content
stringlengths
5
1.05M
function event_spawn(e) eq.set_next_hp_event(90); end function event_combat(e) if (e.joined == true) then eq.stop_timer("depop"); else eq.start_timer("depop", 1800000) -- 30 mins end end function event_hp(e) if (e.hp_event == 90) then e.self:TempName("Zordak Ragefire"); e.self:Say("Now you will see the name that will burn Norrath!") e.self:CastSpell(2046, e.self:GetID()); -- Deathly Chants eq.set_timer("deathlychants", 18000); eq.set_next_hp_event(85); elseif (e.hp_event == 85) then e.self:Say("You fight well, but behold my true form and my true power!"); e.self:SendIllusionPacket({race=19,gender=2,texture=0,helmtexture=0,size=20}); eq.set_timer("lavabreath_start", 40000); eq.set_next_hp_event(60); elseif (e.hp_event == 60) then e.self:Say("Do not think it will be so easy this time!"); eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion e.self:CastSpell(5554, e.self:GetID()); -- Cloud of Discord eq.set_timer("cloudofdiscord", 90000); eq.set_next_hp_event(30); elseif (e.hp_event == 30) then e.self:Say("Fools! My power is more than you can ever imagine! Fear me!"); eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion e.self:CastSpell(5163, e.self:GetID()); -- Force Breath eq.set_timer("forcebreath", 20000); e.self:CastSpell(3070, e.self:GetID()); -- Timeless Panic eq.set_timer("timelesspanic", 42000); eq.set_next_hp_event(25); elseif (e.hp_event == 25) then e.self:CastedSpellFinished(4746, e.self); -- Protection of Discord III e.self:CastedSpellFinished(1248, e.self); -- Spiritual Echo e.self:Say("This will not end here! I have power left to destroy you all!"); eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion eq.spawn2(96369, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()); -- NPC: #Zordak`s_Minion end end function event_timer(e) if (e.timer == "lavabreath_start") then e.self:SpellFinished(5762, e.self:GetTarget()); -- Lava Breath eq.stop_timer("lavabreath_start"); eq.set_timer("lavabreath", 45000); elseif (e.timer == "lavabreath") then e.self:SpellFinished(5762, e.self:GetTarget()); -- Lava Breath elseif (e.timer == "deathlychants") then e.self:CastSpell(2046, e.self:GetID()); -- Deathly Chants elseif (e.timer == "cloudofdiscord") then e.self:CastSpell(5554, e.self:GetID()); -- Cloud of Discord elseif (e.timer == "forcebreath") then e.self:CastSpell(5163, e.self:GetID()); -- Force Breath elseif (e.timer == "timelesspanic") then e.self:CastSpell(3070, e.self:GetID()); -- Timeless Panic elseif (e.timer == "depop") then eq.depop_all(96369); eq.depop(); end end
------------------------------------------------------------------------------- -- Dominos Config Localization -- English (Default) ------------------------------------------------------------------------------- local L = LibStub("AceLocale-3.0"):NewLocale("Dominos-Config", "enUS", true) L.ActionBarBehavior = "Action Bar Behavior" L.ActionBarNumber = "Action Bar %d" L.ActionButtonLookAndFeel = "Action Button Look & Feel" L.Advanced = "Advanced" L.BagBarShowBags = "Show Bag Slots" L.BagBarShowKeyRing = "Show Keyring" L.Bar = "Bar %d" L.BarSettings = "%s Settings" L.Buttons = "Buttons" L.ClickThrough = "Enable Click Through" L.Columns = "Columns" L.CommandKey = 'Command Key' L.ConfirmCopyProfile = "Copy contents from %s into the current profile?" L.ConfirmDeleteProfile = "Delete profile %s?" L.ConfirmResetProfile = "Are you sure you want to reset your profile?" L.Copy = "Copy" L.CopyProfile = "Copy Profile..." L.CreateProfile = "Create Profile..." L.Delay = "Delay (sec)" L.Delete = _G.DELETE L.DisableMenuButtons = "Disable Buttons" L.Duration = "Duration (sec)" L.EnterBindingMode = "Bind Keys..." L.EnterConfigMode = "Configure Bars..." L.EnterName = "Enter Name" L.ExtraBarShowBlizzardTexture = "Show Blizzard Texture" L.FadedOpacity = "Faded Opacity" L.FadeIn = "Fade In" L.FadeOut = "Fade Out" L.Fading = "Fading" L.General = "General" L.Layout = "Layout" L.LeftToRight = "Layout Buttons From Left to Right" L.LinkedOpacity = "Docked bars inherit opacity" L.LockActionButtons = "Lock Action Button Positions" L.MetaKey = 'Meta Key' L.Modifiers = "Modifiers" L.None = _G.NONE L.OneBag = "One Bag" L.Opacity = _G.OPACITY L.OutOfCombat = "Out of Combat" L.Padding = "Padding" L.Paging = "Paging" L.PossessBar = "Override Bar" L.PossessBarDesc = "What action bar to display special actions on when possessing an enemy and in certain encounters" L.Profiles = "Profiles" L.ProfilesPanelDesc = "Allows you to manage saved Dominos layouts" L.QuickMoveKey = "Quick Move Key" L.QuickPaging = "Quick Paging" L.RCUFocus = _G.FOCUS L.RCUPlayer = "Self" L.RCUToT = "Target of Target" L.ResetProfile = "Reset Profile..." L.RightClickUnit = "Right Click Target" L.Save = _G.SAVE L.Scale = "Scale" L.SelfcastKey = "Selfcast Key" L.Set = "Set" L.ShowBindingText = "Show Binding Text" L.ShowCountText = "Show Count Text" L.ShowEmptyButtons = "Show Empty Buttons" L.ShowEquippedItemBorders = "Show Equipped Item Borders" L.ShowInOverrideUI = "Show With Override UI" L.ShowInPetBattleUI = "Show With Pet Battle UI" L.ShowKeyring = "Show Keyring" L.ShowMacroText = "Show Macro Text" L.ShowMinimapButton = "Show Minimap Button" L.ShowOverrideUI = "Use Blizzard Override Action Bar" L.ShowOverrideUIDesc = "Display the Blizzard override UI when piloting a vehicle, and other situations" L.ShowStates = "Show States" L.ShowTooltips = "Show Tooltips" L.ShowTooltipsCombat = "Show Tooltips in Combat" L.Size = "Size" L.Spacing = "Spacing" L.State_HARM = "Harm" L.State_HELP = "Help" L.State_NOTARGET = "No Target" L.State_SHIELD = "Shield Equipped" L.StickyBars = "Sticky Bars" L.Targeting = "Targeting" L.ThemeActionButtons = "Theme Action Buttons (Requires Reload)" L.ThemeActionButtonsDesc = "Applies some custom style adjustments to action buttons when enabled, and leave them untouched when not" L.TopToBottom = "Layout Buttons From Top to Bottom" L.Visibility = "Visibility" -- derived translations L.State_ALTSHIFT = strjoin("-", ALT_KEY_TEXT, SHIFT_KEY_TEXT) L.State_CTRLALT = strjoin("-", CTRL_KEY_TEXT, ALT_KEY_TEXT) L.State_CTRLALTSHIFT = strjoin("-", CTRL_KEY_TEXT, ALT_KEY_TEXT, SHIFT_KEY_TEXT) L.State_CTRLSHIFT = strjoin("-", CTRL_KEY_TEXT, SHIFT_KEY_TEXT) if IsMacClient() then L.State_META = 'CMD Key' else L.State_META = 'Meta Key' end
-- TODO: -- - Write a description. -- we might want to merge this with char.lua... if(select(4, GetAddOnInfo("Fizzle"))) then return end local _E local slots = { "Head", "Neck", "Shoulder", "Shirt", "Chest", "Waist", "Legs", "Feet", "Wrist", "Hands", "Finger0", "Finger1", "Trinket0", "Trinket1", "Back", "MainHand", "SecondaryHand", [19] = "Tabard", } local _MISSING = {} local pollFrame = CreateFrame'Frame' pollFrame:Hide() local time = 3 pollFrame:SetScript('OnUpdate', function(self, elapsed) time = time + elapsed if(time >= 3) then local unit = InspectFrame.unit if(not unit) then self:Hide() table.wipe(_MISSING) end for i, slotName in next, _MISSING do local itemLink = GetInventoryItemLink(unit, i) if(itemLink) then oGlow:CallFilters('inspect', _G['Inspect' .. slotName .. 'Slot'], _E and itemLink) _MISSING[i] = nil end end if(not next(_MISSING)) then self:Hide() end end end) local update = function(self) if(not InspectFrame or not InspectFrame:IsShown()) then return end local unit = InspectFrame.unit for i, slotName in next, slots do local itemLink = GetInventoryItemLink(unit, i) local itemTexture = GetInventoryItemTexture(unit, i) if(itemTexture and not itemLink) then _MISSING[i] = slotName pollFrame:Show() end oGlow:CallFilters('inspect', _G["Inspect"..slotName.."Slot"], _E and itemLink) end end local UNIT_INVENTORY_CHANGED = function(self, event, unit) if(InspectFrame.unit == unit) then update(self) end end local function ADDON_LOADED(self, event, addon) if(addon == "Blizzard_InspectUI") then self:RegisterEvent("PLAYER_TARGET_CHANGED", update) self:RegisterEvent('UNIT_INVENTORY_CHANGED', UNIT_INVENTORY_CHANGED) -- We should check the first argument of this event later on. -- Blizzard's code isn't actually updated yet, so it doesn't -- check if the GUID is correct, nor if the inspect is ready. self:RegisterEvent('INSPECT_READY', update) self:UnregisterEvent("ADDON_LOADED", ADDON_LOADED) end end local enable = function(self) _E = true if(IsAddOnLoaded("Blizzard_InspectUI")) then self:RegisterEvent('PLAYER_TARGET_CHANGED', update) self:RegisterEvent('UNIT_INVENTORY_CHANGED', UNIT_INVENTORY_CHANGED) self:RegisterEvent('INSPECT_READY', update) else self:RegisterEvent("ADDON_LOADED", ADDON_LOADED) end end local disable = function(self) _E = nil self:UnregisterEvent('ADDON_LOADED', ADDON_LOADED) self:UnregisterEvent('PLAYER_TARGET_CHANGED', update) self:UnregisterEvent('UNIT_INVENTORY_CHANGED', UNIT_INVENTORY_CHANGED) self:UnregisterEvent('INSPECT_READY', update) end oGlow:RegisterPipe('inspect', enable, disable, update, 'Inspect frame', nil)
--=============================================================================-- -- Addon: CAF -- Author: SnakeSVx -- Version: 0.1 -- -- --=============================================================================-- local table = table local setmetatable = setmetatable local type = type local tostring = tostring local ErrorNoHalt = ErrorNoHalt local IsValid = IsValid local pairs = pairs module( "CustomArmor" ) local list = {} list.__index = list function list:Create() self.armor = 0; self.muls = {} end --[[ Add multiplier for a certain armor type @param type @param amount ]] function list:setArmorMultiplier(damtype, amount) self.muls[damtype] = amount self.canreceivedamage = true; end --[[ Return the multiplier done for the certain Armortype ]] function list:GetArmormultiplier(damtype) return self.muls[damtype] or 0 end function list:SetArmor(amount) self.armor = amount end function list:GetArmor() return self.armor or 0 end --------------------------------------------------------- --[[ Create, ]] function Create() tmp = {} setmetatable( tmp, list ) tmp:Create() return tmp end
if not modules then modules = { } end modules ['font-mps'] = { version = 1.001, comment = "companion to font-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } local concat = table.concat local formatters = string.formatters -- QP0 [QP1] QP2 => CP0 [CP1 CP2] CP3 -- CP0 = QP0 -- CP3 = QP2 -- -- CP1 = QP0 + 2/3 *(QP1-QP0) -- CP2 = QP2 + 2/3 *(QP1-QP2) fonts = fonts or { } local metapost = fonts.metapost or { } fonts.metapost = metapost local trace_skips = false trackers.register("metapost.outlines.skips",function(v) trace_skips = v end) local f_moveto = formatters["(%F,%F)"] local f_lineto = formatters["--(%F,%F)"] local f_curveto = formatters["..controls(%F,%F)and(%F,%F)..(%F,%F)"] local s_cycle = "--cycle" local f_nofill = formatters["nofill %s;"] local f_dofill = formatters["fill %s;"] local f_draw_trace = formatters["drawpathonly %s;"] local f_draw = formatters["draw %s;"] local f_boundingbox = formatters["((%F,%F)--(%F,%F)--(%F,%F)--(%F,%F)--cycle)"] local f_vertical = formatters["((%F,%F)--(%F,%F))"] function metapost.boundingbox(d,factor) local bounds = d.boundingbox local factor = factor or 1 local llx = factor*bounds[1] local lly = factor*bounds[2] local urx = factor*bounds[3] local ury = factor*bounds[4] return f_boundingbox(llx,lly,urx,lly,urx,ury,llx,ury) end function metapost.widthline(d,factor) local bounds = d.boundingbox local factor = factor or 1 local lly = factor*bounds[2] local ury = factor*bounds[4] local width = factor*d.width return f_vertical(width,lly,width,ury) end function metapost.zeroline(d,factor) local bounds = d.boundingbox local factor = factor or 1 local lly = factor*bounds[2] local ury = factor*bounds[4] return f_vertical(0,lly,0,ury) end function metapost.paths(d,xfactor,yfactor) local sequence = d.sequence local segments = d.segments local list = { } local path = { } -- recycled local size = 0 local xfactor = xfactor or 1 local yfactor = yfactor or xfactor if sequence then local i = 1 local n = #sequence while i < n do local operator = sequence[i] if operator == "m" then -- "moveto" if size > 0 then size = size + 1 path[size] = s_cycle list[#list+1] = concat(path,"",1,size) size = 1 else size = size + 1 end path[size] = f_moveto(xfactor*sequence[i+1],yfactor*sequence[i+2]) i = i + 3 elseif operator == "l" then -- "lineto" size = size + 1 path[size] = f_lineto(xfactor*sequence[i+1],yfactor*sequence[i+2]) i = i + 3 elseif operator == "c" then -- "curveto" size = size + 1 path[size] = f_curveto(xfactor*sequence[i+1],yfactor*sequence[i+2],xfactor*sequence[i+3],yfactor*sequence[i+4],xfactor*sequence[i+5],yfactor*sequence[i+6]) i = i + 7 elseif operator =="q" then -- "quadraticto" size = size + 1 -- first is always a moveto local l_x, l_y = xfactor*sequence[i-2], yfactor*sequence[i-1] local m_x, m_y = xfactor*sequence[i+1], yfactor*sequence[i+2] local r_x, r_y = xfactor*sequence[i+3], yfactor*sequence[i+4] path[size] = f_curveto ( l_x + 2/3 * (m_x-l_x), l_y + 2/3 * (m_y-l_y), r_x + 2/3 * (m_x-r_x), r_y + 2/3 * (m_y-r_y), r_x, r_y ) i = i + 5 else -- weird i = i + 1 end end elseif segments then for i=1,#segments do local segment = segments[i] local operator = segment[#segment] if operator == "m" then -- "moveto" if size > 0 then size = size + 1 path[size] = s_cycle list[#list+1] = concat(path,"",1,size) size = 1 else size = size + 1 end path[size] = f_moveto(xfactor*segment[1],yfactor*segment[2]) elseif operator == "l" then -- "lineto" size = size + 1 path[size] = f_lineto(xfactor*segment[1],yfactor*segment[2]) elseif operator == "c" then -- "curveto" size = size + 1 path[size] = f_curveto(xfactor*segment[1],yfactor*segment[2],xfactor*segment[3],yfactor*segment[4],xfactor*segment[5],yfactor*segment[6]) elseif operator =="q" then -- "quadraticto" size = size + 1 -- first is always a moveto local prev = segments[i-1] local l_x, l_y = xfactor*prev[#prev-2], yfactor*prev[#prev-1] local m_x, m_y = xfactor*segment[1], yfactor*segment[2] local r_x, r_y = xfactor*segment[3], yfactor*segment[4] path[size] = f_curveto ( l_x + 2/3 * (m_x-l_x), l_y + 2/3 * (m_y-l_y), r_x + 2/3 * (m_x-r_x), r_y + 2/3 * (m_y-r_y), r_x, r_y ) else -- weird end end else return end if size > 0 then size = size + 1 path[size] = s_cycle list[#list+1] = concat(path,"",1,size) end return list end function metapost.fill(paths) local r = { } local n = #paths for i=1,n do if i < n then r[i] = f_nofill(paths[i]) else r[i] = f_dofill(paths[i]) end end return concat(r) end function metapost.draw(paths,trace) local r = { } local n = #paths for i=1,n do if trace then r[i] = f_draw_trace(paths[i]) else r[i] = f_draw(paths[i]) end end return concat(r) end function metapost.maxbounds(data,index,factor) local maxbounds = data.maxbounds local factor = factor or 1 local glyphs = data.glyphs local glyph = glyphs[index] local boundingbox = glyph.boundingbox local xmin, ymin, xmax, ymax if not maxbounds then xmin, ymin, xmax, ymax = 0, 0, 0, 0 for i=1,#glyphs do local d = glyphs[i] if d then local b = d.boundingbox if b then if b[1] < xmin then xmin = b[1] end if b[2] < ymin then ymin = b[2] end if b[3] > xmax then xmax = b[3] end if b[4] > ymax then ymax = b[4] end end end end maxbounds = { xmin, ymin, xmax, ymax } data.maxbounds = maxbounds else xmin = maxbounds[1] ymin = maxbounds[2] xmax = maxbounds[3] ymax = maxbounds[4] end local llx = boundingbox[1] local lly = boundingbox[2] local urx = boundingbox[3] local ury = boundingbox[4] local width = glyph.width if llx > 0 then llx = 0 end if width > urx then urx = width end return f_boundingbox( factor*llx,factor*ymin, factor*urx,factor*ymin, factor*urx,factor*ymax, factor*llx,factor*ymax ) end ----- formatters = string.formatters ----- concat = table.concat local nodecodes = nodes.nodecodes -- no nuts yet local glyph_code = nodecodes.glyph local disc_code = nodecodes.disc local kern_code = nodecodes.kern local glue_code = nodecodes.glue local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist local rule_code = nodecodes.rule local find_tail = nodes.tail ----- metapost = fonts.glyphs.metapost local characters = fonts.hashes.characters local parameters = fonts.hashes.parameters local shapes = fonts.hashes.shapes local topaths = metapost.paths local f_code = formatters["mfun_do_outline_text_flush(%q,%i,%F,%F)(%,t);"] local s_nothing = "(origin scaled 10)" local f_trace_rule = formatters["draw rule(%F,%F,%F) shifted (%F,%F) withcolor .5white;"] local f_strut = formatters["strut(%F,%F);"] local f_hrule = formatters["draw rule(%F,%F,%F);"] local f_vrule = formatters["draw rule(%F,%F,%F) shifted (%F,%F);"] local f_bounds = formatters["checkbounds(%F,%F,%F,%F);"] local sc = 10 local fc = number.dimenfactors.bp * sc / 10 -- todo: make the next more efficient: function metapost.output(kind,font,char,advance,shift,ex) local character = characters[font][char] if character then local index = character.index if index then local shapedata = shapes[font] local glyphs = shapedata.glyphs -- todo: subfonts fonts.shapes.indexed(font,sub) if glyphs then local glyf = glyphs[index] if glyf then local units = shapedata.units or 1000 local yfactor = sc/units yfactor = yfactor * parameters[font].factor / 655.36 local xfactor = yfactor local shift = shift or 0 local advance = advance or 0 local exfactor = ex or 0 local wfactor = 1 if exfactor ~= 0 then wfactor = (1+(ex/units)/1000) xfactor = xfactor * wfactor end local paths = topaths(glyf,xfactor,yfactor) local code = f_code(kind,#paths,advance,shift,paths) return code, character.width * fc * wfactor end end end end return s_nothing, 10 * sc/1000 end -- not ok yet: leftoffset in framed not handled well local signal = -0x3FFFFFFF - 1 function fonts.metapost.boxtomp(n,kind) local result = { } local advance = 0 -- in bp local distance = 0 local llx, lly, urx, ury = 0, 0, 0, 0 local boxtomp local function horizontal(current,shift,glue_sign,glue_set,glue_order,ht,dp) shift = shift or 0 while current do local id = current.id if id == glyph_code then local code, width = metapost.output(kind,current.font,current.char,advance,-shift*fc,current.expansion_factor) result[#result+1] = code advance = advance + width elseif id == disc_code then local replace = current.replace if replace then horizontal(replace,shift,glue_sign,glue_set,glue_order,ht,dp) end elseif id == kern_code then local kern = current.kern * fc if trace_skips then result[#result+1] = f_trace_rule(kern,0.8*ht*fc,0.8*dp*fc,advance,-shift*fc) end advance = advance + kern elseif id == glue_code then local width = current.width if glue_sign == 1 then if current.stretch_order == glue_order then width = (width + current.stretch * glue_set) * fc else width = width * fc end elseif glue_sign == 2 then if current.shrink_order == glue_order then width = (width - current.shrink * glue_set) * fc else width = width * fc end else width = width * fc end if trace_skips then result[#result+1] = f_trace_rule(width,0.1*ht*fc,0.1*dp*fc,advance,-shift*fc) end advance = advance + width elseif id == hlist_code then local a = advance boxtomp(current,shift+current.shift,current.glue_sign,current.glue_set,current.glue_order) advance = a + current.width * fc elseif id == vlist_code then boxtomp(current) -- ,distance + shift,current.glue_set*current.glue_sign) advance = advance + current.width * fc elseif id == rule_code then local wd = current.width local ht = current.height local dp = current.depth if not (ht == signal or dp == signal or wd == signal) then ht = ht - shift dp = dp - shift if wd == 0 then result[#result+1] = f_strut(ht*fc,-dp*fc) else result[#result+1] = f_hrule(wd*fc,ht*fc,-dp*fc) end end if wd ~= signal then advance = advance + wd * fc end end current = current.next end end local function vertical(current,shift) shift = shift or 0 current = find_tail(current) -- otherwise bad bbox while current do local id = current.id if id == hlist_code then distance = distance - current.depth boxtomp(current,distance + shift,current.glue_set*current.glue_sign) distance = distance - current.height elseif id == vlist_code then print("vertical >>>") vertical(current.list,0) elseif id == kern_code then distance = distance - current.kern advance = 0 elseif id == glue_code then distance = distance - current.width advance = 0 elseif id == rule_code then local wd = current.width local ht = current.height local dp = current.depth if not (ht == signal or dp == signal or wd == signal) then distance = distance - dp if wd == 0 then result[#result+1] = f_strut(ht*fc,-dp*fc) else result[#result+1] = f_vrule(wd*fc,ht*fc,-dp*fc,0,distance+shift) end distance = distance - ht end end current = current.prev end end boxtomp = function(list,shift) local current = list.list if current then if list.id == hlist_code then horizontal(current,shift,list.glue_sign,list.glue_set,list.glue_order,list.height,list.depth) else vertical(current,shift) end end end local box = tex.box[n] boxtomp(box,box.shift,box.glue_sign,box.glue_set,box.glue_order) local wd = box.width local ht = box.height local dp = box.depth local sh = box.shift result[#result+1] = f_bounds(0,-dp*fc,wd*fc,ht*fc) return concat(result) end
function love.conf(t) -- Love settings t.title = "HumanTECH" t.version = "0.8.0" t.author = "joshbothun@gmail.com" t.identity = nil t.console = false t.screen.width = 1000 t.screen.height = 720 t.screen.fullscreen = false t.screen.vsync = false t.screen.fsaa = 0 -- modules t.modules.joystick = true t.modules.audio = true t.modules.keyboard = true t.modules.event = true t.modules.image = true t.modules.graphics = true t.modules.timer = true t.modules.mouse = true t.modules.sound = true t.modules.physics = false end -- Global game config config = { debug = false, start_area = 'start', music = true, title = true, show_console = false, collision = false, blind = true, iso = true, scale = 3, max_stat = 35, starting_stat = 10, }
/* Copyright (c) 2021 TidalDevs 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. */ include("player_class/player_splitbullet.lua") GM.Name = "Split Bullet: Core" GM.Author = "TidalDevs" GM.Website = "https://www.tidalverse.dev/" GM.IsSplitBullet = true GM.SplitBulletSuffix = ": Core" DeriveGamemode("base") // Don't allow moving out of bounds. // TODO: Allow maps to set the player's axis via logic_splitbullet. function GM:SetupMove(ply, mv, cmd) local pos = mv:GetOrigin() local axis = ply:GetNWString("PlayerAxis", 0) // This value might be unused. mv:SetOrigin(Vector(pos.x, axis, pos.z)) // So instead we're just setting it to 0, which is also fine. end
--- 服务器代码入口 --- @script Server Main Function --- @copyright Lilith Games, Avatar Team --- @author Yuancheng Zhang Server:Run()
local music = nil; local ambientMusic = ""; local isAmbient = false; local doors = {}; local bridges = {}; local plugs = {}; bridge0 = scene:getObjects("bridge0")[1]; bridge1 = scene:getObjects("bridge1")[1]; bridge2 = scene:getObjects("bridge2")[1]; function startMusic(name, crossfade) local newMusic = audio:createStream(name); newMusic.loop = true; newMusic.isMusic = true; if crossfade then audio:crossfade(music, newMusic, 0.5, 0.5, 0.3); else if music ~= nil then music:stop(); end newMusic:play(); end music = newMusic; isAmbient = false; end function stopMusic(crossfade) if music ~= nil then if crossfade then audio:crossfade(music, nil, 0.5, 0.5, 0.3); else music:stop(); end end music = nil; end function setAmbientMusic(name) if ambientMusic ~= name then ambientMusic = name; isAmbient = false; end end function startAmbientMusic(crossfade) if not isAmbient then startMusic(ambientMusic, crossfade); isAmbient = true; end end function makeWater(obj, name) local rc = scene:getObjects(obj)[1]:findRenderTerrainComponents(name)[1]; local ac = AnimationComponent(rc.drawable); ac:addAnimation(const.AnimationDefault, "water1", 1); ac:startAnimation(const.AnimationDefault); scene:getObjects(obj)[1]:addComponent(ac); end function makeBridge(bridge, len) bridge.myStartPos = bridge.pos; bridge.myEndPos = bridge.pos + bridge:getDirection(len); bridge.myLenSq = len * len; local conveyor = scene:getObjects(bridge.name.."_conveyor")[1]; conveyor.deadbodyAware = true; conveyor:addComponent(CollisionSensorComponent()); conveyor.objs = {}; setSensorListener(bridge.name.."_conveyor", function(other) if conveyor.objs[other.cookie] == nil then other.activeDeadbody = true; conveyor.objs[other.cookie] = { count = 1, obj = other }; else conveyor.objs[other.cookie].count = conveyor.objs[other.cookie].count + 1; end end, function (other, args) if conveyor.objs[other.cookie] == nil then return; end conveyor.objs[other.cookie].count = conveyor.objs[other.cookie].count - 1; if conveyor.objs[other.cookie].count == 0 then conveyor.objs[other.cookie] = nil; other.activeDeadbody = false; end end); bridge.conveyor = conveyor; bridge.blocker = scene:getObjects(bridge.name.."_blocker")[1]; end function bridgeOpen(bridge, velocity, quiet, fn, ...) if bridges[bridge.name] ~= nil then if not quiet then bridges[bridge.name].s:stop(); end cancelTimeout(bridges[bridge.name].timer); end local s = nil; if not quiet then s = audio:createSound("cart_move.ogg"); s.loop = true; s:play(); end bridge.linearVelocity = bridge:getDirection(velocity); bridges[bridge.name] = {}; bridges[bridge.name].s = s; bridges[bridge.name].timer = addTimeout0(function(cookie, dt, args) local dir = bridge.conveyor:getDirection(velocity * dt); for _, v in pairs(bridge.conveyor.objs) do v.obj:changePosSmoothed(dir.x, dir.y); end if (bridge.pos - bridge.myStartPos):lenSq() < bridge.myLenSq then return; end bridges[bridge.name] = nil; if not quiet then s:stop(); audio:playSound("cart_stop.ogg"); end cancelTimeout(cookie); bridge.linearVelocity = vec2(0, 0); bridge.active = false; bridge.blocker.active = false; if fn ~= nil then fn(unpack2(args)); end end, pack2(...)); end function bridgeClose(bridge, velocity, quiet, fn, ...) if bridges[bridge.name] ~= nil then if not quiet then bridges[bridge.name].s:stop(); end cancelTimeout(bridges[bridge.name].timer); end local s = nil; if not quiet then s = audio:createSound("cart_move.ogg"); s.loop = true; s:play(); end bridge.active = true; bridge.blocker.active = true; bridge.linearVelocity = bridge:getDirection(-velocity); bridges[bridge.name] = {}; bridges[bridge.name].s = s; bridges[bridge.name].timer = addTimeout0(function(cookie, dt, args) local dir = bridge.conveyor:getDirection(-velocity * dt); for _, v in pairs(bridge.conveyor.objs) do v.obj:changePosSmoothed(dir.x, dir.y); end if (bridge.pos - bridge.myEndPos):lenSq() < bridge.myLenSq then return; end bridges[bridge.name] = nil; if not quiet then s:stop(); audio:playSound("cart_stop.ogg"); end cancelTimeout(cookie); bridge.linearVelocity = vec2(0, 0); if fn ~= nil then fn(unpack2(args)); end end, pack2(...)); end function openDoor(name, haveSound) local snd = nil; if doors[name] ~= nil then snd = doors[name].snd; cancelTimeout(doors[name].cookie); doors[name] = nil; end local inst = scene:getInstances(name)[1]; local j = findJoint(inst.joints, "door2_part_joint"); if j:getJointTranslation() >= j.upperLimit then if snd ~= nil then snd:stop(); end j.motorSpeed = math.abs(j.motorSpeed); return; end doors[name] = {}; if (snd == nil) and haveSound then doors[name].snd = audio:createSound("servo_move.ogg"); doors[name].snd.loop = true; doors[name].snd:play(); else doors[name].snd = snd; end j.motorSpeed = math.abs(j.motorSpeed); doors[name].cookie = addTimeout0(function(cookie, dt) if (j:getJointTranslation() >= j.upperLimit) then cancelTimeout(cookie); if haveSound then doors[name].snd:stop(); end doors[name] = nil; end end); end function closeDoor(name, haveSound) local snd = nil; if doors[name] ~= nil then snd = doors[name].snd; cancelTimeout(doors[name].cookie); doors[name] = nil; end local inst = scene:getInstances(name)[1]; local j = findJoint(inst.joints, "door2_part_joint"); if j:getJointTranslation() <= j.lowerLimit then if snd ~= nil then snd:stop(); end j.motorSpeed = -math.abs(j.motorSpeed); return; end doors[name] = {}; if (snd == nil) and haveSound then doors[name].snd = audio:createSound("servo_move.ogg"); doors[name].snd.loop = true; doors[name].snd:play(); else doors[name].snd = snd; end j.motorSpeed = -math.abs(j.motorSpeed); doors[name].cookie = addTimeout0(function(cookie, dt) if (j:getJointTranslation() <= j.lowerLimit) then cancelTimeout(cookie); if haveSound then doors[name].snd:stop(); end doors[name] = nil; end end); end function doorOpened(name) local inst = scene:getInstances(name)[1]; local j = findJoint(inst.joints, "door2_part_joint"); return j:getJointTranslation() >= j.upperLimit; end function makeDoor(name, opened) if opened then openDoor(name, false); end end function makeDoorTrigger(sensorName, name) setSensorListener(sensorName, function(other, self) if self.num == 0 then openDoor(name, true); end self.num = self.num + 1; end, function (other, self) self.num = self.num - 1; if self.num == 0 then closeDoor(name, true); end end, { num = 0 }); end function setSensorEnterListenerWithAlly(name, func, ...) setSensorListener(name, function(other, self) if other.type == const.SceneObjectTypePlayer then self.timer = addTimeout(0.1, function(cookie) for _, obj in pairs(scene.combatAllies) do if self.allies[obj.cookie] == nil then return; end end cancelTimeout(cookie); self.timer = nil; scene:getObjects(name)[1].active = false; func(unpack2(self.args)); end); else self.allies[other.cookie] = 1; end end, function (other, self) if other.type == const.SceneObjectTypePlayer then if self.timer ~= nil then cancelTimeout(self.timer); self.timer = nil; end else self.allies[other.cookie] = nil; end end, { timer = nil, args = pack2(...), allies = {} }); end function makeWaterPipe(name) local rc = scene:getObjects(name)[1]:findRenderStripeComponents("water")[1]; local ac = AnimationComponent(rc.drawable); ac:addAnimation(const.AnimationDefault, "water2", 1); ac:startAnimation(const.AnimationDefault); scene:getObjects(name)[1]:addComponent(ac); end function makePlug(plug, plugFn, unplugFn, ...) plug.mySocket = nil; plug.myPlugFn = plugFn; plug.myUnplugFn = unplugFn; plug.myArgs = pack2(...); plugs[plug.cookie] = plug; end function makeSocket(socket) socket.myPlug = nil; socket:addComponent(CollisionSensorComponent()); setSensorEnterListener(socket.name, false, function(other) if socket.myPlug ~= nil then return; end if plugs[other.cookie] == nil then return; end other = plugs[other.cookie]; local aw = scene.player:findPlayerComponent().altWeapon; if aw.heldObject == other then aw:cancel(); end other.mySocket = socket; other:setTransform(socket:getTransform()); other:findRenderQuadComponents("nopins")[1].visible = true; other:findRenderQuadComponents("pins")[1].visible = false; socket.myJ = scene:addWeldJoint(other, socket, socket:getWorldPoint(vec2(0, 0)), true); socket.myPlug = other; if other.myPlugFn ~= nil then other.myPlugFn(socket, unpack2(other.myArgs)); end end); end function disableSocket(socket) socket:findLightComponent():getLights("light0")[1].visible = false; setSensorEnterListener(socket.name, false, function(other) end); if socket.myPlug ~= nil then socket.myPlug.gravityGunAware = false; socket.myPlug:findLightComponent():getLights("light0")[1].visible = false; end end addTimeout(0.1, function() local obj = scene.player:findPlayerComponent().altWeapon.heldObject; if (obj == nil) or (plugs[obj.cookie] == nil) then return; end obj = plugs[obj.cookie]; local socket = obj.mySocket; if socket == nil then return; end socket.myJ:remove(); socket.myJ = nil; socket.myPlug = nil; obj.mySocket = nil; obj:findRenderQuadComponents("nopins")[1].visible = false; obj:findRenderQuadComponents("pins")[1].visible = true; if obj.myUnplugFn ~= nil then obj.myUnplugFn(socket, unpack2(obj.myArgs)); end end); function openHatch(name) local inst = scene:getInstances(name)[1]; local j = findJoint(inst.joints, "hatch1_joint"); j.motorSpeed = math.abs(j.motorSpeed); end function closeHatch(name) local inst = scene:getInstances(name)[1]; local j = findJoint(inst.joints, "hatch1_joint"); j.motorSpeed = -math.abs(j.motorSpeed); end function makeKeyDoor(doorName, phName, fn, ...) local doorObj = scene:getObjects(doorName)[1]; local phObj = scene:getObjects(phName)[1]; local phC = phObj:findPlaceholderComponent(); phC.listener = createSensorEnterListener(false, function(other, fn, args) if not scene.player:findPlayerComponent().inventory:have(phC.item) then return; end scene.player:findPlayerComponent().inventory:take(phC.item); phObj:removeFromParent(); doorObj:findRenderQuadComponents("key")[1].visible = true; audio:playSound("key.ogg"); fn(unpack2(args)); end, fn, pack2(...)); end -- main if settings.developer == 0 then scene.player:findPlayerComponent():changeLifeNoDamage(-80.0 * (scene.player.maxLife / 200.0)); end scene.player:findPlayerComponent():giveWeapon(const.WeaponTypeGG); scene.player:findPlayerComponent():giveWeapon(const.WeaponTypeMachineGun); scene.player:findPlayerComponent():giveWeapon(const.WeaponTypeBlaster); scene.player:findPlayerComponent():giveWeapon(const.WeaponTypeRLauncher); scene.player:findPlayerComponent():giveWeapon(const.WeaponTypeProxMine); scene.player:findPlayerComponent():changeAmmo(const.WeaponTypeMachineGun, 50.0); scene.player:findPlayerComponent():changeAmmo(const.WeaponTypeRLauncher, 3.0); scene.player:findPlayerComponent():changeAmmo(const.WeaponTypeProxMine, 3.0); scene.camera:findCameraComponent():zoomTo(35, const.EaseLinear, 0); scene.lighting.ambientLight = {0.2, 0.2, 0.2, 1.0}; math.randomseed(os.time()); setAmbientMusic("ambient9.ogg"); startAmbientMusic(false); makeBridge(bridge0, 65.0); makeBridge(bridge1, 63.0); makeBridge(bridge2, 64.0); require("e1m6_part0"); require("e1m6_part1"); require("e1m6_part2"); require("e1m6_part3"); require("e1m6_part4"); require("e1m6_part5"); require("e1m6_part6"); require("e1m6_part7"); require("e1m6_part8"); if settings.developer >= 1 then scene.respawnPoint = scene:getObjects("player_"..settings.developer)[1]:getTransform(); scene.player:setTransform(scene.respawnPoint); end if settings.developer >= 2 and settings.developer <= 3 then part0Done(true); scene.player:findPlayerComponent():changeAmmo(const.WeaponTypeMachineGun, 450.0); end if settings.developer == 3 then scene:getObjects("sentry1")[1]:setPosRecursive(scene:getObjects("sentry1_1")[1].pos); end if settings.developer >= 4 then scene:getObjects("bridge1_cp")[1].active = false; scene:getObjects("core1_cp")[1].active = false; scene.player:findPlayerComponent():changeAmmo(const.WeaponTypeMachineGun, 200.0); end if settings.developer >= 5 then scene:getObjects("fire1_cp")[1].active = false; end if settings.developer == 6 then startMusic("action10.ogg", false); end if settings.developer >= 7 then scene.player:findPlayerComponent():giveWeapon(const.WeaponTypePlasmaGun); scene.player:findPlayerComponent():changeAmmo(const.WeaponTypePlasmaGun, 250.0); openDoor("door8", false); openDoor("door4", false); scene:getObjects("core2_cp")[1].active = true; scene:getObjects("east3_cp")[1].active = true; end if settings.developer >= 9 then scene:getObjects("bridge2_cp")[1].active = false; scene:getObjects("core2_cp")[1].active = false; scene:getObjects("east3_cp")[1].active = false; end if settings.developer == 10 then scene:getObjects("keeper1_cp")[1].active = true; end if settings.developer == 11 then scene.player:findPlayerComponent().inventory:give(const.InventoryItemRedKey); end if settings.developer >= 12 then openDoor("door15", false); end if settings.developer == 15 then local shields = scene:getInstances("shield1"); for _, inst in pairs(shields) do findJoint(inst.joints, "shield1_joint").motorSpeed = -findJoint(inst.joints, "shield1_joint").motorSpeed; end scene:getObjects("boss2_cp")[1].active = true; end if settings.developer == 16 then scene:getObjects("toxic1_cp")[1].active = true; end
local AddonName, AddonTable = ... AddonTable.tailoring = { -- Cloth Armour 154685, 154686, 154687, 154689, 154690, 154691, 154692, 154697, 161978, 161979, 161981, 161982, 161983, 161984, 161987, -- Bandages 158381, -- Misc 159791, }
-- Application/command launcher. Example config: -- -- config.launcher = { -- mash = {"cmd", "ctrl"}, -- bindings = { -- { key = "B", application = "Google Chrome" } -- { key = "X", commmand = "/usr/bin/rsync ..." } -- } -- } local notify = require 'hs.notify' local application = require 'hs.application' local hotkey = require 'hs.hotkey' local function init_module() if config.launcher == nil then notify.show("Applications has no available configs", "", "Set some configs set in config.launcher or unload this module", "") return end for _, app in ipairs(config.launcher.bindings) do if app.key == nil then error("Application is missing a key value.") end if app.application ~= nil then hotkey.bind(config.launcher.mash or { "cmd", "ctrl", "alt" }, app.key, function() local target = hs.application.find(app.application) if target == nil and app.hide ~= nil then target = hs.application.find(app.hide) end print(app.application) print(target) if target ~= nil and target:isFrontmost() then target:hide() else application.launchOrFocus(app.application) end end) end if app.command ~= nil then hotkey.bind(config.launcher.mash or { "cmd", "ctrl", "alt" }, app.key, function() os.execute(app.command) end) end end end return { init = init_module }
function onCreate() -- skyline makeLuaSprite('skyline', 'hankBG/Skyline', -250, -450); -- city makeLuaSprite('city', 'hankBG/City', -300, -380); -- railroad makeLuaSprite('railroad', 'hankBG/Railroad', -300, -380); --ground makeLuaSprite('ground', 'hankBG/Ground', -400, -450); addLuaSprite('skyline'); addLuaSprite('city'); addLuaSprite('railroad'); addLuaSprite('ground'); end
local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Plasma = require(ReplicatedStorage.Plasma) return function(target) local root = Plasma.new(target) local connection = RunService.Heartbeat:Connect(function() Plasma.start(root, function() Plasma.portal(workspace, function() Plasma.arrow(Vector3.new(0, 0, 0)) Plasma.arrow(Vector3.new(5, 5, 5), Vector3.new(10, 10, 10)) end) end) end) return function() connection:Disconnect() Plasma.start(root, function() end) end end
sets = {} sets.pre_action = {} sets.pre_action.FC = { } sets.idle = { } filter_action = function(act) end pre_action = function(act) end mid_action = function(act) end post_action = function(act) end
vim.wo.fcs = "eob: " vim.cmd("autocmd BufUnload <buffer> call timer_start(1, { tid -> execute('lua SetRoot(\"git_worktree\")')})")
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) function onGetFormulaValues(player, level, maglevel) return -3, -5 end combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local rune = Spell("rune") function rune.onCastSpell(creature, var, isHotkey) return combat:execute(creature, var) end rune:group("attack") rune:id(7) rune:name("lightest magic missile rune") rune:runeId(17512) rune:allowFarUse(true) rune:charges(10) rune:level(1) rune:magicLevel(0) rune:cooldown(2 * 1000) rune:groupCooldown(2 * 1000) rune:needTarget(true) rune:isBlocking(true) -- True = Solid / False = Creature rune:vocation("sorcerer;true", "master sorcerer;true", "druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "knight;true", "elite knight;true") rune:register()
local Zlog = require "Zlibs.class.Log" local Point = require "Zlibs.class.Point" local Size = require "Zlibs.class.Size" local math = require "Zlibs.class.math" local type = require "Zlibs.tool.type" -- local Rect = require "Zlibs.class.Rect" local obj = {} local funcValues = {} -- 魔术变量接口_插件用 obj._magicValues = funcValues -- 默认变量 obj.__tag = "Circle" obj.x = -1 obj.y = -1 obj.r = 0 -- 默认变量结束 -- ///////////////////////////////////////// -- ///////////////////////////////////////// -- 元表设置 function obj:__newindex(k, v) rawset(self, k, v) Zlog.warn( "不建议的操作:设置了[%s]对象中[%s]元素的值为[%s]", self._tag, tostring(k), tostring(v)) end function obj:__index(k) if type(funcValues[k]) == "function" then return funcValues[k](self) end return obj[k] end function obj:__tostring() return string.format("%s(%s ,%d)", obj.__tag, tostring(Point(self.x, self.y)), self.r) end function obj:__add(r) return obj:__call(self.x, self.y, self.r + r) end function obj:__sub(r) return obj:__call(self.x, self.y, self.r - r) end function obj:__mul(n) return obj:__call(self.x, self.y, self.r * n) end function obj:__div(n) return obj:__call(self.x, self.y, self.r / n) end -- 相等 function obj:__eq(s) return self.r == s.r and self.x == s.x and self.y == s.y end function obj:__call(...) local o = {} local t = {...} local x, y, r if #t == 0 then x, y, r = 0, 0, 0 elseif #t == 1 and type(t[1]) == "Circle" then x, y, r = t[1].x, t[1].y, t[1].r elseif #t == 2 and type(t[1]) == "Point" and type(t[2]) == "number" then x, y, r = t[1].x, t[1].y, t[2] elseif #t == 2 and type(t[1]) == "Point" and type(t[2]) == "Point" then x, y, r = t[1].x, t[1].y, t[1] * t[2] elseif #t == 3 then x, y, r = ... else Zlog.fatal("[%s]创建时参数传入错误", self.__tag) end o.x, o.y, o.r = math.round(x), math.round(y), math.max(0, r) return setmetatable(o, obj) end -- 元表设置结束 -- ///////////////////////////////////////// -- ///////////////////////////////////////// -- 自动变量 function funcValues.randomPoint(self) local a = math.random(1, 36000) / 100 local d = math.random(0, self.r * 100) / 100 return self.center - {a, d} end --- obj.center 获取圆心,返回Point类 -- @param self self function funcValues.center(self) return Point(self.x, self.y) end --- obj.outRect 获取外切正方形 -- @param self self function funcValues.outRect(self) local Rect = require "Zlibs.class.Rect" return Rect(self.center, Size(self.r * 2)) end --- obj.inRect 获取内切正方形 -- @param self self function funcValues.inRect(self) local Rect = require "Zlibs.class.Rect" return Rect(self.center, Size(self.r * 1.14121)) end -- 自动变量结束 -- ///////////////////////////////////////// -- ///////////////////////////////////////// -- 内部函数 -- 内部函数结束 -- ///////////////////////////////////////// -- ///////////////////////////////////////// -- 成员函数 --- obj.contains 是否包含某个点/范围/圆,需要完全包括才算,接受重合 -- @param self self -- @param p Point/Rect/Circle function obj.contains(self, p) if type(p) == "Point" then return p * self.center <= self.r elseif type(p) == "Rect" then local l = self.r * self.r local sc = self.center return l >= math.abs((sc.x - p.x) * (sc.y - p.y)) and l >= math.abs((sc.x - p.x) * (p.y + p.height - sc.y)) and l >= math.abs((p.x + p.width - sc.x) * (sc.y - p.y)) and l >= math.abs((p.x + p.width - sc.x) * (p.y + p.height - sc.y)) elseif type(p) == "Circle" then return self.r >= (self.center * p.center + p.r) end end -- 成员函数结束 -- ///////////////////////////////////////// -- ///////////////////////////////////////// -- 类初始化 -- rawset(_G,obj.__tag,setmetatable({},obj)) obj.ZERO = obj:__call(0, 0, 0) return setmetatable({}, obj) -- 类初始化结束 -- ///////////////////////////////////////// -- /////////////////////////////////////////
/*--------------------------------------------------------------------------- F4 menu tab modification module. ---------------------------------------------------------------------------*/ if true then return end -- REMOVE THIS LINE TO ENABLE THIS MODULE local url = "http://wiki.darkrp.com/index.php/Main_Page" local tabName = "MOTD" local function createF4MenuTab() // DarkRP.switchTabOrder(2, 3) -- Remove the "//" in this line if you want to move the third tab to the left of the second tab! // DarkRP.removeF4MenuTab("Ammo") -- Remove the "//" in this line if you want to remove the Ammo tab! local webPage = vgui.Create("F1HTML") webPage:OpenURL(url) DarkRP.addF4MenuTab(tabName, webPage) end hook.Add("F4MenuTabs", "MyCustomF4MenuTab", createF4MenuTab)
-- -- Created by IntelliJ IDEA. -- User: Kunkka -- Date: 6/30/17 -- Time: 16:14 -- To change this template use File | Settings | File Templates. -- -- instance run on Mac or Android platform local instanceRun = {} -- must init this in main.lua before require any other modules function instanceRun:init(androidPackageName) androidPackageName = androidPackageName or "" local MAC_ROOT = "" local ANDROID_PACKAGE_NAME = androidPackageName local ANDROID_ROOT = "/sdcard/" .. androidPackageName .. "/" local platform = cc.Application:getInstance():getTargetPlatform() -- mac use local search path for restart instantly if platform == 2 then local path = cc.FileUtils:getInstance():fullPathForFilename("src/main.lua") MAC_ROOT = string.sub(path, 1, string.find(path, "runtime/mac") - 1) print(string.format("initInstanceRun on Mac, MAC_ROOT = \"%s\"", MAC_ROOT)) cc.FileUtils:getInstance():setSearchPaths({}) cc.FileUtils:getInstance():addSearchPath(MAC_ROOT .. "src/") cc.FileUtils:getInstance():addSearchPath(MAC_ROOT .. "res/") cc.FileUtils:getInstance():addSearchPath(MAC_ROOT) elseif platform == 3 and androidPackageName ~= "" then print(string.format("Android package name = \"%s\"", ANDROID_PACKAGE_NAME)) print(string.format("initInstanceRun on Android, ANDROID_ROOT = \"%s\"", ANDROID_ROOT)) if not cc.FileUtils:getInstance():isDirectoryExist(ANDROID_PACKAGE_NAME) then cc.FileUtils:getInstance():createDirectory(ANDROID_PACKAGE_NAME) end cc.FileUtils:getInstance():setSearchPaths({}) cc.FileUtils:getInstance():addSearchPath(ANDROID_ROOT .. "src/") cc.FileUtils:getInstance():addSearchPath(ANDROID_ROOT .. "res/") cc.FileUtils:getInstance():addSearchPath(ANDROID_ROOT) cc.FileUtils:getInstance():addSearchPath("src/") cc.FileUtils:getInstance():addSearchPath("res/") end self.MAC_ROOT = MAC_ROOT self.ANDROID_ROOT = ANDROID_ROOT self.ANDROID_PACKAGE_NAME = ANDROID_PACKAGE_NAME end return instanceRun
return function() local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local AssetTypeCursor = require(script.Parent.AssetTypeCursor) local SetAssetTypeCursor = require(Modules.AvatarExperience.AvatarEditor.Actions.SetAssetTypeCursor) it("should be unchanged by other actions", function() local oldState = AssetTypeCursor(nil, {}) local newState = AssetTypeCursor(oldState, { type = "not a real action" }) expect(oldState).to.equal(newState) end) it("should set the next page cursor for an assetType", function() local assets = { 1, 2 } local testCursors = { "page1", "page2", } local newState = AssetTypeCursor(nil, SetAssetTypeCursor(assets[1], testCursors[1])) newState = AssetTypeCursor(newState, SetAssetTypeCursor(assets[2], testCursors[2])) expect(newState[assets[1]]).to.equal(testCursors[1]) expect(newState[assets[2]]).to.equal(testCursors[2]) end) it("should overwrite the next page cursor for an assetType", function() local assets = { 1 } local testCursors = { "page1", "page2", } local newState = AssetTypeCursor(nil, SetAssetTypeCursor(assets[1], testCursors[1])) expect(newState[assets[1]]).to.equal(testCursors[1]) newState = AssetTypeCursor(newState, SetAssetTypeCursor(assets[1], testCursors[2])) expect(newState[assets[1]]).to.equal(testCursors[2]) end) end
describe("Table heap", function() local table_heap = require("data_structures.table_heap") local shuffle = require("random.shuffle") local list = {} for index = 1, 100 do list[index] = index end shuffle(list) local heap = table_heap.new() for index = 1, #list do heap:push(list[index]) end for index = 1, #list do local popped = heap:pop() assert.equal(index, popped) end heap = table_heap.new() for i = 1, 100 do heap:push(i) end heap:replace(42, 0) assert.equal(0, heap:pop()) heap:replace(69, 101) assert.falsy(heap:find_index(69)) assert.truthy(heap:find_index(101)) heap:remove(101) assert.falsy(heap:find_index(101)) heap:push(101) local last = 0 for _ = 1, 98 do local new = heap:pop() assert.truthy(new > last) last = new end assert.equal(101, heap:pop()) end)
import "com" ps = com.CreateObject("Photoshop.Application") ps.open("f:\\pictures\\tosort6\\IMG_0471.jpg")
--[[ CanvasBufferedWidget is a *mostly* drop-in replacement for Widget that differs from Widget in that painting is buffered to a canvas before the screen. This allows, e.g., complex drawing logic to be done less often than once per frame in cases where there isn't always something to update every frame. --]] local Widget = require'UI/Widget' local CanvasBufferedWidget = mix{Widget} -- # Interface function CanvasBufferedWidget:initialize(...) Widget.initialize(self, ...) self.canvas = love.graphics.newCanvas() end function CanvasBufferedWidget:resize(...) local width, height = ... -- Canvas dimensions cannot be changed after they're created, so instead -- discard the old canvas and create a new one of the correct size. self.canvas = love.graphics.newCanvas(width, height) return Widget.resize(self, ...) end function CanvasBufferedWidget:draw(x, y) -- TODO: This refresh call is temporary until widgets are changed to refresh -- themselves at appropriate times. self:refresh() love.graphics.draw(self.canvas, x, y) end function CanvasBufferedWidget:refresh() love.graphics.push'all' love.graphics.setCanvas(self.canvas) love.graphics.clear() self:paint() love.graphics.pop() end -- # return CanvasBufferedWidget
local player = ECS.Component("player") return player
local utils = require 'utils' -- part 1 local function part1(input) local sum = 0 for i = 1, #input do local curr_val, next_val, p curr_val = input:sub(i, i) p = (i == #input) and 1 or i + 1 next_val = input:sub(p, p) if curr_val == next_val then sum = sum + tonumber(curr_val) end end return sum end -- part 2 local function part2(input) local steps = #input / 2 local sum = 0 for i = 1, #input do local curr_val, next_val, p curr_val = input:sub(i, i) p = (#input - i >= steps) and i + steps or steps - (#input - i) next_val = input:sub(p, p) if curr_val == next_val then sum = sum + tonumber(curr_val) end end return sum end local input = utils.read_file('../res/day_01.in') print('Part 1:', part1(input)) print('Part 2:', part2(input))
#!/usr/bin/env lua --[[ # USAGE: Full Build ---------- ./build.lua Partial Build (includes dependancies) ------------------------------------- ./build.lua ART.Paint ART.Widget --]] require "luarocks.require" require "json" -- table.include () -- includes a value in a table if not already present function table:include(included) local present = false for key, value in ipairs(self) do if value == included then present = true break end end if not present then table.insert(self, included) end return self end -- Build () -- builds MooTools local function Build(selected) json_path = "Source/scripts.json" scripts_path = "Source/" output_path = "art.js" -- scripts {} -- the json structure as a table scripts = {} -- all {} -- a list of every script all = {} for folder, files in pairs(json.decode(io.open(json_path):read("*all"))) do scripts[folder] = {} local folder = scripts[folder] for script, props in pairs(files) do folder[script] = props.deps table.insert(all, script) end end -- folder_of () -- returns the folder name from a script function folder_of(name) for folder, files in pairs(scripts) do for file in pairs(files) do if file == name then return folder end end end end -- deps_of () -- returns a table containing the full dependancies of a file function deps_of(name) local list = {} -- if name == "ART" then return list end local deps = scripts[folder_of(name)][name]; for i, script in ipairs(deps) do for j, scr in ipairs(deps_of(script)) do table.include(list, scr) end table.include(list, script) end return list end -- build () -- builds from a list of scripts function build(scripts) local list = {} for i, name in ipairs(scripts) do for i, dep in ipairs(deps_of(name)) do table.include(list, dep) end table.include(list, name) end -- write art io.write("\nART Built as " .. output_path .. "\n\n") io.write("Included Scripts: ") local mootools = io.open(output_path, "w+") for i, file in ipairs(list) do io.write(file .. ".js") local str = io.open(scripts_path .. folder_of(file) .. "/" .. file .. ".js"):read("*all") -- %build% replace if file == "Core" then local ref = io.open('.git/HEAD'):read("*all"):match("ref: ([%w/]+)") ref = io.open('.git/' .. ref):read("*all"):match("(%w+)") str = str:gsub("%%build%%", ref) end mootools:write(str) if i ~= table.maxn(list) then mootools:write("\n") io.write(", ") end end io.write("\n\n") end -- checks arg if table.maxn(selected) == 0 then build(all) else build(selected) end end -- builds mootools Build(arg)
local standardVolumeOutput = 0.3; local hasPlayerLoaded = false RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() hasPlayerLoaded = true end) RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() hasPlayerLoaded = false end) RegisterNetEvent('InteractSound_CL:PlayOnOne', function(soundFile, soundVolume) if hasPlayerLoaded then SendNUIMessage({ transactionType = 'playSound', transactionFile = soundFile, transactionVolume = soundVolume }) end end) RegisterNetEvent('InteractSound_CL:PlayOnAll', function(soundFile, soundVolume) if hasPlayerLoaded then SendNUIMessage({ transactionType = 'playSound', transactionFile = soundFile, transactionVolume = soundVolume or standardVolumeOutput }) end end) RegisterNetEvent('InteractSound_CL:PlayWithinDistance', function(otherPlayerCoords, maxDistance, soundFile, soundVolume) if hasPlayerLoaded then local myCoords = GetEntityCoords(PlayerPedId()) local distance = #(myCoords - otherPlayerCoords) if distance < maxDistance then SendNUIMessage({ transactionType = 'playSound', transactionFile = soundFile, transactionVolume = soundVolume or standardVolumeOutput }) end end end)
assert(Config, 'Need a pre-existing Config table!') --NUC #1 (N1bot): 192.168.123.101 --NUC #2 (N2bot): 192.168.123.102 --Super NUC #1 : 192.168.123.103 --#N5bot --Velodyne #2: 192.168.124.202:2369 --Velodyne #1: 192.168.124.201:2368 --Velodyne #4: 192.168.124.204:2371 --N4bot --Velodyne #3: 192.168.124.208:2370 --Velodyne #5: 192.168.124.205:2372 --Velodyne #6: 192.168.124.206:2373 --HDL-32E: 192.168.124.210:2374 -- IP addresses local IP = { n1bot = 101, n2bot = 102, n3bot = 105, n4bot = 106, n5bot = 107, supernuc1 = 103, tpy = 200, broadcast = 255, } local SENSOR_IP={ } local robot_ip = IP.n4bot --local operator_ip = IP.supernuc1 local operator_ip = IP.broadcast --local operator_ip = IP.tpy local net = { robot = '192.168.123.'..robot_ip, operator = '192.168.123.'..operator_ip, broadcast = '192.168.123.255', mainscreen = '192.168.123.'..IP.n2bot, } local udp = { velodyne1 = 2368, velodyne2 = 2369, velodyne3 = 2370, velodyne4 = 2371, velodyne5 = 2372, velodyne6 = 2373, range1 = 54321, range2 = 54322, range3 = 54323, mapdata = 54325, command = 54329, countdown = 54326, } local streams = {} net.streams = streams Config.udp = udp Config.net = net -- Lossless link net.rpc = { tcp_reply = 2000, udp = 2001, uds = 'rpc', } --[[ streams.feedback = { ws = 9002, udp = 2002, --tcp = 43200, sub = 'feedback' } streams.ittybitty0 = { ws = 9070, udp = 2030, sub = 'ittybitty0' } streams.ittybitty1 = { ws = 9071, udp = 2031, sub = 'ittybitty1' } -- Lossy Link streams.camera0 = { ws = 9003, udp = 17003, tcp = 43303, sub = 'camera0', } streams.camera1 = { ws = 9004, udp = 17004, tcp = 43304, sub = 'camera1', } streams.vision0 = { ws = 9013, udp = 17013, tcp = 43313, sub = 'vision0', } streams.label = { ws = 9014, udp = 17014, tcp = 43314, sub = 'label', } streams.world = { ws = 9023, udp = 17023, tcp = 43323, sub = 'world', } streams.lidar0 = { ws = 9010, udp = 17010, --tcp = 43310, sub = 'lidar0' } streams.lidar1 = { ws = 9011, udp = 17011, --tcp = 43311, sub = 'lidar1' } streams.mesh0 = { ws = 9020, udp = 17020, tcp = 43300, sub = 'mesh0' } streams.mesh1 = { ws = 9021, udp = 17021, tcp = 43301, sub = 'mesh1' } streams.kinect2_depth = { ws = 9046, udp = 17046, tcp = 43346, sub = 'kinect2_depth' } streams.kinect2_color = { ws = 9047, udp = 17047, tcp = 43347, sub = 'kinect2_color' } --]] --[[ streams.audio = { ws = 9017, tcp= 55557, } --]] return Config
--[[ NPCCampBehavior - Player Proximity by: standardcombo v0.9.0 Works in conjunction with NPCSpawner and expects it as a sibling script. Camp Behavior The camp's behavior is driven by the scripts 'NPCSpawner' and 'NPCCampBehavior_PlayerProximity'. These scripts define "When" and "How" to spawn NPCs. Each of the scripts has custom properties that can be tuned to adjust their behavior. The Proximity camp is characterized by two triggers, one small and one large--also called the "Inside Trigger" and the "Outside Trigger". Adjusting the position, type and size of these two triggers is essential to correctly setting up a proximity camp. The inside trigger is what detects players entering the camp and spawns the NPCs, while the outside trigger's job is to keep track of players who are present, so that when there are no more players in the camp the NPCs can be despawned. Spawn Points NPC camps are characterized by a number of spawn points that tell the spawner scripts "What" and "Where" to spawn. Each spawn point has references to the NPC templates which they will spawn. These are setup as custom properties. A spawn point can have any number of NPC templates assigned as custom properties. No specific names need to be given to those custom properties. The position and rotation of a spawn point determine the orientation of the NPCs that spawn from it. Spawn points are usually placed touching the ground and should be adjusted on uneven terrain. This assemblage of parts is what allows NPC camps to come in all forms, to spawn all kinds of NPCs, in various compositions, and to behave in different ways as players approach or leave the area. For more information check the tooltips on each of the script properties. --]] local INSIDE_TRIGGER = script:GetCustomProperty("InsideTrigger"):WaitForObject() local OUTSIDE_TRIGGER = script:GetCustomProperty("OutsideTrigger"):WaitForObject() local DESPAWN_DELAY = script:GetCustomProperty("DespawnDelay") or 4 local RESPAWN_COOLDOWN = script:GetCustomProperty("RespawnCooldown") or 15 local RESET_ON_ROUND_START = script:GetCustomProperty("ResetOnRoundStart") local RESET_ON_ROUND_END = script:GetCustomProperty("ResetOnRoundEnd") local CAMP_SPAWNER = script.parent:FindChildByName("NPCSpawner") local playerCount = 0 local despawnCountdown = 0 local lastMinionCount = 0 local respawnCooldown = 0 function Reset() CAMP_SPAWNER.context.Despawn() despawnCountdown = 0 lastMinionCount = 0 respawnCooldown = 0 end function Tick(deltaTime) if (despawnCountdown > 0) then despawnCountdown = despawnCountdown - deltaTime if (despawnCountdown <= 0) then CAMP_SPAWNER.context.Despawn() end end if (respawnCooldown > 0) then respawnCooldown = respawnCooldown - deltaTime end local minionCount = CAMP_SPAWNER.context.minionCount if (minionCount == 0 and lastMinionCount > 0) then respawnCooldown = RESPAWN_COOLDOWN end lastMinionCount = minionCount end function OnBeginOverlapInner(theTrigger, player) if (not player:IsA("Player")) then return end if (CAMP_SPAWNER.context.minionCount == 0 and respawnCooldown <= 0) then CAMP_SPAWNER.context.Spawn() -- Aggro the minions Task.Wait() for _,minion in pairs(CAMP_SPAWNER.context.minions) do local aiScript = minion:FindChildByName("NPCAIServer") if aiScript then aiScript.context.SetTemporaryVisionHalfAngle(360, 1) aiScript.context.EngageNearest() end end end end function OnBeginOverlapOuter(theTrigger, player) if (not player:IsA("Player")) then return end playerCount = playerCount + 1 despawnCountdown = 0 end function OnEndOverlapOuter(theTrigger, player) if (not player:IsA("Player")) then return end playerCount = playerCount - 1 if (playerCount <= 0) then despawnCountdown = DESPAWN_DELAY -- Send the minions home for _,minion in pairs(CAMP_SPAWNER.context.minions) do local aiScript = minion:FindChildByName("NPCAIServer") if aiScript then aiScript.context.SetTemporaryVisionRadius(0, 3) aiScript.context.SetTemporaryHearingRadius(0, 3) aiScript.context.ResumePatrol() end end end end INSIDE_TRIGGER.beginOverlapEvent:Connect(OnBeginOverlapInner) OUTSIDE_TRIGGER.beginOverlapEvent:Connect(OnBeginOverlapOuter) OUTSIDE_TRIGGER.endOverlapEvent:Connect(OnEndOverlapOuter) if RESET_ON_ROUND_START then Game.roundStartEvent:Connect(Reset) end if RESET_ON_ROUND_END then Game.roundEndEvent:Connect(Reset) end
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRIGHT ZENIMAX MEDIA INC. **************************************************************************** ]] local GuildSharedInfo = ZO_Object:Subclass() function GuildSharedInfo:New(control) local manager = ZO_Object.New(self) manager.control = control manager.bankIcon = GetControl(control, "Bank") manager.tradingHouseIcon = GetControl(control, "TradingHouse") manager.heraldryIcon = GetControl(control, "Heraldry") control:RegisterForEvent(EVENT_GUILD_DATA_LOADED, function() manager:Refresh(manager.guildId) end) control:RegisterForEvent(EVENT_GUILD_MEMBER_ADDED, function(_, guildId) manager:Refresh(guildId) end) control:RegisterForEvent(EVENT_GUILD_MEMBER_REMOVED, function(_, guildId) manager:Refresh(guildId) end) control:RegisterForEvent(EVENT_GUILD_MEMBER_PLAYER_STATUS_CHANGED, function(_, guildId) manager:Refresh(guildId) end) return manager end function GuildSharedInfo:SetGuildId(guildId) self.guildId = guildId self:Refresh(guildId) end function GuildSharedInfo:Refresh(guildId) if(self.guildId and self.guildId == guildId) then local count = GetControl(self.control, "Count") local numGuildMembers, numOnline, _, numInvitees = GetGuildInfo(guildId) count:SetText(zo_strformat(SI_GUILD_NUM_MEMBERS_ONLINE_FORMAT, numOnline, numGuildMembers + numInvitees)) self.canDepositToBank = DoesGuildHavePrivilege(guildId, GUILD_PRIVILEGE_BANK_DEPOSIT) if(self.canDepositToBank) then self.bankIcon:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) else self.bankIcon:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) end self.canUseTradingHouse = DoesGuildHavePrivilege(guildId, GUILD_PRIVILEGE_TRADING_HOUSE) if(self.canUseTradingHouse) then self.tradingHouseIcon:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) else self.tradingHouseIcon:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) end self.canUseHeraldry = DoesGuildHavePrivilege(guildId, GUILD_PRIVILEGE_HERALDRY) if(self.canUseHeraldry) then self.heraldryIcon:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) else self.heraldryIcon:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) end end end function ZO_GuildSharedInfoBank_OnMouseEnter(control) InitializeTooltip(InformationTooltip, control, TOP, 0, 0) if(GUILD_SHARED_INFO.canDepositToBank) then SetTooltipText(InformationTooltip, GetString(SI_GUILD_TOOLTIP_BANK_DEPOSIT_ENABLED)) else SetTooltipText(InformationTooltip, zo_strformat(SI_GUILD_TOOLTIP_BANK_DEPOSIT_DISABLED, GetNumGuildMembersRequiredForPrivilege(GUILD_PRIVILEGE_BANK_DEPOSIT))) end end function ZO_GuildSharedInfoBank_OnMouseExit(control) ClearTooltip(InformationTooltip) end function ZO_GuildSharedInfoTradingHouse_OnMouseEnter(control) InitializeTooltip(InformationTooltip, control, TOP, 0, 0) if(GUILD_SHARED_INFO.canUseTradingHouse) then SetTooltipText(InformationTooltip, GetString(SI_GUILD_TOOLTIP_TRADING_HOUSE_ENABLED)) else SetTooltipText(InformationTooltip, zo_strformat(SI_GUILD_TOOLTIP_TRADING_HOUSE_DISABLED, GetNumGuildMembersRequiredForPrivilege(GUILD_PRIVILEGE_TRADING_HOUSE))) end end function ZO_GuildSharedInfoTradingHouse_OnMouseExit(control) ClearTooltip(InformationTooltip) end function ZO_GuildSharedInfoHeraldry_OnMouseEnter(control) InitializeTooltip(InformationTooltip, control, TOP, 0, 0) if(GUILD_SHARED_INFO.canUseHeraldry) then SetTooltipText(InformationTooltip, GetString(SI_GUILD_TOOLTIP_HERALDRY_ENABLED)) else SetTooltipText(InformationTooltip, zo_strformat(SI_GUILD_TOOLTIP_HERALDRY_DISABLED, GetNumGuildMembersRequiredForPrivilege(GUILD_PRIVILEGE_HERALDRY))) end end function ZO_GuildSharedInfoHeraldry_OnMouseExit(control) ClearTooltip(InformationTooltip) end function ZO_GuildSharedInfo_OnInitialized(self) GUILD_SHARED_INFO = GuildSharedInfo:New(self) end
local x = 1 local y = 2 local z = 69 local a = 420 print(x + y) print(x / y) print(y * a) print(a % z) print(1 / 0) print(0 / 0) print(-1 / 0) local function approx(x) return math.floor((x * 1000) + 0.5) / 1000 end print(approx(1 / 3)) print(approx(3 / 5)) print(approx(-1 / 9))
local M = {} M.description = 'Neovim TUI' M.wants = { 'target.basic', } return M
local Tunnel = module("_core", "lib/Tunnel") local Proxy = module("_core", "lib/Proxy") API = Proxy.getInterface("API") cAPI = Tunnel.getInterface("API") dbAPI = Proxy.getInterface("API_DB") local houses = { -- price_dollar, price_gold ["house:1"] = {200.0, 80.0}, ["house:2"] = {200.0, 80.0}, ["house:3"] = {200.0, 80.0}, ["house:4"] = {200.0, 80.0}, ["house:5"] = {200.0, 80.0}, ["house:6"] = {200.0, 80.0}, ["house:7"] = {200.0, 80.0} } RegisterNetEvent("FRP:HOUSING:TryToBuyHouse") AddEventHandler( "FRP:HOUSING:TryToBuyHouse", function(house_id, withGold) local _source = source if not houses[house_id] then return end local User = API.getUserFromSource(_source) local Character = User:getCharacter() --[[ if true then User:notify("error", "Não disponivel :P") return end ]] if Character:hasGroupOrInheritance(house_id) then User:notify("error", "Você já alugou esta residência") return end -- if #API.getUsersByGroup(house_id) > 0 then local rows = dbAPI.query("SELECT:house_rent", {house_id = house_id}) if #rows > 0 then User:notify("error", "Está residência já está alugada") return end local Inventory = Character:getInventory() local currencyItem = withGold and 'gold' or 'money' local currencyAmount = withGold and houses[house_id][2] or houses[house_id][1] currencyAmount = currencyAmount * 100 if Inventory:getItemAmount(currencyItem) < currencyAmount then User:notify("error", "Você não tem " .. (withGold and 'ouros' or 'dollares') .. " suficientes.") return end if Inventory:removeItem(-1, currencyItem, currencyAmount) then User:notify("success", "Parábens! Agora essa residência está sobe sua gerência") Character:addGroup(house_id) local date = os.date("*t") local time_sum_sevendays = os.time(date) + (7 * 24 * 60 * 60) local date_sum_sevendays = os.date("*t", time_sum_sevendays) local sum_to_time = os.time(date_sum_sevendays) -- MUDA NA DB house_next_payment PARA INT Character:addGroup(house_id) dbAPI.execute("INSERT:house_rent", {house_id = house_id, house_next_payment = sum_to_time}) end end ) Citizen.CreateThread( function() while true do Citizen.Wait(1000 * 60 * 60) -- 1 Hora for house_id, _ in pairs(houses) do if IsRentExpired(house_id) then for _, User in pairs(API.getUsersByGroup(house_id)) do User:removeGroup(house_id) end Citizen.CreateThread(function() dbAPI.execute("DELETE:house_rent", {house_id = house_id}) local houseGroupBit = API.GroupNameToBit(house_id) dbAPI.execute("UPDATE:character_remove_role", {role = houseGroupBit}) end ) end end end end ) function IsRentExpired(house_id) local rows = dbAPI.query("SELECT:house_rent", {house_id = house_id}) if #rows > 0 then local date = os.date("*t") local time = os.time(date) local house_next_payment = tonumber(rows[1].house_next_payment) if house_next_payment > time then return true end end return false end -- AddEventHandler( -- "FRP:HOUSING:RequestAvailableHouses", -- function() -- end -- )
local QDEF = QuestDef.Define { qtype = QTYPE.EVENT, act_filter = EscapeTheBogUtil.ETBActFilter, process_fighter = function(quest, fighter) if table.arraycontains(quest.param.opfor or {}, fighter.agent) and not (fighter.agent:GetContentID() == "GROUT_LOOT_CLUSTER" or fighter.agent:GetContentID() == "GROUT_BOG_CYST") then fighter:AddCondition("ETB_GROUT_BURR_IMMUNITY", 1) end end, } :AddObjective{ id = "start", state = QSTATUS.ACTIVE, } QDEF:AddConvo() :ConfrontState("STATE_CONF") :Quips{ { tags = "dialog_start", [[ * You thought you are just walking normally, but all of a sudden, you have disturbed some bog burrs! ]], [[ * You accidentally stepped on some bog burrs while you are walking. ]], }, { tags = "dialog_start_quip", [[ * They don't look happy, that's for sure. * (How do you even tell bog burrs' emotions?) * Either way, be prepared! ]], [[ * Looks like you will have to defend yourself! ]], [[ * Watch out! They look like they want to attack you! ]], }, } :Loc{ DIALOG_INTRO = [[ player: %dialog_start player: !left !scared %dialog_start_quip ]], DIALOG_DEFEND = [[ player: !fight I will not lose! ]], DIALOG_DEFEND_WIN = [[ * You sure showed those burrs who's boss. ]], } :Fn(function(cxt) cxt.quest.param.opfor = CreateCombatParty("BOG_BURRS_TEAM", cxt.quest:GetRank(), cxt.location) cxt:TalkTo(cxt.quest.param.opfor[1]) cxt:Dialog("DIALOG_INTRO") cxt:Opt("OPT_DEFEND") :Dialog("DIALOG_DEFEND") :Battle{ no_oppo_limit = true, flags = BATTLE_FLAGS.SELF_DEFENCE, on_start_battle = function(battle) -- for i, agent in ipairs(opfor) do -- local fighter = battle:GetFighterForAgent(agent) -- if fighter then -- fighter:RemoveCondition("grout_burr") -- end -- end end, on_runaway = function(cxt, battle, no_fail) for i, agent in ipairs(cxt.quest.param.opfor) do if not agent:IsRetired() then agent:Retire() end end StateGraphUtil.DoRunAway( cxt, battle, no_fail ) end, } :OnWin() :Dialog("DIALOG_DEFEND_WIN") :Fn(function(cxt) for i, agent in ipairs(cxt.quest.param.opfor) do if not agent:IsRetired() then agent:Retire() end end end) :CompleteQuest() :DoneConvo() end)
local account = require('account') local channel = require('core.channel') local client_data_items = require('client_data.items') local packet = require('packet') local resources = require('resources') local server = require('shared.server') local string = require('string.ext') local struct = require('struct') local table = require('table.ext') local item_type = struct.struct({ id = {struct.int32}, bag = {struct.int32}, index = {struct.int32}, count = {struct.int32}, status = {struct.int32}, bazaar = {struct.int32}, extdata = {struct.data(0x18)}, }) local equipment, equipment_type = server.new('equipment', struct.struct({ slot = {struct.int32}, item = {item_type}, })[16]) local bag_count = #resources.bags local bag_size = 80 local items, items_type = server.new('items', struct.struct({ bags = {item_type[bag_size + 1][bag_count]}, sizes = {struct.int32[bag_count]}, gil = {struct.int32}, ready = {struct.bool}, })) local items_sizes = items.sizes local equipment_references = {} for bag = 0, bag_count - 1 do for index = 0, bag_size do local item = items.bags[bag][index] item.bag = bag item.index = index end equipment_references[bag] = {} end for i = 0, 15 do equipment[i].slot = i end struct.reset_on(account.logout, equipment, equipment_type) struct.reset_on(account.logout, items, items_type) local search_server = channel.new('items_service_search') search_server.data = {} search_server.env = {} local normalized_lookup local init_search = function() normalized_lookup = {} search_server.data.search_map = normalized_lookup end init_search() search_server.data.id_map = {} local id_names = {} local id_full_names = {} do local string_normalize = string.normalize local id_map = search_server.data.id_map for i = 0, 0x73FF do local item = client_data_items[i] if item ~= nil then local item_name = item.name if item_name ~= '.' then local name = string_normalize(item_name) local full_name = string_normalize(item.full_name) local id = item.id id_names[id] = name id_full_names[id] = full_name local id_map_name = id_map[name] if id_map_name == nil then id_map_name = {} id_map[name] = id_map_name end id_map_name[#id_map_name + 1] = id if full_name ~= name then local id_map_full_name = id_map[full_name] if id_map_full_name == nil then id_map_full_name = {} id_map[full_name] = id_map_full_name end id_map_full_name[#id_map_full_name + 1] = id end end end end do local table_prefix_search = table.prefix_search local table_sort = table.sort local name_lookup = {} local name_lookup_count = 0 for key in pairs(id_map) do name_lookup_count = name_lookup_count + 1 name_lookup[name_lookup_count] = key end table_sort(name_lookup) local map_to_ids = function(...) local res = {} local res_count = 0 local found = {} for i = 1, select('#', ...) do local ids = id_map[select(i, ...)] for j = 1, #ids do local id = ids[j] if found[id] == nil then res_count = res_count + 1 res[res_count] = id found[id] = true end end end return res end search_server.env.search_prefix = function(prefix) return map_to_ids(table_prefix_search(name_lookup, prefix)) end end end account.logout:register(init_search) local empty_item = struct.new(item_type) local update_item do local table_remove = table.remove update_item = function(bag, index, count, status, id, bazaar, extdata) if bag == 0 and index == 0 then items.gil = count return end local item = items.bags[bag][index] item.count = count item.status = status if count == 0 then if item.id ~= 0 then local lookup = normalized_lookup[id_full_names[item.id]] if lookup ~= nil then for i = 1, #lookup do local entry = lookup[i] if entry[1] == bag and entry[2] == index then table_remove(lookup, i) break end end end end item.id = 0 item.bazaar = 0 item.extdata = empty_item.extdata item = empty_item else if id then local old_id = item.id if old_id ~= id then local old_lookup = normalized_lookup[id_full_names[old_id]] if old_lookup ~= nil then for i = 1, #old_lookup do local entry = old_lookup[i] if entry[1] == bag and entry[2] == index then table_remove(old_lookup, i) break end end end local new_name = id_full_names[id] local lookup = normalized_lookup[new_name] if not lookup then lookup = {} normalized_lookup[new_name] = lookup normalized_lookup[id_names[id]] = lookup end lookup[#lookup + 1] = {bag, index} end item.id = id end if bazaar then item.bazaar = bazaar end if extdata then item.extdata = extdata end end local slot = equipment_references[bag][index] if slot then equipment[slot].item = item if count == 0 then equipment_references[bag][index] = nil end end end end packet.incoming:register_init({ [{0x01B}] = function() items.ready = false end, [{0x01C}] = function(p) for bag = 0, bag_count - 1 do items_sizes[bag] = p.size[bag] - 1 end end, [{0x01D}] = function() items.ready = true end, [{0x01E}] = function(p) update_item(p.bag_id, p.bag_index, p.count, p.status) end, [{0x01F}] = function(p) update_item(p.bag_id, p.bag_index, p.count, p.status, p.item_id) end, [{0x020}] = function(p) update_item(p.bag_id, p.bag_index, p.count, p.status, p.item_id, p.bazaar, p.extdata) end, [{0x050}] = function(p) local slot = p.slot_id local bag = p.bag_id local index = p.bag_index local old = equipment[slot].item equipment_references[old.bag][old.index] = nil equipment[slot].item = empty_item if index > 0 then local new = items.bags[bag][index] equipment[slot].item = new equipment_references[new.bag][new.index] = slot end end, }) --[[ Copyright © 2018, Windower Dev Team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Windower Dev Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE WINDOWER DEV TEAM BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]]
local lfs = require "lfs" local eqg = require "luaeqg" local obj = require "gui/obj" require "gui/loader" dir = {} function assert(result, msg) if result then return result end io.stdout:write(msg .. "\n") io.flush() end function error_popup(msg) io.stdout:write(msg .. "\n") io.flush() end function log_write(...) io.stdout:write(... .. "\n") end function Split(s, delimiter) result = {}; for match in (s..delimiter):gmatch("(.-)"..delimiter) do table.insert(result, match); end return result; end function dump(o) if type(o) == 'table' then local s = '{ ' for k,v in pairs(o) do if type(k) ~= 'number' then k = '"'..k..'"' end s = s .. '['..k..'] = ' .. dump(v) .. ',' end return s .. '} ' else return tostring(o) end end function obj_import(shortname) -- local shortname = eqg_path:match("([%s%w_]+)%.eqg$") if not shortname then error("obj_import: no shortname provided") end shortname = shortname:lower() local obj_path = "cache/" .. shortname .. ".obj" local eqg_path = "out/" .. shortname .. ".eqg" local s, dir = pcall(eqg.WriteDirectory, eqg_path, {}) if not s then error("failed creating new EQG file: " .. dir) end dir = {} open_path = eqg_path open_dir = dir ter_name = shortname .. ".ter" pos = 1 dir[pos] = {pos = pos, name = shortname .. ".ter"} by_name[shortname .. ".ter"] = dir[pos] DirNames(dir) local lights = {} --table.insert(lights, {name = "test", x = 1, y = 2, z = 3, r = 1, g = 2, b = 3, radius = 3}) local f = io.open("cache/" .. shortname .. "_light.txt", "rb") if f then f:close() local lineNumber = 0 for line in io.lines("cache/" .. shortname .. "_light.txt") do lineNumber = lineNumber + 1 lines = Split(line, " ") if not #lines == 8 then error("expected 8 entries, got " .. #lines) end table.insert(lights, {name = lines[1], x = lines[2], y = lines[3], z = lines[4], r = lines[5], g = lines[6], b = lines[7], radius = lines[8]}) end log_write("Added " .. #lights .. " lights based on out/" .. shortname .. "_light.txt") end local regions = {} local f = io.open("cache/" ..shortname .. "_region.txt", "rb") if f then f:close() local lineNumber = 0 for line in io.lines("cache/" ..shortname .. "_region.txt") do lineNumber = lineNumber + 1 lines = Split(line, " ") if not #lines == 10 then error("expected 10 entries, got " .. #lines) end -- log_write(#lines) table.insert(regions, {name = lines[1], center_x = lines[2], center_y = lines[3], center_z = lines[4], extent_x = lines[5], extent_y = lines[6], extent_z = lines[7], unknownA = lines[8], unknownB = lines[9], unknownC = lines[10], }) end log_write("Added " .. #regions .. " regions based on out/" .. shortname .. "_region.txt") end local models = {ter_name} local objects = {{name = ter_name:sub(1, -5), id = 0, x = 0, y = 0, z = 0, rotation_x = 0, rotation_y = 0, rotation_z = 0, scale = 1}} local f = io.open("cache/" ..shortname .. "_mod.txt", "rb") if f then f:close() local lineNumber = 0 for line in io.lines("cache/" ..shortname .. "_mod.txt") do lineNumber = lineNumber + 1 lines = Split(line, " ") if not #lines == 9 then error("expected 9 entries, got " .. #lines) end local modelName = string.gsub(lines[1], ".obj", ".mod") local modelIndex = -1 for i = 1, #models do if models[i] == modelName then modelIndex = i end end if modelIndex == -1 then table.insert(models, modelName) modelIndex = #models -- log_write("Inserted " .. lines[1] .. " as index " .. modelIndex) end -- log_write("Found " .. lines[1] .. " as index " .. modelIndex) table.insert(objects, {name = lines[2], id = modelIndex-1, x = lines[3], y = lines[4], z = lines[5], rotation_x = lines[8], rotation_y = lines[7], rotation_z = lines[6], scale = lines[9], }) end log_write("Added " .. #models .. " models, " .. #objects .. " objects based on " .. shortname .. "_mod.txt") end local f = io.open("cache/" ..shortname .. "_doors.txt", "rb") if f then local doorCount = 0 f:close() local lineNumber = 0 for line in io.lines("cache/" ..shortname .. "_doors.txt") do lineNumber = lineNumber + 1 lines = Split(line, " ") if not #lines == 2 then error("expected 2 entries, got " .. #lines) end local modelName = string.gsub(lines[1], ".obj", ".mod") local modelIndex = -1 for i = 1, #models do if models[i] == modelName then modelIndex = i end end if modelIndex == -1 then table.insert(models, modelName) modelIndex = #models doorCount = doorCount + 1 -- log_write("Inserted " .. lines[1] .. " as index " .. modelIndex) end -- log_write("Found " .. lines[1] .. " as index " .. modelIndex) end log_write("Added " .. doorCount .. " door based on " .. shortname .. "_doors.txt") end local ter_data = obj.Import(obj_path, dir, true, shortname) local zon_data = { models = models, objects = objects, regions = regions, lights = lights, } pos = 1 dir[pos] = {pos = pos, name = ter_name} by_name[ter_name] = dir[pos] local s, ter_ent = pcall(ter.Write, ter_data, ter_name, eqg.CalcCRC(ter_name)) if not s then error("ter.write " .. ter_name .. " failed: " .. ter_ent) end ter_ent.pos = pos dir[pos] = ter_ent for i = 2, #models do pos = #dir + 1 local modelBaseName = string.gsub(models[i], ".mod", "") local modelName = models[i] dir[pos] = {pos = pos, name = modelName .. ".mod"} --by_name[modelName .. ".mod"] = dir[pos] log_write("Attempting to save '" .. modelName .. "' as '" .. modelName) local mod_ent = obj.Import("cache/" .. modelBaseName .. ".obj", dir, true, shortname) mod_ent.bones = {} mod_ent.bone_assignments = {} s, mod_data = pcall(mod.Write, mod_ent, modelName, eqg.CalcCRC(modelName)) if not s then error("mod.write " .. modelName .. ".mod failed: "..err) end mod_data.name = modelName mod_data.pos = pos dir[pos] = mod_data end local zon_name = shortname .. ".zon" pos = #dir+1 --log_write("zon pos: "..pos) dir[pos] = {pos = pos, name = zon_name} by_name[zon_name] = dir[pos] local s, zon_ent = pcall(zon.Write, zon_data, zon_name, eqg.CalcCRC(zon_name)) if not s then error("zon.write " .. zon_name .. " failed: " .. zon_ent) end zon_ent.pos = pos dir[pos] = zon_ent DirNames(dir) s, data = pcall(eqg.WriteDirectory, eqg_path, dir) if not s then error("eqg.write " .. eqg_path .. " failed: " .. data) end log_write("Saved successfully to " .. eqg_path) end function main_cmd(arg1, arg2, arg3) io.stdout:write("executing eqgzi v1.8.0 ") local args = "" if arg1 and string.len(arg1) then io.stdout:write(" " .. arg1) args = arg1 end if arg2 and string.len(arg2) then io.stdout:write(" " .. arg2) args = args .. " " .. arg2 end if arg3 and string.len(arg3) then io.stdout:write(" " .. arg3) args = args .. " " .. arg3 end io.stdout:write("\n") local cmdType = "" local eqg_path = "" local shortname = "" local obj_path = "" for cmd in string.gmatch(args, "%S+") do log_write(cmd) if cmd:lower() == "import" then cmdType = "import" elseif cmd == "" then elseif string.find(cmd:lower(), ".eqg$") then eqg_path = cmd elseif string.find(cmd:lower(), ".obj$") then obj_path = cmd else shortname = cmd end end if cmdType == "import" then if shortname == "" then error("usage: eqgzi import <zone>") end obj_import(shortname) return end log_write("usage: eqgzi [import <zone>]") end
for line in io.lines(arg[1]) do if #line > 0 then local sep, m = line:find(";"), {} for i in line:sub(sep):gmatch("%d+") do if m[i] then print(i) break end m[i] = true end end end
--[[ ██╗░░░██╗░█████╗░██████╗░░██████╗░██╗░░░██╗██╗████████╗███████╗ ██║░░░██║██╔══██╗██╔══██╗██╔════╝░██║░░░██║██║╚══██╔══╝╚════██║ ╚██╗░██╔╝███████║██████╔╝██║░░██╗░██║░░░██║██║░░░██║░░░░░███╔═╝ ░╚████╔╝░██╔══██║██╔══██╗██║░░╚██╗██║░░░██║██║░░░██║░░░██╔══╝░░ ░░╚██╔╝░░██║░░██║██║░░██║╚██████╔╝╚██████╔╝██║░░░██║░░░███████╗ ░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝░╚═════╝░░╚═════╝░╚═╝░░░╚═╝░░░╚══════╝ Made to vRPex by Varguitz#6151]] Config = {} Config.OpenMenu = 51 -- Key: E Config.Locations = { {name = "Central de Trabajos", colour=3, id=351, x = -265.79, y = -962.78, z = 31.23} } Config.Language = { SelectedJob = "Ahora has seleccionado:", openMenuText = "[~b~E~s~] para abrir el centro de trabajo" }
includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_belt.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_belt_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bicep_l.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bicep_l_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bicep_r.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bicep_r_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_boots.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_boots_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bracer_l.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bracer_l_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bracer_r.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_bracer_r_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_chest_plate.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_chest_plate_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_gloves.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_gloves_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_helmet.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_helmet_gcw.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_leggings.lua") includeFile("tangible/wearables/armor/rebel_battle/armor_rebel_battle_leggings_gcw.lua")
help([[ stitcher ]]) local base = "/n/groups/lsp/o2/apps/stitcher/" local pkgName = myModuleName() local fullVersion = myModuleVersion() load("java") append_path("PATH", pathJoin(base, fullVersion, "/bin/")) whatis("Name: ".. pkgName) whatis("Version: " .. fullVersion) whatis("Category: tools") whatis("Description: Glencoe Software's stitching and pyramid generation tool")
local ffi = require "ffi" require "khrplatform" ffi.cdef[[ typedef void *EGLNativeDisplayType; typedef void *EGLNativePixmapType; typedef void *EGLNativeWindowType; ]] require "bcm_host" ffi.cdef[[ typedef struct { DISPMANX_ELEMENT_HANDLE_T element; int width; /* This is necessary because dispmanx elements are not queriable. */ int height; } EGL_DISPMANX_WINDOW_T; /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ typedef EGLNativeDisplayType NativeDisplayType; typedef EGLNativePixmapType NativePixmapType; typedef EGLNativeWindowType NativeWindowType; ]] ffi.cdef[[ /* Define EGLint. This must be a signed integral type large enough to contain * all legal attribute names and values passed into and out of EGL, whether * their type is boolean, bitmask, enumerant (symbolic constant), integer, * handle, or other. While in general a 32-bit integer will suffice, if * handles are 64 bit types, then EGLint should be defined as a signed 64-bit * integer type. */ typedef khronos_int32_t EGLint; ]]
local S=physio_stress.intllib function physio_stress.hud_init(player,col) return end function physio_stress.hud_update(player, col, value) return end if minetest.get_modpath("hudbars") then hb.register_hudbar('exhaustion', 0xffffff, S("Exhaustion"), { bar = 'physio_stress_hudbars_bar.png^[colorize:#aa7788', icon = 'physio_stress_exhaust_16.png' }, 20, 20, false) if physio_stress.attributes.saturation then hb.register_hudbar('saturation', 0xffffff, S("Saturation"), { bar = 'physio_stress_hudbars_bar.png^[colorize:#ffff00', icon = 'physio_stress_hunger.png' }, physio_stress.saturationmax, physio_stress.saturationmax, false) end if physio_stress.attributes.thirst then hb.register_hudbar('thirst', 0xffffff, S("Thirst"), { bar = 'physio_stress_hudbars_bar.png^[colorize:#0000ff', icon = 'physio_stress_thirst.png' }, physio_stress.thirstmax, physio_stress.thirstmax, false) end function physio_stress.hud_init(player,col) if col == nil then return end hb.init_hudbar(player, col ,physio_stress.hud_clamp(xpfw.player_get_attribute(player, col)),20, false) end function physio_stress.hud_update(player, col, value) if col == nil then return end if value == nil then return end hb.change_hudbar(player, col, physio_stress.hud_clamp(value), 20) end end
Main = { peds = {}, } function Main:Toggle(value) self.isActive = value if value then self:Update() else self:Destroy() end end function Main:Update() local coords = GetFinalRenderedCamCoord() for ped, text in pairs(self.peds) do if not DoesEntityExist(ped) or not IsEntityVisible(ped) or #(GetEntityCoords(ped) - coords) > Config.Distance then exports.interact:RemoveText(text) self.peds[ped] = nil end end for _, player in ipairs(GetActivePlayers()) do local ped = GetPlayerPed(player) local serverId = GetPlayerServerId(player) if not self.peds[ped] and IsEntityVisible(ped) and #(GetEntityCoords(ped) - coords) < Config.Distance then self.peds[ped] = exports.interact:AddText({ id = "stare-"..ped, text = ("<span style='font-size: 2em'>%s:%s</span>"):format(serverId, Player(serverId).state.userId), entity = ped, offset = vector3(0, 0, 1.5), bone = 0, }) end end if GetGameTimer() - (self.lastNotify or 0) > 1000 * Config.Cooldown then TriggerEvent("chat:notify", "You stare into the world, and it stares back.") TriggerServerEvent("stare") self.lastNotify = GetGameTimer() end end function Main:Destroy() for ped, text in pairs(self.peds) do exports.interact:RemoveText(text) end self.peds = {} end function Main:Input() local isActive = IsDisabledControlPressed(0, 243) if self.isActive ~= isActive then self:Toggle(isActive) end end --[[ Threads ]]-- Citizen.CreateThread(function() while true do Main:Input() Citizen.Wait(0) end end) Citizen.CreateThread(function() while true do if Main.isActive then Main:Update() end Citizen.Wait(200) end end)
local easy_recipes = settings.startup["Factorissimo2-easy-recipes"].value local multiplier = easy_recipes and 1 or 10 --[[ Modify -ingredients ]] data:extend({ -- Factory buildings { type = "recipe", name = "space-factory-3", enabled = false, energy_required = 60, ingredients = {{"se-space-platform-plating", 500 * multiplier}, {"steel-plate", 200 * multiplier}, {"substation", 10 * multiplier}}, result = "space-factory-3" }, { type = "recipe", name = "space-gravFactory-3", enabled = false, energy_required = 60, ingredients = {{"se-space-platform-scaffold", 450 * multiplier}, {"steel-plate", 200 * multiplier}, {"concrete", 50 * multiplier}, {"substation", 10 * multiplier}}, result = "space-gravFactory-3" }, --[[ ,{ type = "recipe", name = "space-factory-4", enabled = false, energy_required = 60, ingredients = {{"se-space-platform-plating", 5500 * multiplier}, {"steel-plate", 200 * multiplier}, {"substation", 10 * multiplier}}, result = "space-factory-4" }, { type = "recipe", name = "space-factory-5", enabled = false, energy_required = 60, ingredients = {{"se-space-platform-plating", 126500 * multiplier}, {"steel-plate", 200 * multiplier}, {"substation", 10 * multiplier}}, result = "space-factory-5" }, ]] { type = "recipe", name = "space-factory-input-pipe", enabled = false, energy_required = 1, ingredients = {{"se-space-pipe", 5}}, result = "space-factory-input-pipe" }, { type = "recipe", name = "space-factory-output-pipe", enabled = false, energy_required = 1, ingredients = {{"se-space-pipe", 5}}, result = "space-factory-output-pipe" }, });
require 'nngraph' require 'loadcaffe' local cmd = torch.CmdLine() cmd:option('-modelfile', 'models/VGG_ILSVRC_16_layers.caffemodel', 'Model used for perceptual losses') cmd:option('-protofile', 'models/VGG_ILSVRC_16_layers_deploy.prototxt', 'prototxt of the perception model') cmd:option('-style_weight', 1e0) cmd:option('-content_weight', 1e-3) cmd:option('-tv_weight', 0) cmd:option('-style_layers_t', 'relu1_1,relu2_1,relu3_1,relu4_1,relu5_1') cmd:option('-content_layers_t', 'relu4_2') cmd:option('-save_path_model','models/sliced_VGG_16.t7') cmd:option('-save_path_layers','models/sliced_VGG_16_loss_layers.t7') local function main(params) local content_layers = params.content_layers_t:split(",") local style_layers = params.style_layers_t:split(",") local cnn = loadcaffe.load(params.protofile, params.modelfile):float() local netsize = 128*256*256 local next_content_idx, next_style_idx = 1, 1 local netlayers = {} local netoutputs = {} local losslayers = {} netlayers[1] = nn.Identity()() -- Output TV_Loss print("Setting up TV layer") table.insert(losslayers,"tv") netoutputs[#netoutputs+1] = nn.MulConstant(params.tv_weight/(3*256*256))(netlayers[#netlayers]) for i = 1, #cnn do if next_content_idx <= #content_layers or next_style_idx <= #style_layers then local layer = cnn:get(i) local name = layer.name netlayers[#netlayers+1] = layer(netlayers[#netlayers]) if name == content_layers[next_content_idx] then -- Output content losses print("Setting up content layer", i, ":", layer.name) table.insert(losslayers,"content") netoutputs[#netoutputs+1] = nn.MulConstant(params.content_weight/(netsize/2^32))(netlayers[#netlayers]) next_content_idx = next_content_idx + 1 end if name == style_layers[next_style_idx] then -- Output style losses print("Setting up style layer ", i, ":", layer.name) table.insert(losslayers,"style") netoutputs[#netoutputs+1] = nn.MulConstant(params.style_weight/(netsize/2^next_style_idx))(GramMatrix()(netlayers[#netlayers])) next_style_idx = next_style_idx + 1 end end end local preparedModel = nn.gModule({netlayers[1]},netoutputs) print("Saving sliced model...") torch.save(params.save_path_model,preparedModel:float()) print("Saving loss layers...") torch.save(params.save_path_layers,losslayers) end -- Returns a network that computes the CxC Gram matrix from inputs -- of size C x H x W function GramMatrix() local net = nn.Sequential() net:add(nn.View(-1):setNumInputDims(2)) local concat = nn.ConcatTable() concat:add(nn.Identity()) concat:add(nn.Identity()) net:add(concat) net:add(nn.MM(false, true)) return net end local params = cmd:parse(arg) main(params)
item_greater_power_treads = class(ItemBaseClass) LinkLuaModifier( "modifier_item_greater_power_treads", "items/farming/greater_power_treads.lua", LUA_MODIFIER_MOTION_NONE ) -------------------------------------------------------------------------------- function item_greater_power_treads:GetAbilityTextureName() local baseName = self.BaseClass.GetAbilityTextureName( self ) local attribute = -1 if self.treadMod then attribute = self.treadMod:GetStackCount() end local attributeName = "" if attribute == DOTA_ATTRIBUTE_INTELLECT then attributeName = "_int" elseif attribute == DOTA_ATTRIBUTE_AGILITY then attributeName = "_agi" elseif attribute == DOTA_ATTRIBUTE_STRENGTH then attributeName = "_str" end return baseName .. attributeName end -------------------------------------------------------------------------------- function item_greater_power_treads:GetIntrinsicModifierName() return "modifier_item_greater_power_treads" end -------------------------------------------------------------------------------- function item_greater_power_treads:OnSpellStart() if self.treadMod then local attribute = self.treadMod:GetStackCount() attribute = attribute - 1 if attribute < DOTA_ATTRIBUTE_STRENGTH then attribute = DOTA_ATTRIBUTE_INTELLECT end self.treadMod:SetStackCount( attribute ) self.attribute = attribute local caster = self:GetCaster() caster:CalculateStatBonus() end end -------------------------------------------------------------------------------- modifier_item_greater_power_treads = class(ModifierBaseClass) -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:IsHidden() return true end function modifier_item_greater_power_treads:IsDebuff() return false end function modifier_item_greater_power_treads:IsPurgable() return false end function modifier_item_greater_power_treads:GetAttributes() return MODIFIER_ATTRIBUTE_MULTIPLE end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:OnCreated( event ) local spell = self:GetAbility() if not spell then return end if spell.attribute then self:SetStackCount( spell.attribute ) end spell.treadMod = self self.moveSpd = spell:GetSpecialValueFor( "bonus_movement_speed" ) self.atkSpd = spell:GetSpecialValueFor( "bonus_attack_speed" ) self.stat = spell:GetSpecialValueFor( "bonus_stat" ) end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:OnRefresh( event ) local spell = self:GetAbility() if not spell then return end if spell.attribute then self:SetStackCount( spell.attribute ) end spell.treadMod = self self.moveSpd = spell:GetSpecialValueFor( "bonus_movement_speed" ) self.atkSpd = spell:GetSpecialValueFor( "bonus_attack_speed" ) self.stat = spell:GetSpecialValueFor( "bonus_stat" ) end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:OnRemoved() local spell = self:GetAbility() if not spell then return end if spell and not spell:IsNull() then spell.treadMod = nil end end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:DeclareFunctions() local funcs = { MODIFIER_PROPERTY_MOVESPEED_BONUS_UNIQUE, MODIFIER_PROPERTY_ATTACKSPEED_BONUS_CONSTANT, MODIFIER_PROPERTY_STATS_STRENGTH_BONUS, MODIFIER_PROPERTY_STATS_AGILITY_BONUS, MODIFIER_PROPERTY_STATS_INTELLECT_BONUS, MODIFIER_EVENT_ON_ATTACK_LANDED, } return funcs end -------------------------------------------------------------------------------- if IsServer() then function modifier_item_greater_power_treads:OnAttackLanded( event ) local parent = self:GetParent() -- with lua events, you need to make sure you're actually looking for the right unit's -- attacks and stuff if event.attacker == parent and event.process_procs then local target = event.target -- make sure the initial target is an appropriate unit to split off of -- ( so no wards, items, or towers ) local parentTeam = parent:GetTeamNumber() local targetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY local targetType = bit.bor( DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_BASIC ) local targetFlags = DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES -- if not, cancel if UnitFilter( target, targetTeam, targetType, targetFlags, parentTeam ) ~= UF_SUCCESS then return end local spell = self:GetAbility() local parentOrigin = parent:GetAbsOrigin() local targetOrigin = target:GetAbsOrigin() -- set the targeting requirements for the actual targets targetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY targetType = DOTA_UNIT_TARGET_BASIC targetFlags = bit.bor( DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, DOTA_UNIT_TARGET_FLAG_NOT_CREEP_HERO ) -- get the radius local radius = spell:GetSpecialValueFor( "split_radius" ) -- find all appropriate targets around the initial target local units = FindUnitsInRadius( parentTeam, targetOrigin, nil, radius, targetTeam, targetType, targetFlags, FIND_ANY_ORDER, false ) -- remove the initial target from the list for k, unit in pairs( units ) do if unit == target then table.remove( units, k ) break end end -- only play the particle if it actually damages something local doParticle = false -- get the wearer's damage local damage = event.original_damage -- get the damage modifier local damageMod = spell:GetSpecialValueFor( "split_damage" ) if parent:GetAttackCapability() == DOTA_UNIT_CAP_RANGED_ATTACK then damageMod = spell:GetSpecialValueFor( "split_damage_ranged" ) end damageMod = damageMod * 0.01 -- apply the damage modifier damage = damage * damageMod -- iterate through all targets for k, unit in pairs( units ) do -- inflict damage -- DOTA_DAMAGE_FLAG_NO_SPELL_AMPLIFICATION prevents spell amp and spell lifesteal if ApplyDamage( { victim = unit, attacker = self:GetCaster(), damage = damage, damage_type = DAMAGE_TYPE_PHYSICAL, damage_flags = DOTA_DAMAGE_FLAG_NO_SPELL_AMPLIFICATION, ability = self, } ) then doParticle = true end end if doParticle == true then -- play the particle local part = ParticleManager:CreateParticle( "particles/items/powertreads_splash.vpcf", PATTACH_POINT, target ) ParticleManager:SetParticleControl( part, 5, Vector( 1, 0, radius ) ) ParticleManager:ReleaseParticleIndex( part ) end end end end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:GetModifierMoveSpeedBonus_Special_Boots( event ) local spell = self:GetAbility() return self.moveSpd or spell:GetSpecialValueFor( "bonus_movement_speed" ) end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:GetModifierAttackSpeedBonus_Constant( event ) local spell = self:GetAbility() return self.atkSpd or spell:GetSpecialValueFor( "bonus_attack_speed" ) end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:GetModifierBonusStats_Strength( event ) local spell = self:GetAbility() local attribute = self:GetStackCount() or DOTA_ATTRIBUTE_STRENGTH if attribute == DOTA_ATTRIBUTE_STRENGTH then return self.stat or spell:GetSpecialValueFor( "bonus_stat" ) end return 0 end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:GetModifierBonusStats_Agility( event ) local spell = self:GetAbility() local attribute = self:GetStackCount() or DOTA_ATTRIBUTE_STRENGTH if attribute == DOTA_ATTRIBUTE_AGILITY then return self.stat or spell:GetSpecialValueFor( "bonus_stat" ) end return 0 end -------------------------------------------------------------------------------- function modifier_item_greater_power_treads:GetModifierBonusStats_Intellect( event ) local spell = self:GetAbility() local attribute = self:GetStackCount() or DOTA_ATTRIBUTE_STRENGTH if attribute == DOTA_ATTRIBUTE_INTELLECT then return self.stat or spell:GetSpecialValueFor( "bonus_stat" ) end return 0 end -------------------------------------------------------------------------------- item_greater_power_treads_2 = item_greater_power_treads item_greater_power_treads_3 = item_greater_power_treads item_greater_power_treads_4 = item_greater_power_treads item_greater_power_treads_5 = item_greater_power_treads
Telegram = Telegram or {} if SERVER then include("telegram/cfg.lua") include("telegram/lib/logs.lua") include("telegram/lib/admin.lua") include("telegram/lib/get.lua") include("telegram/commands.lua") timer.Create("Telegram", Telegram.Config.Delay, 0, Telegram.GetChats) end
return { source = { type = 'dist', location = 'https://www.kernel.org/pub/linux/utils/util-linux/v2.23/util-linux-2.23.2.tar.xz', sha256sum = '7c4042bd91f621250d7b3b2f34e3b11921a32c7f080c149dcc0c7ce62a8a7cac' }, patches = { 'util-linux-2.23.2.patch' }, build = { type = 'gnu', autoreconf = true, options = { '--enable-shared', '--disable-static', '--disable-rpath', '--disable-most-builds', '--enable-libuuid', '--enable-libblkid', '--enable-libmount', '--disable-mount', '--enable-losetup', '--disable-cytune', '--disable-fsck', '--disable-partx', '--disable-uuidd', '--disable-mountpoint', '--disable-fallocate', '--disable-unshare', '--disable-nsenter', '--disable-setpriv', '--disable-eject', '--disable-agetty', '--disable-cramfs', '--disable-bfs', '--disable-fdformat', '--disable-hwclock', '--disable-wdctl', '--disable-switch_root', '--disable-pivot_root', '--disable-elvtune', '--disable-tunelp', '--disable-kill', '--disable-last', '--disable-utmpdump', '--disable-line', '--disable-mesg', '--disable-raw', '--disable-rename', '--disable-reset', '--disable-vipw', '--disable-newgrp', '--disable-chfn-chsh', '--disable-login', '--disable-sulogin', '--disable-su', '--disable-runuser', '--disable-ul', '--disable-more', '--disable-pg', '--disable-setterm', '--disable-schedutils', '--disable-wall', '--disable-write', '--disable-socket-activation', '--disable-bash-completion', '--disable-pg-bell', '--disable-makeinstall-chown', '--disable-makeinstall-setuid', '--without-selinux', '--without-audit', '--without-udev', '--without-ncurses', '--without-slang', '--without-utempter' } }, uses = { 'libtool:host' }, { 'patch', { 'libtool', 'install', 'host' } } }
local E, L, V, P, G = unpack(select(2, ...)) -- Import Functions/Constants, Config, Locales local RU = E:GetModule('RaidUtility') --Lua functions local _G = _G local unpack, ipairs, pairs, next = unpack, ipairs, pairs, next local tinsert, wipe, sort = tinsert, wipe, sort local strfind = strfind --WoW API / Variables local CreateFrame = CreateFrame local DoReadyCheck = DoReadyCheck local GameTooltip_Hide = GameTooltip_Hide local GetNumGroupMembers = GetNumGroupMembers local GetRaidRosterInfo = GetRaidRosterInfo local GetTexCoordsForRole = GetTexCoordsForRole local InCombatLockdown = InCombatLockdown local InitiateRolePoll = InitiateRolePoll local IsInGroup = IsInGroup local IsInInstance = IsInInstance local IsInRaid = IsInRaid local SecureHandler_OnClick = SecureHandler_OnClick local ToggleFriendsFrame = ToggleFriendsFrame local UnitGroupRolesAssigned = UnitGroupRolesAssigned local UnitIsGroupAssistant = UnitIsGroupAssistant local UnitIsGroupLeader = UnitIsGroupLeader local NUM_RAID_GROUPS = NUM_RAID_GROUPS local PANEL_HEIGHT = 100 --Check if We are Raid Leader or Raid Officer local function CheckRaidStatus() local inInstance, instanceType = IsInInstance() if ((IsInGroup() and not IsInRaid()) or UnitIsGroupLeader('player') or UnitIsGroupAssistant("player")) and not (inInstance and (instanceType == "pvp" or instanceType == "arena")) then return true else return false end end --Change border when mouse is inside the button local function ButtonEnter(self) self:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor)) end --Change border back to normal when mouse leaves button local function ButtonLeave(self) self:SetBackdropBorderColor(unpack(E.media.bordercolor)) end -- Function to create buttons in this module function RU:CreateUtilButton(name, parent, template, width, height, point, relativeto, point2, xOfs, yOfs, text, texture) local b = CreateFrame("Button", name, parent, template) b:Width(width) b:Height(height) b:Point(point, relativeto, point2, xOfs, yOfs) b:HookScript("OnEnter", ButtonEnter) b:HookScript("OnLeave", ButtonLeave) b:SetTemplate("Transparent") if text then local t = b:CreateFontString(nil,"OVERLAY",b) t:FontTemplate() t:Point("CENTER", b, 'CENTER', 0, -1) t:SetJustifyH("CENTER") t:SetText(text) b:SetFontString(t) elseif texture then local t = b:CreateTexture(nil,"OVERLAY",nil) t:SetTexture(texture) t:Point("TOPLEFT", b, "TOPLEFT", E.mult, -E.mult) t:Point("BOTTOMRIGHT", b, "BOTTOMRIGHT", -E.mult, E.mult) end end function RU:ToggleRaidUtil(event) if InCombatLockdown() then self:RegisterEvent("PLAYER_REGEN_ENABLED", 'ToggleRaidUtil') return end local RaidUtilityPanel = _G.RaidUtilityPanel local RaidUtility_ShowButton = _G.RaidUtility_ShowButton if CheckRaidStatus() then if RaidUtilityPanel.toggled == true then RaidUtility_ShowButton:Hide() RaidUtilityPanel:Show() else RaidUtility_ShowButton:Show() RaidUtilityPanel:Hide() end else RaidUtility_ShowButton:Hide() RaidUtilityPanel:Hide() end if event == "PLAYER_REGEN_ENABLED" then self:UnregisterEvent("PLAYER_REGEN_ENABLED", 'ToggleRaidUtil') end end -- Credits oRA3 for the RoleIcons local function sortColoredNames(a, b) return a:sub(11) < b:sub(11) end local roleIconRoster = {} local function onEnter(self) wipe(roleIconRoster) for i = 1, NUM_RAID_GROUPS do roleIconRoster[i] = {} end local role = self.role local point = E:GetScreenQuadrant(_G.RaidUtility_ShowButton) local bottom = point and strfind(point, "BOTTOM") local left = point and strfind(point, "LEFT") local anchor1 = (bottom and left and "BOTTOMLEFT") or (bottom and "BOTTOMRIGHT") or (left and "TOPLEFT") or "TOPRIGHT" local anchor2 = (bottom and left and "BOTTOMRIGHT") or (bottom and "BOTTOMLEFT") or (left and "TOPRIGHT") or "TOPLEFT" local anchorX = left and 2 or -2 local GameTooltip = _G.GameTooltip GameTooltip:SetOwner(E.UIParent, "ANCHOR_NONE") GameTooltip:Point(anchor1, self, anchor2, anchorX, 0) GameTooltip:SetText(_G["INLINE_" .. role .. "_ICON"] .. _G[role]) local name, group, class, groupRole, color, coloredName, _ for i = 1, GetNumGroupMembers() do name, _, group, _, _, class, _, _, _, _, _, groupRole = GetRaidRosterInfo(i) if name and groupRole == role then color = class == 'PRIEST' and E.PriestColors or (_G.CUSTOM_CLASS_COLORS and _G.CUSTOM_CLASS_COLORS[class] or _G.RAID_CLASS_COLORS[class]) coloredName = ("|cff%02x%02x%02x%s"):format(color.r * 255, color.g * 255, color.b * 255, name:gsub("%-.+", "*")) tinsert(roleIconRoster[group], coloredName) end end for Group, list in ipairs(roleIconRoster) do sort(list, sortColoredNames) for _, Name in ipairs(list) do GameTooltip:AddLine(("[%d] %s"):format(Group, Name), 1, 1, 1) end roleIconRoster[Group] = nil end GameTooltip:Show() end local function RaidUtility_PositionRoleIcons() local point = E:GetScreenQuadrant(_G.RaidUtility_ShowButton) local left = point and strfind(point, "LEFT") _G.RaidUtilityRoleIcons:ClearAllPoints() if left then _G.RaidUtilityRoleIcons:Point("LEFT", _G.RaidUtilityPanel, "RIGHT", -1, 0) else _G.RaidUtilityRoleIcons:Point("RIGHT", _G.RaidUtilityPanel, "LEFT", 1, 0) end end local count = {} local function UpdateIcons(self) local raid = IsInRaid() local party --= IsInGroup() --We could have this in party :thinking: if not (raid or party) then self:Hide() return else self:Show() RaidUtility_PositionRoleIcons() end wipe(count) local role for i = 1, GetNumGroupMembers() do role = UnitGroupRolesAssigned((raid and "raid" or "party")..i) if role and role ~= "NONE" then count[role] = (count[role] or 0) + 1 end end if (not raid) and party then -- only need this party (we believe) if E.myrole then count[E.myrole] = (count[E.myrole] or 0) + 1 end end for Role, icon in next, _G.RaidUtilityRoleIcons.icons do icon.count:SetText(count[Role] or 0) end end function RU:Initialize() if E.private.general.raidUtility == false then return end self.Initialized = true --Create main frame local RaidUtilityPanel = CreateFrame("Frame", "RaidUtilityPanel", E.UIParent, "SecureHandlerBaseTemplate") RaidUtilityPanel:SetScript("OnMouseUp", function(panel, ...) SecureHandler_OnClick(panel, "_onclick", ...); end) RaidUtilityPanel:SetTemplate('Transparent') RaidUtilityPanel:Width(230) RaidUtilityPanel:Height(PANEL_HEIGHT) RaidUtilityPanel:Point('TOP', E.UIParent, 'TOP', -400, 1) RaidUtilityPanel:SetFrameLevel(3) RaidUtilityPanel.toggled = false RaidUtilityPanel:SetFrameStrata("HIGH") E.FrameLocks.RaidUtilityPanel = true --Show Button self:CreateUtilButton("RaidUtility_ShowButton", E.UIParent, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate", 136, 18, "TOP", E.UIParent, "TOP", -400, E.Border, _G.RAID_CONTROL, nil) local RaidUtility_ShowButton = _G.RaidUtility_ShowButton RaidUtility_ShowButton:SetFrameRef("RaidUtilityPanel", RaidUtilityPanel) RaidUtility_ShowButton:SetAttribute("_onclick", ([=[ local raidUtil = self:GetFrameRef("RaidUtilityPanel") local closeButton = raidUtil:GetFrameRef("RaidUtility_CloseButton") self:Hide() raidUtil:Show() local point = self:GetPoint() local raidUtilPoint, closeButtonPoint, yOffset if string.find(point, "BOTTOM") then raidUtilPoint = "BOTTOM" closeButtonPoint = "TOP" yOffset = 1 else raidUtilPoint = "TOP" closeButtonPoint = "BOTTOM" yOffset = -1 end yOffset = yOffset * (tonumber(%d)) raidUtil:ClearAllPoints() closeButton:ClearAllPoints() raidUtil:SetPoint(raidUtilPoint, self, raidUtilPoint) closeButton:SetPoint(raidUtilPoint, raidUtil, closeButtonPoint, 0, yOffset) ]=]):format(-E.Border + E.Spacing*3)) RaidUtility_ShowButton:SetScript("OnMouseUp", function() RaidUtilityPanel.toggled = true RaidUtility_PositionRoleIcons() end) RaidUtility_ShowButton:SetMovable(true) RaidUtility_ShowButton:SetClampedToScreen(true) RaidUtility_ShowButton:SetClampRectInsets(0, 0, -1, 1) RaidUtility_ShowButton:RegisterForDrag("RightButton") RaidUtility_ShowButton:SetFrameStrata("HIGH") RaidUtility_ShowButton:SetScript("OnDragStart", function(sb) sb:StartMoving() end) E.FrameLocks.RaidUtility_ShowButton = true RaidUtility_ShowButton:SetScript("OnDragStop", function(sb) sb:StopMovingOrSizing() local point = sb:GetPoint() local xOffset = sb:GetCenter() local screenWidth = E.UIParent:GetWidth() / 2 xOffset = xOffset - screenWidth sb:ClearAllPoints() if strfind(point, "BOTTOM") then sb:Point('BOTTOM', E.UIParent, 'BOTTOM', xOffset, -1) else sb:Point('TOP', E.UIParent, 'TOP', xOffset, 1) end end) --Close Button self:CreateUtilButton("RaidUtility_CloseButton", RaidUtilityPanel, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate", 136, 18, "TOP", RaidUtilityPanel, "BOTTOM", 0, -1, _G.CLOSE, nil) local RaidUtility_CloseButton = _G.RaidUtility_CloseButton RaidUtility_CloseButton:SetFrameRef("RaidUtility_ShowButton", RaidUtility_ShowButton) RaidUtility_CloseButton:SetAttribute("_onclick", [=[self:GetParent():Hide(); self:GetFrameRef("RaidUtility_ShowButton"):Show();]=]) RaidUtility_CloseButton:SetScript("OnMouseUp", function() RaidUtilityPanel.toggled = false end) RaidUtilityPanel:SetFrameRef("RaidUtility_CloseButton", RaidUtility_CloseButton) --Role Icons local RoleIcons = CreateFrame("Frame", "RaidUtilityRoleIcons", RaidUtilityPanel) RoleIcons:Point("LEFT", RaidUtilityPanel, "RIGHT", -1, 0) RoleIcons:Size(36, PANEL_HEIGHT) RoleIcons:SetTemplate("Transparent") RoleIcons:RegisterEvent("PLAYER_ENTERING_WORLD") RoleIcons:RegisterEvent("GROUP_ROSTER_UPDATE") RoleIcons:SetScript("OnEvent", UpdateIcons) RoleIcons.icons = {} local roles = {"TANK", "HEALER", "DAMAGER"} for i, role in ipairs(roles) do local frame = CreateFrame("Frame", "$parent_"..role, RoleIcons) if i == 1 then frame:Point("BOTTOM", 0, 4) else frame:Point("BOTTOM", _G["RaidUtilityRoleIcons_"..roles[i-1]], "TOP", 0, 4) end frame:Size(28, 28) --frame:SetTemplate() local texture = frame:CreateTexture(nil, "OVERLAY") texture:SetTexture(E.Media.Textures.RoleIcons) --(337499) local texA, texB, texC, texD = GetTexCoordsForRole(role) texture:SetTexCoord(texA, texB, texC, texD) --[[if E.PixelMode then texture:SetTexCoord(texA+0.0015, texB-0.005, texC-0.005, texD-0.01) else texture:SetTexCoord(texA+0.01, texB-0.01, texC+0.001, texD-0.015) end]] local texturePlace = --[[(E.PixelMode and 4) or]] 2 texture:Point("TOPLEFT", frame, "TOPLEFT", -texturePlace, texturePlace) texture:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", texturePlace, -texturePlace) frame.texture = texture local Count = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight") Count:Point("BOTTOMRIGHT", -2, 2) Count:SetText(0) frame.count = Count frame.role = role frame:SetScript("OnEnter", onEnter) frame:SetScript("OnLeave", GameTooltip_Hide) RoleIcons.icons[role] = frame end --Disband Raid button self:CreateUtilButton("DisbandRaidButton", RaidUtilityPanel, "UIMenuButtonStretchTemplate", RaidUtilityPanel:GetWidth() * 0.8, 18, "TOP", RaidUtilityPanel, "TOP", 0, -5, L["Disband Group"], nil) _G.DisbandRaidButton:SetScript("OnMouseUp", function() if CheckRaidStatus() then E:StaticPopup_Show("DISBAND_RAID") end end) --Role Check button self:CreateUtilButton("RoleCheckButton", RaidUtilityPanel, "UIMenuButtonStretchTemplate", RaidUtilityPanel:GetWidth() * 0.8, 18, "TOP", _G.DisbandRaidButton, "BOTTOM", 0, -5, _G.ROLE_POLL, nil) _G.RoleCheckButton:SetScript("OnMouseUp", function() if CheckRaidStatus() then InitiateRolePoll() end end) --MainTank Button --[[self:CreateUtilButton("MainTankButton", RaidUtilityPanel, "SecureActionButtonTemplate, UIMenuButtonStretchTemplate", (DisbandRaidButton:GetWidth() / 2) - 2, 18, "TOPLEFT", RoleCheckButton, "BOTTOMLEFT", 0, -5, MAINTANK, nil) MainTankButton:SetAttribute("type", "maintank") MainTankButton:SetAttribute("unit", "target") MainTankButton:SetAttribute("action", "toggle") --MainAssist Button self:CreateUtilButton("MainAssistButton", RaidUtilityPanel, "SecureActionButtonTemplate, UIMenuButtonStretchTemplate", (DisbandRaidButton:GetWidth() / 2) - 2, 18, "TOPRIGHT", RoleCheckButton, "BOTTOMRIGHT", 0, -5, MAINASSIST, nil) MainAssistButton:SetAttribute("type", "mainassist") MainAssistButton:SetAttribute("unit", "target") MainAssistButton:SetAttribute("action", "toggle")]] --Ready Check button self:CreateUtilButton("ReadyCheckButton", RaidUtilityPanel, "UIMenuButtonStretchTemplate", _G.RoleCheckButton:GetWidth() * 0.75, 18, "TOPLEFT", _G.RoleCheckButton, "BOTTOMLEFT", 0, -5, _G.READY_CHECK, nil) _G.ReadyCheckButton:SetScript("OnMouseUp", function() if CheckRaidStatus() then DoReadyCheck() end end) --Raid Control Panel self:CreateUtilButton("RaidControlButton", RaidUtilityPanel, "UIMenuButtonStretchTemplate", _G.RoleCheckButton:GetWidth(), 18, "TOPLEFT", _G.ReadyCheckButton, "BOTTOMLEFT", 0, -5, L["Raid Menu"], nil) _G.RaidControlButton:SetScript("OnMouseUp", function() ToggleFriendsFrame(3) end) local buttons = { "DisbandRaidButton", "RoleCheckButton", "ReadyCheckButton", "RaidControlButton", "RaidUtility_ShowButton", "RaidUtility_CloseButton" } if _G.CompactRaidFrameManager then --Reposition/Resize and Reuse the World Marker Button _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:ClearAllPoints() _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:Point("TOPRIGHT", _G.RoleCheckButton, "BOTTOMRIGHT", 0, -5) _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:SetParent("RaidUtilityPanel") _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:Height(18) _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:Width(_G.RoleCheckButton:GetWidth() * 0.22) --Put other stuff back _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck:ClearAllPoints() _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck:Point("BOTTOMLEFT", _G.CompactRaidFrameManagerDisplayFrameLockedModeToggle, "TOPLEFT", 0, 1) _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck:Point("BOTTOMRIGHT", _G.CompactRaidFrameManagerDisplayFrameHiddenModeToggle, "TOPRIGHT", 0, 1) _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll:ClearAllPoints() _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll:Point("BOTTOMLEFT", _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck, "TOPLEFT", 0, 1) _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll:Point("BOTTOMRIGHT", _G.CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck, "TOPRIGHT", 0, 1) tinsert(buttons, "CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton") else E:StaticPopup_Show("WARNING_BLIZZARD_ADDONS") end --Reskin Stuff for _, button in pairs(buttons) do local f = _G[button] f.BottomLeft:SetAlpha(0) f.BottomRight:SetAlpha(0) f.BottomMiddle:SetAlpha(0) f.TopMiddle:SetAlpha(0) f.TopLeft:SetAlpha(0) f.TopRight:SetAlpha(0) f.MiddleLeft:SetAlpha(0) f.MiddleRight:SetAlpha(0) f.MiddleMiddle:SetAlpha(0) f:SetHighlightTexture("") f:SetDisabledTexture("") f:HookScript("OnEnter", ButtonEnter) f:HookScript("OnLeave", ButtonLeave) f:SetTemplate(nil, true) end --Automatically show/hide the frame if we have RaidLeader or RaidOfficer self:RegisterEvent("GROUP_ROSTER_UPDATE", 'ToggleRaidUtil') self:RegisterEvent("PLAYER_ENTERING_WORLD", 'ToggleRaidUtil') end local function InitializeCallback() RU:Initialize() end E:RegisterInitialModule(RU:GetName(), InitializeCallback)
----utility functions local function save_data(filename,...) local file,err = io.open(filename,"w") if not file then error(err) end for i=1, select('#', ...) do local data = select(i, ...) file:write(data) end file:close() end ---------------------------------------- local function read_data(filename) local hfile,err = io.open(filename,"r") if not hfile then error(err) end local hstrfile = hfile:read"*a" hfile:close() return hstrfile end --iterates lines from a gcc -E in a specific location local function location(file,locpathT) local location_re = '^# (%d+) "([^"]*)"' local path_reT = {} for i,locpath in ipairs(locpathT) do table.insert(path_reT,'^(.*[\\/])('..locpath..')%.h$') end local in_location = false local which_location = "" local loc_num local loc_num_incr local lineold = "" local which_locationold,loc_num_realold local lastdumped = false local function location_it() repeat local line = file:read"*l" if not line then if not lastdumped then lastdumped = true return lineold, which_locationold,loc_num_realold else return nil end end if line:sub(1,1) == "#" then -- Is this a location pragma? local loc_num_t,location_match = line:match(location_re) if location_match then in_location = false for i,path_re in ipairs(path_reT) do if location_match:match(path_re) then in_location = true; loc_num = loc_num_t loc_num_incr = 0 which_location = locpathT[i] break end end end elseif in_location then local loc_num_real = loc_num + loc_num_incr loc_num_incr = loc_num_incr + 1 if loc_num_realold and loc_num_realold < loc_num_real then --old line complete local lineR,which_locationR,loc_num_realR = lineold, which_locationold,loc_num_realold lineold, which_locationold,loc_num_realold = line,which_location,loc_num_real return lineR,which_locationR,loc_num_realR else lineold=lineold..line which_locationold,loc_num_realold = which_location,loc_num_real --return line,loc_num_real, which_location end end until false end return location_it end local function get_cdefs(gccline,locat,cdef) cdef = cdef or {} local pipe,err = io.popen(gccline,"r") if not pipe then error("could not execute gcc "..err) end for line in location(pipe,{locat}) do line = line:gsub("extern __attribute__%(%(dllexport%)%)%s*","") line = line:gsub("extern __declspec%(dllexport%)%s*","") if line~="" then table.insert(cdef,line) end end pipe:close() return cdef end local function get_all_cdefs(sources) local cdefs = {} for i,v in ipairs(sources) do print("get cdefs from",v) cdefs = get_cdefs([[gcc -E -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS -I "../cimgui" ]].."../"..v.."/"..v..".h",v,cdefs) end return cdefs end -------------------------------------------------------- --first get cdefs print"get cdefs" local sources = {"cimgui", "cimplot", "cimguizmo", "cimguizmo_quat", "cimnodes","cimnodes_r"} local cdefs = get_all_cdefs(sources) print"get cimgui_impl cdefs" cdefs = get_cdefs([[gcc -E -DCIMGUI_API="" ../cimgui/generator/output/cimgui_impl.h]],"cimgui_impl",cdefs) table.insert(cdefs,1,"typedef void FILE;") ----- create imgui/cdefs.lua print"save cdefs.lua" --time_t is needed for implot_internal local time_t_cdefs = [=[ --time_t needed for implot_internal local ffi = require"ffi" local IS_64_BIT = ffi.abi('64bit') local cdecl = "" cdecl = cdecl .. [[ typedef struct tm { int tm_sec ; int tm_min ; int tm_hour ; int tm_mday ; int tm_mon ; int tm_year ; int tm_wday ; int tm_yday ; int tm_isdst ; } tm; ]] if ffi.os == "Windows" then if IS_64_BIT then cdecl = cdecl..[[typedef __int64 time_t;]] else cdecl = cdecl..[[typedef __int32 time_t;]] end else cdecl = cdecl..[[typedef size_t time_t;]] end ]=] table.insert(cdefs,1,time_t_cdefs) table.insert(cdefs,2,"--[[ BEGIN AUTOGENERATED SEGMENT ]]\n cdecl = cdecl .. [[") table.insert(cdefs,"]]\n--[[ END AUTOGENERATED SEGMENT ]]\n") local hstrfile = read_data"./imgui_base_cdefs.lua" save_data("./imgui/cdefs.lua",table.concat(cdefs,"\n"), hstrfile) ----- generate imgui/glfw.lua print"save glfw.lua" local class_gen = require"class_gen" local classes = class_gen(sources) local iniclass = "local cimguimodule = 'cimgui_glfw' --set imgui directory location\n" local base = read_data("./imgui_base.lua") save_data("./imgui/glfw.lua",iniclass, base, classes) ----- generate imgui/sdl.lua print"save sdl.lua" local iniclass = "local cimguimodule = 'cimgui_sdl' --set imgui directory location\n" save_data("./imgui/sdl.lua",iniclass, base, classes) print"-----------------------------done generation"
-- Copyright (c) 2021 wzhengsen -- 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 type = type; local table = table; -- 重写一些lua库函数和增加一些库函数。 ---遍历表,且可遍历嵌套表,返回3个值:当前表,当前键,当前值。 ---不会触发__pairs元方法。 ---@param t table ---@return function function _G.apairs(t) local curTable = t; -- 记录即将被遍历的表。 local tabList = {}; local key,val = nil,nil; return function () ::begin:: key,val = next(curTable,key); if "table" == type(val) then table.insert(tabList,val); end if nil == key then if #tabList > 0 then curTable = table.remove(tabList); goto begin else curTable = nil; end end return curTable,key,val; end end ---以不会触发__pairs元方法的方式遍历表。 ---@param t table ---@return function function _G.rpairs(t) local key,value = nil,nil; return function () key,value = next(t,key); return key,value; end end if os.Windows then local _dofile = dofile; function dofile(filename) if filename then filename = filename:Convert("gbk//TRANSLIT","utf-8"); end return _dofile(filename); end local _loadfile = loadfile; function loadfile(filename,...) if filename then filename = filename:Convert("gbk//TRANSLIT","utf-8"); end return _loadfile(filename,...); end end
-- https://phelipetls.github.io/posts/async-make-in-nvim-with-lua/ local M = {} local util = require("go.utils") local log = util.log function M.make(...) local args = { ... } local lines = {} local errorlines = {} local winnr = vim.fn.win_getid() local bufnr = vim.api.nvim_win_get_buf(winnr) local makeprg = vim.api.nvim_buf_get_option(bufnr, "makeprg") log(makeprg, args) local indent = "%\\%( %\\)" if not makeprg then log("makeprog not setup") return end local efm = [[%-G#\ %.%#]] if makeprg:find("go build") then vim.cmd([[setl errorformat=%-G#\ %.%#]]) -- if makeprg:find("go build") then efm = efm .. [[,%-G%.%#panic:\ %m]] efm = efm .. [[,%Ecan\'t\ load\ package:\ %m]] efm = efm .. [[,%A%\\%%\(%[%^:]%\\+:\ %\\)%\\?%f:%l:%c:\ %m]] efm = efm .. [[,%A%\\%%\(%[%^:]%\\+:\ %\\)%\\?%f:%l:\ %m]] efm = efm .. [[,%C%*\\s%m]] efm = efm .. [[,%-G%.%#]] end -- end local runner = "golangci-lint" if makeprg:find("golangci%-lint") then -- lint efm = efm .. [[,%A%\\%%(%[%^:]%\\+:\ %\\)%\\?%f:%l:%c:\ %m]] efm = efm .. [[,%A%\\%%(%[%^:]%\\+:\ %\\)%\\?%f:%l:\ %m]] local pwd = util.work_path() local cfg = pwd .. ".golangci.yml" if util.file_exists(cfg) then makeprg = makeprg .. [[\ -c\ ]] .. cfg -- vim.api.nvim_buf_set_option(bufnr, "makeprg", makeprg) end end if makeprg:find("go run") then runner = "go run" if args == nil or #args == 0 then makeprg = makeprg .. " ." -- vim.api.nvim_buf_set_option(bufnr, "makeprg", makeprg) end efm = efm .. [[,%A%\\t%#%f:%l\ +0x%[0-9A-Fa-f]%\\+]] log("go run", makeprg) end if makeprg:find("go vet") then runner = "go vet" if args == nil or #args == 0 then makeprg = makeprg .. " ." -- vim.api.nvim_buf_set_option(bufnr, "makeprg", makeprg) end efm = efm .. [[,%-Gexit\ status\ %\\d%\\+]] end if makeprg:find("test") then log("go test") runner = "go test" -- I feel it is better to output everything -- efm = efm .. [[,]] .. require("go.gotest").efm() end local cmd = vim.fn.split(makeprg, " ") if args and #args > 0 then cmd = vim.list_extend(cmd, args) -- vim.api.nvim_buf_set_option(bufnr, "makeprg", makeprg) end local function on_event(job_id, data, event) log("stdout", data, event) if event == "stdout" then if data then for _, value in ipairs(data) do if value ~= "" then table.insert(lines, value) end end end end if event == "stderr" then if data then for _, value in ipairs(data) do if value ~= "" then table.insert(errorlines, value) end end end if next(errorlines) ~= nil and runner == "golangci-lint" then efm = [[level=%tarning\ msg="%m:\ [%f:%l:%c:\ %.%#]",level=%tarning\ msg="%m",level=%trror\ msg="%m:\ [%f:%l:%c:\ %.%#]",level=%trror\ msg="%m",%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l\ %m]] end end if event == "exit" then if #errorlines > 0 then if #lines > 0 then vim.list_extend(errorlines, lines) end vim.fn.setqflist({}, " ", { title = cmd, lines = errorlines, efm = efm, }) elseif #lines > 0 then vim.fn.setqflist({}, " ", { title = cmd, lines = lines, }) end vim.api.nvim_command("doautocmd QuickFixCmdPost") vim.cmd("botright copen") if type(cmd) == "table" then cmd = table.concat(cmd, " ") end vim.notify(cmd .. " finished", vim.lsp.log_levels.WARN) end end local job_id = vim.fn.jobstart(cmd, { on_stderr = on_event, on_stdout = on_event, on_exit = on_event, stdout_buffered = true, stderr_buffered = true, }) end return M
local exports = {} local serialized_table_token = '@@lua_table@@' local json = require 'dkjson' --- -- @param value -- @return string --- local serialize = function(value) if type(value) == 'table' then value = serialized_table_token .. json.encode(value) end return value end --- -- @param value string json -- @return mixed --- local unserialize = function(value) if type(value) == 'string' and value:sub(1, serialized_table_token:len()) == serialized_table_token then local succ, decoded_value = pcall(function() return json.decode(value:sub(serialized_table_token:len() + 1)) end) if succ then value = decoded_value end end return value end -- /serializer -------------------------------------------------------------------------------- -- EXPORTS -------------------------------------------------------------------------------- exports.serialize = serialize exports.unserialize = unserialize return exports
local luview = require 'luview' local lunum = require 'lunum' local shaders = require 'shaders' local window = luview.Window() local box = luview.BoundingBox() local points = luview.PointsSource() local colors = luview.FunctionMapping() local pntens = luview.PointsEnsemble() local shader = shaders.load_shader("lambertian") local function make_data(lam) local Npnt = 800 local pntdata = lunum.zeros{Npnt,3} local xn = { } xn[1] = 0.5 for n=1,Npnt+10 do xn[n+1] = lam * xn[n] * (1 - xn[n]) end for i=0,Npnt-1 do pntdata[{i,0}] = xn[i+1] pntdata[{i,1}] = xn[i+2] pntdata[{i,2}] = xn[i+3] end collectgarbage() return pntdata end local function cmap1(x,y,z) return z,z,z,0.9 end local function cmap2(x,y,z) local a = 100.0 local b = 2 return math.exp(-a*(z-0.3)^b), math.exp(-a*(z-0.5)^b), math.exp(-a*(z-0.7)^b), 1.0 end points:set_points(make_data(3.8)) colors:set_input(points) colors:set_transform(cmap2) pntens:set_data("points", points) pntens:set_data("colors", colors) pntens:set_position(-0.5, -0.5, 0.5) pntens:set_linewidth(64.0) pntens:set_alpha(0.1) window:set_color(0.05, 0.1, 0.1) box:set_color(0.5, 0.9, 0.9) box:set_shader(shader) local status = "continue" local key = '' local lambda = 3.6 while status == "continue" do status, key = window:render_scene({box, pntens}) if key == 'l' then lambda = lambda - 0.01 points:set_points(make_data(lambda)) end if key == 'L' then lambda = lambda + 0.01 points:set_points(make_data(lambda)) end end
local simplex_noise = require 'tools.simplex_noise' local Event = require 'utils.event' biter_battles_terrain = {} --no need to constantly work out each chunk local radius = 24 --starting pond radius local radsquare = radius*radius local ore_amount = 1400 local ores = {"copper-ore", "iron-ore", "stone", "coal", "uranium-ore"} -- /c game.forces["north"].chart(game.player.surface, {lefttop = {x = -1024, y = -1024}, rightbottom = {x = 1024, y = 1024}}) local function on_chunk_generated(event) if not global.noise_seed then global.noise_seed = math.random(1,5000000) end local left_top = event.area.left_top --decreased var calls in later loop with more direct local surface = game.surfaces[1] local noise = {} local entities = surface.find_entities(event.area) for _, entity in pairs(entities) do if entity.type == "resource" then entity.destroy() end end for x = 0, 31, 1 do for y = 0, 31, 1 do local pos_x = left_top.x + x local pos_y = left_top.y + y local tile_to_insert = false --noise[1] = simplex_noise.d2(pos_x/350, pos_y/350,global.noise_seed) noise[1] = simplex_noise.d2(pos_x*0.008, pos_y*0.008,global.noise_seed) --100 noise[2] = simplex_noise.d2(pos_x*0.05, pos_y*0.05,global.noise_seed+10000) noise[3] = noise[1] + noise[2] * 0.1 --local xx = 1 --for yy = 1, 17, 1 do --local z = (yy % 4) + 1 --xx = xx - 0.010 --if noise[3] > xx then if noise[3] > 0.65 then local a = ore_amount * (1+(noise[2]*0.3)) --moved to when used --local z = (yy % 4) + 1 noise[4] = simplex_noise.d2(pos_x*0.005, pos_y*0.005,global.noise_seed+5000) noise[5] = simplex_noise.d2(pos_x*0.005, pos_y*0.005,global.noise_seed+3000) local z = 2 if noise[4] > 0.2 then if noise[5] > 0.05 then z = 3 elseif noise[5] < -0.05 then z = 4 else z = 5 end elseif noise[4] < -0.2 then if noise[5] > 0.05 then z = 1 elseif noise[5] < -0.05 then z = 2 else z = 5 end else z = math.floor((noise[3]+noise[2]*0.1)* 40) % 4 + 1 end --if noise[4] > 0.0 and noise[4] < 0.05 then z = (math.floor((noise[3]+noise[2]*0.1)* 40) % 4) + 1 end if surface.can_place_entity {name=ores[z], position={pos_x,pos_y}, amount=a} then surface.create_entity {name=ores[z], position={pos_x,pos_y}, amount=a} end --break elseif noise[3] < -0.85 then if math.random(1,250) == 1 and surface.can_place_entity {name="crude-oil", position={pos_x,pos_y}} then surface.create_entity {name="crude-oil", position={pos_x,pos_y}, amount = math.random(140000,380000) } end end --end end end if left_top.y > 96 or left_top.y < -128 then return end --tweeked range local tiles = {} local spawn_tile = surface.get_tile(game.forces.south.get_spawn_position(surface)) for x = 0, 31, 1 do for y = 0, 31, 1 do local pos_x = left_top.x + x local pos_y = left_top.y + y local tile_to_insert = false local tile_distance_to_center = pos_x^2 + pos_y^2 noise[4] = simplex_noise.d2(pos_x*0.0118, pos_y*0.0118,global.noise_seed+20000) noise[5] = simplex_noise.d2(pos_x*0.15, pos_y*0.15,global.noise_seed+30000) noise[7] = 1 + (noise[4]+(noise[5]*0.75))*0.1 if pos_y >= ((global.horizontal_border_width/2)*-1)*noise[7] and pos_y <= (global.horizontal_border_width/2)*noise[7] then local entities = surface.find_entities({{pos_x, pos_y}, {pos_x+1, pos_y+1}}) for _, e in pairs(entities) do if e.type == "simple-entity" or e.type == "resource" or e.type == "tree" then e.destroy() end end tile_to_insert = "deepwater" else local t = surface.get_tile(pos_x,pos_y) if t.name == "deepwater" or t.name =="water" then if tile_distance_to_center < 20000 then if spawn_tile.name == "water" or spawn_tile.name == "deepwater" then tile_to_insert = "sand-1" else tile_to_insert = spawn_tile.name end end end end if tile_distance_to_center <= radsquare then if tile_distance_to_center >= radsquare/10 then tile_to_insert = "deepwater" else tile_to_insert = "sand-1" if tile_distance_to_center >= radsquare/18 then tile_to_insert = "refined-concrete" end end end if tile_to_insert then table.insert(tiles, {name = tile_to_insert, position = {pos_x,pos_y}}) end end end surface.set_tiles(tiles,true) for x = 0, 31, 1 do for y = 0, 31, 1 do local pos_x = left_top.x + x local pos_y = left_top.y + y local t = surface.get_tile(pos_x,pos_y) if t.name == "water" or t.name == "deepwater" or t.name == "water-green" then if surface.can_place_entity{name="fish", position={pos_x,pos_y}} and math.random(1,40) == 1 then surface.create_entity {name="fish", position={pos_x,pos_y}} end end end end end local function find_tile_placement_spot_around_target_position(tilename, position, mode, density) local x = position.x local y = position.y if not surface then surface = game.surfaces[1] end local scan_radius = 50 if not tilename then return end if not mode then mode = "ball" end if not density then density = 1 end local cluster_tiles = {} local auto_correct = true local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end local i = 2 local r = 1 if mode == "ball" then if math.random(1,2) == 1 then density = density * -1 end r = math.random(1,4) end if mode == "line" then density = 1 r = math.random(1,4) end if mode == "line_down" then density = density * -1 r = math.random(1,4) end if mode == "line_up" then density = 1 r = math.random(1,4) end if mode == "block" then r = 1 density = 1 end if r == 1 then --start placing at -1,-1 while i <= scan_radius do y = y - density x = x - density for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end x = x + density end for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end y = y + density end for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end x = x - density end for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end y = y - density end i = i + 2 end end if r == 2 then --start placing at 0,-1 while i <= scan_radius do y = y - density x = x - density for a = 1, i, 1 do x = x + density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end for a = 1, i, 1 do y = y + density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end for a = 1, i, 1 do x = x - density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end for a = 1, i, 1 do y = y - density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end i = i + 2 end end if r == 3 then --start placing at 1,-1 while i <= scan_radius do y = y - density x = x + density for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end y = y + density end for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end x = x - density end for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end y = y - density end for a = 1, i, 1 do local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end x = x + density end i = i + 2 end end if r == 4 then --start placing at 1,0 while i <= scan_radius do y = y - density x = x + density for a = 1, i, 1 do y = y + density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end for a = 1, i, 1 do x = x - density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end for a = 1, i, 1 do y = y - density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end for a = 1, i, 1 do x = x + density local scanned_tile = surface.get_tile(x,y) if scanned_tile.name ~= tilename then table.insert(cluster_tiles, {name = tilename, position = {x,y}}) surface.set_tiles(cluster_tiles,auto_correct) return true, x, y end end i = i + 2 end end return false end local function create_tile_cluster(tilename,position,amount) local mode = "ball" local cluster_tiles = {} local surface = game.surfaces[1] local pos = position local x = pos.x local y = pos.y for i = 1, amount, 1 do local b,x,y = find_tile_placement_spot_around_target_position(tilename, pos, mode) if b == true then if 1 == math.random(1,16) then pos.x = x pos.y = y end end if b == false then return false,x,y end if i >= amount then return true,x,y end end end function biter_battles_terrain.generate_spawn_water_pond() local x = 1 local surface = game.surfaces[1] for _, silo in pairs(global.rocket_silo) do local pos = {} local wreck_pos = {} pos["x"]=silo.position.x + 60*x pos["y"]=silo.position.y - 5*x wreck_pos["x"]=silo.position.x + 60*x wreck_pos["y"]=silo.position.y - 5*x create_tile_cluster("water-green",pos,450) local p = surface.find_non_colliding_position("big-ship-wreck-1", {wreck_pos.x,wreck_pos.y-3*x}, 20,1) local e = surface.create_entity {name="big-ship-wreck-1", position=p, force=silo.force.name} e.insert({name = 'copper-cable', count = 7}) e.insert({name = 'iron-stick', count = 3}) local p = surface.find_non_colliding_position("big-ship-wreck-3", {pos.x-3*x,pos.y}, 20,1) local e = surface.create_entity {name="big-ship-wreck-3", position=p, force=silo.force.name} e.insert({name = 'land-mine', count = 6}) pos["x"]=silo.position.x - math.random(80,90)*x pos["y"]=silo.position.y - math.random(50,70)*x create_tile_cluster("water-green",pos,300) local p = surface.find_non_colliding_position("big-ship-wreck-2", {pos.x+3*x,pos.y+1*x}, 20,1) local e = surface.create_entity {name="big-ship-wreck-2", position=p, force=silo.force.name} e.insert({name = 'empty-barrel', count = 1}) e.insert({name = 'lubricant-barrel', count = 2}) local p = surface.find_non_colliding_position("crude-oil", {pos.x-5*x,pos.y+5*x}, 50,1) local e = surface.create_entity {name="crude-oil", position=p, amount=225000} x = -1 end end function biter_battles_terrain.clear_spawn_ores() local surface = game.surfaces[1] for x = -200,200,1 do for y = -200,200,1 do local tile_distance_to_center = math.sqrt(x^2 + y^2) if tile_distance_to_center < 150 then local entities = surface.find_entities({{x, y}, {x+1, y+1}}) for _, e in pairs(entities) do if e.type == "resource" then e.destroy() end end end end end end function biter_battles_terrain.generate_spawn_ores(ore_layout) local surface = game.surfaces[1] local tiles = {} --generate ores around silos local ore_layout = "windows" --local ore_layout = "4squares" local ore_amount = 1000 if ore_layout == "4squares" then local size = 22 for _, rocket_silo in pairs(global.rocket_silo) do local tiles = {} for x = (size+1)*-1, size+1, 1 do for y = (size+1)*-1, size+1, 1 do table.insert(tiles, {name = "stone-path", position = {rocket_silo.position.x + x,rocket_silo.position.y + y}}) end end surface.set_tiles(tiles,true) local entities = surface.find_entities({{(rocket_silo.position.x-4)-size/2, (rocket_silo.position.y-5)-size/2}, {rocket_silo.position.x+4+size/2, rocket_silo.position.y+5+size/2}}) for _, entity in pairs(entities) do if entity.type == "simple-entity" or entity.type == "tree" or entity.type == "resource" then entity.destroy() end end end for x = size*-1, size, 1 do for y = size*-1, size, 1 do if x > 0 and y < 0 then if surface.can_place_entity {name="stone", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} then surface.create_entity {name="stone", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} end end if x < 0 and y < 0 then if surface.can_place_entity {name="coal", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} then surface.create_entity {name="coal", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} end end if x < 0 and y > 0 then if surface.can_place_entity {name="copper-ore", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} then surface.create_entity {name="copper-ore", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} end end if x > 0 and y > 0 then if surface.can_place_entity {name="iron-ore", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} then surface.create_entity {name="iron-ore", position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} end end if x < 0 and y > 0 then if surface.can_place_entity {name="stone", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} then surface.create_entity {name="stone", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} end end if x > 0 and y > 0 then if surface.can_place_entity {name="coal", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} then surface.create_entity {name="coal", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} end end if x > 0 and y < 0 then if surface.can_place_entity {name="copper-ore", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} then surface.create_entity {name="copper-ore", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} end end if x < 0 and y < 0 then if surface.can_place_entity {name="iron-ore", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} then surface.create_entity {name="iron-ore", position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} end end end end for _, rocket_silo in pairs(global.rocket_silo) do local entities = surface.find_entities({{rocket_silo.position.x-5, rocket_silo.position.y-6}, {rocket_silo.position.x+5, rocket_silo.position.y+6}}) for _, entity in pairs(entities) do if entity.type == "resource" then entity.destroy() end end end end if ore_layout == "windows" then for x = -24, 24, 1 do for y = -25, 24, 1 do table.insert(tiles, {name = "stone-path", position = {global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}}) table.insert(tiles, {name = "stone-path", position = {global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}}) end end surface.set_tiles(tiles,true) local ore = {"stone","stone","stone","stone","coal","coal","coal","coal","coal","copper-ore","copper-ore","copper-ore","copper-ore","copper-ore","iron-ore","iron-ore","iron-ore","iron-ore","iron-ore"} for z = 1, 19, 1 do for x = -4-z, 4+z, 1 do for y = -5-z, 4+z, 1 do if surface.can_place_entity {name=ore[z], position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} then surface.create_entity {name=ore[z], position={global.rocket_silo["south"].position.x + x,global.rocket_silo["south"].position.y + y}, amount=ore_amount} end end end end for z = 1, 19, 1 do for x = -4-z, 4+z, 1 do for y = -5-z, 4+z, 1 do if surface.can_place_entity {name=ore[z], position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} then surface.create_entity {name=ore[z], position={global.rocket_silo["north"].position.x + x,global.rocket_silo["north"].position.y + y}, amount=ore_amount} end end end end end for _, rocket_silo in pairs(global.rocket_silo) do local entities = surface.find_entities({{rocket_silo.position.x-4, rocket_silo.position.y-5}, {rocket_silo.position.x+4, rocket_silo.position.y+5}}) for _, entity in pairs(entities) do if entity.type == "resource" then entity.destroy() end end end end Event.add(defines.events.on_chunk_generated, on_chunk_generated) return biter_battles_ores
MainColor = "Bright blue" Name = "xSoulStealerx" Plrs = game:GetService("Players") me = Plrs[Name] char = me.Character Modelname = "xDragon" PetName = "xDragon" Toolname = "Dragon" Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"} necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) selected = false Hurt = false Deb = true Able = true Prop = {Damage = 30} ToolIcon = "" MouseIc = "" MouseDo = "" Add = { Sphere = function(P) local m = Instance.new("SpecialMesh",P) m.MeshType = "Sphere" return m end, BF = function(P) local bf = Instance.new("BodyForce",P) bf.force = Vector3.new(0, P:GetMass()*187, 0) return bf end, BP = function(P) local bp = Instance.new("BodyPosition",P) bp.maxForce = Vector3.new(math.huge, 0, math.huge) bp.P = 14000 return bp end, BG = function(P) local bg = Instance.new("BodyGyro",P) bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge) bg.P = 14000 return bg end, Mesh = function(P, ID, x, y, z) local m = Instance.new("SpecialMesh") m.MeshId = ID m.Scale = Vector3.new(x, y, z) m.Parent = P return m end, Sound = function(P, ID, vol, pitch) local s = Instance.new("Sound") s.SoundId = ID s.Volume = vol s.Pitch = pitch s.Parent = P return s end } function find(tab, arg) local ah = nil for i,v in pairs(tab) do if v == arg then ah = v end end return ah end function getAllParts(from) local t = {} function getParts(where) for i, v in pairs(where:children()) do if v:IsA("BasePart") then if v.Parent ~= char and v.Parent.Parent ~= char then table.insert(t, v) end end getParts(v) end end getParts(workspace) return t end function RayCast(pos1, pos2, maxDist, forward) local list = getAllParts(workspace) local pos0 = pos1 for dist = 1, maxDist, forward do pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -dist)).p for _, v in pairs(list) do local pos3 = v.CFrame:pointToObjectSpace(pos0) local s = v.Size if pos3.x > -(s.x/2) and pos3.x < (s.x/2) and pos3.y > -(s.y/2) and pos3.y < (s.y/2) and pos3.z > -(s.z/2) and pos3.x < (s.z/2) and v.CanCollide == true then return pos0, v end end end return pos0, nil end function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break) local p = Instance.new("Part") p.formFactor = "Custom" p.Anchored = Anchor p.CanCollide = Collide p.Transparency = Tran p.Reflectance = Ref p.BrickColor = BrickColor.new(Color) for _, Surf in pairs(Surfaces) do p[Surf] = "Smooth" end p.Size = Vector3.new(X, Y, Z) if Break then p:BreakJoints() else p:MakeJoints() end p.Parent = Parent return p end function Weld(p0, p1, x, y, z, a, b, c) local w = Instance.new("Weld") w.Parent = p0 w.Part0 = p0 w.Part1 = p1 w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c) return w end function ComputePos(pos1, pos2) local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z) return CFrame.new(pos1, pos3) end function getHumanoid(c) local h = nil for i,v in pairs(c:children()) do if v:IsA("Humanoid") and c ~= char then if v.Health > 0 then h = v end end end return h end for i,v in pairs(char:children()) do if v.Name == Modelname or v.Name == PetName then v:remove() end end torso = char.Torso neck = torso.Neck hum = char.Humanoid Rarm = char["Right Arm"] Larm = char["Left Arm"] Rleg = char["Right Leg"] Lleg = char["Left Leg"] hc = Instance.new("Humanoid") hc.Health = 0 hc.MaxHealth = 0 slash = Add.Sound(nil, "rbxasset://sounds//swordslash.wav", 0.9, 0.8) hitsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2801263", 0.7, 0.6) charge = Add.Sound(nil, "http://www.roblox.com/asset/?id=2101137", 0.8, 0.65) boom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2691586", 0.8, 0.3) smashsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2692806", 0.8, 0.35) boomboom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2760979", 1, 0.18) function PlaySound(sound, pitch, vol) local s = sound:clone() if pitch ~= nil then if tonumber(pitch) then s.Pitch = tonumber(pitch) end end if vol ~= nil then if tonumber(vol) then s.Volume = tonumber(vol) end end s.Parent = torso s.PlayOnRemove = true coroutine.resume(coroutine.create(function() wait() s:remove() end)) end Mo = Instance.new("Model") Mo.Name = Modelname RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0) LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0) RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0) LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0) RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0) LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0) RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0) LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0) HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) HBW = Weld(Rarm, HB, 0, 1, 0, 0, 0, 0) HW = Weld(HB, nil, 0, -1.3, 0, math.pi/2, 0, 0) TH = Weld(torso, nil, -0.8, 0.4, -0.4, 0, math.pi/2, math.rad(80)) RAWStand, LAWStand, RLWStand, LLWStand, HWStand = nil --handle = Part(Mo, false, false, 0, 0, GuitarColour, 0.6, 1.5, 1.5, true) Pet = Instance.new("Model") Pet.Name = PetName petbody = Part(Pet, false, true, 0, 0, MainColor, 3, 2.6, 6, true) Add.Sphere(petbody) petbody.CFrame = torso.CFrame * CFrame.new(4, 0, 0) bodytrim = Part(Pet, false, true, 0, 0, "Cool yellow", 2.7, 2.4, 5.4, true) Add.Sphere(bodytrim) Weld(petbody, bodytrim, 0, 0.25, 0, 0, 0, 0) neckplace = Part(Pet, false, false, 0, 0, "Cool yellow", 0.1, 0.1, 0.1, true) Weld(petbody, neckplace, 0, -0.2, 2.6, 0, 0, 0) Mo.Parent = char Pet.Parent = char TH.Part1 = handle if script.Parent.className ~= "HopperBin" then h = Instance.new("HopperBin",me.Backpack) h.Name = Toolname h.TextureId = ToolIcon script.Parent = h end bin = script.Parent function detach(bool) LLW.C0 = CFrame.new(0, 0, 0) RLW.C0 = CFrame.new(0, 0, 0) LAW.C0 = CFrame.new(0,0,0) RAW.C0 = CFrame.new(0, 0, 0) if bool then LLW.Part1 = nil RLW.Part1 = nil RAW.Part1 = nil LAW.Part1 = nil end end function attach() RAW.Part1 = Rarm LAW.Part1 = Larm RLW.Part1 = Rleg LLW.Part1 = Lleg end function normal() neck.C0 = NeckStand RAW.C0 = RAWStand LAW.C0 = LAWStand RLW.C0 = RLWStand LLW.C0 = LLWStand RAW.C1 = CFrame.new(0, 0.5, 0) LAW.C1 = CFrame.new(0, 0.5, 0) RLW.C1 = CFrame.new(0, 0.8, 0) LLW.C1 = CFrame.new(0, 0.8, 0) HW.C0 = HWStand end function idleanim() attach() for i = 0, 1, 0.03 do RAW.C0 = RAWStand * CFrame.Angles(0, 0, 0) LAW.C0 = LAWStand * CFrame.Angles(0, 0, 0) RLW.C0 = RLWStand * CFrame.Angles(0, 0, 0) LLW.C0 = LLWStand * CFrame.Angles(0, 0, 0) neck.C0 = NeckStand * CFrame.Angles(0, 0, 0) if selected == false or torso.Velocity.magnitude > 2 or Able == false then break end wait() end wait() for i = 1, 0, -0.02 do RAW.C0 = RAWStand * CFrame.Angles(0, 0, 0) LAW.C0 = LAWStand * CFrame.Angles(0, 0, 0) RLW.C0 = RLWStand * CFrame.Angles(0, 0, 0) LLW.C0 = LLWStand * CFrame.Angles(0, 0, 0) neck.C0 = NeckStand * CFrame.Angles(0, 0, 0) if selected == false or torso.Velocity.magnitude > 2 or Able == false then break end wait() end normal() end function runanim() RLW.Part1 = nil LLW.Part1 = nil end coroutine.resume(coroutine.create(function() while true do wait() if selected and Able == true then if torso.Velocity.magnitude < 2 then --idleanim() wait() else --runanim() wait() end end end end)) function selectanim() attach() if RAWStand == nil then RAWStand = RAW.C0 LAWStand = LAW.C0 RLWStand = RLW.C0 LLWStand = LLW.C0 HWStand = HW.C0 end normal() end function deselanim() neck.C0 = necko detach(true) end function select(mouse) selectanim() selected = true mouse.KeyDown:connect(function(key) key = key:lower() end) mouse.Button1Down:connect(function() end) end function deselect(mouse) selected = false deselanim() end bin.Selected:connect(select) bin.Deselected:connect(deselect)
test_run = require('test_run').new() -- -- gh-5435: make sure the new limbo owner commits everything there is left in -- the limbo from an old owner. -- SERVERS = {'election_replica1', 'election_replica2', 'election_replica3'} test_run:create_cluster(SERVERS, "replication", {args='2 0.4'}) test_run:wait_fullmesh(SERVERS) -- Force election_replica1 to become leader. test_run:switch('election_replica2') box.cfg{election_mode='voter'} test_run:switch('election_replica3') box.cfg{election_mode='voter'} test_run:switch('election_replica1') box.ctl.wait_rw() _ = box.schema.space.create('test', {is_sync=true}) _ = box.space.test:create_index('pk') box.ctl.promote() -- Fill the limbo with pending entries. 3 mustn't receive them yet. test_run:cmd('stop server election_replica3') box.cfg{replication_synchro_quorum=3, replication_synchro_timeout=1000} lsn = box.info.lsn for i=1,10 do\ require('fiber').create(function() box.space.test:insert{i} end)\ end -- Wait for WAL write and replication. test_run:wait_cond(function() return box.info.lsn == lsn + 10 end) test_run:wait_lsn('election_replica2', 'election_replica1') test_run:cmd('switch election_replica2') test_run:cmd('stop server election_replica1') -- Since 2 is not the leader yet, 3 doesn't replicate the rows from it. -- It will vote for 2, however, since 2 has newer data, and start replication -- once 2 becomes the leader. test_run:cmd('start server election_replica3 with wait=False, wait_load=False, args="2 0.4 voter 2"') -- Set a huge timeout for 2 reasons. -- First, this guards us from the instance leaving clear_synchro_queue too early -- and confirming nothing. -- Second, it lets us test that the instance doesn't wait for the full timeout. box.cfg{replication_synchro_timeout=1000} box.cfg{election_mode='candidate'} box.ctl.wait_rw() -- If 2 decided whether to keep the rows or not right on becoming the leader, -- it would roll them all back. Make sure 2 waits till the rows are replicated -- to 3. box.space.test:select{} test_run:cmd('switch default') -- To silence the QA warning. The 1st replica is already stopped. SERVERS[1] = nil test_run:cmd('delete server election_replica1') test_run:drop_cluster(SERVERS)
local M = {} function M.seconds(amount) local co = coroutine.running() assert(co, "You must run this from within a coroutine") timer.delay(amount, false, function() coroutine.resume(co) end) coroutine.yield() end function M.eval(fn, timeout) local co = coroutine.running() assert(co, "You must run this from within a coroutine") local start = socket.gettime() timer.delay(0.01, true, function(self, handle, time_elapsed) if fn() or (timeout and socket.gettime() > (start + timeout)) then timer.cancel(handle) coroutine.resume(co) end end) coroutine.yield() end return setmetatable(M, { __call = function(self, arg1, ...) if type(arg1) == "number" then return M.seconds(arg1, ...) elseif type(arg1) == "function" then return M.eval(arg1, ...) else error("Unknown argument type") end end })
class "job.hos" ("job") local hos = job.hos hos.title = "Head of Security" hos.access = { "security", "sec_doors", "brig", "armory", "court", "weapons", "forensics_lockers", "morgue", "maint_tunnels", "all_personal_lockers", "research", "engine", "mining", "medical", "construction", "mailsorting", "heads", "hos", "rc_announce", "keycard_auth", "gateway", "maint_tunnels", "mineral_storeroom" } hos.extended_access = { } hos.total_positions = 1 hos.spawn_positions = 1 -- how many players can spawn in as this job? --[[ TODO change this value on map-load. Create a `player_spawn` entity which mutates this. ]] hos.supervisorsStr = "the Captain" hos.equip = { -- TODO -- silver ID -- hos pda -- hos headset -- hos jumpsuit -- sunglasses -- e-gun -- handcuffs -- beret -- black gloves -- jack boots }
return nil --TODO
--[[ ]] -- [[ LAPIS MODULES ]] local DB = require "lapis.db" local APPLICATION = require("lapis.application") local MODEL = require("lapis.db.model").Model --[[ ETC MODULES ]] local ParamUtil = require "ParamUtil" local Builder = require "ResponseBuilder" --[[ GLOBAL LAPIS CONSTANTS ]] local RESPOND_TO = APPLICATION.respond_to local JSON_PARAMS = APPLICATION.json_params -- [[ GLOBAL CONSTANTS ]] local NOT_IMPLEMENTED = {status = 501} --[[ MODULE ]] local module = {} function module.use(app) local userParams = ParamUtil.Flip( {"userid", "username", "email", "address", "bio"} ) -- [[ Base User Registration ]] local Users = MODEL:extend("users") -- determine if a username exists app:get("/users/find/:username", function(self) local user = Users:find({username = self.params.username}) if user then return Builder.OK({userid = user.id}, {Location = self.url_for("user", {userid = user.id})}) end return Builder.NotFound() end) -- GET user and UPDATE user app:match("user", "/users/:userid", RESPOND_TO({ GET = function(self) -- Make sure the userid is a number local userid = tonumber(self.params.userid) if not userid then return Builder.BadRequest("userid") end -- make sure the userid exists local user = Users:find(userid) if not user then return Builder.NotFound() end local data = { username = user.username, email = user.email, address = user.address, bio = user.bio } return Builder.OK(data) end, PATCH = JSON_PARAMS(function(self) -- Ensure only the "allowed" variables are set. local ok, key = ParamUtil.SoftCompare(self.params, userParams) if not ok then return Builder.BadRequest(key) end -- Make sure the userid is a number local userid = tonumber(self.params.userid) if not userid then return Builder.BadRequest("userid") end -- make sure the userid exists local user = Users:find(userid) if not user then return Builder.NotFound() end local data = {} for k, v in pairs(self.params) do if k ~= "userid" then data[k] = v end end user:update(data) return Builder.Updated() end), DELETE = JSON_PARAMS(function(self) -- Make sure the userid is a number local userid = tonumber(self.params.userid) if not userid then return Builder.BadRequest("userid") end -- make sure the userid exists local user = Users:find(userid) if not user then return Builder.NotFound() end user:delete() return Builder.Updated() end) })) -- self.params.userid, GET, PATCH -- Create user app:post("/users/new", JSON_PARAMS(function(self) local ok, key = ParamUtil.SoftCompare(self.params, userParams) if not ok then return Builder.BadRequest(key) end local t = { username = self.params.username, email = self.params.email, address = self.params.address, bio = self.params.bio } local user = Users:create(self.params) if user then return Builder.Created({userid = user.id}, {Location = self.url_for("user", {userid = user.id})}) end return Builder.UnknownError(1) end)) end return module
-- Source: https://wiki.wemos.cc/products:d1_mini_shields:oled_shield -- font_10x20,font_6x10,font_7x13,font_8x13,font_9x15,font_chikita print("\n display_oled.lua hv180729.1133 \n") pin_sda = 12 pin_scl = 11 disp_sla = 0x3c function init_OLED(sda, scl) i2c.setup(0, sda, scl, i2c.SLOW) disp = u8g.ssd1306_128x64_i2c(disp_sla) disp:setFontRefHeightExtendedText() disp:setDefaultForegroundColor() end function draw() disp:setFont(u8g.font_10x20) disp:setFontPosTop() disp:drawStr(0,0,oled_line1) disp:setFont(u8g.font_6x10) disp:setFontPosTop() disp:drawStr(0,14,oled_line2) disp:drawStr(0,28,oled_line3) disp:drawStr(0,42,oled_line4) disp:drawStr(0,70,oled_line5) end function disp_oled() disp:firstPage() repeat draw() until disp:nextPage() == false end init_OLED(pin_sda, pin_scl) --Run setting up
vTable = { [ 'Overwatch by Aurora Systems' ] = { [1] = { "Tracer's Pulse Gun" , "Uzi" , "overwatch/overwatch_micro_uzi.dff" , "overwatch/overwatch_micro_uzi.txd" , 352, "893KB" , true}, [2] = { "Pharah's Rocket Launcher" , "Rocket Launcher" , "overwatch/overwatch_rocketla.dff" , "overwatch/overwatch_rocketla.txd" , 359, "1049KB" , true}, [3] = { "Wildowmaker's Rifle" , "AK-47" , "overwatch/overwatch_ak47.dff" , "overwatch/overwatch_ak47.txd" , 355, "1.8MB" , true}, }, [ 'Blue-Line by Larry & Beka' ] = { [1] = { "BlueLine Deagle" , "Deagle" , "blueline/blueline_desert_eagle.dff" , "blueline/blueline_desert_eagle.txd" , 348, "3.5MB" , true}, [2] = { "BlueLine Spas-12" , "Combat Shotgun" , "blueline/blueline_chromegun.dff" , "blueline/blueline_chromegun.txd" , 349, "2MB" , true}, [3] = { "BlueLine MP5" , "MP5" , "blueline/blueline_mp5lng.dff" , "blueline/blueline_mp5lng.txd" , 353, "1.7MB" , true}, [4] = { "BlueLine M4A4" , "M4" , "blueline/blueline_m4.dff" , "blueline/blueline_m4.txd" , 356, "2.3MB" , true}, [5] = { "BlueLine Sniper" , "Sniper" , "blueline/blueline_sniper.dff" , "blueline/blueline_sniper.txd" , 358, "4.3MB" , true}, [6] = { "BlueLine Shotgun" , "Shotgun" , "blueline/blueline_shotgspa.dff" , "blueline/blueline_shotgspa.txd" , 351, "1.8MB" , true}, [7] = { "BlueLine Knife" , "Knife" , "blueline/blueline_knifecur.dff" , "blueline/blueline_knifecur.txd" , 335, "300KB" , true}, }, } function getTable() return vTable end
--[[ Pixel Vision 8 - Flag Example Copyright (C) 2017, Pixel Vision 8 (http://pixelvision8.com) Created by Jesse Freeman (@jessefreeman) This project was designed to display some basic instructions when you create a new game. Simply delete the following code and implement your own Init(), Update() and Draw() logic. Learn more about making Pixel Vision 8 games at https://www.pixelvision8.com/getting-started ]]-- -- This point will store the current tile's position local tilePosition = NewPoint() -- This will store the current flag ID local flagID = -1 function Update(timeDelta) -- Get the current mouse position tilePosition = MousePosition() -- Convert the mouse position to the tilemap's correct column and row tilePosition.x = math.floor(tilePosition.x / 8) tilePosition.y = math.floor(tilePosition.y / 8) -- Get the flag value of the current tile flagID = Flag(tilePosition.x, tilePosition.y) end function Draw() -- Redraws the display RedrawDisplay() -- Display the tile and flag text on the screen DrawText("Tile " .. tilePosition.x .. ",".. tilePosition.y, 8, 8, DrawMode.Sprite, "large") DrawText("Flag " .. flagID, 8, 16, DrawMode.Sprite, "large") -- Draw a rect to represent which tile the mouse is over and set the color to match the flag ID plus 1 DrawRect(tilePosition.x * 8, tilePosition.y * 8, 8, 8, flagID + 1, DrawMode.Sprite) end
describe("util.smqueue", function() local smqueue setup(function() smqueue = require "util.smqueue"; end) describe("#new()", function() it("should work", function() local q = smqueue.new(10); assert.truthy(q); end) end) describe("#push()", function() it("should allow pushing many items", function() local q = smqueue.new(10); for i = 1, 20 do q:push(i); end assert.equal(20, q:count_unacked()); end) end) describe("#resumable()", function() it("returns true while the queue is small", function() local q = smqueue.new(10); for i = 1, 10 do q:push(i); end assert.truthy(q:resumable()); q:push(11); assert.falsy(q:resumable()); end) end) describe("#ack", function() it("allows removing items", function() local q = smqueue.new(10); for i = 1, 10 do q:push(i); end assert.same({ 1; 2; 3 }, q:ack(3)); assert.same({ 4; 5; 6 }, q:ack(6)); assert.falsy(q:ack(3), "can't go backwards") assert.falsy(q:ack(100), "can't ack too many") for i = 11, 20 do q:push(i); end assert.same({ 11; 12 }, q:ack(12), "items are dropped"); end) end) describe("#resume", function() it("iterates over current items", function() local q = smqueue.new(10); for i = 1, 12 do q:push(i); end assert.same({ 3; 4; 5; 6 }, q:ack(6)); assert.truthy(q:resumable()); local resume = {} for _, i in q:resume() do resume[i] = true end assert.same({ [7] = true; [8] = true; [9] = true; [10] = true; [11] = true; [12] = true }, resume); end) end) describe("#table", function () it("produces a compat layer", function () local q = smqueue.new(10); for i = 1,10 do q:push(i); end do local t = q:table(); assert.same({ 1; 2; 3; 4; 5; 6; 7; 8; 9; 10 }, t); end do for i = 11,20 do q:push(i); end local t = q:table(); assert.same({ 11; 12; 13; 14; 15; 16; 17; 18; 19; 20 }, t); end do q:ack(15); local t = q:table(); assert.same({ 16; 17; 18; 19; 20 }, t); end do q:ack(20); local t = q:table(); assert.same({}, t); end end) end) end);
--succ it hard print("Hello world!") wait() Player = game:GetService("Players").LocalPlayer Character = Player.Character PlayerGui = Player.PlayerGui Backpack = Player.Backpack Torso = Character.Torso Head = Character.Head Humanoid = Character.Humanoid LeftArm = Character["Left Arm"] LeftLeg = Character["Left Leg"] RightArm = Character["Right Arm"] RightLeg = Character["Right Leg"] LS = Torso["Left Shoulder"] LH = Torso["Left Hip"] RS = Torso["Right Shoulder"] RH = Torso["Right Hip"] Neck = Torso.Neck it = Instance.new vt = Vector3.new cf = CFrame.new euler = CFrame.fromEulerAnglesXYZ angles = CFrame.Angles necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) RootPart = Character.HumanoidRootPart RootJoint = RootPart.RootJoint RootCF = euler(-1.57, 0, 3.14) attack = false attackdebounce = false MMouse = Player:GetMouse() combo = 0 local idle = 0 local Anim = "Idle" local Effects = {} local Weapon = {} local Welds = {} local decreaseatk = 0 local decreasedef = 0 local decreasemvmt = 0 local RailgunTarget, CannonTarget, BladesTarget = nil, nil, nil local railgunattack = false local cannonattack = false local tribladesattack = false local givingarmor = false local givingrailgun = false local givingplasma = false local givingblades = false local Target = nil local move1 = "(Z)\nRailgun Armor" local move2 = "(X)\nPlasma Cannon Armor" local move3 = "(C)\nTri-Blades Armor" local move4 = "(V)\nIon Cannon Strike" local cooldowns = {} local cooldown1 = 100 table.insert(cooldowns, cooldown1) local cooldown2 = 100 table.insert(cooldowns, cooldown2) local cooldown3 = 100 table.insert(cooldowns, cooldown3) local cooldown4 = 100 table.insert(cooldowns, cooldown4) local cooldownsadd = {} local cooldownadd1 = 0.3 table.insert(cooldownsadd, cooldownadd1) local cooldownadd2 = 0.4 table.insert(cooldownsadd, cooldownadd2) local cooldownadd3 = 0.25 table.insert(cooldownsadd, cooldownadd3) local cooldownadd4 = 0.0475 table.insert(cooldownsadd, cooldownadd4) local cooldownmax = 100 local manualguardend = false player = nil RSH = nil RW = Instance.new("Motor") LW = Instance.new("Motor") RW.Name = "Right Shoulder" LW.Name = "Left Shoulder" LH = Torso["Left Hip"] RH = Torso["Right Hip"] TorsoColor = Torso.BrickColor TorsoRed = TorsoColor.Color.r TorsoGreen = TorsoColor.Color.g TorsoBlue = TorsoColor.Color.b NewCol = Color3.new(0.3, TorsoGreen, 0.3) NewCol2 = Color3.new(TorsoRed, TorsoGreen, TorsoBlue) ArtificialHB = Instance.new("BindableEvent", script) ArtificialHB.Name = "Heartbeat" script:WaitForChild("Heartbeat") frame = 1 / 40 tf = 0 allowframeloss = true tossremainder = false lastframe = tick() script.Heartbeat:Fire() game:GetService("RunService").Heartbeat:connect(function(s, p) tf = tf + s if tf >= frame then if allowframeloss then script.Heartbeat:Fire() lastframe = tick() else for i = 1, math.floor(tf / frame) do script.Heartbeat:Fire() end lastframe = tick() end if tossremainder then tf = 0 else tf = tf - frame * math.floor(tf / frame) end end end) function swait(num) if num == 0 or num == nil then ArtificialHB.Event:wait() else for i = 0, num do ArtificialHB.Event:wait() end end end if Player:findFirstChild("Color1") ~= nil then NewCol = Player.Color1.Value end if Player:findFirstChild("Color2") ~= nil then NewCol2 = Player.Color2.Value end if Character.Name == "DahNoob" then NewCol = BrickColor.new("Bright blue").Color end local mdec = Instance.new("NumberValue", Decrease) mdec.Name = "DecreaseDef" mdec.Value = 0.4 local mdec2 = Instance.new("NumberValue", Decrease) mdec2.Name = "DecreaseMvmt" mdec2.Value = 0.1 local Animate = Character.Animate local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/Asset?ID=180435571" local animTrack = Humanoid:LoadAnimation(animation) local canjump = true removeControl = function() canjump = false end resumeControl = function() canjump = true end Player.Character.Humanoid.Changed:connect(function() if canjump == false then Player.Character.Humanoid.Jump = false end end) createpassgui = function(parent) print("makegui111") local g = Instance.new("ScreenGui", parent) local f = Instance.new("Frame", g) f.Position = UDim2.new(0.3, 0, 0.25, 0) f.Size = UDim2.new(0.4, 0, 0.4, 0) f.Style = "DropShadow" local t = Instance.new("TextBox", f) t.BackgroundColor3 = Color3.new(0, 0, 0) t.BackgroundTransparency = 0.5 t.BorderSizePixel = 0 t.Position = UDim2.new(0.15, 0, 0.2, 0) t.Size = UDim2.new(0.7, 0, 0.2, 0) t.Font = "SourceSansLight" t.Text = "Enter Access Code." t.TextScaled = true t.TextColor3 = Color3.new(1, 1, 1) t.TextStrokeTransparency = 0 local t2 = Instance.new("TextButton", f) t2.BackgroundColor3 = Color3.new(0, 0, 0) t2.BackgroundTransparency = 0.5 t2.BorderSizePixel = 0 t2.Position = UDim2.new(0.3, 0, 0.5, 0) t2.Size = UDim2.new(0.4, 0, 0.15, 0) t2.TextScaled = true t2.Font = "SourceSansLight" t2.Text = "Submit" t2.TextColor3 = Color3.new(1, 1, 1) t2.TextStrokeTransparency = 0 print("done1") return t2 end if Character:findFirstChild("Gear Gauntlet", true) ~= nil then Character:findFirstChild("Gear Gauntlet", true).Parent = nil end if Character:findFirstChild("Railgun", true) ~= nil then Character:findFirstChild("Railgun", true).Parent = nil end if Character:findFirstChild("Plasma Cannon", true) ~= nil then Character:findFirstChild("Plasma Cannon", true).Parent = nil end if Character:findFirstChild("Tri-Blades", true) ~= nil then Character:findFirstChild("Tri-Blades", true).Parent = nil end if Player.PlayerGui:findFirstChild("WeaponGUI", true) ~= nil then Player.PlayerGui:findFirstChild("WeaponGUI", true).Parent = nil end if Character:findFirstChild("Stats", true) ~= nil then Character:findFirstChild("Stats", true).Parent = nil end local Stats = Instance.new("BoolValue") Stats.Name = "Stats" Stats.Parent = Character local Atk = Instance.new("NumberValue") Atk.Name = "Damage" Atk.Parent = Stats Atk.Value = 1 local Def = Instance.new("NumberValue") Def.Name = "Defense" Def.Parent = Stats Def.Value = 1 local Mvmt = Instance.new("NumberValue") Mvmt.Name = "Movement" Mvmt.Parent = Stats Mvmt.Value = 1 local Block = Instance.new("BoolValue") Block.Name = "Block" Block.Parent = Stats Block.Value = false local Stun = Instance.new("NumberValue") Stun.Name = "Stun" Stun.Parent = Stats Stun.Value = 0 local StunT = Instance.new("NumberValue") StunT.Name = "StunThreshold" StunT.Parent = Stats StunT.Value = 100 local Rooted = Instance.new("BoolValue") Rooted.Name = "Rooted" Rooted.Parent = Stats Rooted.Value = false local Decrease = Instance.new("BoolValue") Decrease.Name = "Decrease" Decrease.Parent = Stats Decrease.Value = false local Stunned = Instance.new("BoolValue") Stunned.Name = "Stunned" Stunned.Parent = Stats Stunned.Value = false local Stagger = Instance.new("BoolValue") Stagger.Name = "Stagger" Stagger.Parent = Stats Stagger.Value = false local StaggerHit = Instance.new("BoolValue") StaggerHit.Name = "StaggerHit" StaggerHit.Parent = Stats StaggerHit.Value = false local RecentEnemy = Instance.new("ObjectValue") RecentEnemy.Name = "RecentEnemy" RecentEnemy.Parent = Stats RecentEnemy.Value = nil local mana = Instance.new("NumberValue") mana.Name = "Mana" mana.Parent = Stats mana.Value = 30 NoOutline = function(Part) Part.TopSurface = 10 end part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size) local fp = it("Part") fp.formFactor = formfactor fp.Parent = parent fp.Reflectance = reflectance fp.Transparency = transparency fp.CanCollide = false fp.Locked = true fp.BrickColor = brickcolor fp.Name = name fp.Size = size fp.Position = Torso.Position NoOutline(fp) fp.Material = "SmoothPlastic" fp:BreakJoints() return fp end mesh = function(Mesh, part, meshtype, meshid, offset, scale) local mesh = it(Mesh) mesh.Parent = part if Mesh == "SpecialMesh" then mesh.MeshType = meshtype if meshid ~= "nil" then mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid end end mesh.Offset = offset mesh.Scale = scale return mesh end weld = function(parent, part0, part1, c0) local weld = it("Motor") weld.Parent = parent weld.Part0 = part0 weld.Part1 = part1 weld.C0 = c0 return weld end gui = function(GuiType, parent, text, backtrans, backcol, pos, size) local gui = it(GuiType) gui.Parent = parent gui.Text = text gui.BackgroundTransparency = backtrans gui.BackgroundColor3 = backcol gui.SizeConstraint = "RelativeXY" gui.TextXAlignment = "Center" gui.TextYAlignment = "Center" gui.Position = pos gui.Size = size gui.Font = "SourceSans" gui.FontSize = "Size14" gui.TextWrapped = false gui.TextStrokeTransparency = 0 gui.TextColor = BrickColor.new("White") return gui end local Color1 = Torso.BrickColor local fengui = it("GuiMain") fengui.Parent = Player.PlayerGui fengui.Name = "WeaponGUI" local fenframe = it("Frame") fenframe.Parent = fengui fenframe.BackgroundColor3 = Color3.new(255, 255, 255) fenframe.BackgroundTransparency = 1 fenframe.BorderColor3 = Color3.new(17, 17, 17) fenframe.Size = UDim2.new(0.1, 0, 0.1, 0) fenframe.Position = UDim2.new(0.95, 0, 0.7, 0) local fenframe2 = it("Frame") fenframe2.Parent = fengui fenframe2.BackgroundColor3 = Color3.new(255, 255, 255) fenframe2.BackgroundTransparency = 1 fenframe2.BorderColor3 = Color3.new(17, 17, 17) fenframe2.Size = UDim2.new(0.2, 0, 0.1, 0) fenframe2.Position = UDim2.new(0.4, 0, 0.85, 0) local fenframe3 = it("Frame") fenframe3.Parent = fengui fenframe3.BackgroundColor3 = Color3.new(255, 255, 255) fenframe3.BackgroundTransparency = 1 fenframe3.BorderColor3 = Color3.new(17, 17, 17) fenframe3.Size = UDim2.new(0.2, 0, 0.2, 0) fenframe3.Position = UDim2.new(0.8, 0, 0.8, 0) fenframe3.Name = "MoveFrame" local fenframe4 = it("Frame") fenframe4.Parent = fengui fenframe4.BackgroundColor3 = Color3.new(255, 255, 255) fenframe4.BackgroundTransparency = 1 fenframe4.BorderColor3 = Color3.new(17, 17, 17) fenframe4.Size = UDim2.new(0.1, 0, 0.1, 0) fenframe4.Position = UDim2.new(0, 0, 0.7, 0) local pressedf = false local fenframe5 = it("Frame") fenframe5.Parent = fengui fenframe5.BackgroundColor3 = Color3.new(0, 0, 0) fenframe5.BackgroundTransparency = 1 fenframe5.BorderColor3 = Color3.new(0, 0, 0) fenframe5.Size = UDim2.new(1, 0, 1, 0) fenframe5.Position = UDim2.new(0, 0, 0, 0) fenframe5.ZIndex = 2 local tellbar = gui("TextLabel", fenframe5, "Press \'F\' to equip your weapon.", 1, Color3.new(0, 0, 0), UDim2.new(0.25, 0, 0.25, 0), UDim2.new(0.5, 0, 0.5, 0)) tellbar.Font = "Arial" tellbar.TextScaled = true tellbar.TextTransparency = 1 tellbar.TextStrokeTransparency = 1 tellbar.ZIndex = 2 local fnumb = 0 local fenbarmana1 = gui("TextLabel", fenframe, "", 0, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(0.4, 0, -4, 0)) local fenbarmana2 = gui("TextLabel", fenframe, "", 0, BrickColor.new("Dark green").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0.4, 0, 0, 0)) local fenbarmana4 = gui("TextLabel", fenframe, "Mana(" .. mana.Value .. ")", 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0.2, 0), UDim2.new(0.4, 0, 0.2, 0)) local fenbardamage = gui("TextLabel", fenframe2, "Damage", 0.55, Color3.new(0.6078431372549, 0, 0), UDim2.new(-0.23, 0, 0, 0), UDim2.new(0.2, 0, 1, 0)) local fenbardef = gui("TextLabel", fenframe2, "Defense", 0.55, Color3.new(0, 0, 0.6078431372549), UDim2.new(-0.46, 0, 0, 0), UDim2.new(0.2, 0, 1, 0)) local fenbarmove = gui("TextLabel", fenframe2, "Walkspeed", 0.55, Color3.new(0, 0.6078431372549, 0), UDim2.new(1.03, 0, 0, 0), UDim2.new(0.2, 0, 1, 0)) local fenbarhp1 = gui("TextLabel", fenframe2, "", 0, Color3.new(0, 0, 0), UDim2.new(-0.46, 0, 1, 0), UDim2.new(1.92, 0, 0.4, 0)) local fenbarhp2 = gui("TextLabel", fenbarhp1, "", 0, Color3.new(1, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0)) local fenbarhp3 = gui("TextLabel", fenbarhp1, "(100)", 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0)) local fenbarstun1 = gui("TextLabel", fenframe4, "", 0, Color3.new(0, 0, 0), UDim2.new(0.2, 0, 0, 0), UDim2.new(0.4, 0, -4, 0)) local fenbarstun2 = gui("TextLabel", fenframe4, "", 0, Color3.new(0.960784, 0.803922, 0.188235), UDim2.new(0.2, 0, 0, 0), UDim2.new(0.4, 0, 0, 0)) local fenbarstun3 = gui("TextLabel", fenframe4, "Stun(" .. Stun.Value .. ")", 1, Color3.new(0.960784, 0.803922, 0.188235), UDim2.new(0.2, 0, 0.2, 0), UDim2.new(0.4, 0, 0.2, 0)) local fenbarmove1 = gui("TextButton", fenframe3, move1, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.1, 0, 0.1, 0), UDim2.new(0.4, 0, 0.4, 0)) fenbarmove1.ZIndex = 2 local fenbarmove1b = gui("TextLabel", fenbarmove1, "", 0.55, BrickColor.new(NewCol).Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0)) local fenbarmove2 = gui("TextButton", fenframe3, move2, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.6, 0, 0.1, 0), UDim2.new(0.4, 0, 0.4, 0)) fenbarmove2.ZIndex = 2 local fenbarmove2b = gui("TextLabel", fenbarmove2, "", 0.55, BrickColor.new(NewCol).Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0)) local fenbarmove3 = gui("TextButton", fenframe3, move3, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.1, 0, 0.6, 0), UDim2.new(0.4, 0, 0.4, 0)) fenbarmove3.ZIndex = 2 local fenbarmove3b = gui("TextLabel", fenbarmove3, "", 0.55, BrickColor.new(NewCol).Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0)) local fenbarmove4 = gui("TextButton", fenframe3, move4, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.6, 0, 0.6, 0), UDim2.new(0.4, 0, 0.4, 0)) fenbarmove4.ZIndex = 2 local fenbarmove4b = gui("TextLabel", fenbarmove4, "", 0.55, BrickColor.new("Really red").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0)) local modelzorz = Instance.new("Model") modelzorz.Parent = Character modelzorz.Name = "Gear Gauntlet" RightArm.Transparency = 1 local handle = part(3, modelzorz, 0, 0, BrickColor.new("Dark stone grey"), "Handle", vt()) local prt1 = part(3, modelzorz, 0, 0, BrickColor.new("Black"), "Part01", vt()) local prt2 = part(3, modelzorz, 0, 0, BrickColor.new(NewCol), "Part02", vt()) local prt3 = part(3, modelzorz, 0, 0, BrickColor.new(NewCol), "Part03", vt()) local prt4 = part(3, modelzorz, 0, 0, BrickColor.new(NewCol), "Part04", vt()) local prt5 = part(3, modelzorz, 0, 0, BrickColor.new(NewCol), "Part05", vt()) local prt6 = part(3, modelzorz, 0, 0, BrickColor.new("Medium stone grey"), "Part06", vt()) local prt7 = part(3, modelzorz, 0, 0, Torso.BrickColor, "Part07", vt()) local prt8 = part(3, modelzorz, 0, 0, BrickColor.new(NewCol), "Part08", vt()) local prt9 = part(3, modelzorz, 0, 0, BrickColor.new("Medium stone grey"), "Part09", vt()) local prt10 = part(3, modelzorz, 0, 0, BrickColor.new("Black"), "Part10", vt()) local prt11 = part(3, modelzorz, 0, 0, BrickColor.new(NewCol), "Part11", vt()) local prt12 = part(3, modelzorz, 0, 0, BrickColor.new("Really black"), "Part12", vt()) local prt13 = part(3, modelzorz, 0, 0, BrickColor.new(NewCol), "Part13", vt()) local prt14 = part(3, modelzorz, 0, 0, BrickColor.new("Medium stone grey"), "Part14", vt()) local prt15 = part(3, modelzorz, 0, 0, BrickColor.new("Black"), "Part15", vt()) local prt16 = part(3, modelzorz, 0.4, 0, BrickColor.new(NewCol), "Part16", vt()) hmsh = mesh("BlockMesh", handle, "", "", vt(0, 0, 0), vt(5.1, 10.1, 5.1)) msh1 = mesh("BlockMesh", prt1, "", "", vt(0, 0, 0), vt(6, 3, 6)) msh2 = mesh("BlockMesh", prt2, "", "", vt(0, 0, 0), vt(1, 3.5, 5.25)) msh3 = mesh("BlockMesh", prt3, "", "", vt(0, 0, 0), vt(5.25, 3.5, 1)) msh4 = mesh("BlockMesh", prt4, "", "", vt(0, 0, 0), vt(8, 8.1, 1)) msh5 = mesh("BlockMesh", prt5, "", "", vt(0, 0, 0), vt(8, 8.1, 1)) msh6 = mesh("BlockMesh", prt6, "", "", vt(0, 0, 0), vt(3, 0.5, 3)) msh7 = mesh("SpecialMesh", prt7, "Sphere", "nil", vt(0, 0, 0), vt(2.5, 2.5, 2.5)) msh8 = mesh("CylinderMesh", prt8, "", "", vt(0, 0, 0), vt(3, 0.5, 0.3)) msh9 = mesh("CylinderMesh", prt9, "", "", vt(0, 0, 0), vt(1.5, 0.5, 1.5)) msh10 = mesh("CylinderMesh", prt10, "", "", vt(0, 0, 0), vt(1, 0.5, 1)) msh11 = mesh("BlockMesh", prt11, "", "", vt(0, 0, 0), vt(2, 2, 6)) msh12 = mesh("SpecialMesh", prt12, "Wedge", "nil", vt(0, 0, 0), vt(2, 1, 4)) msh13 = mesh("CylinderMesh", prt13, "", "", vt(0, 0, 0), vt(3, 0.5, 0.3)) msh14 = mesh("CylinderMesh", prt14, "", "", vt(0, 0, 0), vt(1.5, 0.5, 1.5)) msh15 = mesh("CylinderMesh", prt15, "", "", vt(0, 0, 0), vt(1, 0.5, 1)) msh16 = mesh("SpecialMesh", prt16, "FileMesh", "9756362", vt(0, 0, 0), vt(0.2, 1, 0.6)) local hwld = weld(handle, handle, RightArm, euler(0, 0, 0) * cf(0, 0, 0)) local wld1 = weld(prt1, prt1, handle, euler(0, 0, 0) * cf(0, 0.6, 0)) local wld2 = weld(prt1, prt2, prt1, euler(0, 0, 0) * cf(-0.2, 0.1, 0)) local wld3 = weld(prt1, prt3, prt1, euler(0, 0, 0) * cf(0, 0.1, 0)) local wld4 = weld(prt1, prt4, prt1, euler(0, 0.785, 0) * cf(0, -0.81, 0)) local wld5 = weld(prt1, prt5, prt1, euler(0, -0.785, 0) * cf(0, -0.81, 0)) local wld6 = weld(prt1, prt6, prt1, euler(0, 0, 0) * cf(0, -1.6, 0)) local wld7 = weld(prt1, prt7, prt6, euler(0, 0, 0) * cf(0, 0, 0)) local wld8 = weld(prt1, prt8, prt1, euler(1.57, 0, -1.57) * cf(0, 0, -0.55)) local wld9 = weld(prt1, prt9, prt8, euler(0, 0, 0) * cf(0, 0.05, 0)) local wld10 = weld(prt1, prt10, prt9, euler(0, 0, 0) * cf(0, 0.01, 0)) local wld11 = weld(prt1, prt11, handle, euler(0, 0, 0) * cf(-0.4, -0.5, 0)) local wld12 = weld(prt1, prt12, prt11, euler(-0.5, 1.57, 1.57) * cf(-0.3, 0.2, 0)) local wld13 = weld(prt1, prt13, prt1, euler(1.57, 0, -1.57) * cf(0, 0, 0.55)) local wld14 = weld(prt1, prt14, prt13, euler(0, 0, 0) * cf(0, -0.05, 0)) local wld15 = weld(prt1, prt15, prt14, euler(0, 0, 0) * cf(0, -0.01, 0)) local wld16 = weld(prt1, prt16, prt1, euler(0, 0, 0) * cf(-0.6, 0, 0)) numb2 = 0 for i = 1, 4 do numb = 0.3 for i = 1, 3 do local prtclaw = part(3, modelzorz, 0, 0, BrickColor.new("Medium stone grey"), "Partclaw", vt()) mshclaw = mesh("SpecialMesh", prtclaw, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 1.5, 0.5)) local wldclaw = weld(prt1, prtclaw, prt1, euler(1.57, -1.57, -1.57) * cf(-0.6, 0.3, numb) * euler(0, numb2, 0)) numb = numb - 0.3 end numb2 = numb2 + 1.57 end numb = 0 for i = 1, 5 do local prtgear = part(3, modelzorz, 0, 0, BrickColor.new("Medium stone grey"), "Partgear", vt()) mshgear = mesh("BlockMesh", prtgear, "", "", vt(0, 0, 0), vt(2, 0.45, 0.35)) local wldgear = weld(prt1, prtgear, prt9, euler(0, numb, 0) * cf(0, 0, 0)) numb = numb + 0.628 end numb = 0 for i = 1, 5 do local prtgear = part(3, modelzorz, 0, 0, BrickColor.new("Medium stone grey"), "Partgear", vt()) mshgear = mesh("BlockMesh", prtgear, "", "", vt(0, 0, 0), vt(2, 0.45, 0.35)) local wldgear = weld(prt1, prtgear, prt14, euler(0, numb, 0) * cf(0, 0, 0)) numb = numb + 0.628 end num = 0.3 num2 = 0.5 for i = 1, 3 do local prtclaw1 = part(3, modelzorz, 0, 0, BrickColor.new("Black"), "Partclaw1", vt()) clawmsh1 = mesh("SpecialMesh", prtclaw1, "Wedge", "nil", vt(0, 0, 0), vt(1, 1, 2)) local clawwld1 = weld(prt1, prtclaw1, prt11, euler(0, -1.57 + num2, 1.57) * cf(-0.2, -0.2, num)) num = num - 0.3 num2 = num2 - 0.5 end num1 = 0.5 for i = 1, 2 do num = 1.57 num2 = 0.08 for i = 1, 2 do local prt17 = part(3, modelzorz, 0.5, 0, BrickColor.new("Medium stone grey"), "Part17", vt()) msh17 = mesh("SpecialMesh", prt17, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 4, 0.8)) local wld17 = weld(prt1, prt17, handle, euler(3.14, num, 0) * cf(num2, -0.3, num1)) num = num - 3.14 num2 = num2 - 0.16 end num1 = num1 - 1 end for _,c in pairs(modelzorz:children()) do table.insert(Weapon, c) end for _,c in pairs(prt1:children()) do if c.className == "Motor" then table.insert(Welds, c) end end local Color1 = BrickColor.new("Medium stone grey") local Color2 = BrickColor.new(NewCol) local Color4 = BrickColor.new("Really black") local model1 = (Instance.new("Model")) model1.Parent = nil model1.Name = "Railgun" Railgun = {} RailgunWelds = {} local model2 = (Instance.new("Model")) model2.Parent = nil model2.Name = "Plasma Cannon" Plasma = {} PlasmaWelds = {} local model3 = (Instance.new("Model")) model3.Parent = nil model3.Name = "Tri-Blades" Blades = {} BladesWelds = {} rprt1 = part(3, model1, 0, 0, Color1, "Part1", vt()) rprt2 = part(3, model1, 0, 0, Color2, "Part2", vt()) rprt3 = part(3, model1, 0, 0, Color2, "Part3", vt()) rprt4 = part(3, model1, 0, 0, Color2, "Part4", vt()) rprt5 = part(3, model1, 0, 0, Color2, "Part5", vt()) rprt6 = part(3, model1, 0, 0, Color2, "Part6", vt()) rprt7 = part(3, model1, 0, 0, Color1, "Part7", vt()) rprt8 = part(3, model1, 0, 0, Color4, "Part8", vt()) rprt9 = part(3, model1, 0, 0, Color1, "Part9", vt()) rprt10 = part(3, model1, 0, 0, Color1, "Part10", vt()) rprt11 = part(3, model1, 0, 0, Color1, "Part11", vt()) rprt12 = part(3, model1, 0, 0, Color1, "Part12", vt()) rprt13 = part(3, model1, 0, 0, Color1, "Part13", vt()) rprt14 = part(3, model1, 0, 0, Color1, "Part14", vt()) rprt15 = part(3, model1, 0, 0, Color1, "Part15", vt()) rprt16 = part(3, model1, 0, 0, Color1, "Part16", vt()) rprt17 = part(3, model1, 0, 0, Color1, "Part17", vt()) rprt18 = part(3, model1, 0, 0, Color2, "Part18", vt()) rprt19 = part(3, model1, 0, 0, Color2, "Part19", vt()) rprt20 = part(3, model1, 0.2, 0, Color1, "Part20", vt()) rprt21 = part(3, model1, 0.2, 0, Color1, "Part21", vt()) rprt22 = part(3, model1, 0.5, 0, Color1, "Part22", vt()) rprt23 = part(3, model1, 0.5, 0, Color1, "Part23", vt()) rprt24 = part(3, model1, 0, 0, Color2, "Part24", vt()) rprt25 = part(3, model1, 0, 0, Color2, "Part25", vt()) rprt26 = part(3, model1, 0.2, 0, Color1, "Part26", vt()) rprt27 = part(3, model1, 0.2, 0, Color1, "Part27", vt()) rprt28 = part(3, model1, 0.5, 0, Color1, "Part28", vt()) rprt29 = part(3, model1, 0.5, 0, Color1, "Part29", vt()) rprt30 = part(3, model1, 0, 0, Color2, "Part30", vt()) rprt31 = part(3, model1, 0, 0, Color2, "Part31", vt()) rprt32 = part(3, model1, 0.2, 0, Color1, "Part32", vt()) rprt33 = part(3, model1, 0.2, 0, Color1, "Part33", vt()) rprt34 = part(3, model1, 0.5, 0, Color1, "Part34", vt()) rprt35 = part(3, model1, 0.5, 0, Color1, "Part35", vt()) for _,c in pairs(model1:children()) do table.insert(Railgun, c) end pprt1 = part(3, model2, 0, 0, Color1, "aPart1", vt()) pprt2 = part(3, model2, 0, 0, Color2, "aPart2", vt()) pprt3 = part(3, model2, 0, 0, Color2, "aPart3", vt()) pprt4 = part(3, model2, 0, 0, Color2, "aPart4", vt()) pprt5 = part(3, model2, 0, 0, Color2, "aPart5", vt()) pprt6 = part(3, model2, 0, 0, Color2, "aPart6", vt()) pprt7 = part(3, model2, 0, 0, Color2, "aPart7", vt()) pprt8 = part(3, model2, 0, 0, Color1, "aPart8", vt()) pprt9 = part(3, model2, 0, 0, Color1, "aPart9", vt()) pprt10 = part(3, model2, 0, 0, Color4, "aPart10", vt()) pprt11 = part(3, model2, 0, 0, Color4, "aPart11", vt()) pprt12 = part(3, model2, 0, 0, Color1, "aPart12", vt()) pprt13 = part(3, model2, 0, 0, Color1, "aPart13", vt()) pprt14 = part(3, model2, 0, 0, Color1, "aPart14", vt()) pprt15 = part(3, model2, 0, 0, Color1, "aPart15", vt()) pprt16 = part(3, model2, 0, 0, Color1, "aPart16", vt()) pprt17 = part(3, model2, 0, 0, Color1, "aPart17", vt()) pprt18 = part(3, model2, 0, 0, Color1, "aPart18", vt()) pprt19 = part(3, model2, 0, 0, Color2, "aPart19", vt()) pprt20 = part(3, model2, 0, 0, Color2, "aPart20", vt()) pprt21 = part(3, model2, 0.2, 0, Color1, "aPart21", vt()) pprt22 = part(3, model2, 0.2, 0, Color1, "aPart22", vt()) pprt23 = part(3, model2, 0.5, 0, Color1, "aPart23", vt()) pprt24 = part(3, model2, 0.5, 0, Color1, "aPart24", vt()) pprt25 = part(3, model2, 0, 0, Color2, "aPart25", vt()) pprt26 = part(3, model2, 0, 0, Color2, "aPart26", vt()) pprt27 = part(3, model2, 0.2, 0, Color1, "aPart27", vt()) pprt28 = part(3, model2, 0.2, 0, Color1, "aPart28", vt()) pprt29 = part(3, model2, 0.5, 0, Color1, "aPart29", vt()) pprt30 = part(3, model2, 0.5, 0, Color1, "aPart30", vt()) pprt31 = part(3, model2, 0, 0, Color2, "aPart31", vt()) pprt32 = part(3, model2, 0, 0, Color2, "aPart32", vt()) pprt33 = part(3, model2, 0.2, 0, Color1, "aPart33", vt()) pprt34 = part(3, model2, 0.2, 0, Color1, "aPart34", vt()) pprt35 = part(3, model2, 0.5, 0, Color1, "aPart35", vt()) pprt36 = part(3, model2, 0.5, 0, Color1, "aPart36", vt()) pprt37 = part(3, model2, 0, 0, Color2, "aPart37", vt()) pprt38 = part(3, model1, 0, 0, Color1, "aPart38", vt()) pprt39 = part(3, model1, 0, 0, Color1, "aPart39", vt()) for _,c in pairs(model2:children()) do table.insert(Plasma, c) end bref = part(3, model3, 0, 1, Color4, "bRef", vt()) bprt1 = part(3, model3, 0, 1, Color1, "bPart1", vt()) bprt2 = part(3, model3, 0, 0, Color1, "bPart2", vt()) bprt3 = part(3, model3, 0, 0, Color2, "bPart3", vt()) bprt4 = part(3, model3, 0.8, 0, Color1, "bPart4", vt()) bprt5 = part(3, model3, 0.8, 0, Color1, "bPart5", vt()) bprt6 = part(3, model3, 0.8, 0, Color1, "bPart6", vt()) bprt7 = part(3, model3, 0, 1, Color1, "bPart7", vt()) bprt8 = part(3, model3, 0, 0, Color1, "bPart8", vt()) bprt9 = part(3, model3, 0, 0, Color2, "bPart9", vt()) bprt10 = part(3, model3, 0.8, 0, Color1, "bPart10", vt()) bprt11 = part(3, model3, 0.8, 0, Color1, "bPart11", vt()) bprt12 = part(3, model3, 0.8, 0, Color1, "bPart12", vt()) bprt13 = part(3, model3, 0, 1, Color1, "bPart13", vt()) bprt14 = part(3, model3, 0, 0, Color1, "bPart14", vt()) bprt15 = part(3, model3, 0, 0, Color2, "bPart15", vt()) bprt16 = part(3, model3, 0.8, 0, Color1, "bPart16", vt()) bprt17 = part(3, model3, 0.8, 0, Color1, "bPart17", vt()) bprt18 = part(3, model3, 0.8, 0, Color1, "bPart18", vt()) for _,c in pairs(model3:children()) do table.insert(Blades, c) end msh1 = mesh("BlockMesh", rprt1, "", "", vt(0, 0, 0), vt(1, 1, 1)) msh2 = mesh("BlockMesh", rprt2, "", "", vt(0, 0, 0), vt(1.3, 2.5, 10)) msh3 = mesh("BlockMesh", rprt3, "", "", vt(0, 0, 0), vt(1.49, 2.5, 5)) msh4 = mesh("BlockMesh", rprt4, "", "", vt(0, 0, 0), vt(1.51, 2.5, 3)) msh5 = mesh("CylinderMesh", rprt5, "", "", vt(0, 0, 0), vt(2.5, 1, 2.5)) msh6 = mesh("CylinderMesh", rprt6, "", "", vt(0, 0, 0), vt(1.5, 16, 1.5)) msh7 = mesh("CylinderMesh", rprt7, "", "", vt(0, 0, 0), vt(1.6, 1, 1.6)) msh8 = mesh("CylinderMesh", rprt8, "", "", vt(0, 0, 0), vt(1.4, 1.01, 1.4)) msh9 = mesh("BlockMesh", rprt9, "", "", vt(0, 0, 0), vt(1.4, 14, 2)) msh10 = mesh("SpecialMesh", rprt10, "Wedge", "nil", vt(0, 0, 0), vt(1.3, 4, 3)) msh11 = mesh("SpecialMesh", rprt11, "Wedge", "nil", vt(0, 0, 0), vt(1.3, 2, 3)) msh12 = mesh("SpecialMesh", rprt12, "Wedge", "nil", vt(0, 0, 0), vt(1.7, 3, 3.5)) msh13 = mesh("BlockMesh", rprt13, "", "", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh14 = mesh("BlockMesh", rprt14, "", "", vt(0, 0, 0), vt(1.6, 4.5, 2)) msh15 = mesh("BlockMesh", rprt15, "", "", vt(0, 0, 0), vt(1.6, 3.6, 2)) msh16 = mesh("SpecialMesh", rprt16, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 3, 3.5)) msh17 = mesh("SpecialMesh", rprt17, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 2, 4)) msh19 = mesh("SpecialMesh", rprt19, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh20 = mesh("SpecialMesh", rprt20, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh21 = mesh("SpecialMesh", rprt21, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh22 = mesh("SpecialMesh", rprt22, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh23 = mesh("SpecialMesh", rprt23, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh25 = mesh("SpecialMesh", rprt25, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh26 = mesh("SpecialMesh", rprt26, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh27 = mesh("SpecialMesh", rprt27, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh28 = mesh("SpecialMesh", rprt28, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh29 = mesh("SpecialMesh", rprt29, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh31 = mesh("SpecialMesh", rprt31, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh32 = mesh("SpecialMesh", rprt32, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh33 = mesh("SpecialMesh", rprt33, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh34 = mesh("SpecialMesh", rprt34, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh35 = mesh("SpecialMesh", rprt35, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh1 = mesh("BlockMesh", pprt1, "", "", vt(0, 0, 0), vt(1, 1, 1)) msh2 = mesh("BlockMesh", pprt2, "", "", vt(0, 0, 0), vt(2, 1.3, 5)) msh3 = mesh("SpecialMesh", pprt3, "Wedge", "nil", vt(0, 0, 0), vt(2, 2, 1)) msh4 = mesh("BlockMesh", pprt4, "", "", vt(0, 0, 0), vt(2, 2, 6)) msh5 = mesh("BlockMesh", pprt5, "", "", vt(0, 0, 0), vt(2, 2, 2)) msh6 = mesh("CylinderMesh", pprt6, "", "", vt(0, 0, 0), vt(2, 5, 2)) msh7 = mesh("CylinderMesh", pprt7, "", "", vt(0, 0, 0), vt(2, 5, 2)) msh8 = mesh("CylinderMesh", pprt8, "", "", vt(0, 0, 0), vt(2.1, 1, 2.1)) msh9 = mesh("CylinderMesh", pprt9, "", "", vt(0, 0, 0), vt(2.1, 1, 2.1)) msh10 = mesh("CylinderMesh", pprt10, "", "", vt(0, 0, 0), vt(1.9, 1.01, 1.9)) msh11 = mesh("CylinderMesh", pprt11, "", "", vt(0, 0, 0), vt(1.9, 1.01, 1.9)) msh12 = mesh("CylinderMesh", pprt12, "", "", vt(0, 0, 0), vt(2.2, 5.5, 2.2)) msh13 = mesh("SpecialMesh", pprt13, "Wedge", "nil", vt(0, 0, 0), vt(1.7, 3, 3.5)) msh14 = mesh("BlockMesh", pprt14, "", "", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh15 = mesh("BlockMesh", pprt15, "", "", vt(0, 0, 0), vt(1.6, 4.5, 2)) msh16 = mesh("BlockMesh", pprt16, "", "", vt(0, 0, 0), vt(1.6, 3.6, 2)) msh17 = mesh("SpecialMesh", pprt17, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 3, 3.5)) msh18 = mesh("SpecialMesh", pprt18, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 2, 4)) msh20 = mesh("SpecialMesh", pprt20, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh21 = mesh("SpecialMesh", pprt21, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh22 = mesh("SpecialMesh", pprt22, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh23 = mesh("SpecialMesh", pprt23, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh24 = mesh("SpecialMesh", pprt24, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh26 = mesh("SpecialMesh", pprt26, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh27 = mesh("SpecialMesh", pprt27, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh28 = mesh("SpecialMesh", pprt28, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh29 = mesh("SpecialMesh", pprt29, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh30 = mesh("SpecialMesh", pprt30, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh32 = mesh("SpecialMesh", pprt32, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5)) msh33 = mesh("SpecialMesh", pprt33, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh34 = mesh("SpecialMesh", pprt34, "Wedge", "nil", vt(0, 0, 0), vt(0.2, 8, 0.5)) msh35 = mesh("SpecialMesh", pprt35, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh36 = mesh("SpecialMesh", pprt36, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 7, 0.7)) msh37 = mesh("BlockMesh", pprt37, "", "", vt(0, 0, 0), vt(1.51, 2.5, 3)) msh38 = mesh("SpecialMesh", pprt38, "Wedge", "nil", vt(0, 0, 0), vt(1.3, 4, 3)) msh39 = mesh("SpecialMesh", pprt39, "Wedge", "nil", vt(0, 0, 0), vt(1.3, 2, 3)) msh2 = mesh("CylinderMesh", bprt2, "", "", vt(0, 0, 0), vt(3, 1, 3)) msh3 = mesh("CylinderMesh", bprt3, "", "", vt(0, 0, 0), vt(2.5, 1.01, 2.5)) msh4 = mesh("BlockMesh", bprt4, "", "", vt(0, 0, 0), vt(7, 0.5, 1.5)) msh5 = mesh("SpecialMesh", bprt5, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 1.5, 10)) msh6 = mesh("SpecialMesh", bprt6, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 3, 4)) msh8 = mesh("CylinderMesh", bprt8, "", "", vt(0, 0, 0), vt(3, 1, 3)) msh9 = mesh("CylinderMesh", bprt9, "", "", vt(0, 0, 0), vt(2.5, 1.01, 2.5)) msh10 = mesh("BlockMesh", bprt10, "", "", vt(0, 0, 0), vt(7, 0.5, 1.5)) msh11 = mesh("SpecialMesh", bprt11, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 1.5, 10)) msh12 = mesh("SpecialMesh", bprt12, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 3, 4)) msh14 = mesh("CylinderMesh", bprt14, "", "", vt(0, 0, 0), vt(3, 1, 3)) msh15 = mesh("CylinderMesh", bprt15, "", "", vt(0, 0, 0), vt(2.5, 1.01, 2.5)) msh16 = mesh("BlockMesh", bprt16, "", "", vt(0, 0, 0), vt(7, 0.5, 1.5)) msh17 = mesh("SpecialMesh", bprt17, "Wedge", "nil", vt(0, 0, 0), vt(0.5, 1.5, 10)) msh18 = mesh("SpecialMesh", bprt18, "Wedge", "nil", vt(0, 0, 0), vt(0.3, 3, 4)) rwld1 = weld(rprt1, rprt1, RootPart, euler(-0.2, 0, 0) * cf(3, -1, -0.2)) rwld2 = weld(rprt1, rprt2, rprt1, euler(0, 0, 0) * cf(0, 0, 0)) rwld3 = weld(rprt1, rprt3, rprt2, euler(-0.3, 0, 0) * cf(0, 0.05, -1)) rwld4 = weld(rprt1, rprt4, rprt2, euler(-0.5, 0, 0) * cf(0, 0.1, -0.3)) rwld5 = weld(rprt1, rprt5, rprt4, euler(2.07, 0, 0) * cf(0, -0.2, 0)) rwld6 = weld(rprt1, rprt6, rprt2, euler(1.57, 0, 0) * cf(0, -0.11, 1.1)) rwld7 = weld(rprt1, rprt7, rprt6, euler(0, 0, 0) * cf(0, -1.6, 0)) rwld8 = weld(rprt1, rprt8, rprt7, euler(0, 0, 0) * cf(0, 0, 0)) rwld9 = weld(rprt1, rprt9, rprt6, euler(0, 0, 0) * cf(0, -0.3, 0.2)) rwld10 = weld(rprt1, rprt10, rprt9, euler(0, 0, 0) * cf(0, 1.2, 0.4)) rwld11 = weld(rprt1, rprt11, rprt10, euler(0, 0, 3.14) * cf(0, 0.6, 0)) rwld12 = weld(rprt1, rprt12, rprt5, euler(3.14, 0, 0) * cf(0, -0.2, -0.55)) rwld13 = weld(rprt1, rprt13, rprt12, euler(0.785, 0, 0) * cf(0, 0.2, -0.4)) rwld14 = weld(rprt1, rprt14, rprt12, euler(0, 0, 0) * cf(0, -0.4, -0.2)) rwld15 = weld(rprt1, rprt15, rprt14, euler(-0.8, 0, 0) * cf(0, -0.55, -0.2)) rwld16 = weld(rprt1, rprt16, rprt14, euler(0, 0, 3.14) * cf(0, -0.15, 0.5)) rwld17 = weld(rprt1, rprt17, rprt16, euler(0, 0, 3.14) * cf(0, 0.5, -0.3)) rwld18 = weld(rprt1, rprt18, rprt2, euler(0, 0, 0) * cf(0.2, 0, 0)) rwld19 = weld(rprt1, rprt19, rprt18, euler(0, 0, 0.5) * cf(0, 0, 0)) rwld20 = weld(rprt1, rprt20, rprt19, euler(3.14, 3.14, 0) * cf(0, 0.8, 0.05)) rwld21 = weld(rprt1, rprt21, rprt19, euler(3.14, 0, 0) * cf(0, 0.8, -0.05)) rwld22 = weld(rprt1, rprt22, rprt20, euler(0, 0, 0) * cf(0, -0.5, 0.02)) rwld23 = weld(rprt1, rprt23, rprt21, euler(0, 0, 0) * cf(0, -0.5, 0.02)) rwld24 = weld(rprt1, rprt24, rprt2, euler(0, 0, 0) * cf(0.2, -0.1, -0.3)) rwld25 = weld(rprt1, rprt25, rprt24, euler(0.3, 0, 0.6) * cf(0, 0, 0)) rwld26 = weld(rprt1, rprt26, rprt25, euler(3.14, 3.14, 0) * cf(0, 0.8, 0.05)) rwld27 = weld(rprt1, rprt27, rprt25, euler(3.14, 0, 0) * cf(0, 0.8, -0.05)) rwld28 = weld(rprt1, rprt28, rprt26, euler(0, 0, 0) * cf(0, -0.5, 0.02)) rwld29 = weld(rprt1, rprt29, rprt27, euler(0, 0, 0) * cf(0, -0.5, 0.02)) rwld30 = weld(rprt1, rprt30, rprt2, euler(0, 0, 0) * cf(0.2, -0.2, -0.6)) rwld31 = weld(rprt1, rprt31, rprt30, euler(0.6, 0, 0.7) * cf(0, 0, 0)) rwld32 = weld(rprt1, rprt32, rprt31, euler(3.14, 3.14, 0) * cf(0, 0.8, 0.05)) rwld33 = weld(rprt1, rprt33, rprt31, euler(3.14, 0, 0) * cf(0, 0.8, -0.05)) rwld34 = weld(rprt1, rprt34, rprt32, euler(0, 0, 0) * cf(0, -0.5, 0.02)) rwld35 = weld(rprt1, rprt35, rprt33, euler(0, 0, 0) * cf(0, -0.5, 0.02)) for _,c in pairs(rprt1:children()) do if c.className == "Motor" then table.insert(RailgunWelds, c) end end pwld1 = weld(pprt1, pprt1, RootPart, euler(-0.2, 0, 0) * cf(-3, -1, -0.2)) pwld2 = weld(pprt1, pprt2, pprt1, euler(0, 0, 0) * cf(0, 0, 0)) pwld3 = weld(pprt1, pprt3, pprt2, euler(0, 3.14, 0) * cf(0, -0.3, -0.4)) pwld4 = weld(pprt1, pprt4, pprt2, euler(0, 0, 0) * cf(0, -0.3, 0.3)) pwld5 = weld(pprt1, pprt5, pprt4, euler(0, 0, 0) * cf(0, -0.3, 0.2)) pwld6 = weld(pprt1, pprt6, pprt4, euler(1.57, 0, 0) * cf(0, -0.02, 0.7)) pwld7 = weld(pprt1, pprt7, pprt4, euler(1.57, 0, 0) * cf(0, 0.02, 0.7)) pwld8 = weld(pprt1, pprt8, pprt6, euler(0, 0, 0) * cf(0, -0.5, 0)) pwld9 = weld(pprt1, pprt9, pprt7, euler(0, 0, 0) * cf(0, -0.5, 0)) pwld10 = weld(pprt1, pprt10, pprt8, euler(0, 0, 0) * cf(0, 0, 0)) pwld11 = weld(pprt1, pprt11, pprt9, euler(0, 0, 0) * cf(0, 0, 0)) pwld12 = weld(pprt1, pprt12, pprt4, euler(1.57, 0, 0) * cf(0, 0.2, 0.75)) pwld13 = weld(pprt1, pprt13, pprt5, euler(-1.57, 0, 0) * cf(0, -0.3, 0)) pwld14 = weld(pprt1, pprt14, pprt13, euler(0.785, 0, 0) * cf(0, 0.2, -0.4)) pwld15 = weld(pprt1, pprt15, pprt13, euler(0, 0, 0) * cf(0, -0.4, -0.2)) pwld16 = weld(pprt1, pprt16, pprt15, euler(-0.8, 0, 0) * cf(0, -0.55, -0.2)) pwld17 = weld(pprt1, pprt17, pprt15, euler(0, 0, 3.14) * cf(0, -0.15, 0.5)) pwld18 = weld(pprt1, pprt18, pprt17, euler(0, 0, 3.14) * cf(0, 0.5, -0.3)) pwld19 = weld(pprt1, pprt19, pprt2, euler(0, 0, 0) * cf(-0.2, -0.2, 0.7)) pwld20 = weld(pprt1, pprt20, pprt19, euler(0, 0, -0.5) * cf(0, 0, 0)) pwld21 = weld(pprt1, pprt21, pprt20, euler(3.14, 3.14, 0) * cf(0, 0.8, 0.05)) pwld22 = weld(pprt1, pprt22, pprt20, euler(3.14, 0, 0) * cf(0, 0.8, -0.05)) pwld23 = weld(pprt1, pprt23, pprt21, euler(0, 0, 0) * cf(0, -0.5, 0.02)) pwld24 = weld(pprt1, pprt24, pprt22, euler(0, 0, 0) * cf(0, -0.5, 0.02)) pwld25 = weld(pprt1, pprt25, pprt2, euler(0, 0, 0) * cf(-0.2, -0.3, 0.4)) pwld26 = weld(pprt1, pprt26, pprt25, euler(0.3, 0, -0.6) * cf(0, 0, 0)) pwld27 = weld(pprt1, pprt27, pprt26, euler(3.14, 3.14, 0) * cf(0, 0.8, 0.05)) pwld28 = weld(pprt1, pprt28, pprt26, euler(3.14, 0, 0) * cf(0, 0.8, -0.05)) pwld29 = weld(pprt1, pprt29, pprt27, euler(0, 0, 0) * cf(0, -0.5, 0.02)) pwld30 = weld(pprt1, pprt30, pprt28, euler(0, 0, 0) * cf(0, -0.5, 0.02)) pwld31 = weld(pprt1, pprt31, pprt2, euler(0, 0, 0) * cf(-0.2, -0.4, 0.1)) pwld32 = weld(pprt1, pprt32, pprt31, euler(0.6, 0, -0.7) * cf(0, 0, 0)) pwld33 = weld(pprt1, pprt33, pprt32, euler(3.14, 3.14, 0) * cf(0, 0.8, 0.05)) pwld34 = weld(pprt1, pprt34, pprt32, euler(3.14, 0, 0) * cf(0, 0.8, -0.05)) pwld35 = weld(pprt1, pprt35, pprt33, euler(0, 0, 0) * cf(0, -0.5, 0.02)) pwld36 = weld(pprt1, pprt36, pprt34, euler(0, 0, 0) * cf(0, -0.5, 0.02)) pwld37 = weld(pprt1, pprt37, pprt2, euler(-0.5, 0, 0) * cf(0, -0.05, -0.1)) pwld38 = weld(pprt1, pprt38, pprt37, euler(-1.57, 3.14, 0) * cf(0, 0.2, 0.15)) pwld39 = weld(pprt1, pprt339, pprt39, euler(0, 0, 3.14) * cf(0, 0.6, 0)) for _,c in pairs(pprt1:children()) do if c.className == "Motor" then table.insert(PlasmaWelds, c) end end brefwld = weld(bprt1, bref, RootPart, euler(0, 0, 0) * cf(0, -2, 0)) bwld1 = weld(bprt1, bprt1, bref, euler(0, 0, 0) * cf(2, -0.6, -2)) bwld2 = weld(bprt1, bprt2, bprt1, euler(3.14, -2, 1.17) * cf(0, 0, 0)) bwld3 = weld(bprt1, bprt3, bprt2, euler(0, 0, 0) * cf(0, 0, 0)) bwld4 = weld(bprt1, bprt4, bprt2, euler(0, 0, 0) * cf(-0.8, 0, 0)) bwld5 = weld(bprt1, bprt5, bprt2, euler(-1.57, 0, 1.57) * cf(-0.8, 0, -0.35)) bwld6 = weld(bprt1, bprt6, bprt4, euler(-1.57, 0, 1.57) * cf(-1.1, 0, -0.15)) bwld7 = weld(bprt1, bprt7, bref, euler(0, 0, 0) * cf(0, -0.6, -2)) bwld8 = weld(bprt1, bprt8, bprt7, euler(3.14, -2, 1.57) * cf(0, 0, 0)) bwld9 = weld(bprt1, bprt9, bprt8, euler(0, 0, 0) * cf(0, 0, 0)) bwld10 = weld(bprt1, bprt10, bprt8, euler(0, 0, 0) * cf(-0.8, 0, 0)) bwld11 = weld(bprt1, bprt11, bprt8, euler(-1.57, 0, 1.57) * cf(-0.8, 0, -0.35)) bwld12 = weld(bprt1, bprt12, bprt10, euler(-1.57, 0, 1.57) * cf(-1.1, 0, -0.15)) bwld13 = weld(bprt1, bprt13, bref, euler(0, 0, 0) * cf(-2, -0.6, -2)) bwld14 = weld(bprt1, bprt14, bprt13, euler(3.14, -2, 1.97) * cf(0, 0, 0)) bwld15 = weld(bprt1, bprt15, bprt14, euler(0, 0, 0) * cf(0, 0, 0)) bwld16 = weld(bprt1, bprt16, bprt14, euler(0, 0, 0) * cf(-0.8, 0, 0)) bwld17 = weld(bprt1, bprt17, bprt14, euler(-1.57, 0, 1.57) * cf(-0.8, 0, -0.35)) bwld18 = weld(bprt1, bprt18, bprt16, euler(-1.57, 0, 1.57) * cf(-1.1, 0, -0.15)) for _,c in pairs(bprt1:children()) do if c.className == "Motor" then table.insert(BladesWelds, c) end end local hitbox = part(3, modelzorz, 0, 1, BrickColor.new("Black"), "Hitbox2", vt()) hitbox.Anchored = false local hbwld = weld(hitbox, hitbox, RootPart, euler(0, 0, 0) * cf(0, 0, 0)) local hitbox2 = part(3, nil, 0, 1, BrickColor.new("Black"), "Hitbox", vt(1, 1, 1)) hitbox2.Anchored = true local hitboxCF = cf(0, 0, 0) local hitboxb1 = part(3, nil, 0, 1, BrickColor.new("Black"), "Hitboxb", vt(1, 1, 1)) hitboxb1.Anchored = false local hitboxb2 = part(3, nil, 0, 1, BrickColor.new("Black"), "Hitboxb", vt(1, 1, 1)) hitboxb2.Anchored = false local hitboxb3 = part(3, nil, 0, 1, BrickColor.new("Black"), "Hitboxb", vt(1, 1, 1)) hitboxb3.Anchored = false hboxpos = Instance.new("BodyPosition", nil) hboxpos.P = 2000 hboxpos.D = 100 hboxpos.maxForce = Vector3.new(math.huge, math.huge, math.huge) hitboxweld = function() hbwld.Parent = modelzorz hbwld.Part0 = hitbox hbwld.Part1 = handle end if script.Parent.className ~= "HopperBin" then Tool = Instance.new("HopperBin") Tool.Parent = Backpack Tool.Name = "Gear Gauntlet" script.Parent = Tool end Bin = script.Parent if Bin.Name == "Mechanic" then Bin.Name = "Gear Gauntlet" end local bodvel = Instance.new("BodyVelocity") local bg = Instance.new("BodyGyro") so = function(id, par, vol, pit) local sou = Instance.new("Sound", par or workspace) sou.Volume = vol sou.Pitch = pit or 1 sou.SoundId = "http://www.roblox.com/asset/?id=" .. id coroutine.resume(coroutine.create(function(Sound) fwait() Sound:play() end), sou) game:GetService("Debris"):AddItem(sou, 6) end function clerp(a,b,t) local qa = {QuaternionFromCFrame(a)} local qb = {QuaternionFromCFrame(b)} local ax, ay, az = a.x, a.y, a.z local bx, by, bz = b.x, b.y, b.z local _t = 1-t return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) end function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end hideanim = function() equipped = false for i = 0, 1, 0.1 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 0), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, RHC0, 0.4) LH.C0 = clerp(LH.C0, LHC0, 0.4) end mdec2.Parent = nil mdec.Parent = Decrease end mdec.Parent = Decrease equipanim = function() equipped = true mdec.Parent = nil mdec2.Parent = Decrease end StaggerAnim = function() attack = true removeControl() for i = 1, math.random(2, 4) do ClangEffect(BrickColor.new("New Yeller"), cf(hitbox.Position) * euler(math.random(-50, 50) / 100, math.random(-50, 50), math.random(-50, 50) / 100), 0, 0.1, 0.2, math.random(150, 300) / 1000) end for i = 0, 1, 0.35 do fwait() if Rooted.Value == false then Torso.Velocity = RootPart.CFrame.lookVector * -40 end Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0.5) * euler(0.1, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(-0.2, 0, -0.4), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.2, 0, 0.7) * euler(0, -0.7, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.4) * euler(0, 0.4, 0), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(1, -0.8, 0) * euler(0, 1.57, 0) * euler(-0.5, 0, 0.6), 0.3) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(0, -1.57, 0) * euler(0, 0.2, 0.2), 0.3) end for i = 0, 1, 0.2 do fwait() if Rooted.Value == false then Torso.Velocity = RootPart.CFrame.lookVector * -40 end Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0.5) * euler(0.1, 0, 0), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(-0.5, 0, -0.4), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.2, 0, 0.7) * euler(0, -0.7, 0), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.4) * euler(0, 0.4, 0), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, cf(1, -0.8, 0) * euler(0, 1.57, 0) * euler(-0.5, 0, 0.6), 0.4) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(0, -1.57, 0) * euler(0, 0.2, 0.5), 0.4) end for i = 0, 1, 0.1 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0.4) * euler(0.5, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.8) * euler(-0.2, 0, -0.4), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.5, 0, 0.8) * euler(0, -0.4, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.5, 0, -0.2) * euler(0, 0.4, 0), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(1, -0.8, 0) * euler(0, 1.57, 0) * euler(-0.5, 0, 1.2), 0.3) LH.C0 = clerp(LH.C0, cf(-1, 0, -1) * euler(0, -1.57, 0) * euler(0, 0.2, 0.2), 0.3) end for i = 1, 40 do fwait() if StunT.Value <= Stun.Value then break end end do resumeControl() combo = 0 attack = false end end StaggerHitt = function() attack = true for i = 1, math.random(2, 4) do ClangEffect(BrickColor.new("New Yeller"), cf(hitbox.Position) * euler(math.random(-50, 50) / 100, math.random(-50, 50), math.random(-50, 50) / 100), 0, 0.1, 0.2, math.random(150, 300) / 1000) end for i = 0, 1, 0.1 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0) * euler(0.1, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(-0.2, 0, 0), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.4, 0, 0.9), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.6), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(1, -0.8, 0) * euler(0, 1.57, 0) * euler(-0.2, 0, -0.4), 0.3) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(0, -1.57, 0) * euler(0, 0.2, 0.2), 0.3) end attack = false end StunAnim = function() attack = true removeControl() Stunned.Value = true showDamage(Character, "Stunned", "Interrupt") local dec = Instance.new("NumberValue", Decrease) dec.Name = "DecreaseMvmt" dec.Value = 10 for i = 0, 1, 0.3 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(-0.2, 0, -0.5), 0.2) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0.2, 0, -3), 0.2) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.2, 0, 1.3), 0.2) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) LW.C0 = clerp(LW.C0, cf(-1.2, 0.5, -0.4) * euler(1, 0, 0.4) * euler(0, -0.1, 0), 0.2) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) RH.C0 = clerp(RH.C0, cf(1, -0.6, 0) * euler(0, 1.57, 0) * euler(-0.5, 0, 0.3), 0.25) LH.C0 = clerp(LH.C0, cf(-1, -0.8, 0) * euler(0, -1.57, 0) * euler(-0.2, 0, 0), 0.25) end for i = 0, 1, 0.3 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(-0.3, 0, -0.5), 0.2) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.5) * euler(0.8, 0, -3), 0.2) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.8, 0, 1.3), 0.2) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) LW.C0 = clerp(LW.C0, cf(-1.2, 0.5, -0.4) * euler(1.2, 0, 0.8) * euler(0, -0.1, 0), 0.2) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) RH.C0 = clerp(RH.C0, cf(1, -0.6, 0) * euler(0, 1.57, 0) * euler(-0.5, 0, 0.6), 0.25) LH.C0 = clerp(LH.C0, cf(-1, -0.8, 0) * euler(0, -1.57, 0) * euler(0.1, 0, 0.7), 0.25) end for i = 0, 1, 0.3 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(-0.3, 0, -1), 0.2) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -2) * euler(1.57, 0, -3), 0.2) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.8, 0, 1.3), 0.2) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(1.2, 0, -0.8) * euler(0, -0.1, 0), 0.2) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) RH.C0 = clerp(RH.C0, cf(1, -0.6, 0) * euler(0, 1.57, 0) * euler(-0.2, 0, 0.6), 0.25) LH.C0 = clerp(LH.C0, cf(-1, -0.8, 0) * euler(0, -1.57, 0) * euler(-0.1, 0, 0.3), 0.25) end local gairost = Instance.new("BodyGyro") gairost.Parent = RootPart gairost.maxTorque = Vector3.new(400000, 0, 400000) * math.huge gairost.P = 20000 gairost.cframe = cf(0, 0, 0) for i = 0, 1, 0.1 do fwait() if hitfloor ~= nil then Torso.Velocity = vt(0, 0, 0) end Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1.57), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -2.5) * euler(1.57, 0, -3.14), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-1.57, 0, 1.5) * euler(0.2, 0, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(1.5, 0, -1.57) * euler(0, 0, 0), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0, 1.57, 0) * euler(-0.3, 0.5, 0), 0.3) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(0, -1.57, 0) * euler(-0.1, 0.2, 0), 0.3) end for i = 1, 70 do fwait() gairost.cframe = RootPart.CFrame if hitfloor ~= nil then Torso.Velocity = vt(0, 0, 0) end end for i = 0, 1, 0.2 do fwait() Stun.Value = 0 gairost.cframe = RootPart.CFrame Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -2) * euler(1, 0, -4), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-1.57, 0, 1) * euler(0.2, -1, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(1.2, 0, 0.2) * euler(0, 0, 0), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0, 1.57, 0) * euler(-0.3, 0.5, 0.4), 0.3) LH.C0 = clerp(LH.C0, cf(-1, -1, -1) * euler(0, -1.57, 0) * euler(-0.1, 0.2, 1), 0.3) end resumeControl() gairost.Parent = nil dec.Parent = nil Stun.Value = 0 combo = 0 Stunned.Value = false attack = false for i = 1, 10 do fwait() Stun.Value = 0 end end attackone = function() attack = true for i = 0, 1, 0.12 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, 1) * euler(0, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(0, 0, -1), 0.3) RW.C0 = clerp(RW.C0, cf(1, 0.5, -0.5) * euler(1.4, 0, -1), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0.6, 0, -1) * euler(0, 0, 0), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(0.8, -1, -0.4) * euler(0, 1.57, 0) * euler(0, 1, -0.1), 0.4) LH.C0 = clerp(LH.C0, cf(-0.8, -0.9, 0.4) * euler(0, -1.57, 0) * euler(0, 1, 0.1), 0.4) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC189: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC189: LeaveBlock: unexpected jumping out IF_STMT end end end so("199145095", handle, 1, 1.1) hbwld.Parent = nil hboxpos.Parent = hitbox hitbox.Parent = modelzorz hitbox.Size = vt(2, 3, 2) hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF for i = 0, 1, 0.35 do fwait() hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF MagniDamage(hitbox, 3, 6, 7, math.random(5, 10), "Normal", RootPart, 0.5, 1, (math.random(4, 8)), nil, true) Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, -1.57) * euler(0, 0, 0), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(0, 0, 1.57), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.8, 0, 1.2), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0.4, 0, -0.1), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.4) * euler(0, 1.57, 0) * euler(0.2, -1.57, 0), 0.3) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.4) * euler(0, -1.57, 0) * euler(-0.4, -1.57, 0), 0.3) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC426: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC426: LeaveBlock: unexpected jumping out IF_STMT end end end for i = 0, 1, 0.1 do fwait() hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF MagniDamage(hitbox, 3, 6, 7, math.random(5, 10), "Normal", RootPart, 0.5, 1, (math.random(4, 8)), nil, true) Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, -1.57) * euler(0, 0, 0), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(0, 0, 1.57), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1, 0, 0) * euler(-0.5, 0, 0.5), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0.4, 0, -0.1), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.4) * euler(0, 1.57, 0) * euler(0.2, -1.57, 0), 0.3) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.4) * euler(0, -1.57, 0) * euler(-0.4, -1.57, 0), 0.3) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC642: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC642: LeaveBlock: unexpected jumping out IF_STMT end end end hitbox.Parent = modelzorz hitbox.Size = vt() hitboxweld() hboxpos.Parent = nil attack = false end attacktwo = function() attack = true for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 1.3), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, -1.3), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1, 0, 1.3), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1, 0.5, -0.5) * euler(0, -2.5, -1.57), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, cf(0.8, -1, -0.4) * euler(0, 1.57, 0) * euler(0, 1.3, -0.1), 0.4) LH.C0 = clerp(LH.C0, cf(-0.8, -0.9, 0.4) * euler(0, -1.57, 0) * euler(0, 1.3, 0.1), 0.4) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC171: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC171: LeaveBlock: unexpected jumping out IF_STMT end end end so("199145146", handle, 1, 1.3) hbwld.Parent = nil hboxpos.Parent = hitbox hitbox.Parent = modelzorz hitbox.Size = vt(2, 3, 2) hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF for i = 0, 1, 0.3 do fwait() hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF MagniDamage(hitbox, 3, 6, 7, math.random(5, 10), "Normal", RootPart, 0.5, 1, (math.random(4, 8)), nil, true) Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1.5) * euler(0.1, 0, 0), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 1.6), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 1, 1.3) * euler(0, -1.57, 0), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, -1.2), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.4) * euler(0, 1.57, 0) * euler(0.2, -1.57, 0), 0.3) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.4) * euler(0, -1.57, 0) * euler(-0.4, -1.57, 0), 0.3) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC408: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC408: LeaveBlock: unexpected jumping out IF_STMT end end end for i = 0, 1, 0.15 do fwait() hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF MagniDamage(hitbox, 3, 6, 7, math.random(5, 10), "Normal", RootPart, 0.5, 1, (math.random(4, 8)), nil, true) Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1.5) * euler(0.2, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 1.6), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 1, 1.3) * euler(0, -1.57, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, -1.2), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.4) * euler(0, 1.57, 0) * euler(0.2, -1.57, 0), 0.3) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.4) * euler(0, -1.57, 0) * euler(-0.4, -1.57, 0), 0.3) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC618: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC618: LeaveBlock: unexpected jumping out IF_STMT end end end hitbox.Parent = modelzorz hitbox.Size = vt() hitboxweld() hboxpos.Parent = nil attack = false end attackthree = function() attack = true for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1.2) * euler(0.2, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 1.2), 0.3) RW.C0 = clerp(RW.C0, cf(1, 0.5, -0.5) * euler(0, 2.5, 1.5) * euler(0, -1.57, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, -1.2), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.4) * euler(0, 1.57, 0) * euler(0.2, -1.2, 0), 0.3) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.4) * euler(0, -1.57, 0) * euler(-0.4, -1.2, 0), 0.3) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC183: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC183: LeaveBlock: unexpected jumping out IF_STMT end end end so("199145204", handle, 1, 1.2) hbwld.Parent = nil hboxpos.Parent = hitbox hitbox.Parent = modelzorz hitbox.Size = vt(2, 3, 2) hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF for i = 0, 1, 0.1 do fwait() hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF MagniDamage(hitbox, 3, 6, 7, math.random(5, 10), "Normal", RootPart, 0.5, 1, (math.random(4, 8)), nil, true) Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0.2) * euler(0, 0, 0), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, -0.2), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 1.2) * euler(0, -1.57, 0), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0.5, 0, -1.4), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0, 1.57, 0) * euler(0, 0, 0), 0.4) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(0, -1.57, 0) * euler(0, 0, 0), 0.4) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC420: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC420: LeaveBlock: unexpected jumping out IF_STMT end end end hitbox.Parent = modelzorz hitbox.Size = vt() hitboxweld() hboxpos.Parent = nil attack = false end attackfour = function() attack = true for i = 0, 1, 0.15 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 1) * euler(0, 0, 0), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(0, 0, -1), 0.4) RW.C0 = clerp(RW.C0, cf(1, 0.5, -0.5) * euler(1.57, 0, -1.2), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(1, 0, -0.1), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, cf(0.8, -1, -0.4) * euler(0, 1.57, 0) * euler(0, 1, -0.1), 0.4) LH.C0 = clerp(LH.C0, cf(-0.8, -0.9, 0.4) * euler(0, -1.57, 0) * euler(0, 1, 0.1), 0.4) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC183: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC183: LeaveBlock: unexpected jumping out IF_STMT end end end so("200632211", handle, 1, 0.8) hbwld.Parent = nil hboxpos.Parent = hitbox hitbox.Parent = modelzorz hitbox.Size = vt(2, 3, 2) hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF for i = 0, 1, 0.1 do fwait() hitboxCF = handle.CFrame hitbox.CFrame = hitboxCF MagniDamage(hitbox, 3, 6, 7, math.random(5, 10), "Normal", RootPart, 0.5, 1, (math.random(4, 8)), nil, true) Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1.57) * euler(0, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(0, 0, 1.57), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.57, 0, 1.57) * euler(0, 1.57, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0.5, 0, -1), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.4) * euler(0, 1.57, 0) * euler(0.2, -1.57, 0), 0.2) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.4) * euler(0, -1.57, 0) * euler(-0.4, -1.57, 0), 0.2) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC426: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC426: LeaveBlock: unexpected jumping out IF_STMT end end end hitbox.Parent = modelzorz hitbox.Size = vt() hitboxweld() hboxpos.Parent = nil attack = false end ShootRailGun = function() if railgunattack == true then return end ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt()) ref.Anchored = true ref.CFrame = cf(rprt8.Position) game:GetService("Debris"):AddItem(ref, 1) so("169380505", ref, 0.5, 1) local MouseLook = cf((rprt8.Position + MMouse.Hit.p) / 2, MMouse.Hit.p) local hit, pos = rayCast(rprt8.Position, MouseLook.lookVector, 999, RailgunTarget.Parent) local mag = (rprt8.Position - pos).magnitude MagicCylinder(Color2, CFrame.new((rprt8.Position + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * 5, 1, 1.2, 0, 1.2, 0.1) if hit ~= nil then ref = part(3, workspace, 0, 1, Color2, "Reference", vt()) ref.Anchored = true ref.CFrame = cf(pos) game:GetService("Debris"):AddItem(ref, 1) so("153092334", ref, 0.5, 1.5) so("169380505", ref, 0.5, 1.5) MagicCircle(Color2, cf(pos), 10, 10, 10, 1, 1, 1, 0.07) Damagefunc(hit, 6, 8, 0, "Normal", RootPart, 0, 2, math.random(1, 5), false, false, true, "Movement", 0.05, 100) end coroutine.resume(coroutine.create(function() railgunattack = true for i = 0, 1, 0.2 do fwait() rwld2.C1 = clerp(rwld2.C1, cf(0, 0, -1), 0.5) end for i = 0, 1, 0.1 do fwait() rwld2.C1 = clerp(rwld2.C1, cf(0, 0, 0), 0.4) end railgunattack = false end)) end ShootCannon = function() if cannonattack == true then return end ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt()) ref.Anchored = true ref.CFrame = cf(pprt8.Position) game:GetService("Debris"):AddItem(ref, 1) so("169380505", ref, 0.5, 1) table.insert(Effects, {pprt8.Position, "Shoot", 30, MMouse.Hit.p}) coroutine.resume(coroutine.create(function() cannonattack = true for i = 0, 1, 0.05 do fwait() pwld2.C1 = clerp(pwld2.C1, cf(0, 0, -1.5), 0.5) end for i = 0, 1, 0.05 do fwait() pwld2.C1 = clerp(pwld2.C1, cf(0, 0, 0), 0.3) end cannonattack = false end)) end bladesattackone = function() while tribladesattack == true do fwait() end tribladesattack = true for i = 0, 1, 0.2 do fwait() brefwld.C0 = clerp(brefwld.C0, euler(0, 0, 0) * cf(0, -2.5, 2), 0.4) bwld1.C0 = clerp(bwld1.C0, euler(0, 0, 0) * cf(3, -0.6, -2), 0.4) bwld7.C0 = clerp(bwld7.C0, euler(0, 0, 0) * cf(0, -0.6, -2), 0.4) bwld13.C0 = clerp(bwld13.C0, euler(0, 0, 0) * cf(-3, -0.6, -2), 0.4) bwld2.C0 = clerp(bwld2.C0, euler(3.14, -1.5, 1) * cf(0, 0, 0), 0.4) bwld8.C0 = clerp(bwld8.C0, euler(3.14, -1.5, 1.57) * cf(0, 0, 0), 0.4) bwld14.C0 = clerp(bwld14.C0, euler(3.14, -1.5, 2) * cf(0, 0, 0), 0.4) end so("161006195", bprt1, 0.6, math.random(100, 200) / 100) so("161006195", bprt7, 0.6, math.random(100, 200) / 100) so("161006195", bprt13, 0.6, math.random(100, 200) / 100) hitboxb1.Parent = Character hitboxb1.Size = vt(1, 2, 1) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb1.Transparency = 1 hitboxb2.Parent = Character hitboxb2.Size = vt(1, 2, 1) hitboxb2.CFrame = bprt10.CFrame * euler(0, 0, 1.57) hitboxb3.Parent = Character hitboxb3.Size = vt(1, 2, 1) hitboxb3.CFrame = bprt16.CFrame * euler(0, 0, 1.57) for i = 0, 1, 0.3 do fwait() brefwld.C0 = clerp(brefwld.C0, euler(1.57, 0, 0) * cf(0, 1.5, 3), i) bwld2.C0 = clerp(bwld2.C0, euler(3.14, -1.5, 1.57) * cf(0, 0, 0), i) bwld8.C0 = clerp(bwld8.C0, euler(3.14, -1.5, 1.57) * cf(0, 0, 0), i) bwld14.C0 = clerp(bwld14.C0, euler(3.14, -1.5, 1.57) * cf(0, 0, 0), i) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end for i = 0, 1, 0.2 do fwait() brefwld.C0 = clerp(brefwld.C0, euler(1.7, 0, 0) * cf(0, 2, 3), 0.4) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end hitboxb1.Parent = nil hitboxb2.Parent = nil hitboxb3.Parent = nil tribladesattack = false end bladesattacktwo = function() while tribladesattack == true do fwait() end tribladesattack = true for i = 0, 1, 0.2 do fwait() brefwld.C0 = clerp(brefwld.C0, euler(0, -1, 0) * cf(6, 1, 3), 0.4) bwld1.C0 = clerp(bwld1.C0, euler(0, -0.5, 0) * cf(2, -0.6, -2), 0.4) bwld7.C0 = clerp(bwld7.C0, euler(0, 0, 0) * cf(0, -0.6, -2), 0.4) bwld13.C0 = clerp(bwld13.C0, euler(0, 0.5, 0) * cf(-2, -0.6, -2), 0.4) bwld2.C0 = clerp(bwld2.C0, euler(4.71, -1.57, 1.57) * cf(0, 0, 0), 0.4) bwld8.C0 = clerp(bwld8.C0, euler(4.71, -1.57, 1.57) * cf(0, 0, 0), 0.4) bwld14.C0 = clerp(bwld14.C0, euler(4.71, -1.57, 1.57) * cf(0, 0, 0), 0.4) end so("161006195", bprt1, 0.6, math.random(80, 150) / 100) so("161006195", bprt7, 0.6, math.random(80, 150) / 100) so("161006195", bprt13, 0.6, math.random(80, 150) / 100) hitboxb1.Parent = Character hitboxb1.Size = vt(1, 2, 1) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb1.Transparency = 1 hitboxb2.Parent = Character hitboxb2.Size = vt(1, 2, 1) hitboxb2.CFrame = bprt10.CFrame * euler(0, 0, 1.57) hitboxb3.Parent = Character hitboxb3.Size = vt(1, 2, 1) hitboxb3.CFrame = bprt16.CFrame * euler(0, 0, 1.57) for i = 0, 1, 0.4 do fwait() brefwld.C0 = clerp(brefwld.C0, euler(0, 1, 0) * cf(-6, 1, 3), i) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end for i = 0, 1, 0.2 do fwait() brefwld.C0 = clerp(brefwld.C0, euler(0, 1.7, 0) * cf(-6, 1, -1), 0.4) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end hitboxb1.Parent = nil hitboxb2.Parent = nil hitboxb3.Parent = nil tribladesattack = false end bladesattackthree = function() while tribladesattack == true do fwait() end tribladesattack = true for i = 0, 1, 0.3 do fwait() bwld1.C0 = clerp(bwld1.C0, cf(0, -4, -2) * euler(0, 0, 2.09), 0.4) bwld7.C0 = clerp(bwld7.C0, cf(0, -4, -2) * euler(0, 0, 4.18), 0.4) bwld13.C0 = clerp(bwld13.C0, cf(0, -4, -2) * euler(0, 0, 6.27), 0.4) bwld2.C0 = clerp(bwld2.C0, euler(3.14, -1.3, 1.57) * cf(0, 0, 0), 0.4) bwld8.C0 = clerp(bwld8.C0, euler(3.14, -1.3, 1.57) * cf(0, 0, 0), 0.4) bwld14.C0 = clerp(bwld14.C0, euler(3.14, -1.3, 1.57) * cf(0, 0, 0), 0.4) brefwld.C0 = clerp(brefwld.C0, euler(0, 0, 0) * cf(0, 0, -2), 0.4) end so("161006195", bprt1, 0.6, math.random(100, 200) / 100) so("161006195", bprt7, 0.6, math.random(100, 200) / 100) so("161006195", bprt13, 0.6, math.random(100, 200) / 100) hitboxb1.Parent = Character hitboxb1.Size = vt(1, 2, 1) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb1.Transparency = 1 hitboxb2.Parent = Character hitboxb2.Size = vt(1, 2, 1) hitboxb2.CFrame = bprt10.CFrame * euler(0, 0, 1.57) hitboxb3.Parent = Character hitboxb3.Size = vt(1, 2, 1) hitboxb3.CFrame = bprt16.CFrame * euler(0, 0, 1.57) n = math.random(-50, 50) for i = 0, 1, 0.4 do fwait() bwld1.C0 = clerp(bwld1.C0, cf(0, -1.2, -2) * euler(0, 0, 2.09), 0.4) bwld7.C0 = clerp(bwld7.C0, cf(0, -1.2, -2) * euler(0, 0, 4.18), 0.4) bwld13.C0 = clerp(bwld13.C0, cf(0, -1.2, -2) * euler(0, 0, 6.27), 0.4) bwld2.C0 = clerp(bwld2.C0, euler(3.14, -1.3, 1.57) * cf(0, 0, 0), 0.4) bwld8.C0 = clerp(bwld8.C0, euler(3.14, -1.3, 1.57) * cf(0, 0, 0), 0.4) bwld14.C0 = clerp(bwld14.C0, euler(3.14, -1.3, 1.57) * cf(0, 0, 0), 0.4) brefwld.C0 = clerp(brefwld.C0, euler(0, 0, n) * cf(0, 0, 6), 0.4) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end n = math.random(-50, 50) for i = 0, 1, 0.3 do fwait() bwld1.C0 = clerp(bwld1.C0, cf(0, -1, -2) * euler(0, 0, 2.09), 0.4) bwld7.C0 = clerp(bwld7.C0, cf(0, -1, -2) * euler(0, 0, 4.18), 0.4) bwld13.C0 = clerp(bwld13.C0, cf(0, -1, -2) * euler(0, 0, 6.27), 0.4) brefwld.C0 = clerp(brefwld.C0, euler(0, 0, n) * cf(0, 0, 7), 0.4) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end hitboxb1.Parent = nil hitboxb2.Parent = nil hitboxb3.Parent = nil tribladesattack = false end bladesattackfour = function() while tribladesattack == true do fwait() end tribladesattack = true for i = 0, 1, 0.2 do fwait() bwld1.C0 = clerp(bwld1.C0, cf(0, -1, 0) * euler(0, 0, 2.09), 0.4) bwld7.C0 = clerp(bwld7.C0, cf(0, -1, 0) * euler(0, 0, 4.18), 0.4) bwld13.C0 = clerp(bwld13.C0, cf(0, -1, 0) * euler(0, 0, 6.27), 0.4) bwld2.C0 = clerp(bwld2.C0, euler(1.57, 0, -1.57) * cf(0, 0, 0), 0.4) bwld8.C0 = clerp(bwld8.C0, euler(1.57, 0, -1.57) * cf(0, 0, 0), 0.4) bwld14.C0 = clerp(bwld14.C0, euler(1.57, 0, -1.57) * cf(0, 0, 0), 0.4) brefwld.C0 = clerp(brefwld.C0, euler(-1.57, 0, 0) * cf(-5, -0.5, 0), 0.4) end so("161006195", bprt1, 0.6, math.random(40, 80) / 100) so("161006195", bprt7, 0.6, math.random(40, 80) / 100) so("161006195", bprt13, 0.6, math.random(40, 80) / 100) hitboxb1.Parent = Character hitboxb1.Size = vt(1, 2, 1) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb1.Transparency = 1 hitboxb2.Parent = Character hitboxb2.Size = vt(1, 2, 1) hitboxb2.CFrame = bprt10.CFrame * euler(0, 0, 1.57) hitboxb3.Parent = Character hitboxb3.Size = vt(1, 2, 1) hitboxb3.CFrame = bprt16.CFrame * euler(0, 0, 1.57) for i = 0, 1, 0.6 do fwait() bwld1.C0 = clerp(bwld1.C0, cf(0, -1, 0) * euler(0, 0, 5.19), 0.5) bwld7.C0 = clerp(bwld7.C0, cf(0, -1, 0) * euler(0, 0, 7.28), 0.5) bwld13.C0 = clerp(bwld13.C0, cf(0, -1, 0) * euler(0, 0, 9.37), 0.5) brefwld.C0 = clerp(brefwld.C0, euler(-1.57, 0, 0) * cf(0, -0.5, 8), 0.5) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end for i = 0, 1, 0.4 do fwait() bwld1.C0 = clerp(bwld1.C0, cf(0, -1, 0) * euler(0, 0, 7.09), 0.5) bwld7.C0 = clerp(bwld7.C0, cf(0, -1, 0) * euler(0, 0, 9.18), 0.5) bwld13.C0 = clerp(bwld13.C0, cf(0, -1, 0) * euler(0, 0, 11.27), 0.5) brefwld.C0 = clerp(brefwld.C0, euler(-1.57, 0, 0) * cf(0, -0.5, 20), 0.5) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end for i = 0, 1, 0.4 do fwait() brefwld.C0 = clerp(brefwld.C0, euler(-1.57, 0, 0) * cf(0, -2, 0), 0.5) bwld1.C0 = clerp(bwld1.C0, cf(0, -1, 0) * euler(0, 0, 2.09), 0.4) bwld7.C0 = clerp(bwld7.C0, cf(0, -1, 0) * euler(0, 0, 4.18), 0.4) bwld13.C0 = clerp(bwld13.C0, cf(0, -1, 0) * euler(0, 0, 6.27), 0.4) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end hitboxb1.Parent = nil hitboxb2.Parent = nil hitboxb3.Parent = nil tribladesattack = false end BladesDamage = function(pitch) so("161006195", bprt1, 0.6, pitch) so("161006195", bprt7, 0.6, pitch) so("161006195", bprt13, 0.6, pitch) hitboxb1.Parent = Character hitboxb1.Size = vt(1, 2, 1) hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb1.Transparency = 1 hitboxb2.Parent = Character hitboxb2.Size = vt(1, 2, 1) hitboxb2.CFrame = bprt10.CFrame * euler(0, 0, 1.57) hitboxb3.Parent = Character hitboxb3.Size = vt(1, 2, 1) hitboxb3.CFrame = bprt16.CFrame * euler(0, 0, 1.57) coroutine.resume(coroutine.create(function(Con1, Con2, Con3) while attack == true do fwait() hitboxb1.CFrame = bprt4.CFrame * euler(0, 0, 1.57) hitboxb2.CFrame = bprt10.CFrame hitboxb3.CFrame = bprt16.CFrame MagniDamage(hitboxb1, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb2, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") MagniDamage(hitboxb3, 2, 5, 7, math.random(1, 5), "Normal", BladesTarget, 0.4, 1, math.random(1, 3), false, true, true, nil, nil, nil, "Slash") end hitboxb1.Parent = nil hitboxb2.Parent = nil hitboxb3.Parent = nil end), con1, con2, con3) end StatConvert = function() attack = true for i = 0, 1, 0.1 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0) * euler(0.2, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.3) RW.C0 = clerp(RW.C0, cf(1.2, 0.5, -0.5) * euler(1.5, 0, -1.5) * euler(0, 0, 0), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.2, 0.5, -0.5) * euler(1.5, 0, 1.5) * euler(0, 0, 0), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0, 1.57, 0) * euler(0, 0, 0), 0.3) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(0, -1.57, 0) * euler(0, 0, 0), 0.3) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC189: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC189: LeaveBlock: unexpected jumping out IF_STMT end end end for _,i in pairs(Decrease:children()) do if i.Name == "DecreaseDef" then i.Name = "DecreaseAtk" i.Value = i.Value * 0.5 else if i.Name == "DecreaseAtk" then i.Name = "DecreaseDef" i.Value = i.Value * 2 end end end attack = false for i = 1, 30 do fwait() for i = 1, 2 do ElecEffect(cf(RootPart.Position), 2, 3, 1) end end end do1 = function() if givingarmor == true then givingarmor = false cooldowns[1] = 0 RailgunTarget = RootPart end if attack == true then return end if Stagger.Value == true or StunT.Value <= Stun.Value or StaggerHit.Value == true then return end if cooldownmax <= cooldowns[1] and mana.Value >= 30 then givingrailgun = true attack = true mana.Value = mana.Value - 30 MagicSpecial(BrickColor.new(NewCol), RightArm.CFrame * cf(0, -1, 0) * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 0.2, 0.2, 0.2, 0.5, 0.5, 0.5, 0.1) local dec = Instance.new("NumberValue", Decrease) dec.Name = "DecreaseMvmt" dec.Value = 0.4 for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1) * euler(0.2, 0, 0), 0.5) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 1), 0.5) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.7, 0, 0) * euler(0, 0, -0.5), 0.5) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.5) LW.C0 = clerp(LW.C0, cf(-1, 0.5, -0.5) * euler(1.3, 0, 0) * euler(0, 0, 0.8), 0.5) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.5) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.5) * euler(0, 1.57, 0) * euler(0, -1, -0.1), 0.5) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.5) * euler(0, -1.57, 0) * euler(0, -1, 0.4), 0.5) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC279: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC279: LeaveBlock: unexpected jumping out IF_STMT end end end givingarmor = true while givingarmor == true do if givingarmor == true then fwait() ElecEffect(RightArm.CFrame, 1, 2, 1) end if Stagger.Value ~= true and StunT.Value > Stun.Value and StaggerHit.Value == true then break end end givingrailgun = false DecreaseStat(Character, "Defense", -0.1, 400) DecreaseStat(Character, "Movement", 0.1, 400) cooldowns[1] = 0 givingarmor = false dec.Parent = nil if RailgunTarget ~= nil then for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(-0.4, 0, -0.2), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.5) * euler(0.8, 0, 0.5), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.4, 0, 0.5), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.4), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, RHC0 * cf(0, 0, 0) * euler(0, -0.5, -0.5), 0.4) LH.C0 = clerp(LH.C0, LHC0 * cf(-0.5, 1, 0) * euler(0.5, 0, -0.5), 0.4) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC499: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC499: LeaveBlock: unexpected jumping out IF_STMT end end end DecreaseStat(RailgunTarget.Parent, "Defense", -0.2, 280) rwld1.Part1 = RailgunTarget model1.Parent = RailgunTarget.Parent MagicSpecial(BrickColor.new(NewCol), rprt1.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.5, 0.5, 0.5, 0.05) ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt()) ref.Anchored = true ref.CFrame = cf(rprt1.Position) game:GetService("Debris"):AddItem(ref, 1) so("203691326", ref, 1, 1) for i = 1, 5 do ElecEffect(cf(rprt1.Position), 3, 3, 3) end for i = 1, #Railgun do Railgun[i].Parent = model1 RailgunWelds[i].Parent = Railgun[1] end elecnum = 0 attack = false for i = 1, 50 do fwait() ElecEffect(cf(rprt1.Position), 2, 2, 2) end else do attack = false end end end end do2 = function() if givingarmor == true then givingarmor = false cooldowns[2] = 0 CannonTarget = RootPart end if attack == true then return end if Stagger.Value == true or StunT.Value <= Stun.Value or StaggerHit.Value == true then return end if cooldownmax <= cooldowns[2] and mana.Value >= 30 then attack = true mana.Value = mana.Value - 30 givingplasma = true MagicSpecial(BrickColor.new(NewCol), RightArm.CFrame * cf(0, -1, 0) * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 0.2, 0.2, 0.2, 0.5, 0.5, 0.5, 0.1) local dec = Instance.new("NumberValue", Decrease) dec.Name = "DecreaseMvmt" dec.Value = 0.4 for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1) * euler(0.2, 0, 0), 0.5) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 1), 0.5) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.7, 0, 0) * euler(0, 0, -0.5), 0.5) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.5) LW.C0 = clerp(LW.C0, cf(-1, 0.5, -0.5) * euler(1.3, 0, 0) * euler(0, 0, 0.8), 0.5) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.5) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.5) * euler(0, 1.57, 0) * euler(0, -1, -0.1), 0.5) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.5) * euler(0, -1.57, 0) * euler(0, -1, 0.4), 0.5) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC279: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC279: LeaveBlock: unexpected jumping out IF_STMT end end end givingarmor = true while givingarmor == true do if givingarmor == true then fwait() ElecEffect(RightArm.CFrame, 1, 2, 1) end if Stagger.Value ~= true and StunT.Value > Stun.Value and StaggerHit.Value == true then break end end givingplasma = false DecreaseStat(Character, "Defense", -0.1, 400) DecreaseStat(Character, "Movement", 0.1, 400) cooldowns[2] = 0 givingarmor = false dec.Parent = nil if CannonTarget ~= nil then for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(-0.4, 0, -0.2), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.5) * euler(0.8, 0, 0.5), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.4, 0, 0.5), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.4), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, RHC0 * cf(0, 0, 0) * euler(0, -0.5, -0.5), 0.4) LH.C0 = clerp(LH.C0, LHC0 * cf(-0.5, 1, 0) * euler(0.5, 0, -0.5), 0.4) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC499: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC499: LeaveBlock: unexpected jumping out IF_STMT end end end DecreaseStat(CannonTarget.Parent, "Defense", -0.2, 300) pwld1.Part1 = CannonTarget model2.Parent = CannonTarget.Parent MagicSpecial(BrickColor.new(NewCol), pprt1.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.5, 0.5, 0.5, 0.05) ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt()) ref.Anchored = true ref.CFrame = cf(pprt1.Position) game:GetService("Debris"):AddItem(ref, 1) so("203691326", ref, 1, 1) for i = 1, 5 do ElecEffect(cf(pprt1.Position), 3, 3, 3) end for i = 1, #Plasma do Plasma[i].Parent = model2 PlasmaWelds[i].Parent = Plasma[1] end elecnum = 0 attack = false for i = 1, 50 do fwait() ElecEffect(cf(pprt1.Position), 2, 2, 2) end else do attack = false end end end end do3 = function() if givingarmor == true then givingarmor = false cooldowns[3] = 0 BladesTarget = RootPart end if attack == true then return end if Stagger.Value == true or StunT.Value <= Stun.Value or StaggerHit.Value == true then return end if cooldownmax <= cooldowns[3] and mana.Value >= 30 then attack = true mana.Value = mana.Value - 30 givingblades = true MagicSpecial(BrickColor.new(NewCol), RightArm.CFrame * cf(0, -1, 0) * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 0.2, 0.2, 0.2, 0.5, 0.5, 0.5, 0.1) local dec = Instance.new("NumberValue", Decrease) dec.Name = "DecreaseMvmt" dec.Value = 0.4 for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1) * euler(0.2, 0, 0), 0.5) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 1), 0.5) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.7, 0, 0) * euler(0, 0, -0.5), 0.5) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.5) LW.C0 = clerp(LW.C0, cf(-1, 0.5, -0.5) * euler(1.3, 0, 0) * euler(0, 0, 0.8), 0.5) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.5) RH.C0 = clerp(RH.C0, cf(0.6, -1, 0.5) * euler(0, 1.57, 0) * euler(0, -1, -0.1), 0.5) LH.C0 = clerp(LH.C0, cf(-0.6, -1, -0.5) * euler(0, -1.57, 0) * euler(0, -1, 0.4), 0.5) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC279: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC279: LeaveBlock: unexpected jumping out IF_STMT end end end givingarmor = true while givingarmor == true do if givingarmor == true then fwait() ElecEffect(RightArm.CFrame, 1, 2, 1) end if Stagger.Value ~= true and StunT.Value > Stun.Value and StaggerHit.Value == true then break end end givingblades = false DecreaseStat(Character, "Defense", -0.1, 400) DecreaseStat(Character, "Movement", 0.1, 400) cooldowns[3] = 0 givingarmor = false dec.Parent = nil if BladesTarget ~= nil then for i = 0, 1, 0.2 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(-0.4, 0, -0.2), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.5) * euler(0.8, 0, 0.5), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.4, 0, 0.5), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.4), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, RHC0 * cf(0, 0, 0) * euler(0, -0.5, -0.5), 0.4) LH.C0 = clerp(LH.C0, LHC0 * cf(-0.5, 1, 0) * euler(0.5, 0, -0.5), 0.4) if Stagger.Value ~= true and StunT.Value > Stun.Value then do if StaggerHit.Value == true then break end -- DECOMPILER ERROR at PC499: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC499: LeaveBlock: unexpected jumping out IF_STMT end end end DecreaseStat(BladesTarget.Parent, "Damage", -0.2, 300) brefwld.Part1 = BladesTarget model3.Parent = BladesTarget.Parent MagicSpecial(BrickColor.new(NewCol), bprt1.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.3, 0.3, 0.3, 0.05) MagicSpecial(BrickColor.new(NewCol), bprt7.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.3, 0.3, 0.3, 0.05) MagicSpecial(BrickColor.new(NewCol), bprt13.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.3, 0.3, 0.3, 0.05) ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt()) ref.Anchored = true ref.CFrame = cf(bprt1.Position) game:GetService("Debris"):AddItem(ref, 1) so("203691326", ref, 1, 1) for i = 1, 5 do ElecEffect(cf(bref.Position), 3, 3, 3) end for i = 1, #Blades do Blades[i].Parent = model3 BladesWelds[i].Parent = Blades[1] end attack = false for i = 1, 50 do fwait() ElecEffect(cf(bref.Position), 2, 2, 2) end else do attack = false end end end end ignoretab2 = {} NewPart = function(size, cframe, color, meshtype, meshscale) local par = Instance.new("Part") par.TopSurface = 0 par.BottomSurface = 0 par.Size = size par.CFrame = cframe par.BrickColor = color par.Anchored = true par.CanCollide = false do if meshtype then local m = Instance.new(meshtype, par) m.Scale = meshscale end table.insert(ignoretab2, par) return par end end vPlayer = game.Players.LocalPlayer GetTeamFromColor = function(color) for _,v in pairs(game:GetService("Teams"):children()) do if color == v.TeamColor then return v.Name end end end drawline = function(pos, pos2) local par, loc, normal = nil, nil, nil for i = 1, 100 do par = workspace:FindPartOnRayWithIgnoreList(Ray.new(pos, -(pos - pos2)), ignoretab2) if par then -- DECOMPILER ERROR at PC45: Unhandled construct in 'MakeBoolean' P3 -- DECOMPILER ERROR at PC45: Unhandled construct in 'MakeBoolean' P3 if (par.CanCollide == false and par.Parent:FindFirstChild("Humanoid") == nil) or par:IsDescendantOf(vPlayer) then table.insert(ignoretab2, par) else local ok = true do do do if par.Parent:FindFirstChild("Humanoid") then local vp = game.Players:GetPlayerFromCharacter(par.Parent) -- DECOMPILER ERROR at PC81: Unhandled construct in 'MakeBoolean' P1 if vp ~= nil and vp.Neutral ~= true and vPlayer.Neutral ~= true and GetTeamFromColor(vp.TeamColor) == GetTeamFromColor(vPlayer.TeamColor) then table.insert(ignoretab2, par) ok = false end end if vPlayer.Neutral ~= true and par.Parent:FindFirstChild("Alignment") ~= nil and vPlayer.TeamColor.Color == par.Parent.Alignment.Value then table.insert(ignoretab2, par) ok = false end if ok then return par, loc, normal end do return par, loc, normal end -- DECOMPILER ERROR at PC119: LeaveBlock: unexpected jumping out DO_STMT -- DECOMPILER ERROR at PC119: LeaveBlock: unexpected jumping out DO_STMT -- DECOMPILER ERROR at PC119: LeaveBlock: unexpected jumping out IF_ELSE_STMT -- DECOMPILER ERROR at PC119: LeaveBlock: unexpected jumping out IF_STMT -- DECOMPILER ERROR at PC119: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC119: LeaveBlock: unexpected jumping out IF_STMT end end end end end end print("oops") return nil, Vector3.new(0, 0, 0), Vector3.new(0, 0, 0) end lasersounds = {412755503, 412755564, 412755598, 412755669, 412756057, 412756123, 412756170, 412756199} GetNubs = function() Nubs = {} for _,v in pairs(workspace:children()) do if v:FindFirstChild("Humanoid") ~= nil and v:FindFirstChild("Torso") ~= nil and v.Name ~= game.Players.LocalPlayer.Name and v.Name ~= vPlayer.Name .. "Subunit" and (v.Torso.Position - vPlayer.Character.HumanoidRootPart.Position).magnitude <= 600 and v.Humanoid.Health > 0 then local vp = game.Players:GetPlayerFromCharacter(v) if vp == nil then table.insert(Nubs, v) else if vp.Neutral == true and vPlayer.Neutral == true then table.insert(Nubs, v) else if GetTeamFromColor(vp.TeamColor) ~= GetTeamFromColor(vPlayer.TeamColor) then table.insert(Nubs, v) end end end end end end Nubs = {} GetNubsInRadius = function(pos, radius) local radius = radius local filtered = {} for _,v in pairs(Nubs) do if v:FindFirstChild("Torso") ~= nil and v:FindFirstChild("Humanoid") ~= nil then local cpos = pos do do if v.Humanoid:GetState() == Enum.HumanoidStateType.Jumping or v.Humanoid:GetState() == Enum.HumanoidStateType.Freefall then local ydiff = (v.Torso.Position.y - vPlayer.Character.Torso.Position.y) / 1 if ydiff > 5 then ydiff = 5 end cpos = pos + Vector3.new(0, ydiff, 0) end if v.Name == "Siegmund" then cpos = cpos - Vector3.new(0, 5, 0) end if v.Torso.Position - (cpos).magnitude <= radius then table.insert(filtered, v) end -- DECOMPILER ERROR at PC74: LeaveBlock: unexpected jumping out DO_STMT -- DECOMPILER ERROR at PC74: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC74: LeaveBlock: unexpected jumping out IF_STMT end end end end return filtered end fwait = function(t) if t == nil then t = 0.033333333333333 else if t == 0 then t = 0.033333333333333 end end local s = 0 repeat s = s + 0.033333333333333 ArtificialHB.Event:wait() until t <= s return s, workspace.DistributedGameTime end do4 = function() if attack == true then return end if Stagger.Value == true or StunT.Value <= Stun.Value or StaggerHit.Value == true then return end if cooldownmax <= cooldowns[4] and mana.Value >= 40 then attack = true cooldowns[4] = 0 mana.Value = mana.Value - 40 GetNubs() table.insert(Nubs, vPlayer.Character) local ppos = vPlayer:GetMouse().Hit.p do local h, p, k = drawline(ppos + Vector3.new(0, 450, 0), ppos - Vector3.new(0, 450, 0)) local r, g, b = nil, nil, nil local Col1 = BrickColor.new(NewCol) r = Col1.Color.r + 0.3 g = Col1.Color.g + 0.3 b = Col1.Color.b + 0.3 if r > 1 then r = 1 end if g > 1 then g = 1 end if b > 1 then b = 1 end local Col1C = (Color3.new(r, g, b)) local pro, blolb, r, psl, par, loc, nor = nil, nil, nil, nil, nil, nil, nil local x = {} local joj, kd = false, false for i = 1, 10 do x[i] = i end local m = Instance.new("Model", workspace) m.Name = "IONCANNON_EFFECTS" game:GetService("Debris"):AddItem(m, 20) local kt = tick() local soloc = Instance.new("Part", workspace) soloc.Transparency = 1 soloc.CanCollide = false soloc.Anchored = true soloc.Name = "Effect" soloc.Size = Vector3.new(0.2, 0.2, 0.2) soloc.CFrame = CFrame.new(ppos + Vector3.new(0, 450, 0), ppos - Vector3.new(0, 450, 0)) --(p) game:GetService("Debris"):AddItem(soloc, 25) local so = Instance.new("Sound", vPlayer.Character.Head) so.Volume = 0.35 so.Pitch = 1 so.SoundId = "http://www.roblox.com/asset/?id=412756347" coroutine.resume(coroutine.create(function(so) wait() so:Play() end), so) for i = 0, 1, 0.1 do fwait() Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1) * euler(0, 0, 0), 0.5) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.5) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1.7, 0, 0) * euler(0, 0, 0), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.5) LW.C0 = clerp(LW.C0, cf(-1, 0.5, -0.5) * euler(0, 0, 0) * euler(0, 0, 0), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) end fwait(0.5) local so = Instance.new("Sound", vPlayer.Character.Head) so.Volume = 0.4 so.Pitch = 1.1 so.SoundId = "http://www.roblox.com/asset/?id=412756417" coroutine.resume(coroutine.create(function(so) wait() so:Play() end), so) attack = false local so = Instance.new("Sound", soloc) so.Volume = 0.8 so.Pitch = 1.2 so.SoundId = "http://www.roblox.com/asset/?id=412756315" coroutine.resume(coroutine.create(function(so) wait() so:Play() end), so) local kuck = false local lasparts = {} coroutine.resume(coroutine.create(function() local ksl, mdist, mpl = 0, 0, 0 repeat fwait(0.12) ksl = ksl + 1 if ksl == 50 then GetNubs() table.insert(Nubs, vPlayer.Character) ksl = 0 end mdist = (lasparts[1].Position - p).magnitude print(mdist) for _,v in pairs(Nubs) do if v and v.Parent and v:FindFirstChild("Torso") and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 then mpl = Vector3.new(v.Torso.Position.x, 0, v.Torso.Position.z) - Vector3.new(p.x, 0, p.z).magnitude if mdist - 4.5 < mpl and mpl < mdist + 4.5 then print("!!!!", time()) for __,vv in pairs(lasparts) do if vv.Position - v.Torso.Position.magnitude <= 10 and vv.Position.y - 4 <= v.Torso.Position.y then if v ~= vPlayer.Character then Damagefunc(v.Torso, 1, 1, 0, "Normal", RootPart, 0, 1, 1, nil, false) DecreaseStat(v.Parent, "Movement", 0.06, 200) break end vPlayer.Character.Humanoid:TakeDamage(1 / vPlayer.Character.Stats.Defense.Value) DecreaseStat(vPlayer.Character, "Movement", 0.06, 200) showDamage(vPlayer.Character, math.floor(1 / vPlayer.Character.Stats.Defense.Value), "Damage") break end end end end end until kuck == true end)) for i = 1, 10 do r = math.random(1, #x) if #x > 1 then blolb = x[r] else blolb = x[1] end psl = ppos + Vector3.new(0, 450, 0), ppos - Vector3.new(0, 450, 0) + Vector3.new(math.cos(math.rad(36 * blolb)) * 35, 0, math.sin(math.rad(36 * blolb)) * 35) --p + Vector3.new(math.cos(math.rad(36 * blolb)) * 35, 0, math.sin(math.rad(36 * blolb)) * 35) par = drawline(psl + Vector3.new(0, 480, 0), psl - Vector3.new(0, 480, 0)) local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(loc) * CFrame.Angles(math.random(-30, 30) / 50, math.random(-30, 30) / 50, math.random(-30, 30) / 50), Col1, "SpecialMesh", Vector3.new(2, 2, 2)) pc.Parent = workspace pc.Anchored = true pc.CanCollide = false pc.Mesh.MeshType = "Sphere" pc.Transparency = 1 pc.Material = "Neon" game:GetService("Debris"):AddItem(pc, 15) coroutine.resume(coroutine.create(function(p, V, x) for i = 1, 12 do p.Mesh.Scale = p.Mesh.Scale + Vector3.new(1.6, 1.6, 1.6) / (1 + i / 6.5) p.Transparency = 0.25 + i / 16 p.CFrame = p.CFrame * V fwait() end p:Remove() end), pc, CFrame.Angles(math.rad(math.random(-6, 6)), math.rad(math.random(-16, 16)), math.rad(math.random(-6, 6)))) table.insert(ignoretab2, pc) local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(loc + Vector3.new(0, 1.25, 0)) * CFrame.Angles(0, math.random(-180, 180) * math.rad(1), 0), Col1, "SpecialMesh", Vector3.new(4, 4, 4)) pc.Mesh.MeshType = "FileMesh" pc.Anchored = true pc.CanCollide = false pc.Parent = workspace pc.Mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" pc.Name = "Shockwave" pc.Material = "Neon" game:GetService("Debris"):AddItem(pc, 5) coroutine.resume(coroutine.create(function(p) for i = 1, 12 do p.Transparency = 0.25 + i / 16 p.CFrame = p.CFrame * CFrame.Angles(0, math.rad(5 + i / 20), 0) + Vector3.new(0, -0.11666666666667, 0) p.Mesh.Scale = p.Mesh.Scale + Vector3.new(i / 10, -0.25, i / 10) fwait() end p:Remove() end), pc) local so = Instance.new("Sound", pc) so.Volume = 1 so.Pitch = 1 so.SoundId = "http://www.roblox.com/asset/?id=" .. lasersounds[math.random(1, 8)] coroutine.resume(coroutine.create(function(so) wait() so:Play() end), so) for kek = 1, 3 do pro = NewPart(Vector3.new(1, 1, 1), CFrame.new(loc), Col1, "CylinderMesh", Vector3.new(1.7 - kek * 0.1, 1600, 1.7 - kek * 0.1) - Vector3.new(0.25, 0, 0.25) * 1.95 ^ (kek - 1)) pro.Anchored = true pro.Mesh.Offset = Vector3.new(0, 799, 0) pro.Material = "Neon" pro.Name = "Las" .. i .. kek pro.Parent = m pro.Transparency = 1 - 0.2 * 1.7 ^ (kek - 1) game:GetService("Debris"):AddItem(pro, 10) if kek == 1 then table.insert(lasparts, pro) coroutine.resume(coroutine.create(function(k, l) repeat fwait() until joj == true local j, c, h, psl, pc = nil, nil, nil, nil, nil local klr, i, lj = 0, 0, 0 repeat if lj < 0.008 then lj = lj + 0.001 else lj = 0.008 end klr = klr + i * lj if klr > 34.75 then klr = 34.75 end psl = p + Vector3.new(math.cos(math.rad(36 * l + i ^ (0.775 + i * 0.0066))) * (35 - klr), 0, math.sin(math.rad(36 * l + i ^ (0.775 + i * 0.0066))) * (35 - klr)) j = drawline(psl + Vector3.new(0, 480, 0), psl - Vector3.new(0, 480, 0)) k.CFrame = CFrame.new(c) i = i + 1 m["Las" .. l .. "2"].CFrame = k.CFrame m["Las" .. l .. "3"].CFrame = k.CFrame fwait() until klr >= 34.75 psl = p + Vector3.new(math.cos(math.rad(36 * l + i ^ (0.75 + (i) * 0.007))) * (35 - klr), 0, math.sin(math.rad(36 * l + i ^ (0.75 + (i) * 0.007))) * (35 - klr)) -- DECOMPILER ERROR at PC144: Overwrote pending register: R4 in 'AssignReg' -- DECOMPILER ERROR at PC145: Overwrote pending register: R3 in 'AssignReg' j = drawline(psl + Vector3.new(0, 480, 0), psl - Vector3.new(0, 480, 0)) k.CFrame = CFrame.new(c) kd = true end), pro, i) local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 1.8), NumberSequenceKeypoint.new(1, 0)}) local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.66), NumberSequenceKeypoint.new(1, 1)}) local sus1 = Instance.new("ParticleEmitter", pro) sus1.Color = ColorSequence.new(Col1.Color, Col1C) sus1.Transparency = transseq sus1.Size = sizeseq sus1.LightEmission = 0.33 sus1.Rotation = NumberRange.new(-180, 180) sus1.Lifetime = NumberRange.new(0.8, 0.8) sus1.RotSpeed = NumberRange.new(-10, 10) sus1.Texture = "http://www.roblox.com/asset/?id=242911609" sus1.Speed = NumberRange.new(5, 8) sus1.VelocitySpread = 3 sus1.Rate = 125 sus1.ZOffset = 0 sus1.Name = "ParticleEmitter1" local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6), NumberSequenceKeypoint.new(1, 0)}) local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 0)}) local sus1 = Instance.new("ParticleEmitter", pro) sus1.Color = ColorSequence.new(Col1C, Col1C) sus1.Transparency = transseq sus1.Size = sizeseq sus1.LightEmission = 0.33 sus1.Rotation = NumberRange.new(-180, 180) sus1.Lifetime = NumberRange.new(0.4, 0.8) sus1.RotSpeed = NumberRange.new(-10, 10) sus1.Texture = "http://www.roblox.com/asset/?id=242292318" sus1.Speed = NumberRange.new(10, 12) sus1.VelocitySpread = 60 sus1.Rate = 50 sus1.ZOffset = 0 sus1.Name = "ParticleEmitter2" end end table.remove(x, r) fwait(0.15) end fwait() joj = true fwait(2) local so = Instance.new("Sound", soloc) so.Volume = 0.9 so.Pitch = 1 so.SoundId = "http://www.roblox.com/asset/?id=412756262" coroutine.resume(coroutine.create(function(so) wait() so:Play() end), so) repeat fwait(0.06) pro = NewPart(Vector3.new(0.2, 0.2, 0.2), CFrame.new(p) * CFrame.Angles(0, math.rad(math.random(-180, 180)), 0) * CFrame.new(math.random(3, 50), 0, 0), Col1, "SpecialMesh", Vector3.new(2, 25, 2)) pro.Mesh.MeshType = "Sphere" pro.Anchored = true pro.Material = "Neon" pro.Name = "LasEffect" pro.Parent = m pro.Transparency = 1 game:GetService("Debris"):AddItem(pro, 10) table.insert(ignoretab2, pro) coroutine.resume(coroutine.create(function(p, k) for i = 1, 50 do if i <= 5 then p.Transparency = p.Transparency - 0.1 else if i >= 45 then p.Transparency = p.Transparency + 0.1 end end p.CFrame = p.CFrame + Vector3.new(0, k, 0) fwait() end p:Destroy() end), pro, math.random(15, 30) / 10) until kd == true for kek = 1, 4 do pro = NewPart(Vector3.new(3, 1, 3), CFrame.new(p), Col1, "CylinderMesh", Vector3.new(0.7, 1600, 0.7) - Vector3.new(0.175, 0, 0.175) * (kek - 1)) pro.Anchored = true pro.Mesh.Offset = Vector3.new(0, 799, 0) pro.Material = "Neon" pro.Name = "LasBig" pro.Parent = m pro.Transparency = 1 - 0.2 * 1.7 ^ (kek - 1) game:GetService("Debris"):AddItem(pro, 10) local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 1.8), NumberSequenceKeypoint.new(1, 0)}) local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.66), NumberSequenceKeypoint.new(1, 1)}) local sus1 = Instance.new("ParticleEmitter", pro) sus1.Color = ColorSequence.new(Col1.Color, Col1C) sus1.Transparency = transseq sus1.Size = sizeseq sus1.LightEmission = 0.33 sus1.Rotation = NumberRange.new(-180, 180) sus1.Lifetime = NumberRange.new(0.8, 0.8) sus1.RotSpeed = NumberRange.new(-10, 10) sus1.Texture = "http://www.roblox.com/asset/?id=242911609" sus1.Speed = NumberRange.new(5, 8) sus1.VelocitySpread = 3 sus1.Rate = 125 sus1.ZOffset = 5 sus1.Name = "ParticleEmitter1" local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6), NumberSequenceKeypoint.new(1, 0)}) local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 0)}) local sus1 = Instance.new("ParticleEmitter", pro) sus1.Color = ColorSequence.new(Col1C, Col1C) sus1.Transparency = transseq sus1.Size = sizeseq sus1.LightEmission = 0.33 sus1.Rotation = NumberRange.new(-180, 180) sus1.Lifetime = NumberRange.new(0.4, 0.8) sus1.RotSpeed = NumberRange.new(-10, 10) sus1.Texture = "http://www.roblox.com/asset/?id=242292318" sus1.Speed = NumberRange.new(10, 12) sus1.VelocitySpread = 60 sus1.Rate = 50 sus1.ZOffset = 5 sus1.Name = "ParticleEmitter2" coroutine.resume(coroutine.create(function(k) for i = 1, 70 do if k.Parent == nil then break end fwait() k.Mesh.Scale = k.Mesh.Scale * 1.028 k.ParticleEmitter1.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 2 + i * 0.1), NumberSequenceKeypoint.new(1, 0)}) k.ParticleEmitter1.Speed = NumberRange.new(10 + i / 8, 12 + i / 8) k.ParticleEmitter2.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1 + i * 0.03), NumberSequenceKeypoint.new(1, 0)}) k.ParticleEmitter2.Speed = NumberRange.new(15 + i / 8, 18 + i / 8) end end), pro) end print(tick() - kt) print("JOJ") for i = 1, 22.5 do fwait(0.066666666666667) pro = NewPart(Vector3.new(0.2, 0.2, 0.2), CFrame.new(p) * CFrame.Angles(0, math.rad(math.random(-180, 180)), 0) * CFrame.new(math.random(3, 50), 0, 0), Col1, "SpecialMesh", Vector3.new(2, 25, 2)) pro.Mesh.MeshType = "Sphere" pro.Anchored = true pro.Material = "Neon" pro.Name = "LasEffect" pro.Parent = m pro.Transparency = 1 game:GetService("Debris"):AddItem(pro, 10) table.insert(ignoretab2, pro) coroutine.resume(coroutine.create(function(p, k) for i = 1, 50 do if i <= 5 then p.Transparency = p.Transparency - 0.1 else if i >= 45 then p.Transparency = p.Transparency + 0.1 end end p.CFrame = p.CFrame + Vector3.new(0, k, 0) fwait() end p:Destroy() end), pro, math.random(15, 30) / 10) end local so = Instance.new("Sound", soloc) so.Volume = 1 so.Pitch = 1 so.SoundId = "http://www.roblox.com/asset/?id=266243673" so:Play() local pros = NewPart(Vector3.new(1, 1, 1), CFrame.new(p), Col1, "CylinderMesh", Vector3.new(24, 1600, 24)) pros.Anchored = true pros.Mesh.Offset = Vector3.new(0, 799, 0) * 4 pros.Material = "Neon" pros.Name = "LasBerryBig" pros.Parent = m game:GetService("Debris"):AddItem(pros, 10) coroutine.resume(coroutine.create(function(k) for i = 1, 30 do k.Mesh.Offset = k.Mesh.Offset - Vector3.new(0, 79.9, 0) fwait() end kuck = true for i = 1, 30 do if k.Parent == nil then break end k.Mesh.Offset = k.Mesh.Offset - Vector3.new(0, 799, 0) / 30 k.Mesh.Scale = k.Mesh.Scale - Vector3.new(22, 1600, 22) / 30 fwait() end do k:Destroy() end end), pros) for i = 1, 32.5 do if kuck == true then break end fwait() pro = NewPart(Vector3.new(0.2, 0.2, 0.2), CFrame.new(p) * CFrame.Angles(0, math.rad(math.random(-180, 180)), 0) * CFrame.new(math.random(3, 50), 0, 0), Col1, "SpecialMesh", Vector3.new(2, 25, 2)) pro.Mesh.MeshType = "Sphere" pro.Anchored = true pro.Material = "Neon" pro.Name = "LasEffect" pro.Parent = m pro.Transparency = 1 game:GetService("Debris"):AddItem(pro, 10) table.insert(ignoretab2, pro) coroutine.resume(coroutine.create(function(p, k) for i = 1, 50 do if i <= 5 then p.Transparency = p.Transparency - 0.1 else if i >= 45 then p.Transparency = p.Transparency + 0.1 end end p.CFrame = p.CFrame + Vector3.new(0, k, 0) fwait() end p:Destroy() end), pro, math.random(15, 30) / 10) if kuck == true then break end fwait() end do local so = Instance.new("Sound", soloc) so.Volume = 1 so.Pitch = 1.2 so.SoundId = "http://www.roblox.com/asset/?id=266243712" so:Play() local so = Instance.new("Sound", soloc) so.Volume = 1 so.Pitch = 1.2 so.SoundId = "http://www.roblox.com/asset/?id=385545047" so:Play() local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p + Vector3.new(0, 6.75, 0)) * CFrame.Angles(0, math.random(-10, 10), 0), Col1, "SpecialMesh", Vector3.new(47.5, 15, 47.5)) pc.Mesh.MeshType = "FileMesh" pc.Anchored = true pc.CanCollide = false pc.Parent = workspace pc.Mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" pc.Name = "Shockwave" game:GetService("Debris"):AddItem(pc, 5) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p) for i = 1, 30 do p.Transparency = 0.25 + i / 40 p.CFrame = p.CFrame * CFrame.Angles(0, math.rad(3 + i / 30), 0) - Vector3.new(0, 0.24166666666667, 0) p.Mesh.Scale = p.Mesh.Scale + Vector3.new(i / 11, -0.48333333333333, i / 11) fwait() end p:Remove() end), pc) local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p + Vector3.new(0, 4.25, 0)) * CFrame.Angles(0, math.random(-10, 10), 0), Col1, "SpecialMesh", Vector3.new(57.5, 10, 57.5)) pc.Mesh.MeshType = "FileMesh" pc.Anchored = true pc.CanCollide = false pc.Parent = workspace pc.Mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" pc.Name = "Shockwave" game:GetService("Debris"):AddItem(pc, 5) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p) for i = 1, 30 do p.Transparency = 0.25 + i / 40 p.CFrame = p.CFrame * CFrame.Angles(0, -math.rad(3 + i / 30), 0) - Vector3.new(0, 0.15833333333333, 0) p.Mesh.Scale = p.Mesh.Scale + Vector3.new(i / 9, -0.31666666666667, i / 9) fwait() end p:Remove() end), pc) local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p + Vector3.new(0, 1.75, 0)) * CFrame.Angles(0, math.random(-10, 10), 0), Col1, "SpecialMesh", Vector3.new(73.5, 5, 73.5)) pc.Mesh.MeshType = "FileMesh" pc.Anchored = true pc.CanCollide = false pc.Parent = workspace pc.Mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" pc.Name = "Shockwave" game:GetService("Debris"):AddItem(pc, 5) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p) for i = 1, 30 do p.Transparency = 0.25 + i / 40 p.CFrame = p.CFrame * CFrame.Angles(0, math.rad(3 + i / 30), 0) - Vector3.new(0, 0.075, 0) p.Mesh.Scale = p.Mesh.Scale + Vector3.new(i / 7, -0.15, i / 7) fwait() end p:Remove() end), pc) local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p + Vector3.new(0, 1.5, 0)) * CFrame.Angles(0, math.random(-10, 10), 0), BrickColor.new("Institutional white"), "SpecialMesh", Vector3.new(30, 5, 30)) pc.Mesh.MeshType = "FileMesh" pc.Anchored = true pc.CanCollide = false pc.Parent = workspace pc.Mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" pc.Name = "Shockwave" pc.Material = "Neon" game:GetService("Debris"):AddItem(pc, 5) coroutine.resume(coroutine.create(function(p) for i = 1, 20 do p.Transparency = 0.5 + i / 40 p.CFrame = p.CFrame * CFrame.Angles(0, math.rad(5 + i / 10), 0) p.Mesh.Scale = p.Mesh.Scale + Vector3.new(i / 6 + 8, 0, i / 6 + 8) fwait() end p:Remove() end), pc) for LEL = 1, 3 do local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p + Vector3.new(0, 0, 0)), Col1, "SpecialMesh", Vector3.new(18, 18, 18) * LEL) pc.Parent = workspace pc.Mesh.MeshType = "Sphere" pc.Anchored = true pc.CanCollide = false pc.Transparency = 1 game:GetService("Debris"):AddItem(pc, 15) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p, V, x) for i = 1, 20 do p.Mesh.Scale = p.Mesh.Scale * 1.05 + Vector3.new(1.5, 1.5, 1.5) p.Transparency = 0.25 + i / 26.666666666667 p.CFrame = p.CFrame * V fwait() end p:Remove() end), pc, CFrame.fromEulerAnglesXYZ(0, math.rad(5), 0)) end for LEL = 1, 3 do local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p) * CFrame.fromEulerAnglesXYZ(math.random(-180, 180), math.random(-180, 180), math.random(-180, 180)), Col1, "BlockMesh", Vector3.new(15, 15, 15) * LEL) pc.Parent = workspace pc.Anchored = true pc.CanCollide = false pc.Transparency = 1 game:GetService("Debris"):AddItem(pc, 15) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p, V, x) for i = 1, 12 do p.Mesh.Scale = p.Mesh.Scale * 1.02 + Vector3.new(3.5, 3.5, 3.5) p.Transparency = 0.1 + i / 13.333333333333 p.CFrame = p.CFrame * V fwait() end p:Remove() end), pc, CFrame.fromEulerAnglesXYZ(0, math.rad(5), 0)) end for LEL = 1, 6 do local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p + Vector3.new(math.random(-50, 50) / 3, 0, math.random(-50, 50) / 3)), Col1, "SpecialMesh", Vector3.new(7, 9, 7)) pc.Parent = workspace pc.Mesh.MeshType = "Sphere" pc.Anchored = true pc.CanCollide = false pc.Transparency = 1 game:GetService("Debris"):AddItem(pc, 15) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p, V, x) for i = 1, 40 do p.Mesh.Scale = Vector3.new(25 - i / 2, 30 * i, 25 - i / 2) p.Transparency = 0.25 + i / 53.333333333333 p.CFrame = p.CFrame * V fwait() end p:Remove() end), pc, CFrame.fromEulerAnglesXYZ(0, math.rad(5), 0)) do if LEL % 2 == 0 then local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p), Col1, "SpecialMesh", Vector3.new(10, 15, 10) + Vector3.new(2, 3, 2) * LEL) pc.Parent = workspace pc.Mesh.MeshType = "Sphere" pc.Anchored = true pc.CanCollide = false pc.Transparency = 1 game:GetService("Debris"):AddItem(pc, 15) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p, V, x) for i = 1, 40 do p.Mesh.Scale = p.Mesh.Scale * 1.04 + Vector3.new(3.5 - i * 0.27, i, 3.5 - i * 0.27) p.Transparency = 0.33 + i / 59.701492537313 p.CFrame = p.CFrame * V fwait() end p:Remove() end), pc, CFrame.fromEulerAnglesXYZ(0, math.rad(5), 0)) end do local pc = NewPart(Vector3.new(1, 1, 1), CFrame.new(p + Vector3.new(0, 0, 0)) * CFrame.fromEulerAnglesXYZ(math.random(-180, 180), math.random(-180, 180), math.random(-180, 180)), Col1, "BlockMesh", Vector3.new(20, 20, 20)) pc.Parent = workspace pc.Anchored = true pc.CanCollide = false pc.Transparency = 1 game:GetService("Debris"):AddItem(pc, 15) pc.Material = "Neon" coroutine.resume(coroutine.create(function(p, V, x) for i = 1, 60 do p.Mesh.Scale = p.Mesh.Scale * 1.01 + Vector3.new(0.6, 0.6, 0.6) p.Transparency = 0.4 + i / 100 p.CFrame = p.CFrame * V fwait() end p:Remove() end), pc, CFrame.fromEulerAnglesXYZ(math.rad(math.random(-50, 50) / 15), math.rad(math.random(-50, 50) / 15), math.rad(math.random(-50, 50) / 15))) if LEL == 2 then MagniDamage(soloc, 50, 38, 42, 45, "Normal", soloc, 0, 1, 80, false, false, true, nil, nil, nil, nil) if vPlayer.Character.Torso.Position - p.magnitude <= 50 then vPlayer.Character.Humanoid:TakeDamage(40 / vPlayer.Character.Stats.Defense.Value) showDamage(vPlayer.Character, math.floor(40 / vPlayer.Character.Stats.Defense.Value), "Damage") vPlayer.Character.Stats.Stun.Value = 100 end end fwait(0.066666666666667) -- DECOMPILER ERROR at PC2114: LeaveBlock: unexpected jumping out DO_STMT end end end fwait() for _,v in pairs(m:children()) do if v.Name ~= "LasBerryBig" then v:Remove() end end end end end end DecreaseStat = function(Model, Stat, Amount, Duration) if Model:findFirstChild("Stats") ~= nil and Model.Stats[Stat] ~= nil then Model.Stats[Stat].Value = Model.Stats[Stat].Value - Amount d = Instance.new("NumberValue", Model.Stats.Decrease) dur = Instance.new("NumberValue", d) dur.Name = "Duration" dur.Value = Duration game:GetService("Debris"):AddItem(d, 20) if Stat == "Damage" then d.Name = "DecreaseAtk" else if Stat == "Defense" then d.Name = "DecreaseDef" else if Stat == "Movement" then d.Name = "DecreaseMvmt" end end end if Model:findFirstChild("Torso") ~= nil then display = "" if Stat == "Damage" then if Amount > 0 then display = "-Damage" else display = "+Damage" end else if Stat == "Defense" then if Amount > 0 then display = "-Defense" else display = "+Defense" end else if Stat == "Movement" then if Amount > 0 then display = "-Movement" else display = "+Movement" end end end end showDamage(Model, display, "Debuff") end d.Value = Amount end end GetDist = function(Part1, Part2, magni) local targ = Part1.Position - Part2.Position local mag = targ.magnitude if mag <= magni then return true else return false end end MagniDamage = function(Part, magni, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration, Sound) for _,c in pairs(workspace:children()) do local hum = c:findFirstChild("Humanoid") if hum ~= nil then local head = nil for _,d in pairs(c:children()) do if d.className == "Model" and ranged ~= true then head = d:findFirstChild("Hitbox") if d.Parent == Character then break end if head ~= nil then local targ = head.Position - Part.Position local mag = targ.magnitude if mag <= magni and c.Name ~= Player.Name then ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt()) ref.Anchored = true ref.CFrame = cf(head.Position) game:GetService("Debris"):AddItem(ref, 1) hitnum = math.random(1, 5) if hitnum == 1 then so("199148971", ref, 1, 1) else if hitnum == 2 then so("199149025", ref, 1, 1) else if hitnum == 3 then so("199149072", ref, 1, 1) else if hitnum == 4 then so("199149109", ref, 1, 1) else if hitnum == 5 then so("199149119", ref, 1, 1) end end end end end StaggerHit.Value = true end end end do if d.className == "Part" then head = d if head ~= nil then local targ = head.Position - Part.Position local mag = targ.magnitude if mag <= magni and c.Name ~= Player.Name then if stun == nil then stun = math.random(5, 10) end local Rang = nil if Ranged == false then Rang = true end local stag = nil if shbash == true then stag = true end Damagefunc(head, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration, Sound) end end end do -- DECOMPILER ERROR at PC184: LeaveBlock: unexpected jumping out DO_STMT end end end end end end rayCast = function(Pos, Dir, Max, Ignore) return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) end local Point = Torso.CFrame * cf(0, Torso.Size.Y, 0) LastPoint = Point effect = function(Color, Ref, LP, P1, returnn) if LP == nil or P1 == nil then return end local effectsmsh = Instance.new("CylinderMesh") effectsmsh.Scale = Vector3.new(0.2, 1, 0.2) effectsmsh.Name = "Mesh" local effectsg = Instance.new("Part") NoOutline(effectsg) effectsg.formFactor = 3 effectsg.CanCollide = false effectsg.Name = "Eff" effectsg.Locked = true effectsg.Anchored = true effectsg.Size = Vector3.new(0.5, 1, 0.5) effectsg.Parent = workspace effectsmsh.Parent = effectsg effectsg.BrickColor = BrickColor.new(Color) effectsg.Reflectance = Ref local point1 = P1 local mg = LP.p - point1.p.magnitude effectsg.Size = Vector3.new(0.5, mg, 0.5) effectsg.CFrame = cf((LP.p + point1.p) / 2, point1.p) * CFrame.Angles(math.rad(90), 0, 0) effectsmsh.Scale = Vector3.new(0.2, 1, 0.2) game:GetService("Debris"):AddItem(effectsg, 2) if returnn then return effectsg end if not returnn then table.insert(Effects, {effectsg, "Cylinder", 0.2, 0.01, 0, 0.01, effectsmsh}) end end MagicBlock = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt()) prt.Anchored = true prt.CFrame = cframe msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) game:GetService("Debris"):AddItem(prt, 10) if Type == 1 or Type == nil then table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh}) else if Type == 2 then table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh}) end end end MagicCircle = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt()) prt.Anchored = true prt.CFrame = cframe local msh = mesh("SpecialMesh", prt, "Sphere", "nil", vt(0, 0, 0), vt(x1, y1, z1)) game:GetService("Debris"):AddItem(prt, 10) table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) end MagicRing = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5)) prt.Anchored = true prt.CFrame = cframe * cf(x2, y2, z2) local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1)) game:GetService("Debris"):AddItem(prt, 10) table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) end MagicCylinder = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt()) prt.Anchored = true prt.CFrame = cframe local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) game:GetService("Debris"):AddItem(prt, 10) table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) end MagicCylinder2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2)) prt.Anchored = true prt.CFrame = cframe msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) game:GetService("Debris"):AddItem(prt, 5) table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) end ClangEffect = function(brickcolor, cframe, duration, decrease, size, power) local prt = part(3, workspace, 0, 1, brickcolor, "Effect", vt()) prt.Anchored = true prt.CFrame = cframe local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(5, 5, 5)) game:GetService("Debris"):AddItem(prt, 10) table.insert(Effects, {prt, "CylinderClang", duration, decrease, size, power, prt.CFrame, nil}) end MagicWave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt()) prt.Anchored = true prt.CFrame = cframe local msh = mesh("SpecialMesh", prt, "FileMesh", "20329976", vt(0, 0, 0), vt(x1, y1, z1)) game:GetService("Debris"):AddItem(prt, 10) table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) end MagicSpecial = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt()) prt.Anchored = true prt.CFrame = cframe local msh = mesh("SpecialMesh", prt, "FileMesh", "24388358", vt(0, 0, 0), vt(x1, y1, z1)) game:GetService("Debris"):AddItem(prt, 10) table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) end ElecEffect = function(cff, x, y, z) local prt = part(3, workspace, 0, 0, BrickColor.new("Dark stone grey"), "Part", vt(1, 1, 1)) prt.Anchored = true prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z)) prt.CFrame = cf(prt.Position) game:GetService("Debris"):AddItem(prt, 10) xval = math.random() / 3 yval = math.random() / 3 zval = math.random() / 3 msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval)) Effects[#Effects + 1] = {prt, "Elec", 0.2, x, y, z, xval, yval, zval, msh} end Damagefunc = function(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration) if hit.Parent == nil then return end if hit.Name == "Hitbox" and hit.Parent ~= modelzorz and ranged ~= true then ref = part(3, effects, 0, 1, BrickColor.new("Black"), "Reference", vt()) ref.Anchored = true ref.CFrame = cf(hit.Position) game:GetService("Debris"):AddItem(ref, 1) hitnum = math.random(1, 5) if hitnum == 1 then so("199148971", ref, 1, 1) else if hitnum == 2 then so("199149025", ref, 1, 1) else if hitnum == 3 then so("199149072", ref, 1, 1) else if hitnum == 4 then so("199149109", ref, 1, 1) else if hitnum == 5 then so("199149119", ref, 1, 1) end end end end end StaggerHit.Value = true end h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then if hit.Parent:findFirstChild("DebounceHit") ~= nil then return end c = Instance.new("ObjectValue") c.Name = "creator" c.Value = game:service("Players").LocalPlayer c.Parent = h RecentEnemy.Value = hit.Parent game:GetService("Debris"):AddItem(c, 0.5) minim = minim * Atk.Value maxim = maxim * Atk.Value Damage = 0 if minim == maxim then Damage = maxim else Damage = math.random(minim, maxim) end blocked = false enblock = nil local EStats = hit.Parent:findFirstChild("Stats") if EStats ~= nil then invis = EStats:findFirstChild("Invisibility") isinvis = EStats:findFirstChild("IsInvisible") if (ranged == false or ranged == nil) and invis ~= nil and isinvis.Value == true then invis.Value = 0 end enblock = EStats:findFirstChild("Block") if enblock ~= nil and enblock.Value == true then blocked = true end if EStats:findFirstChild("Defense") ~= nil then Damage = Damage / EStats.Defense.Value if Damage <= 3 and (ranged == false or ranged == nil) and blocked ~= true then hitnum = math.random(1, 5) if hitnum == 1 then so("199149321", hit, 1, 1) else if hitnum == 2 then so("199149338", hit, 1, 1) else if hitnum == 3 then so("199149367", hit, 1, 1) else if hitnum == 4 then so("199149409", hit, 1, 1) else if hitnum == 5 then so("199149452", hit, 1, 1) end end end end end else if ranged == false or ranged == nil and blocked ~= true then hitnum = math.random(1, 6) if hitnum == 1 then so("199149137", hit, 1, 1) else if hitnum == 2 then so("199149186", hit, 1, 1) else if hitnum == 3 then so("199149221", hit, 1, 1) else if hitnum == 4 then so("199149235", hit, 1, 1) else if hitnum == 5 then so("199149269", hit, 1, 1) else if hitnum == 6 then so("199149297", hit, 1, 1) end end end end end end end end if Damage <= 3 and staghit == true and ranged ~= true then StaggerHit.Value = true end end if EStats:findFirstChild("Stun") ~= nil then if blocked == true then incstun = incstun / 2 end if EStats.Stun.Value < EStats.StunThreshold.Value then EStats.Stun.Value = EStats.Stun.Value + incstun end end if EStats:findFirstChild("Stagger") ~= nil and stagger == true then EStats.Stagger.Value = true end end if blocked == true then showDamage(hit.Parent, "Block", "Damage") if ranged ~= true then enblock.Value = false Stagger.Value = true hitnum = math.random(1, 2) if hitnum == 1 then so("199148933", hit, 1, 1) else if hitnum == 2 then so("199148947", hit, 1, 1) end end end else Damage = math.floor(Damage) coroutine.resume(coroutine.create(function(Hum, Dam) hit.Parent.Humanoid:TakeDamage(Damage) end ), h, Damage) showDamage(hit.Parent, Damage, "Damage") if DecreaseState ~= nil then if DecreaseState == "Temporal" then DecreaseStat(hit.Parent, "Damage", DecreaseAmount, Duration) DecreaseStat(hit.Parent, "Defense", DecreaseAmount, Duration) else if DecreaseState == "Temporal2" then DecreaseStat(hit.Parent, "Damage", DecreaseAmount, Duration) DecreaseStat(hit.Parent, "Movement", DecreaseAmount, Duration) else DecreaseStat(hit.Parent, DecreaseState, DecreaseAmount, Duration) end end end if Type == "NormalDecreaseMvmt1" then DecreaseStat(hit.Parent, "Movement", 0.1, 200) end if Type == "Knockdown" then hum = hit.Parent.Humanoid hum.PlatformStand = true coroutine.resume(coroutine.create(function(HHumanoid) swait(1) HHumanoid.PlatformStand = false end ), hum) local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit local bodvol = Instance.new("BodyVelocity") bodvol.velocity = angle * knockback bodvol.P = 5000 bodvol.maxForce = Vector3.new(8000, 8000, 8000) bodvol.Parent = hit rl = Instance.new("BodyAngularVelocity") rl.P = 3000 rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000 rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)) rl.Parent = hit game:GetService("Debris"):AddItem(bodvol, 0.5) game:GetService("Debris"):AddItem(rl, 0.5) else do if Type == "Knockdown2" then hum = hit.Parent.Humanoid local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit local bodvol = Instance.new("BodyVelocity") bodvol.velocity = angle * knockback bodvol.P = 5000 bodvol.maxForce = Vector3.new(8000, 8000, 8000) bodvol.Parent = hit game:GetService("Debris"):AddItem(bodvol, 0.5) else do if Type == "Normal" or Type == "NormalDecreaseMvmt1" then vp = Instance.new("BodyVelocity") vp.P = 500 vp.maxForce = Vector3.new(math.huge, 0, math.huge) if KnockbackType == 1 then vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05 else if KnockbackType == 2 then vp.velocity = Property.CFrame.lookVector * knockback end end game:GetService("Debris"):AddItem(vp, 0.5) if knockback > 0 then vp.Parent = hit.Parent.Torso end end debounce = Instance.new("BoolValue") debounce.Name = "DebounceHit" debounce.Parent = hit.Parent debounce.Value = true game:GetService("Debris"):AddItem(debounce, Delay) c = Instance.new("ObjectValue") c.Name = "creator" c.Value = Player c.Parent = h game:GetService("Debris"):AddItem(c, 0.5) CRIT = false end end end end end end end showDamage = function(Char, Dealt, Type) m = Instance.new("Model") m.Name = "Effect" c = Instance.new("Part") c.Transparency = 1 c.Name = "Head" c.TopSurface = 0 c.BottomSurface = 0 c.formFactor = "Plate" c.Size = Vector3.new(1, 0.4, 1) local b = Instance.new("BillboardGui", c) b.Size = UDim2.new(5, 0, 5, 0) b.AlwaysOnTop = true damgui = gui("TextLabel", b, tostring(Dealt), 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0)) if Type == "Damage" then damgui.Font = "SourceSans" if Dealt == "Block" then damgui.TextColor3 = BrickColor.new("Bright blue").Color else if Dealt < 3 then damgui.TextColor3 = BrickColor.new("White").Color else if Dealt >= 3 and Dealt < 20 then damgui.TextColor3 = BrickColor.new("Bright yellow").Color else damgui.TextColor3 = BrickColor.new("Really red").Color damgui.Font = "SourceSansBold" end end end else if Type == "Debuff" then damgui.TextColor3 = BrickColor.new("White").Color else if Type == "Interrupt" then damgui.TextColor3 = BrickColor.new("New Yeller").Color end end end damgui.TextScaled = true ms = Instance.new("CylinderMesh") ms.Scale = Vector3.new(0.8, 0.8, 0.8) ms.Parent = c c.Reflectance = 0 Instance.new("BodyGyro").Parent = c c.Parent = m if Char:findFirstChild("Head") ~= nil then c.CFrame = cf(Char.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100)) else if Char.Parent:findFirstChild("Head") ~= nil then c.CFrame = cf(Char.Parent.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100)) end end f = Instance.new("BodyPosition") f.P = 2000 f.D = 100 f.maxForce = Vector3.new(math.huge, math.huge, math.huge) if Type == "Damage" then f.position = c.Position + Vector3.new(0, 3, 0) else if Type == "Debuff" or Type == "Interrupt" then f.position = c.Position + Vector3.new(0, 5, 0) end end f.Parent = c game:GetService("Debris"):AddItem(m, 5) table.insert(Effects, {m, "showDamage", damgui, f, 10, 1, 15, 50, 100}) c.CanCollide = false m.Parent = workspace c.CanCollide = false end combo = 0 ob1d = function(mouse) if MMouse.Target ~= nil and MMouse.Target.Parent:findFirstChild("Humanoid") ~= nil and game.Players:GetPlayerFromCharacter(MMouse.Target.Parent) ~= nil and Player.Neutral == false and game.Players:GetPlayerFromCharacter(MMouse.Target.Parent).TeamColor == Player.TeamColor then if givingrailgun == true then RailgunTarget = MMouse.Target.Parent.HumanoidRootPart givingarmor = false end if givingplasma == true then CannonTarget = MMouse.Target.Parent.HumanoidRootPart givingarmor = false end if givingblades == true then BladesTarget = MMouse.Target.Parent.HumanoidRootPart givingarmor = false end end if attack == true or equipped == false then return end hold = true if BladesTarget ~= nil then coroutine.resume(coroutine.create(function() if combo == 0 then bladesattackone() else if combo == 1 then bladesattackthree() else if combo == 2 then bladesattacktwo() else if combo == 3 then bladesattackfour() end end end end end)) end if combo == 0 then combo = 1 attackone() else if combo == 1 then combo = 2 attacktwo() else if combo == 2 then combo = 3 attackthree() else if combo == 3 then combo = 0 attackfour() end end end end if RailgunTarget ~= nil then ShootRailGun() end if CannonTarget ~= nil then ShootCannon() end coroutine.resume(coroutine.create(function() for i = 1, 50 do if attack == false then fwait() end end if attack == false then combo = 0 end end)) end ob1u = function(mouse) hold = false end buttonhold = false fenbarmove1.MouseButton1Click:connect(do1) fenbarmove2.MouseButton1Click:connect(do2) fenbarmove3.MouseButton1Click:connect(do3) fenbarmove4.MouseButton1Click:connect(do4) eul = 0 equipped = false key = function(key) if key == "z" and givingarmor == true then do1() end if key == "x" and givingarmor == true then do2() end if key == "c" and givingarmor == true then do3() end if attack == true then return end if key == "f" then pressedf = true fnumb = 0 attack = true if equipped == false then equipped = true RSH = ch.Torso["Right Shoulder"] LSH = ch.Torso["Left Shoulder"] RSH.Parent = nil LSH.Parent = nil RW.Name = "Right Shoulder" RW.Part0 = ch.Torso RW.C0 = cf(1.5, 0.5, 0) RW.C1 = cf(0, 0.5, 0) RW.Part1 = ch["Right Arm"] RW.Parent = ch.Torso LW.Name = "Left Shoulder" LW.Part0 = ch.Torso LW.C0 = cf(-1.5, 0.5, 0) LW.C1 = cf(0, 0.5, 0) LW.Part1 = ch["Left Arm"] LW.Parent = ch.Torso Animate.Parent = nil animTrack:Play() equipanim() else equipped = false hideanim() LH.C1 = LHC1 RH.C1 = RHC1 animTrack:Stop() Animate.Parent = Character fwait(0) RW.Parent = nil LW.Parent = nil RSH.Parent = player.Character.Torso LSH.Parent = player.Character.Torso end attack = false end if equipped == false then return end if key == "e" then StatConvert() end if key == "z" then do1() end if key == "x" then do2() end if key == "c" then do3() end if key == "v" then do4() end end key2 = function(key) end s = function(mouse) mouse.Button1Down:connect(function() ob1d(mouse) end) mouse.Button1Up:connect(function() ob1u(mouse) end) mouse.KeyDown:connect(key) mouse.KeyUp:connect(key2) player = Player ch = Character end ds = function(mouse) end Bin.Selected:connect(s) Bin.Deselected:connect(ds) print("Mechanic loaded.") local mananum = 0 local blocknum2 = 0 local donum = 0 local stunnum = 0 local staggeranim = false local stunanim = false local Point, LastPoint = nil, nil local walk = 0 local walkforw = true while 1 do fwait() if Humanoid.Health <= 0 then attack = true resumeControl() modelzorz.Parent = workspace game:GetService("Debris"):AddItem(modelzorz, 30) for i = 1, #Weapon do Weapon[i].Parent = modelzorz Weapon[i].CanCollide = true end for i = 1, #Welds do if Welds[i].Part0.Parent == Character or Welds[i].Part1.Parent == Character then Welds[i].Parent = nil else Welds[i].Parent = prt1 end end end do if fnumb < 21 then fnumb = fnumb + 1 if pressedf == false then fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency - 0.025 tellbar.TextTransparency = tellbar.TextTransparency - 0.05 tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency - 0.05 else if fnumb == 20 then fenframe5.Parent = nil print("daigui") end fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency + 0.025 tellbar.TextTransparency = tellbar.TextTransparency + 0.05 tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency + 0.05 end end if hbwld.Parent == nil then hitbox2.Name = "Hitbox" else hitbox2.Name = "Hitbox2" end hitbox2.Parent = hitbox.Parent hitbox2.Size = hitbox.Size hitbox2.CFrame = hitboxCF hboxpos.position = hitbox2.Position + vt(math.random(-100, 100) / 100, math.random(-100, 100) / 100, math.random(-100, 100) / 100) if cooldownmax <= cooldowns[1] and RailgunTarget ~= nil then MagicSpecial(BrickColor.new(NewCol), rprt1.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.5, 0.5, 0.5, 0.05) for i = 1, 5 do ElecEffect(cf(rprt1.Position), 3, 3, 3) end RailgunTarget = nil model1.Parent = nil end if cooldownmax <= cooldowns[2] and CannonTarget ~= nil then print("daicannon") print(cooldowns[2]) print(CannonTarget) MagicSpecial(BrickColor.new(NewCol), pprt1.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.5, 0.5, 0.5, 0.05) for i = 1, 5 do ElecEffect(cf(pprt1.Position), 3, 3, 3) end CannonTarget = nil model2.Parent = nil end if cooldownmax <= cooldowns[3] and BladesTarget ~= nil then print("daiblades") print(cooldowns[3]) print(BladesTarget) MagicSpecial(BrickColor.new(NewCol), bprt1.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.3, 0.3, 0.3, 0.05) MagicSpecial(BrickColor.new(NewCol), bprt7.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.3, 0.3, 0.3, 0.05) MagicSpecial(BrickColor.new(NewCol), bprt13.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 0.3, 0.3, 0.3, 0.05) for i = 1, 5 do ElecEffect(cf(bref.Position), 3, 3, 3) end BladesTarget = nil model3.Parent = nil end if MMouse ~= nil then if model1.Parent ~= nil then local mpos = rprt1.CFrame * euler(0, 0, 0) local cff = CFrame.new(mpos.p, MMouse.Hit.p) * CFrame.Angles(math.pi / 2, 0, 0) local x, y, z = rprt1.CFrame:toObjectSpace(cff):toEulerAnglesXYZ() rwld1.Part1 = RailgunTarget rwld1.C0 = euler(0, 0, 0) * cf(3, -1, -0.2) rwld2.Part0 = rprt1 rwld2.Part1 = rprt2 rwld2.C0 = clerp(rwld2.C0, CFrame.Angles(x, y, z) * euler(-1.57, 0, 0), 0.3) end do if model2.Parent ~= nil then local mpos = pprt1.CFrame * euler(0, 0, 0) local cff = CFrame.new(mpos.p, MMouse.Hit.p) * CFrame.Angles(math.pi / 2, 0, 0) local x, y, z = pprt1.CFrame:toObjectSpace(cff):toEulerAnglesXYZ() pwld1.Part1 = CannonTarget pwld1.C0 = euler(0, 0, 0) * cf(-3, -1, -0.2) pwld2.Part0 = pprt1 pwld2.Part1 = pprt2 pwld2.C0 = clerp(pwld2.C0, CFrame.Angles(x, y, z) * euler(-1.57, 0, 0), 0.3) end do pwld1.C0 = clerp(pwld1.C0, euler(-0.2, 0, 0) * cf(-3, -1, -0.2), 0.5) pwld2.C0 = clerp(pwld2.C0, euler(0, 0, 0) * cf(0, 0, 0), 0.5) rwld1.C0 = clerp(rwld1.C0, euler(-0.2, 0, 0) * cf(3, -1, -0.2), 0.5) rwld2.C0 = clerp(rwld2.C0, euler(0, 0, 0) * cf(0, 0, 0), 0.5) if Stagger.Value == true and staggeranim == false then coroutine.resume(coroutine.create(function() staggeranim = true while attack == true do fwait() end StaggerAnim() StaggerHit.Value = false Stagger.Value = false staggeranim = false end)) end if StaggerHit.Value == true and staggeranim == false then coroutine.resume(coroutine.create(function() staggeranim = true while attack == true do fwait() end StaggerHitt() StaggerHit.Value = false Stagger.Value = false staggeranim = false end)) end if Mvmt.Value < 0 or Stagger.Value == true or StunT.Value <= Stun.Value or StaggerHit.Value == true or Rooted.Value == true then Humanoid.WalkSpeed = 0 else Humanoid.WalkSpeed = 16 * Mvmt.Value end if StunT.Value <= Stun.Value and stunanim == false then coroutine.resume(coroutine.create(function() stunanim = true while attack == true do fwait() end StunAnim() Stun.Value = 0 stunanim = false end)) end local stunnum2 = 30 if stunnum2 <= stunnum then if 0 < Stun.Value then Stun.Value = Stun.Value - 1 end stunnum = 0 end stunnum = stunnum + 1 if 0.5 <= donum then handidle = true else if donum <= 0 then handidle = false end end if handidle == false then donum = donum + 0.006 else donum = donum - 0.006 end local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude local velderp = RootPart.Velocity.y hitfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character) if equipped == true then if attack == false then idle = idle + 1 else idle = 0 end if (500 <= idle and attack ~= false) or Anim == "Walk" then if walkforw == true then RH.C1 = clerp(RH.C1, RHC1 * cf(0.2, -0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50) LH.C1 = clerp(LH.C1, LHC1 * cf(0.1, 0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50) else RH.C1 = clerp(RH.C1, RHC1 * cf(-0.1, 0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50) LH.C1 = clerp(LH.C1, LHC1 * cf(-0.2, -0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50) end else RH.C1 = clerp(RH.C1, RHC1, 0.2) LH.C1 = clerp(LH.C1, LHC1, 0.2) end if tribladesattack == false then bwld1.C0 = clerp(bwld1.C0, euler(0, 0, 0) * cf(2, -0.6, -2), 0.4) bwld7.C0 = clerp(bwld7.C0, euler(0, 0, 0) * cf(0, -0.6, -2), 0.4) bwld13.C0 = clerp(bwld13.C0, euler(0, 0, 0) * cf(-2, -0.6, -2), 0.4) bwld2.C0 = clerp(bwld2.C0, euler(3.14, -2, 1.17) * cf(0, 0, 0), 0.4) bwld8.C0 = clerp(bwld8.C0, euler(3.14, -2, 1.57) * cf(0, 0, 0), 0.4) bwld14.C0 = clerp(bwld14.C0, euler(3.14, -2, 1.97) * cf(0, 0, 0), 0.4) brefwld.C0 = clerp(brefwld.C0, euler(0, 0, 0) * cf(0, -2, 0), 0.4) end if 1 < RootPart.Velocity.y and hitfloor == nil then Anim = "Jump" if attack == false then Neck.C0 = clerp(Neck.C0, necko * euler(-0.2, 0, 0), 0.2) Neck.C1 = clerp(Neck.C1, necko2 * euler(0, 0, 0), 0.2) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(-0.1, 0, 0), 0.2) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.5, 0, 0.5), 0.2) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) LW.C0 = clerp(LW.C0, cf(-1, 0.5, -0.5) * euler(2, 0, 1.2), 0.2) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) RH.C0 = clerp(RH.C0, cf(1, -1, -0.3) * euler(-0.5, 1.57, 0) * euler(-0.2, 0, 0), 0.2) LH.C0 = clerp(LH.C0, cf(-1, -1, -0.3) * euler(-0.5, -1.57, 0) * euler(-0.2, 0, 0), 0.2) end else if RootPart.Velocity.y < -1 and hitfloor == nil then Anim = "Fall" if attack == false then Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0), 0.2) Neck.C1 = clerp(Neck.C1, necko2 * euler(0, 0, 0), 0.2) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0.1, 0, 0), 0.2) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.3, 0, 0.2), 0.2) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) LW.C0 = clerp(LW.C0, cf(-1.3, 0.5, -0.2) * euler(-0.3, 0, -0.2), 0.2) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2) RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0.4, 1.57, 0), 0.2) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(-0.2, -1.57, 0), 0.2) end else if torvel < 1 and hitfloor ~= nil then Anim = "Idle" if attack == false then Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0.5) * euler(0.1, 0, 0), 0.15) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, -0.5), 0.15) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0.3, 0, 0.2) * euler(0, -1.57, 0), 0.15) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.15) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, -0.4 + (donum) / 3), 0.15) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.15) RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0, 1.57, 0) * euler(0, 0.5, -0.1), 0.2) LH.C0 = clerp(LH.C0, cf(-0.8, -1, 0.2) * euler(0, -1.57, 0) * euler(0, 0.5, 0.05), 0.2) end else if 2 < torvel and torvel < 30 and hitfloor ~= nil then Anim = "Walk" walk = walk + 1 if 15 - 5 * Mvmt.Value <= walk then walk = 0 if walkforw == true then walkforw = false else if walkforw == false then walkforw = true end end end if attack == false then Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 0.3) RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.3) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(-0.2, 0, 0.2), 0.3) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.2), 0.3) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.3) RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0, 1.57, 0), 0.2) LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(0, -1.57, 0), 0.2) end else if 30 <= torvel and hitfloor ~= nil then Anim = "Run" if attack == false then Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, -0.2), 0.4) RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -1.5) * euler(0.8, 0, 0.2), 0.4) RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(1, 0, 0.2), 0.4) RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(-0.2, 0, -0.4), 0.4) LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4) RH.C0 = clerp(RH.C0, RHC0 * cf(1, 1, 0.2) * euler(0, -0.2, -0.5), 0.4) LH.C0 = clerp(LH.C0, LHC0 * cf(-0.5, 1, 0) * euler(0.2, 0, -0.5), 0.4) end end end end end end end if 0 < #Effects then for e = 1, #Effects do if Effects[e] ~= nil then local Thing = Effects[e] if Thing ~= nil then local Part = Thing[1] local Mode = Thing[2] local Delay = Thing[3] local IncX = Thing[4] local IncY = Thing[5] local IncZ = Thing[6] if Thing[2] == "CylinderClang" then if Thing[3] <= 1 then Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 2.5 * Thing[5], 0) * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) Thing[7] = Thing[1].CFrame effect("New Yeller", 0, Thing[8], Thing[7]) Thing[8] = Thing[7] Thing[3] = Thing[3] + Thing[4] else Part.Parent = nil table.remove(Effects, e) end end if Thing[2] == "showDamage" then if Thing[6] < Thing[5] then Thing[6] = Thing[6] + 1 else if Thing[6] < Thing[7] then Thing[4].position = Thing[4].position + vt(0, -0.2, 0) Thing[6] = Thing[6] + 1 else if Thing[6] < Thing[8] then Thing[6] = Thing[6] + 1 else if Thing[6] < Thing[9] then Thing[6] = Thing[6] + 1 Thing[4].position = Thing[4].position + vt(0, 0.2, 0) Thing[3].TextStrokeTransparency = Thing[3].TextStrokeTransparency + 0.1 Thing[3].TextTransparency = Thing[3].TextTransparency + 0.1 else Thing[1].Parent = nil table.remove(Effects, e) end end end end end if Thing[2] == "Shoot" then if CannonTarget == nil then table.remove(Effects, e) else local MainPos = Thing[1] local MainPos2 = Thing[4] local MouseLook = cf((MainPos + MainPos2) / 2, MainPos2) local hit, pos = rayCast(MainPos, MouseLook.lookVector, 10, CannonTarget.Parent) local mag = (Thing[1] - pos).magnitude MagicCylinder2(Color2, CFrame.new((Thing[1] + pos) / 2, pos) * angles(1.57, 0, 0), 3, mag * 5, 3, 1.5, 0, 1.5, 0.1) Thing[1] = Thing[1] + MouseLook.lookVector * 10 Thing[3] = Thing[3] - 1 if hit ~= nil then Thing[3] = 0 Damagefunc(hit, 8, 10, 0, "Normal", RootPart, 0, 2, math.random(1, 5), false, false, true, "Damage", 0.1, 200) ref = part(3, workspace, 0, 1, Color2, "Reference", vt()) ref.Anchored = true ref.CFrame = cf(pos) so("169445602", ref, 1, 0.8) so("153092334", ref, 1, 0.8) MagicBlock(Color2, cf(pos), 20, 20, 20, 5, 5, 5, 0.05) game:GetService("Debris"):AddItem(ref, 1) MagniDamage(ref, 10, 6, 9, 0, "Normal", ref, 0, 1, (math.random(1, 5)), nil, nil, true, "Damage", 0.05, 200) end if Thing[3] <= 0 then table.remove(Effects, e) end end end do do if Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" and Thing[2] ~= "Shoot" then if Thing[1].Transparency <= 1 then if Thing[2] == "Block1" then Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) Mesh = Thing[7] Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) Thing[1].Transparency = Thing[1].Transparency + Thing[3] else if Thing[2] == "Ice" then if Thing[6] <= Thing[5] then Thing[6] = Thing[6] + 0.3 Thing[1].CFrame = Thing[1].CFrame * cf(0, 1, 0) else Thing[1].Transparency = Thing[1].Transparency + Thing[3] end else if Thing[2] == "Shatter" then Thing[1].Transparency = Thing[1].Transparency + Thing[3] Thing[4] = Thing[4] * cf(0, Thing[7], 0) Thing[1].CFrame = Thing[4] * euler(Thing[6], 0, 0) Thing[6] = Thing[6] + Thing[5] else if Thing[2] == "Block2" then Thing[1].CFrame = Thing[1].CFrame Mesh = Thing[7] Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) Thing[1].Transparency = Thing[1].Transparency + Thing[3] else if Thing[2] == "Cylinder" then Mesh = Thing[7] Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) Thing[1].Transparency = Thing[1].Transparency + Thing[3] else if Thing[2] == "Blood" then Mesh = Thing[7] Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0) Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) Thing[1].Transparency = Thing[1].Transparency + Thing[3] else if Thing[2] == "Elec" then Mesh = Thing[10] Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9]) Thing[1].Transparency = Thing[1].Transparency + Thing[3] else if Thing[2] == "Disappear" then Thing[1].Transparency = Thing[1].Transparency + Thing[3] end end end end end end end end else Part.Parent = nil table.remove(Effects, e) end end -- DECOMPILER ERROR at PC9980: LeaveBlock: unexpected jumping out DO_STMT -- DECOMPILER ERROR at PC9980: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC9980: LeaveBlock: unexpected jumping out IF_STMT -- DECOMPILER ERROR at PC9980: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC9980: LeaveBlock: unexpected jumping out IF_STMT end end end end end end fenbarmana2:TweenSize((UDim2.new(0.4, 0, -4 * mana.Value / 100, 0)), nil, 1, 0.4, true) fenbarmana4.Text = "Mana(" .. mana.Value .. ")" fenbarhp2.BackgroundColor3 = Color3.new(Humanoid.Health / Humanoid.MaxHealth, 0, 0) fenbarhp2:TweenSize((UDim2.new(Humanoid.Health / Humanoid.MaxHealth, 0, 1, 0)), nil, 1, 0.4, true) fenbarhp3.Text = "(" .. math.floor(Humanoid.Health) .. ")" fenbarmove1b:TweenSize((UDim2.new(1 * cooldowns[1] / cooldownmax, 0, 1, 0)), nil, 1, 0.4, true) fenbarmove2b:TweenSize((UDim2.new(1 * cooldowns[2] / cooldownmax, 0, 1, 0)), nil, 1, 0.4, true) fenbarmove3b:TweenSize((UDim2.new(1 * cooldowns[3] / cooldownmax, 0, 1, 0)), nil, 1, 0.4, true) fenbarmove4b:TweenSize((UDim2.new(1 * cooldowns[4] / cooldownmax, 0, 1, 0)), nil, 1, 0.4, true) for _,c in pairs(Decrease:children()) do if (c:findFirstChild("Duration")) ~= nil then c.Duration.Value = c.Duration.Value - 1 if c.Duration.Value <= 0 then c.Parent = nil end end if c.Name == "DecreaseAtk" then decreaseatk = decreaseatk + c.Value else if c.Name == "DecreaseDef" then decreasedef = decreasedef + c.Value else if c.Name == "DecreaseMvmt" then decreasemvmt = decreasemvmt + c.Value end end end end Atk.Value = 1 - (decreaseatk) if Atk.Value <= 0 then Atk.Value = 0 end Def.Value = 1 - (decreasedef) if Def.Value <= 0 then Def.Value = 0.01 end Mvmt.Value = 1 - (decreasemvmt) if Mvmt.Value <= 0 then Mvmt.Value = 0 end decreaseatk = 0 decreasedef = 0 decreasemvmt = 0 AtkVal = Atk.Value * 100 AtkVal = math.floor(AtkVal) AtkVal = AtkVal / 100 fenbardamage.Text = "Damage\n(" .. AtkVal .. ")" DefVal = Def.Value * 100 DefVal = math.floor(DefVal) DefVal = DefVal / 100 fenbardef.Text = "Defense\n(" .. DefVal .. ")" MvmtVal = Mvmt.Value * 100 MvmtVal = math.floor(MvmtVal) MvmtVal = MvmtVal / 100 if Rooted.Value == true then MvmtVal = 0 end fenbarmove.Text = "Walkspeed\n(" .. MvmtVal .. ")" if StunT.Value <= Stun.Value then fenbarstun2:TweenSize((UDim2.new(0.4, 0, -4, 0)), nil, 1, 0.4, true) else fenbarstun2:TweenSize((UDim2.new(0.4, 0, -4 * Stun.Value / StunT.Value, 0)), nil, 1, 0.4, true) end fenbarstun3.Text = "Stun(" .. Stun.Value .. ")" if 100 <= mana.Value then mana.Value = 100 else if mananum <= 11 then mananum = mananum + 1 else if 8 <= mananum then mananum = 0 mana.Value = mana.Value + 1 end end end for i = 1, #cooldowns do if cooldownmax <= cooldowns[i] then cooldowns[i] = cooldownmax else cooldowns[i] = cooldowns[i] + cooldownsadd[i] end end -- DECOMPILER ERROR at PC10344: LeaveBlock: unexpected jumping out DO_STMT -- DECOMPILER ERROR at PC10344: LeaveBlock: unexpected jumping out DO_STMT -- DECOMPILER ERROR at PC10344: LeaveBlock: unexpected jumping out IF_THEN_STMT -- DECOMPILER ERROR at PC10344: LeaveBlock: unexpected jumping out IF_STMT -- DECOMPILER ERROR at PC10344: LeaveBlock: unexpected jumping out DO_STMT end end end end end
local input = require'neogit.lib.input' local M = { value = '', confirmed = true } input.get_user_input = function (_) return M.value end input.get_user_input_with_completion = function (_, _) return M.value end input.get_confirmation = function (_, _) return M.confirmed end return M
local PLUGIN = PLUGIN PLUGIN.name = "Tying" PLUGIN.author = "Shavargo" PLUGIN.description = "Ported from HL2RP; Adds the ability to tie players." ix.lang.AddTable("english", { tying = "Tying...", unTying = "Untying...", isTied = "Tied", fTiedUp = "You have been tied up.", fBeingTied = "You are being tied up.", tiedUp = "They have been tied up.", beingTied = "They are being tied up.", beingUntied = "They are being untied." }) if (SERVER) then function PLUGIN:PlayerUse(client, entity) if (!client:IsRestricted() and entity:IsPlayer() and entity:IsRestricted() and !entity:GetNetVar("untying")) then entity:SetAction("@beingUntied", 5) entity:SetNetVar("untying", true) client:SetAction("@unTying", 5) client:DoStaredAction(entity, function() entity:SetRestricted(false) entity:SetNetVar("untying") end, 5, function() if (IsValid(entity)) then entity:SetNetVar("untying") entity:SetAction() end if (IsValid(client)) then client:SetAction() end end) end end function PLUGIN:PlayerLoadout(client) client:SetNetVar("restricted") end function PLUGIN:CanPlayerJoinClass(client, class, info) if (client:IsRestricted()) then client:Notify("You cannot change classes when you are restrained!") return false end end function PLUGIN:SearchPlayer(client, target) if (!target:GetCharacter() or !target:GetCharacter():GetInventory()) then return false end local name = hook.Run("GetDisplayedName", target) or target:Name() local inventory = target:GetCharacter():GetInventory() ix.storage.Open(client, inventory, { entity = target, name = name }) return true end end if (CLIENT) then function PLUGIN:PopulateCharacterInfo(client, character, tooltip) if (client:IsRestricted()) then local panel = tooltip:AddRowAfter("name", "ziptie") panel:SetBackgroundColor(derma.GetColor("Warning", tooltip)) panel:SetText(L("tiedUp")) panel:SizeToContents() elseif (client:GetNetVar("tying")) then local panel = tooltip:AddRowAfter("name", "ziptie") panel:SetBackgroundColor(derma.GetColor("Warning", tooltip)) panel:SetText(L("beingTied")) panel:SizeToContents() elseif (client:GetNetVar("untying")) then local panel = tooltip:AddRowAfter("name", "ziptie") panel:SetBackgroundColor(derma.GetColor("Warning", tooltip)) panel:SetText(L("beingUntied")) panel:SizeToContents() end end end do local COMMAND = {} function COMMAND:OnRun(client, arguments) local data = {} data.start = client:GetShootPos() data.endpos = data.start + client:GetAimVector() * 96 data.filter = client local target = util.TraceLine(data).Entity if (IsValid(target) and target:IsPlayer() and target:IsRestricted()) then if (!client:IsRestricted()) then PLUGIN:SearchPlayer(client, target) else return "@notNow" end end end ix.command.Add("CharSearch", COMMAND) end
ITEM.name = "Flare gun" ITEM.description = "A flare gun used for long-distance communication." ITEM.class = "weapon_vj_flaregun" ITEM.model = "models/vj_weapons/w_flaregun.mdl" ITEM.width = 1 ITEM.height = 1 ITEM.iconCam = { pos = Vector(5, 0, 30), ang = Angle(90, 0, 0), fov = 45, } ITEM.price = 100
local specs = require "specs" specs.setup { show_jumps = true, min_jump = 30, popup = { delay_ms = 0, -- delay before popup displays inc_ms = 12, -- time increments used for fade/resize effects blend = 30, -- starting blend, between 0-100 (fully transparent), see :h winblend width = 25, winhl = "Visual", fader = require("specs").exp_fader, resizer = require("specs").shrink_resizer, }, ignore_filetypes = {}, ignore_buftypes = { nofile = true, }, } -- Press <C-b> to call specs! vim.api.nvim_set_keymap("n", "<C-b>", ':lua require("specs").show_specs()<CR>', { noremap = true, silent = true }) -- You can even bind it to search jumping and more, example: vim.api.nvim_set_keymap("n", "n", 'n:lua require("specs").show_specs()<CR>', { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "N", 'N:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })
--[[ Copyright (C) 2018 Google Inc. 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ]] local factory = require 'factories.explore.factory' local game = require 'dmlab.system.game' local helpers = require 'common.helpers' local pickups = require 'common.pickups' local random = require 'common.random' local map_maker = require 'dmlab.system.map_maker' local randomMap = random(map_maker:randomGen()) local level = { _pickupCount = 0, } -- Options set in createLevelApi. Keep in global so constants can be accessed. local opts function level:pickup(spawnId) level._pickupCount = level._pickupCount + 1 if level._pickupCount == level._rewardCount then level._pickupCount = 0 game:finishMap() end end function level:restart(maze) -- Select spawn point. local spawnId = random:uniformInt(1, #level._spawnLocations) local ij = level._spawnLocations[spawnId] level._spawnX, level._spawnY = maze:toWorldPos(ij[1], ij[2]) end function level:start(maze, episode, seed) random:seed(seed) randomMap:seed(seed) -- Find spawn points. level._spawnLocations = {} local rewardLocations = {} local height, width = maze:size() for i = 1, height do for j = 1, width do local c = maze:getEntityCell(i, j) if c == 'P' then table.insert(level._spawnLocations, {i, j}) elseif c == 'A' then local x, y = maze:toWorldPos(i, j) local key = y .. '_' .. x table.insert(rewardLocations, key) end end end -- Select rewards. random:shuffleInPlace(rewardLocations) level._pickupCount = 0 level._rewardCount = opts.rewardDensity * #rewardLocations level._rewards = {} for i = 1, level._rewardCount do level._rewards[rewardLocations[i]] = i end end level.spawnVarsUpdater = { ['info_player_start'] = function(spawnVars) local x, y = unpack(helpers.spawnVarToNumberTable(spawnVars.origin)) if x == level._spawnX and y == level._spawnY then return spawnVars else return nil end end, ['apple_reward'] = function(spawnVars) local j, i = unpack(helpers.spawnVarToNumberTable(spawnVars.origin)) local key = i .. '_' .. j local rewardId = level._rewards[key] if rewardId then spawnVars.id = tostring(rewardId) spawnVars.wait = '-1' return spawnVars else return nil end end } local function createLevelApi(optsOverride) opts = optsOverride or {} opts.rewardDensity = opts.rewardDensity or 0.5 -- Set base class options. opts.objectEntity = opts.objectEntity or 'A' return factory.createLevelApi{opts = opts, level = level} end return { createLevelApi = createLevelApi }
--[[ Copyright (c) 2012 Stephen Baker 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. --]] --! Layer which handles the Lua-facing side of loading and playing video. local TH = require "TH" local pathsep = package.config:sub(1, 1) class "MoviePlayer" ---@type MoviePlayer local MoviePlayer = _G["MoviePlayer"] function MoviePlayer:MoviePlayer(app, audio, video) self.app = app self.audio = audio self.video = video self.playing = false self.holding_bg_music = false self.channel = -1 self.lose_movies = {} self.advance_movies = {} self.intro_movie = nil self.win_movie = nil self.can_skip = true self.wait_for_stop = false self.wait_for_over = false end function MoviePlayer:init() self.moviePlayer = TH.moviePlayer() self.moviePlayer:setRenderer(self.video) --find movies in Anims folder local num local movie local movies = self.app.fs:listFiles("Anims"); if movies then for _,movie in pairs(movies) do --lose level movies if movie:upper():match(pathsep .. "LOSE%d+%.[^" .. pathsep .. "]+$") then table.insert(self.lose_movies, movie) end --advance level movies num = movie:upper():match(pathsep .. "AREA(%d+)V%.[^" .. pathsep .. "]+$") if num ~= nil and tonumber(num, 10) ~= nil then self.advance_movies[tonumber(num, 10)] = movie end --win game movie if movie:upper():match(pathsep .. "WINGAME%.[^" .. pathsep .. "]+$") then self.win_movie = movie end end end --find intro movies = self.app.fs:listFiles("Intro") if movies then for _,movie in pairs(movies) do if movie:upper():match(pathsep .. "INTRO%.SM4$") then self.intro_movie = movie end end end end function MoviePlayer:playIntro(callback_after_movie) self:playMovie(self.intro_movie, false, true, callback_after_movie) end function MoviePlayer:playWinMovie() self:playMovie(self.win_movie, true, true) end function MoviePlayer:playAdvanceMovie(level) local filename = self.advance_movies[level] if(not self.moviePlayer:getEnabled() or not self.app.config.movies or filename == nil) then return end if self.audio.background_music then self.holding_bg_music = self.audio:pauseBackgroundTrack() else end if level == 12 then self.audio:playSound("DICE122M.WAV") else self.audio:playSound("DICEYFIN.WAV") end self:playMovie(filename, true, false) end function MoviePlayer:playLoseMovie() if #self.lose_movies > 0 then local filename = self.lose_movies[math.random(#self.lose_movies)] self:playMovie(filename, true, true) end end function MoviePlayer:playMovie(filename, wait_for_stop, can_skip, callback) local x, y, w, h = 0 local screen_w, screen_h = self.app.config.width, self.app.config.height local ar local success, warning if(not self.moviePlayer:getEnabled() or not self.app.config.movies or filename == nil) then if callback then callback() end return end success, warning = self.moviePlayer:load(filename) if warning ~= nil and warning ~= "" then local message = "MoviePlayer:playMovie - Warning: " .. warning if self.app.world then self.app.world:gameLog(message) elseif self.app.config.debug then print(message) end end if not success then -- Indicates failure to load movie if callback then callback() end return end -- Abort any loading of music self.audio.load_music = false if self.moviePlayer:hasAudioTrack() then self.channel = self.audio:reserveChannel() if self.audio.background_music then self.holding_bg_music = self.audio:pauseBackgroundTrack() end end -- calculate target dimensions local native_w = self.moviePlayer:getNativeWidth() local native_h = self.moviePlayer:getNativeHeight() if(native_w ~= 0 and native_h ~= 0) then ar = native_w / native_h if(math.abs((screen_w / screen_h) - ar) < 0.001) then x, y = 0, 0 w, h = screen_w, screen_h else if(screen_w > screen_h / native_h * native_w) then w = math.floor(screen_h / native_h * native_w) h = screen_h x = math.floor((screen_w - w) / 2) y = 0 else w = screen_w h = math.floor(screen_w / native_w * native_h) x = 0 y = math.floor((screen_h - h) / 2) end end else x, y = 0, 0 w, h = screen_w, screen_h end self.video:startFrame() self.video:fillBlack() self.video:endFrame() self.can_skip = can_skip self.wait_for_stop = wait_for_stop self.wait_for_over = true self.callback_on_destroy_movie = callback self.opengl_mode_index = nil for i=1, #self.app.modes do if self.app.modes[i] == "opengl" then self.opengl_mode_index = i end end if self.opengl_mode_index then self.app.modes[self.opengl_mode_index] = "" end --TODO: Add text e.g. for newspaper headlines warning = self.moviePlayer:play(x, y, w, h, self.channel) if warning ~= nil and warning ~= "" then local message = "MoviePlayer:playMovie - Warning: " .. warning if self.app.world then self.app.world:gameLog(message) elseif self.app.config.debug then print(message) end end self.playing = true end --NB: Call after any changes to TH.surface function MoviePlayer:allocatePictureBuffer() self.moviePlayer:allocatePictureBuffer() end --NB: Call before any changes to TH.surface function MoviePlayer:deallocatePictureBuffer() self.moviePlayer:deallocatePictureBuffer() end function MoviePlayer:onMovieOver() self.wait_for_over = false if not self.wait_for_stop then self:_destroyMovie() end end function MoviePlayer:stop() if self.can_skip then self.moviePlayer:stop() end self.wait_for_stop = false if not self.wait_for_over then self:_destroyMovie() end end function MoviePlayer:_destroyMovie() self.moviePlayer:unload() if self.opengl_mode_index then self.app.modes[self.opengl_mode_index] = "opengl" end if self.channel >= 0 then self.audio:releaseChannel(self.channel) self.channel = -1 end if self.holding_bg_music then -- If possible we want to continue playing music where we were self.audio:pauseBackgroundTrack() else self.audio:playRandomBackgroundTrack() end self.playing = false if self.callback_on_destroy_movie then self.callback_on_destroy_movie() self.callback_on_destroy_movie = nil end end function MoviePlayer:refresh() self.moviePlayer:refresh() end function MoviePlayer:updateRenderer() self.moviePlayer:setRenderer(self.video) end
require("startup").setup({ theme = 'startify' })
-- This comment enforces unit-test coverage for this file: -- coverage: 0 http = require 'summit.http' menu = require 'summit.menu' speech = require 'summit.speech' json = require 'json' inspect = require "inspect" log = require "summit.log" category_names = { 'u.s.', 'world', 'sports', 'business', 'technology', 'science', 'health' } function get_abstract(arg) channel.say(arg.abstract) get_link_menu(arg.url) end function invalid() channel.say("Not a valid selection") end function send_article(selection) local url = selection sms = require "summit.sms" to = channel.data.ani from = "+1" .. channel.data.dnis message = "You have saved " .. url .. " for later." ok, err = sms.send(to, from, message) log.debug("This is the ok message: " .. ok) get_continue_menu() end function get_continue_menu() continue_menu = menu() continue_menu.add(tostring(1), "To listen to another article, press 1", get_main_menu) continue_menu.add(tostring(2), "To end the call, press 2", hangup) continue_menu.default(invalid) continue_menu.run() get_link_menu() end function select_category(cat) selected_category = cat end function hangup() channel.say("Goodbye!") channel.hangup() end function get_user_info() -- phone_number = '6039690489' phone_number = channel.data.ani user_url = "https://getnewspeak.herokuapp.com/api/v1/users/" .. phone_number res, err = http.get(user_url) if err or res.data == '' then get_main_menu() end user_info = json:decode(res.content) if user_info.categories[1] then category_names = {} for index, category in ipairs(user_info.categories) do category_names[index] = category.abbreviation end end channel.say("Welcome to Newspeak, " .. user_info.name) end -- Main menu function get_main_menu() selected_category = "" cat_counter = 1 main_menu = menu() main_menu.intro("Select a news topic.") for index, category in ipairs(category_names) do main_menu.add(tostring(index), "For " .. category .. ", press " .. tostring(index), function() select_category(category) end) end main_menu.run() channel.say("Here are the top items for " .. selected_category) get_category_menu() end -- API Call function get_category_menu() url = "http://getnewspeak.herokuapp.com/headlines?categories=" .. selected_category res, err = http.get(url) if err then channel.say('Unable to contact news service, goodbye.') channel.hangup() end news_content = json:decode(res.content) -- Category Menu category_menu = menu() category_menu.add(tostring(1), "For " .. news_content[1].title .. ", press " .. tostring(1), function() get_abstract(news_content[1]) end) category_menu.add(tostring(2), "For " .. news_content[2].title .. ", press " .. tostring(2), function() get_abstract(news_content[2]) end) category_menu.add(tostring(3), "For " .. news_content[3].title .. ", press " .. tostring(3), function() get_abstract(news_content[3]) end) category_menu.add(tostring(4), "For " .. news_content[4].title .. ", press " .. tostring(4), function() get_abstract(news_content[4]) end) category_menu.add(tostring(5), "For " .. news_content[5].title .. ", press " .. tostring(5), function() get_abstract(news_content[5]) end) category_menu.default(invalid) category_menu.run() get_link_menu() end -- Link Menu function get_link_menu(selection) link_menu = menu() link_menu.add(tostring(1), "To receive a link to the full article, press 1", function() send_article(selection) end) link_menu.add(tostring(2), "To continue browsing, press 2", get_main_menu) link_menu.add(tostring(3), "To close Newspeak, press 3", hangup) link_menu.default(invalid) link_menu.run() end -- Welcome channel.answer() get_user_info() get_main_menu()
-- local json = require "json" function f (a) return a + 5 end function setup_camera() return 34 end function f2(a, b, c) return a, b, c end clear_screen() clear_screen() clear_screen() load_project(5); print "hello world" function tick(elapsed) print "elapsed" end function setup_scene() end
local lgi = require 'lgi' local Gtk = lgi.Gtk local stylesheet_template = [[ GtkLabel { color: %s; } GtkButton GtkLabel { color: %s; } ]] local cssprovider = Gtk.CssProvider() local window = Gtk.Window { width_request = 500, height_request = 300, title = 'CSS', Gtk.Box { orientation = 'VERTICAL', Gtk.Label { margin = 20, label = 'Colored Gtk.Label' }, Gtk.Button { margin = 20, label = 'Colored Gtk.Button', on_clicked = function (_) cssprovider:load_from_data(string.format(stylesheet_template, "red", "green")) end } } } local style_context = window:get_style_context() style_context.add_provider_for_screen(window:get_screen(),cssprovider, 0) function window:on_destroy() Gtk.main_quit() end window:show_all() Gtk:main()
local config = require 'config' local u = require 'utilities' local api = require 'methods' local plugin = {} function trim(str) local s = str:gsub('^%s*(.-)%s*$', '%1') return s end function plugin.onTextMessage(msg, blocks) if blocks[1] == 'shout' then if not blocks[2] then message = "*Avaliable Commands:*\n\n- /shout `something` - _Shout the _`something`" api.sendReply(msg, message, true, nil, true) else local input = blocks[2] input = trim(input) input = input:upper() local output = '' local inc = 0 local ilen = 0 local utf8_char = '('..u.char.utf_8..'*)' for match in input:gmatch(utf8_char) do if ilen < 20 then ilen = ilen + 1 output = output .. match .. ' ' end end ilen = 0 output = output .. '\n' for match in input:sub(2):gmatch(utf8_char) do if ilen < 19 then local spacing = '' for _ = 1, inc do spacing = spacing .. ' ' end inc = inc + 1 ilen = ilen + 1 output = output .. match .. ' ' .. spacing .. match .. '\n' end end message = '```\n' .. trim(output) .. '\n```' api.sendReply(msg, message, true, nil, true) end end end plugin.triggers = { onTextMessage = { config.cmd..'(shout) (.+)$', config.cmd..'(shout)$' } } return plugin
-- KEYS只指定客户号 -- ARGV[]格式为:用户信息数据个数N, -- 用户信息数据1键,用户信息数据1值,......,用户信息数据N键,用户信息数据N值, -- 账户1,账户1信息数据个数M1, -- 账户1信息数据1键,账户1信息数据1值,......,账户1信息数据M1键,账户1信息数据M1值, -- 账户2,账户2信息数据个数M2, -- 账户2信息数据1键,账户2信息数据1值,......,账户2信息数据M2键,账户2信息数据M2值, -- ...... local user_info_key = 'HXRC_USER_OBJ:' .. KEYS[1] .. ':USER_INFO' local user_accts_list_key = 'HXRC_USER_OBJ:' .. KEYS[1] .. ':ACCTS_LIST' -- 设置数据有效期(秒) local timeout = 300 -- 第一个参数为用户信息数据个数 if ARGV[1] == nil then return redis.status_reply('ok') end local data_num = ARGV[1] local hmset_tab = {} local k = 1 -- 遍历用户信息数据,使用redis hashes保存数据 for j = 2, data_num * 2 + 1, 2 do hmset_tab[k] = ARGV[j] hmset_tab[k + 1] = ARGV[j + 1] k = k + 2 -- redis.call('hset', user_info_key, ARGV[j], ARGV[j + 1]) end --利用unpack将hmset_tab转换成可变参数列表 redis.call('hmset', user_info_key, unpack(hmset_tab)) redis.call('expire', user_info_key, timeout) -- 遍历账户信息列表 local i = data_num * 2 + 2 while ARGV[i] ~= nil do -- 获取账户 local acct = ARGV[i] -- 获取账户信息数据个数 data_num = ARGV[i + 1] -- 生成账户信息主键 local user_acct_info_key = 'HXRC_USER_OBJ:' .. KEYS[1] .. ':ACCT_INFO:' .. acct i = i + 2 k = 1 -- 遍历data_num对数据 hmset_tab = {} for j = i, i + data_num * 2 - 1, 2 do hmset_tab[k] = ARGV[j] hmset_tab[k + 1] = ARGV[j + 1] k = k + 2 -- 用redis hashes存储卡信息 -- redis.call('hset', user_acct_info_key, ARGV[j], ARGV[j + 1]) i = i + 2 end redis.call('hmset', user_acct_info_key, unpack(hmset_tab)) redis.call('expire', user_acct_info_key, timeout) -- 用redis sets存储卡列表 redis.call('sadd', user_accts_list_key, acct) end redis.call('expire', user_accts_list_key, timeout) return redis.status_reply('ok')
--[[ Copyright (c) 2018 Optera * Part of Re-Stack * * See LICENSE.md in the project directory for license information. --]] SelectItemByEntity("reactor", settings.startup["ReStack-reactor"].value) SelectItemByEntity("assembling-machine", settings.startup["ReStack-crafting-machine"].value) SelectItemByEntity("furnace", settings.startup["ReStack-furnace"].value) SelectItemByEntity("beacon", settings.startup["ReStack-beacon"].value) SelectItemByEntity("mining-drill", settings.startup["ReStack-mining-drill"].value) SelectItemByEntity("boiler", settings.startup["ReStack-boiler"].value) SelectItemByEntity("generator", settings.startup["ReStack-generator"].value) for _, item in pairs(data.raw["module"]) do ReStack_Items[item.name] = {stack_size = settings.startup["ReStack-modules"].value, type = "module"} end
--Made by Lagx#2413-- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-19, 32, 253) for i = 1, 50 do while wait() do local Loc = CFrame.new(-24.374, 33.1, 253.669) for i, ChosenPlayer in pairs(game.Players:GetPlayers()) do if ChosenPlayer.Name ~= game:GetService("Players").LocalPlayer.Name then ChosenPlayer.Character:SetPrimaryPartCFrame(Loc) end end end end
--[[ LuiExtended License: The MIT License (MIT) --]] local UnitFrames = LUIE.UnitFrames local PetNames = LUIE.Data.PetNames local zo_strformat = zo_strformat local g_FramesMovingEnabled = false -- Helper local flag local nameDisplayOptions = { "@UserID", "Character Name", "Character Name @UserID" } local nameDisplayOptionsKeys = { ["@UserID"] = 1, ["Character Name"] = 2, ["Character Name @UserID"] = 3 } local raidIconOptions = { "No Icons", "Class Icons Only", "Role Icons Only", "Class Icon in PVP, Role in PVE", "Class Icon in PVE, Role in PVP" } local raidIconOptionsKeys = { ["No Icons"] = 1 , ["Class Icons Only"] = 2, ["Role Icons Only"] = 3, ["Class Icon in PVP, Role in PVE"] = 4, ["Class Icon in PVE, Role in PVP"] = 5 } local playerFrameOptions = { "Vertical Stacked Frames", "Separated Horizontal Frames", "Pyramid" } local playerFrameOptionsKeys = { ["Vertical Stacked Frames"] = 1, ["Separated Horizontal Frames"] = 2, ["Pyramid"] = 3 } local championOptions = { "Show Above Cap", "Limit to Cap" } local resolutionOptions = { "1080p", "1440p", "4K" } local resolutionOptionsKeys = { ["1080p"] = 1, ["1440p"] = 2, ["4K"] = 3 } local alignmentOptions = { "Left to Right (Default)", "Right to Left", "Center" } local alignmentOptionsKeys = { ["Left to Right (Default)"] = 1, ["Right to Left"] = 2, ["Center"] = 3 } local formatOptions = { "Nothing", "Current", "Current + Shield", "Max", "Percentage%", "Current / Max", "Current + Shield / Max", "Current / Max (Percentage%)", "Current + Shield / Max (Percentage%)", "Current (Percentage%)", "Current + Shield (Percentage%)" } local Whitelist, WhitelistValues = {} -- Create a list of Unitnames to use for Summon Whitelist local function GenerateCustomList(input) local options, values = {}, {} local counter = 0 for name in pairs(input) do counter = counter + 1 options[counter] = name values[counter] = name end return options, values end function UnitFrames.CreateSettings() -- Load LibAddonMenu local LAM = LibAddonMenu2 if LAM == nil then return end local Defaults = UnitFrames.Defaults local Settings = UnitFrames.SV -- Get fonts local FontsList = {} for f in pairs(LUIE.Fonts) do table.insert(FontsList, f) end -- Get statusbar textures local StatusbarTexturesList = {} for key, _ in pairs(LUIE.StatusbarTextures) do table.insert(StatusbarTexturesList, key) end local panelDataUnitFrames = { type = "panel", name = zo_strformat("<<1>> - <<2>>", LUIE.name, GetString(SI_LUIE_LAM_UF)), displayName = zo_strformat("<<1>> <<2>>", LUIE.name, GetString(SI_LUIE_LAM_UF)), author = LUIE.author, version = LUIE.version, website = LUIE.website, feedback = LUIE.feedback, translation = LUIE.translation, donation = LUIE.donation, slashCommand = "/luiuf", registerForRefresh = true, registerForDefaults = true, } local optionsDataUnitFrames = {} -- Unit Frames module description optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "description", text = GetString(SI_LUIE_LAM_UF_DESCRIPTION), } -- ReloadUI Button optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "button", name = GetString(SI_LUIE_LAM_RELOADUI), tooltip = GetString(SI_LUIE_LAM_RELOADUI_BUTTON), func = function() ReloadUI("ingame") end, width = "full", } -- Resolution Options optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "dropdown", name = GetString(SI_LUIE_LAM_UF_RESOLUTION), tooltip = GetString(SI_LUIE_LAM_UF_RESOLUTION_TP), choices = resolutionOptions, getFunc = function() return resolutionOptions[Settings.ResolutionOptions] end, setFunc = function(value) Settings.ResolutionOptions = resolutionOptionsKeys[value] UnitFrames.CustomFramesSetPositions() end, width = "full", default = Defaults.ResolutionOptions, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, } -- Custom Unit Frames Unlock optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_UNLOCK), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_UNLOCK_TP), getFunc = function() return g_FramesMovingEnabled end, setFunc = function(value) g_FramesMovingEnabled = value UnitFrames.CustomFramesSetMovingState(value) end, width = "half", default = false, resetFunc = function() UnitFrames.CustomFramesResetPosition(false) end, } -- Custom Unit Frames Reset position optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "button", name = GetString(SI_LUIE_LAM_RESETPOSITION), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_RESETPOSIT_TP), func = function() UnitFrames.CustomFramesResetPosition(false) end, width = "half", } -- Unit Frames - Default Unit Frames Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_DFRAMES_HEADER), controls = { { -- Default PLAYER frame type = "dropdown", name = GetString(SI_LUIE_LAM_UF_DFRAMES_PLAYER), choices = UnitFrames.GetDefaultFramesOptions('Player'), getFunc = function() return UnitFrames.GetDefaultFramesSetting('Player') end, setFunc = function(value) UnitFrames.SetDefaultFramesSetting('Player', value) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), default = UnitFrames.GetDefaultFramesSetting('Player', true), }, { -- Default TARGET frame type = "dropdown", name = GetString(SI_LUIE_LAM_UF_DFRAMES_TARGET), choices = UnitFrames.GetDefaultFramesOptions('Target'), getFunc = function() return UnitFrames.GetDefaultFramesSetting('Target') end, setFunc = function(value) UnitFrames.SetDefaultFramesSetting('Target', value) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), default = UnitFrames.GetDefaultFramesSetting('Target', true), }, { -- Default small GROUP frame type = "dropdown", name = GetString(SI_LUIE_LAM_UF_DFRAMES_GROUPSMALL), choices = UnitFrames.GetDefaultFramesOptions('Group'), getFunc = function() return UnitFrames.GetDefaultFramesSetting('Group') end, setFunc = function(value) UnitFrames.SetDefaultFramesSetting('Group', value) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), default = UnitFrames.GetDefaultFramesSetting('Group', true), }, { -- Compass Boss Bar type = "dropdown", name = GetString(SI_LUIE_LAM_UF_DFRAMES_BOSS_COMPASS), choices = UnitFrames.GetDefaultFramesOptions('Boss'), getFunc = function() return UnitFrames.GetDefaultFramesSetting('Boss') end, setFunc = function(value) UnitFrames.SetDefaultFramesSetting('Boss', value) UnitFrames.ResetCompassBarMenu() end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), default = UnitFrames.GetDefaultFramesSetting('Boss', true), }, { -- Reposition default player bars type = "checkbox", name = GetString(SI_LUIE_LAM_UF_DFRAMES_REPOSIT), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_REPOSIT_TP), getFunc = function() return Settings.RepositionFrames end, setFunc = function(value) Settings.RepositionFrames = value UnitFrames.RepositionDefaultFrames() end, width = "full", default = Defaults.RepositionFrames, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Reposition frames adjust Y Coordinates type = "slider", name = GetString(SI_LUIE_LAM_UF_DFRAMES_VERT), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_VERT_TP), min = -150, max = 300, step = 5, getFunc = function() return Settings.RepositionFramesAdjust end, setFunc = function(value) Settings.RepositionFramesAdjust = value UnitFrames.RepositionDefaultFrames() end, width = "full", default = Defaults.RepositionFramesAdjust, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Out-of-Combat bars transparency type = "slider", name = GetString(SI_LUIE_LAM_UF_DFRAMES_OOCTRANS), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_OOCTRANS_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.DefaultOocTransparency end, setFunc = function(value) UnitFrames.SetDefaultFramesTransparency(value, nil) end, width = "full", default = Defaults.DefaultOocTransparency, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- In-Combat bars transparency type = "slider", name = GetString(SI_LUIE_LAM_UF_DFRAMES_INCTRANS), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_INCTRANS_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.DefaultIncTransparency end, setFunc = function(value) UnitFrames.SetDefaultFramesTransparency(nil, value) end, width = "full", default = Defaults.DefaultIncTransparency, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Format label text type = "dropdown", name = GetString(SI_LUIE_LAM_UF_DFRAMES_LABEL), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_LABEL_TP), choices = formatOptions, getFunc = function() return Settings.Format end, setFunc = function(var) Settings.Format = var end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.Format, }, { -- DefaultFrames Font type = "dropdown", scrollable = true, name = GetString(SI_LUIE_LAM_FONT), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_FONT_TP), choices = FontsList, sort = "name-up", getFunc = function() return Settings.DefaultFontFace end, setFunc = function(var) Settings.DefaultFontFace = var UnitFrames.DefaultFramesApplyFont() end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.DefaultFontFace, }, { -- DefaultFrames Font Size type = "slider", name = GetString(SI_LUIE_LAM_FONT_SIZE), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_FONT_SIZE_TP), min = 10, max = 30, step = 1, getFunc = function() return Settings.DefaultFontSize end, setFunc = function(value) Settings.DefaultFontSize = value UnitFrames.DefaultFramesApplyFont() end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.DefaultFontSize, }, { -- DefaultFrames Font Style type = "dropdown", name = GetString(SI_LUIE_LAM_FONT_STYLE), tooltip = GetString(SI_LUIE_LAM_UF_DFRAMES_FONT_STYLE_TP), choices = { "normal", "outline", "shadow", "soft-shadow-thick", "soft-shadow-thin", "thick-outline" }, sort = "name-up", getFunc = function() return Settings.DefaultFontStyle end, setFunc = function(var) Settings.DefaultFontStyle = var UnitFrames.DefaultFramesApplyFont() end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.DefaultFontStyle, }, { -- Color of text labels type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_DFRAMES_LABEL_COLOR), getFunc = function() return unpack(Settings.DefaultTextColour) end, setFunc = function(r,g,b,a) Settings.DefaultTextColour={r,g,b} UnitFrames.DefaultFramesApplyColour() end, width = "full", default = { r=Defaults.DefaultTextColour[1], g=Defaults.DefaultTextColour[2], b=Defaults.DefaultTextColour[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Color target name by reaction type = "checkbox", name = GetString(SI_LUIE_LAM_UF_TARGET_COLOR_REACTION), tooltip = GetString(SI_LUIE_LAM_UF_TARGET_COLOR_REACTION_TP), getFunc = function() return Settings.TargetColourByReaction end, setFunc = UnitFrames.TargetColourByReaction, width = "full", default = Defaults.TargetColourByReaction, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Target class icon type = "checkbox", name = GetString(SI_LUIE_LAM_UF_TARGET_ICON_CLASS), tooltip = GetString(SI_LUIE_LAM_UF_TARGET_ICON_CLASS_TP), getFunc = function() return Settings.TargetShowClass end, setFunc = function(value) Settings.TargetShowClass = value end, width = "full", default = Defaults.TargetShowClass, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Target ignore/friend/guild icon type = "checkbox", name = GetString(SI_LUIE_LAM_UF_TARGET_ICON_GFI), tooltip = GetString(SI_LUIE_LAM_UF_TARGET_ICON_GFI_TP), getFunc = function() return Settings.TargetShowFriend end, setFunc = function(value) Settings.TargetShowFriend = value end, width = "full", default = Defaults.TargetShowFriend, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, }, } -- Unit Frames - Custom Unit Frames Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMES_HEADER), controls = { { -- Custom Unit Frames Font type = "dropdown", scrollable = true, name = GetString(SI_LUIE_LAM_FONT), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_FONT_TP), choices = FontsList, sort = "name-up", getFunc = function() return Settings.CustomFontFace end, setFunc = function(var) Settings.CustomFontFace = var UnitFrames.CustomFramesApplyFont() end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomFontFace, }, { -- Custom Unit Frames Font size labels type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMES_FONT_SIZE_LABELS), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_FONT_SIZE_LABELS_TP), min = 10, max = 30, step = 1, getFunc = function() return Settings.CustomFontOther end, setFunc = function(value) Settings.CustomFontOther = value UnitFrames.CustomFramesApplyFont() end, width = "half", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomFontOther, }, { -- Custom Unit Frames Font size bars type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMES_FONT_SIZE_BARS), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_FONT_SIZE_BARS_TP), min = 10, max = 30, step = 1, getFunc = function() return Settings.CustomFontBars end, setFunc = function(value) Settings.CustomFontBars = value UnitFrames.CustomFramesApplyFont() end, width = "half", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomFontBars, }, { -- Custom Unit Frames Font style type = "dropdown", name = GetString(SI_LUIE_LAM_FONT_STYLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_FONT_STYLE_TP), choices = { "normal", "outline", "shadow", "soft-shadow-thick", "soft-shadow-thin", "thick-outline" }, sort = "name-up", getFunc = function() return Settings.CustomFontStyle end, setFunc = function(var) Settings.CustomFontStyle = var UnitFrames.CustomFramesApplyFont() end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomFontStyle, }, { -- Custom Unit Frames Texture type = "dropdown", scrollable = true, name = GetString(SI_LUIE_LAM_UF_CFRAMES_TEXTURE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_TEXTURE_TP), choices = StatusbarTexturesList, sort = "name-up", getFunc = function() return Settings.CustomTexture end, setFunc = function(var) Settings.CustomTexture = var UnitFrames.CustomFramesApplyTexture() end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomTexture, }, { -- Custom Unit Frames Separate Shield Bar type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_SEPERATE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_SEPERATE_TP), getFunc = function() return Settings.CustomShieldBarSeparate end, setFunc = function(value) Settings.CustomShieldBarSeparate = value end, width = "full", default = Defaults.CustomShieldBarSeparate, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end }, { -- Custom Unit Frames Separate Shield Bar Height type = "slider", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_SEPERATE_HEIGHT)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_SEPERATE_HEIGHT_TP), min = 4, max = 12, step = 1, getFunc = function() return Settings.CustomShieldBarHeight end, setFunc = function(value) Settings.CustomShieldBarHeight = value UnitFrames.CustomFramesApplyLayoutPlayer(true) UnitFrames.CustomFramesApplyLayoutGroup() end, width = "full", default = Defaults.CustomShieldBarHeight, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomShieldBarSeparate ) end, }, { -- Custom Unit Frames Overlay Full Height Shield Bar type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_OVERLAY), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_OVERLAY_TP), getFunc = function() return Settings.CustomShieldBarFull end, setFunc = function(value) Settings.CustomShieldBarFull = value end, width = "full", default = Defaults.CustomShieldBarFull, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and not Settings.CustomShieldBarSeparate ) end, }, { -- Shield Transparency type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_ALPHA), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_SHIELD_ALPHA_TP), min = 0, max = 100, step = 1, getFunc = function() return Settings.ShieldAlpha end, setFunc = function(value) Settings.ShieldAlpha = value UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = Defaults.ShieldAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and not Settings.CustomShieldBarSeparate ) end, }, { -- Custom Unit Frames Smooth Bar Transition type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_SMOOTHBARTRANS), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_SMOOTHBARTRANS_TP), getFunc = function() return Settings.CustomSmoothBar end, setFunc = function(value) Settings.CustomSmoothBar = value end, width = "full", default = Defaults.CustomSmoothBar, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Champion Points Effective type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMES_CHAMPION), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_CHAMPION_TP), choices = championOptions, getFunc = function() return Settings.ChampionOptions end, setFunc = function(var) Settings.ChampionOptions = var UnitFrames.OnPlayerActivated() end, width = "full", default = Defaults.ChampionOptions, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, }, } -- Unit Frames - Custom Unit Frame Color Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_HEADER), controls = { { -- Custom Unit Frames Health Bar Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_HEALTH), getFunc = function() return unpack(Settings.CustomColourHealth) end, setFunc = function(r,g,b,a) Settings.CustomColourHealth={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourHealth[1], g=Defaults.CustomColourHealth[2], b=Defaults.CustomColourHealth[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Shield Bar Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_SHIELD), getFunc = function() return Settings.CustomColourShield[1], Settings.CustomColourShield[2], Settings.CustomColourShield[3] end, setFunc = function(r,g,b,a) Settings.CustomColourShield={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourShield[1], g=Defaults.CustomColourShield[2], b=Defaults.CustomColourShield[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Magicka Bar Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_MAGICKA), getFunc = function() return unpack(Settings.CustomColourMagicka) end, setFunc = function(r,g,b,a) Settings.CustomColourMagicka={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourMagicka[1], g=Defaults.CustomColourMagicka[2], b=Defaults.CustomColourMagicka[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Stamina Bar Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_STAMINA), getFunc = function() return unpack(Settings.CustomColourStamina) end, setFunc = function(r,g,b,a) Settings.CustomColourStamina={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourStamina[1], g=Defaults.CustomColourStamina[2], b=Defaults.CustomColourStamina[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames DPS Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_DPS), getFunc = function() return unpack(Settings.CustomColourDPS) end, setFunc = function(r,g,b,a) Settings.CustomColourDPS={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourDPS[1], g=Defaults.CustomColourDPS[2], b=Defaults.CustomColourDPS[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Healer Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_HEALER), getFunc = function() return unpack(Settings.CustomColourHealer) end, setFunc = function(r,g,b,a) Settings.CustomColourHealer={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourHealer[1], g=Defaults.CustomColourHealer[2], b=Defaults.CustomColourHealer[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Tank Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_TANK), getFunc = function() return unpack(Settings.CustomColourTank) end, setFunc = function(r,g,b,a) Settings.CustomColourTank={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourTank[1], g=Defaults.CustomColourTank[2], b=Defaults.CustomColourTank[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Dragonknight Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_DK), getFunc = function() return unpack(Settings.CustomColourDragonknight) end, setFunc = function(r,g,b,a) Settings.CustomColourDragonknight={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourDragonknight[1], g=Defaults.CustomColourDragonknight[2], b=Defaults.CustomColourDragonknight[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Nightblade Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_NB), getFunc = function() return unpack(Settings.CustomColourNightblade) end, setFunc = function(r,g,b,a) Settings.CustomColourNightblade={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourNightblade[1], g=Defaults.CustomColourNightblade[2], b=Defaults.CustomColourNightblade[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Sorcerer Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_SORC), getFunc = function() return unpack(Settings.CustomColourSorcerer) end, setFunc = function(r,g,b,a) Settings.CustomColourSorcerer={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourSorcerer[1], g=Defaults.CustomColourSorcerer[2], b=Defaults.CustomColourSorcerer[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Templar Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_TEMP), getFunc = function() return unpack(Settings.CustomColourTemplar) end, setFunc = function(r,g,b,a) Settings.CustomColourTemplar={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourTemplar[1], g=Defaults.CustomColourTemplar[2], b=Defaults.CustomColourTemplar[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Warden Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_WARD), getFunc = function() return unpack(Settings.CustomColourWarden) end, setFunc = function(r,g,b,a) Settings.CustomColourWarden={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourWarden[1], g=Defaults.CustomColourWarden[2], b=Defaults.CustomColourWarden[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Necromancer Role Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_NECRO), getFunc = function() return unpack(Settings.CustomColourNecromancer) end, setFunc = function(r,g,b,a) Settings.CustomColourNecromancer={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourNecromancer[1], g=Defaults.CustomColourNecromancer[2], b=Defaults.CustomColourNecromancer[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Reaction color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_FILL_R_PLAYER), getFunc = function() return unpack(Settings.CustomColourPlayer) end, setFunc = function(r,g,b,a) Settings.CustomColourPlayer={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourPlayer[1], g=Defaults.CustomColourPlayer[2], b=Defaults.CustomColourPlayer[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Reaction color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_FILL_R_FRIENDLY), getFunc = function() return unpack(Settings.CustomColourFriendly) end, setFunc = function(r,g,b,a) Settings.CustomColourFriendly={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourFriendly[1], g=Defaults.CustomColourFriendly[2], b=Defaults.CustomColourFriendly[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Reaction color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_FILL_R_HOSTILE), getFunc = function() return unpack(Settings.CustomColourHostile) end, setFunc = function(r,g,b,a) Settings.CustomColourHostile={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourHostile[1], g=Defaults.CustomColourHostile[2], b=Defaults.CustomColourHostile[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Reaction color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_FILL_R_NEUTRAL), getFunc = function() return unpack(Settings.CustomColourNeutral) end, setFunc = function(r,g,b,a) Settings.CustomColourNeutral={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourNeutral[1], g=Defaults.CustomColourNeutral[2], b=Defaults.CustomColourNeutral[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Reaction color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_FILL_R_GUARD), getFunc = function() return unpack(Settings.CustomColourGuard) end, setFunc = function(r,g,b,a) Settings.CustomColourGuard={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourGuard[1], g=Defaults.CustomColourGuard[2], b=Defaults.CustomColourGuard[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Custom Unit Frames Pet Bar Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_COLOR), getFunc = function() return unpack(Settings.CustomColourPet) end, setFunc = function(r,g,b,a) Settings.CustomColourPet={r,g,b} UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = { r=Defaults.CustomColourPet[1], g=Defaults.CustomColourPet[2], b=Defaults.CustomColourPet[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, }, } -- Unit Frames - Custom Unit Frames (Player & Target) Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_HEADER), controls = { { -- Enable LUIE PLAYER frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_ENABLE_PLAYER), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_ENABLE_PLAYER_TP), getFunc = function() return Settings.CustomFramesPlayer end, setFunc = function(value) Settings.CustomFramesPlayer = value end, width = "full", default = Defaults.CustomFramesPlayer, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Enable LUIE Target frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_ENABLE_TARGET), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_ENABLE_TARGET_TP), getFunc = function() return Settings.CustomFramesTarget end, setFunc = function(value) Settings.CustomFramesTarget = value end, width = "full", default = Defaults.CustomFramesTarget, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Player Name Display Method (Player) type = "dropdown", name = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_PLAYER), tooltip = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_PLAYER_TP), choices = nameDisplayOptions, getFunc = function() return nameDisplayOptions[Settings.DisplayOptionsPlayer] end, setFunc = function(value) Settings.DisplayOptionsPlayer = nameDisplayOptionsKeys[value] UnitFrames.CustomFramesReloadControlsMenu(true) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = nameDisplayOptions[2] }, { -- Player Name Display Method (Target) type = "dropdown", name = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_TARGET), tooltip = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_TARGET_TP), choices = nameDisplayOptions, getFunc = function() return nameDisplayOptions[Settings.DisplayOptionsTarget] end, setFunc = function(value) Settings.DisplayOptionsTarget = nameDisplayOptionsKeys[value] UnitFrames.CustomFramesReloadControlsMenu(true) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = nameDisplayOptions[2] }, { -- Custom Unit Frames format left label type = "dropdown", name = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_LEFT), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_LEFT_TP), choices = formatOptions, getFunc = function() return Settings.CustomFormatOnePT end, setFunc = function(var) Settings.CustomFormatOnePT = var UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomFormatOnePT, }, { -- Custom Unit Frames format right label type = "dropdown", name = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_RIGHT), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_RIGHT_TP), choices = formatOptions, getFunc = function() return Settings.CustomFormatTwoPT end, setFunc = function(var) Settings.CustomFormatTwoPT = var UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomFormatTwoPT, }, { -- Player Bars Width type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_WIDTH), min = 200, max = 500, step = 5, getFunc = function() return Settings.PlayerBarWidth end, setFunc = function(value) Settings.PlayerBarWidth = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerBarWidth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Player Health Bar Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_HP_HIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.PlayerBarHeightHealth end, setFunc = function(value) Settings.PlayerBarHeightHealth = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerBarHeightHealth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Player Magicka Bar Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_MAG_HIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.PlayerBarHeightMagicka end, setFunc = function(value) Settings.PlayerBarHeightMagicka = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerBarHeightMagicka, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Player Stamina Bar Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_STAM_HIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.PlayerBarHeightStamina end, setFunc = function(value) Settings.PlayerBarHeightStamina = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerBarHeightStamina, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Out-of-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_OOCPACITY), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_OOCPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.PlayerOocAlpha end, setFunc = function(value) Settings.PlayerOocAlpha = value UnitFrames.CustomFramesApplyInCombat() UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerOocAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- In-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_ICPACITY), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_ICPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.PlayerIncAlpha end, setFunc = function(value) Settings.PlayerIncAlpha = value UnitFrames.CustomFramesApplyInCombat() UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerIncAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- HIDE BUFFS OOC - PLAYER type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_BuFFS_PLAYER), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_BuFFS_PLAYER_TP), getFunc = function() return Settings.HideBuffsPlayerOoc end, setFunc = function(value) Settings.HideBuffsPlayerOoc = value UnitFrames.CustomFramesApplyInCombat() end, width = "full", default = Defaults.HideBuffsPlayerOoc, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- Display self name on Player Frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_NAMESELF), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_NAMESELF_TP), getFunc = function() return Settings.PlayerEnableYourname end, setFunc = function(value) Settings.PlayerEnableYourname = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerEnableYourname, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Display Mount/Siege/Werewolf Bar type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_MOUNTSIEGEWWBAR), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_MOUNTSIEGEWWBAR_TP), getFunc = function() return Settings.PlayerEnableAltbarMSW end, setFunc = function(value) Settings.PlayerEnableAltbarMSW = value UnitFrames.CustomFramesSetupAlternative() UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerEnableAltbarMSW, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Display XP/Champion XP Bar type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_XPCPBAR), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_XPCPBAR_TP), getFunc = function() return Settings.PlayerEnableAltbarXP end, setFunc = function(value) Settings.PlayerEnableAltbarXP = value UnitFrames.CustomFramesSetupAlternative() UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerEnableAltbarXP, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Champion XP Bar Point-Type Color type = "checkbox", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_XPCPBARCOLOR)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_XPCPBARCOLOR_TP), getFunc = function() return Settings.PlayerChampionColour end, setFunc = function(value) Settings.PlayerChampionColour = value UnitFrames.OnChampionPointGained() UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerChampionColour, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.PlayerEnableAltbarXP ) end, }, { -- Custom Unit Frames Low Health Warning type = "slider", name = GetString(SI_LUIE_LAM_UF_LOWRESOURCE_HEALTH), tooltip = GetString(SI_LUIE_LAM_UF_LOWRESOURCE_HEALTH_TP), min = 0, max = 50, step = 1, getFunc = function() return Settings.LowResourceHealth end, setFunc = function(value) Settings.LowResourceHealth = value UnitFrames.CustomFramesReloadLowResourceThreshold() end, width = "full", default = Defaults.LowResourceHealth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Custom Unit Frames Low Magicka Warning type = "slider", name = GetString(SI_LUIE_LAM_UF_LOWRESOURCE_MAGICKA), tooltip = GetString(SI_LUIE_LAM_UF_LOWRESOURCE_MAGICKA_TP), min = 0, max = 50, step = 1, getFunc = function() return Settings.LowResourceMagicka end, setFunc = function(value) Settings.LowResourceMagicka = value UnitFrames.CustomFramesReloadLowResourceThreshold() end, width = "full", default = Defaults.LowResourceMagicka, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Custom Unit Frames Low Stamina Warning type = "slider", name = GetString(SI_LUIE_LAM_UF_LOWRESOURCE_STAMINA), tooltip = GetString(SI_LUIE_LAM_UF_LOWRESOURCE_STAMINA_TP), min = 0, max = 50, step = 1, getFunc = function() return Settings.LowResourceStamina end, setFunc = function(value) Settings.LowResourceStamina = value UnitFrames.CustomFramesReloadLowResourceThreshold() end, width = "full", default = Defaults.LowResourceStamina, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Target Bars Width type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_WIDTH), min = 200, max = 500, step = 5, getFunc = function() return Settings.TargetBarWidth end, setFunc = function(value) Settings.TargetBarWidth = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetBarWidth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesTarget ) end, }, { -- Target Bars Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_HEIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.TargetBarHeight end, setFunc = function(value) Settings.TargetBarHeight = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetBarHeight, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesTarget ) end, }, { -- Out-of-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_OOCPACITY), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_OOCPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.TargetOocAlpha end, setFunc = function(value) Settings.TargetOocAlpha = value UnitFrames.CustomFramesApplyInCombat() UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetOocAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- In-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_ICPACITY), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_ICPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.TargetIncAlpha end, setFunc = function(value) Settings.TargetIncAlpha = value UnitFrames.CustomFramesApplyInCombat() UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetIncAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- HIDE BUFFS OOC - TARGET type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_BUFFS_TARGET), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_BUFFS_TARGET_TP), getFunc = function() return Settings.HideBuffsTargetOoc end, setFunc = function(value) Settings.HideBuffsTargetOoc = value UnitFrames.CustomFramesApplyInCombat() end, width = "full", default = Defaults.HideBuffsTargetOoc, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- Color Target by Reaction type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_REACTION_TARGET), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_REACTION_TARGET_TP), getFunc = function() return Settings.FrameColorReaction end, setFunc = function(value) Settings.FrameColorReaction = value UnitFrames.CustomFramesApplyReactionColor() end, width = "full", default = Defaults.FrameColorReaction, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesTarget ) end, }, { -- Color Target by Class type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_CLASS_TARGET), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_CLASS_TARGET_TP), getFunc = function() return Settings.FrameColorClass end, setFunc = function(value) Settings.FrameColorClass = value UnitFrames.CustomFramesApplyReactionColor() end, width = "full", default = Defaults.FrameColorClass, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesTarget ) end, }, { -- Display Target Class Label type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_CLASSLABEL), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TARGET_CLASSLABEL_TP), getFunc = function() return Settings.TargetEnableClass end, setFunc = function(value) Settings.TargetEnableClass = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetEnableClass, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesTarget ) end, }, { -- Execute Health % Threshold type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_EXETHRESHOLD), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_EXETHRESHOLD_TP), min = 0, max = 50, step = 5, getFunc = function() return Settings.ExecutePercentage end, setFunc = function(value) Settings.ExecutePercentage = value UnitFrames.CustomFramesReloadExecuteMenu() end, width = "full", default = Defaults.ExecutePercentage, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesTarget ) end, }, { -- Display Skull Execute Texture type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_EXETEXTURE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_EXETEXTURE_TP), getFunc = function() return Settings.TargetEnableSkull end, setFunc = function(value) Settings.TargetEnableSkull = value end, width = "full", default = Defaults.TargetEnableSkull, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesTarget ) end, }, { -- Display title on target frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TITLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_TITLE_TP), getFunc = function() return Settings.TargetEnableTitle end, setFunc = function(value) Settings.TargetEnableTitle = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetEnableTitle, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Display rank name on target frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_RANK), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_RANK_TP), getFunc = function() return Settings.TargetEnableRank end, setFunc = function(value) Settings.TargetEnableRank = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetEnableRank, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Prioritize Title or AvA Rank type = 'dropdown', name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_RANK_TITLE_PRIORITY)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_RANK_TITLE_PRIORITY_TP), choices = { "AVA Rank", "Title" }, getFunc = function() return Settings.TargetTitlePriority end, setFunc = function(value) Settings.TargetTitlePriority = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetTitlePriority, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.TargetEnableRank and Settings.TargetEnableTitle) end, }, { -- Display rank icon on target frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_RANKICON), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_RANKICON_TP), getFunc = function() return Settings.TargetEnableRankIcon end, setFunc = function(value) Settings.TargetEnableRankIcon = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.TargetEnableRankIcon, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Display Armor stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_ARMOR), GetString(SI_LUIE_LAM_UF_SHARED_PT)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_ARMOR_TP), getFunc = function() return Settings.PlayerEnableArmor end, setFunc = function(value) Settings.PlayerEnableArmor = value end, width = "full", default = Defaults.PlayerEnableArmor, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- Display Power stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_POWER), GetString(SI_LUIE_LAM_UF_SHARED_PT)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_POWER_TP), getFunc = function() return Settings.PlayerEnablePower end, setFunc = function(value) Settings.PlayerEnablePower = value end, width = "full", default = Defaults.PlayerEnablePower, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, { -- Custom Unit Frames Display HoT / DoT Animations type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_REGEN), GetString(SI_LUIE_LAM_UF_SHARED_PT)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_REGEN_TP), getFunc = function() return Settings.PlayerEnableRegen end, setFunc = function(value) Settings.PlayerEnableRegen = value end, width = "full", default = Defaults.PlayerEnableRegen, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Treat Missing Power as In-Combat type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_MISSPOWERCOMBAT), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_MISSPOWERCOMBAT_TP), getFunc = function() return Settings.CustomOocAlphaPower end, setFunc = function(value) Settings.CustomOocAlphaPower = value UnitFrames.CustomFramesApplyInCombat() end, width = "full", default = Defaults.CustomOocAlphaPower, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and ( Settings.CustomFramesPlayer or Settings.CustomFramesTarget ) ) end, }, }, } -- Unit Frames -- Custom Unit Frames Bar Alignment optionsDataUnitFrames[#optionsDataUnitFrames +1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_HEADER), controls = { { -- Alignment Player Health Bar type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_PLAYER_HEALTH), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_PLAYER_HEALTH_TP), choices = alignmentOptions, getFunc = function() return alignmentOptions[Settings.BarAlignPlayerHealth] end, setFunc = function(value) Settings.BarAlignPlayerHealth = alignmentOptionsKeys[value] UnitFrames.CustomFramesApplyBarAlignment() end, width = "full", default = Defaults.BarAlignPlayerHealth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Alignment Player Magicka Bar type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_PLAYER_MAGICKA), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_PLAYER_MAGICKA_TP), choices = alignmentOptions, getFunc = function() return alignmentOptions[Settings.BarAlignPlayerMagicka] end, setFunc = function(value) Settings.BarAlignPlayerMagicka = alignmentOptionsKeys[value] UnitFrames.CustomFramesApplyBarAlignment() end, width = "full", default = Defaults.BarAlignPlayerMagicka, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Alignment Player Stamina Bar type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_PLAYER_STAMINA), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_PLAYER_STAMINA_TP), choices = alignmentOptions, getFunc = function() return alignmentOptions[Settings.BarAlignPlayerStamina] end, setFunc = function(value) Settings.BarAlignPlayerStamina = alignmentOptionsKeys[value] UnitFrames.CustomFramesApplyBarAlignment() end, width = "full", default = Defaults.BarAlignPlayerStamina, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Alignment Target Health Bar type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_TARGET), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_TARGET_TP), choices = alignmentOptions, getFunc = function() return alignmentOptions[Settings.BarAlignTarget] end, setFunc = function(value) Settings.BarAlignTarget = alignmentOptionsKeys[value] UnitFrames.CustomFramesApplyBarAlignment() end, width = "full", default = Defaults.BarAlignTarget, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Center Label for Player Bars type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_LABEL_PLAYER), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_LABEL_PLAYER_TP), getFunc = function() return Settings.BarAlignCenterLabelPlayer end, setFunc = function(value) Settings.BarAlignCenterLabelPlayer = value UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.BarAlignCenterLabelPlayer, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Center Label for Target Bar type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_LABEL_TARGET), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_LABEL_TARGET_TP), getFunc = function() return Settings.BarAlignCenterLabelTarget end, setFunc = function(value) Settings.BarAlignCenterLabelTarget = value UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.BarAlignCenterLabelTarget, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Custom Unit Frames format left label type = "dropdown", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_LABEL_CENTER_FORM)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_ALIGN_LABEL_CENTER_FORM), choices = formatOptions, getFunc = function() return Settings.CustomFormatCenterLabel end, setFunc = function(var) Settings.CustomFormatCenterLabel = var UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = Defaults.CustomFormatCenterLabel, }, }, } -- Unit Frames - Additional Player Frame Display Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_OPTIONS_HEADER), controls = { { -- Player Frames Display Method type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_METHOD), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_METHOD_TP), choices = playerFrameOptions, getFunc = function() return playerFrameOptions[Settings.PlayerFrameOptions] end, setFunc = function(value) Settings.PlayerFrameOptions = playerFrameOptionsKeys[value] UnitFrames.MenuUpdatePlayerFrameOptions(Settings.PlayerFrameOptions) end, width = "full", warning = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_METHOD_WARN), default = Defaults.PlayerFrameOptions, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Position Adjust Horizontal type = "slider", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_S_HORIZ_ADJUST)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_S_HORIZ_ADJUST_TP), min = 0, max = 500, step = 5, getFunc = function() return Settings.AdjustStaminaHPos end, setFunc = function(value) Settings.AdjustStaminaHPos = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.AdjustStaminaHPos, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.PlayerFrameOptions == 2 ) end, }, { -- Position Adjust Vertical type = "slider", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_S_VERT_ADJUST)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_S_VERT_ADJUST_TP), min = -250, max = 250, step = 5, getFunc = function() return Settings.AdjustStaminaVPos end, setFunc = function(value) Settings.AdjustStaminaVPos = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.AdjustStaminaVPos, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.PlayerFrameOptions == 2 ) end, }, { -- Position Adjust type = "slider", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_M_HORIZ_ADJUST)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_M_HORIZ_ADJUST_TP), min = 0, max = 500, step = 5, getFunc = function() return Settings.AdjustMagickaHPos end, setFunc = function(value) Settings.AdjustMagickaHPos = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.AdjustMagickaHPos, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.PlayerFrameOptions == 2 ) end, }, { -- Position Adjust type = "slider", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_M_VERT_ADJUST)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_M_VERT_ADJUST_TP), min = -250, max = 250, step = 5, getFunc = function() return Settings.AdjustMagickaVPos end, setFunc = function(value) Settings.AdjustMagickaVPos = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.AdjustMagickaVPos, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.PlayerFrameOptions == 2 ) end, }, { -- Spacing between Player Bars type = "slider", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_SPACING)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_SPACING_TP), min = -1, max = 4, step = 1, getFunc = function() return Settings.PlayerBarSpacing end, setFunc = function(value) Settings.PlayerBarSpacing = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.PlayerBarSpacing, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and ( Settings.PlayerFrameOptions == 1 or Settings.PlayerFrameOptions == 3 ) ) end, }, { -- Hide Player Health Bar Label type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_HP_NOLABEL), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_HP_NOLABEL_TP), getFunc = function() return Settings.HideLabelHealth end, setFunc = function(value) Settings.HideLabelHealth = value Settings.HideBarHealth = false end, width = "full", default = Defaults.HideLabelHealth, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Hide Player Health Bar type = "checkbox", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_HP_NOBAR)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_HP_NOBAR_TP), getFunc = function() return Settings.HideBarHealth end, setFunc = function(value) Settings.HideBarHealth = value end, width = "full", default = Defaults.HideBarHealth, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.HideLabelHealth ) end, }, { -- Hide Player Magicka Bar Label type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_MAG_NOLABEL), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_MAG_NOLABEL_TP), getFunc = function() return Settings.HideLabelMagicka end, setFunc = function(value) Settings.HideLabelMagicka = value Settings.HideBarMagicka = false end, width = "full", default = Defaults.HideLabelMagicka, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Hide Player Magicka Bar type = "checkbox", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_MAG_NOBAR)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_MAG_NOBAR_TP), getFunc = function() return Settings.HideBarMagicka end, setFunc = function(value) Settings.HideBarMagicka = value end, width = "full", default = Defaults.HideBarMagicka, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.HideLabelMagicka ) end, }, { -- Hide Player Stamina Bar Label type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_STAM_NOLABEL), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_STAM_NOLABEL_TP), getFunc = function() return Settings.HideLabelStamina end, setFunc = function(value) Settings.HideLabelStamina = value Settings.HideBarStamina = false end, width = "full", default = Defaults.HideLabelStamina, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, { -- Hide Player Stamina Bar type = "checkbox", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_STAM_NOBAR)), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_STAM_NOBAR_TP), getFunc = function() return Settings.HideBarStamina end, setFunc = function(value) Settings.HideBarStamina = value end, width = "full", default = Defaults.HideBarStamina, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer and Settings.HideLabelStamina ) end, }, { -- Reverse Player Magicka and Stamina type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_REVERSE_RES), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPT_PLAYER_REVERSE_RES_TP), getFunc = function() return Settings.ReverseResourceBars end, setFunc = function(value) Settings.ReverseResourceBars = value end, width = "full", default = Defaults.ReverseResourceBars, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPlayer ) end, }, }, } -- Unit Frames - Custom Unit Frames (Group) Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMESG_HEADER), controls = { { -- Enable Group Frames type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESG_LUIEFRAMESENABLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESG_LUIEFRAMESENABLE_TP), getFunc = function() return Settings.CustomFramesGroup end, setFunc = function(value) Settings.CustomFramesGroup = value end, width = "full", default = Defaults.CustomFramesGroup, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Player Name Display Method (Group/Raid) type = "dropdown", name = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_GROUPRAID), tooltip = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_GROUPRAID_TP), choices = nameDisplayOptions, getFunc = function() return nameDisplayOptions[Settings.DisplayOptionsGroupRaid] end, setFunc = function(value) Settings.DisplayOptionsGroupRaid = nameDisplayOptionsKeys[value] UnitFrames.CustomFramesReloadControlsMenu(false, true, true) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = nameDisplayOptions[2] }, { -- Custom Unit Frames format left label type = "dropdown", name = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_LEFT), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_LEFT_TP), choices = formatOptions, getFunc = function() return Settings.CustomFormatOneGroup end, setFunc = function(var) Settings.CustomFormatOneGroup = var UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutGroup(true) end, width = "full", disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, default = Defaults.CustomFormatOneGroup, }, { -- Custom Unit Frames format right label type = "dropdown", name = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_RIGHT), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_RIGHT_TP), choices = formatOptions, getFunc = function() return Settings.CustomFormatTwoGroup end, setFunc = function(var) Settings.CustomFormatTwoGroup = var UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutGroup(true) end, width = "full", disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, default = Defaults.CustomFormatTwoGroup, }, { -- Group Bars Width type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESG_WIDTH), min = 100, max = 400, step = 5, getFunc = function() return Settings.GroupBarWidth end, setFunc = function(value) Settings.GroupBarWidth = value UnitFrames.CustomFramesApplyLayoutGroup(true) end, width = "full", default = Defaults.GroupBarWidth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Group Bars Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESG_HEIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.GroupBarHeight end, setFunc = function(value) Settings.GroupBarHeight = value UnitFrames.CustomFramesApplyLayoutGroup(true) end, width = "full", default = Defaults.GroupBarHeight, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Group / Raid ALPHA type = "slider", name = GetString(SI_LUIE_LAM_UF_SHARED_GROUPRAID_OPACITY), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_GROUPRAID_OPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.GroupAlpha end, setFunc = function(value) Settings.GroupAlpha = value UnitFrames.CustomFramesGroupAlpha() UnitFrames.CustomFramesApplyLayoutGroup(true) end, width = "full", default = Defaults.GroupAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Spacing between Group Bars type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESG_SPACING), min = 20, max = 80, step = 2, getFunc = function() return Settings.GroupBarSpacing end, setFunc = function(value) Settings.GroupBarSpacing = value UnitFrames.CustomFramesApplyLayoutGroup(true) end, width = "full", default = Defaults.GroupBarSpacing, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Include Player in Group Frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESG_INCPLAYER), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESG_INCPLAYER_TP), getFunc = function() return not Settings.GroupExcludePlayer end, setFunc = function(value) Settings.GroupExcludePlayer = (not value) UnitFrames.CustomFramesGroupUpdate() UnitFrames.CustomFramesApplyLayoutGroup(true) UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = not Defaults.GroupExcludePlayer, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Show Role Icon on Group Frames type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESG_ROLEICON), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESG_ROLEICON_TP), getFunc = function() return Settings.RoleIconSmallGroup end, setFunc = function(value) Settings.RoleIconSmallGroup = value UnitFrames.CustomFramesApplyLayoutGroup(true) end, width = "full", default = Defaults.RoleIconSmallGroup, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Custom Unit Frames Group Color Class type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_GFRAMESBYCLASS), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_GFRAMESBYCLASS_TP), getFunc = function() return Settings.ColorClassGroup end, setFunc = function(value) Settings.ColorClassGroup = value UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = Defaults.ColorClassGroup, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Custom Unit Frames Group Color Player Role type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_GFRAMESBYROLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_GFRAMESBYROLE_TP), getFunc = function() return Settings.ColorRoleGroup end, setFunc = function(value) Settings.ColorRoleGroup = value UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = Defaults.ColorRoleGroup, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Display Armor stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_ARMOR), GetString(SI_LUIE_LAM_UF_SHARED_GROUP)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_ARMOR_TP), getFunc = function() return Settings.GroupEnableArmor end, setFunc = function(value) Settings.GroupEnableArmor = value end, width = "full", default = Defaults.GroupEnableArmor, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Display Power stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_POWER), GetString(SI_LUIE_LAM_UF_SHARED_GROUP)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_POWER_TP), getFunc = function() return Settings.GroupEnablePower end, setFunc = function(value) Settings.GroupEnablePower = value end, width = "full", default = Defaults.GroupEnablePower, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, { -- Display Regen Arrows type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_REGEN), GetString(SI_LUIE_LAM_UF_SHARED_GROUP)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_REGEN_TP), getFunc = function() return Settings.GroupEnableRegen end, setFunc = function(value) Settings.GroupEnableRegen = value end, width = "full", default = Defaults.GroupEnableRegen, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesGroup ) end, }, }, } -- Unit Frames - Custom Unit Frames (Raid) Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_HEADER), controls = { { -- Enable Raid Frames type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_LUIEFRAMESENABLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESR_LUIEFRAMESENABLE_TP), getFunc = function() return Settings.CustomFramesRaid end, setFunc = function(value) Settings.CustomFramesRaid = value end, width = "full", default = Defaults.CustomFramesRaid, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Player Name Display Method (Group/Raid) type = "dropdown", name = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_GROUPRAID), tooltip = GetString(SI_LUIE_LAM_UF_COMMON_NAMEDISPLAY_GROUPRAID_TP), choices = nameDisplayOptions, getFunc = function() return nameDisplayOptions[Settings.DisplayOptionsGroupRaid] end, setFunc = function(value) Settings.DisplayOptionsGroupRaid = nameDisplayOptionsKeys[value] UnitFrames.CustomFramesReloadControlsMenu(false, true, true) end, width = "full", disabled = function() return not LUIE.SV.UnitFrames_Enabled end, default = nameDisplayOptions[2] }, { -- Raid HP Bar Format type = "dropdown", name = GetString(SI_LUIE_LAM_UF_SHARED_LABEL), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_TP), choices = formatOptions, getFunc = function() return Settings.CustomFormatRaid end, setFunc = function(var) Settings.CustomFormatRaid = var UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, default = Defaults.CustomFormatRaid, }, { -- Raid Bars Width type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_WIDTH), min = 100, max = 500, step = 5, getFunc = function() return Settings.RaidBarWidth end, setFunc = function(value) Settings.RaidBarWidth = value UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", default = Defaults.RaidBarWidth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Raid Bars Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_HEIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.RaidBarHeight end, setFunc = function(value) Settings.RaidBarHeight = value UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", default = Defaults.RaidBarHeight, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Group / Raid ALPHA type = "slider", name = GetString(SI_LUIE_LAM_UF_SHARED_GROUPRAID_OPACITY), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_GROUPRAID_OPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.GroupAlpha end, setFunc = function(value) Settings.GroupAlpha = value UnitFrames.CustomFramesGroupAlpha() UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", default = Defaults.GroupAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Raid Frame Layout type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_LAYOUT), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESR_LAYOUT_TP), choices = { "1 x 24", "2 x 12", "3 x 8", "4 x 6", "6 x 4" }, -- sort = "name-up", getFunc = function() return Settings.RaidLayout end, setFunc = function(var) Settings.RaidLayout = var UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, default = Defaults.RaidLayout, }, { -- Add Spacer for every 4 members type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_SPACER), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESR_SPACER_TP), getFunc = function() return Settings.RaidSpacers end, setFunc = function(value) Settings.RaidSpacers = value UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", default = Defaults.RaidSpacers, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Raid Name Clip type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_NAMECLIP), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESR_NAMECLIP_TP), min = 0, max = 200, step = 1, getFunc = function() return Settings.RaidNameClip end, setFunc = function(value) Settings.RaidNameClip = value UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", default = Defaults.RaidNameClip, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Class / Role Icon on Raid Frames Setting type = "dropdown", name = GetString(SI_LUIE_LAM_UF_CFRAMESR_ROLEICON), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESR_ROLEICON_TP), choices = raidIconOptions, getFunc = function() return raidIconOptions[Settings.RaidIconOptions] end, setFunc = function(value) Settings.RaidIconOptions = raidIconOptionsKeys[value] UnitFrames.CustomFramesApplyLayoutRaid(true) end, width = "full", default = Defaults.RaidIconOptions, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Custom Unit Frames Raid Color Player Class type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_RFRAMESBYCLASS), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_RFRAMESBYCLASS_TP), getFunc = function() return Settings.ColorClassRaid end, setFunc = function(value) Settings.ColorClassRaid = value UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = Defaults.ColorClassRaid, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Custom Unit Frames Raid Color Player Role type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_RFRAMESBYROLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMES_COLOR_RFRAMESBYROLE_TP), getFunc = function() return Settings.ColorRoleRaid end, setFunc = function(value) Settings.ColorRoleRaid = value UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = Defaults.ColorRoleRaid, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Display Armor stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_ARMOR), GetString(SI_LUIE_LAM_UF_SHARED_RAID)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_ARMOR_TP), getFunc = function() return Settings.RaidEnableArmor end, setFunc = function(value) Settings.RaidEnableArmor = value end, width = "full", default = Defaults.RaidEnableArmor, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Display Power stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_POWER), GetString(SI_LUIE_LAM_UF_SHARED_RAID)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_POWER_TP), getFunc = function() return Settings.RaidEnablePower end, setFunc = function(value) Settings.RaidEnablePower = value end, width = "full", default = Defaults.RaidEnablePower, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, { -- Display Regen Arrows type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_REGEN), GetString(SI_LUIE_LAM_UF_SHARED_RAID)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_REGEN_TP), getFunc = function() return Settings.RaidEnableRegen end, setFunc = function(value) Settings.RaidEnableRegen = value end, width = "full", default = Defaults.RaidEnableRegen, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesRaid ) end, }, }, } -- Unit Frames - Custom Unit Frames (Pet) Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_HEADER), controls = { { -- Enable Pet Frames type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_ENABLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPET_ENABLE_TP), getFunc = function() return Settings.CustomFramesPet end, setFunc = function(value) Settings.CustomFramesPet = value end, width = "full", default = Defaults.CustomFramesPet, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Pet HP Bar Format type = "dropdown", name = GetString(SI_LUIE_LAM_UF_SHARED_LABEL), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_TP), choices = formatOptions, getFunc = function() return Settings.CustomFormatPet end, setFunc = function(var) Settings.CustomFormatPet = var UnitFrames.CustomFramesFormatLabels(true) UnitFrames.CustomFramesApplyLayoutPet(true) end, width = "full", disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPet ) end, default = Defaults.CustomFormatPet, }, { -- Pet Bars Width type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_WIDTH), min = 100, max = 500, step = 5, getFunc = function() return Settings.PetWidth end, setFunc = function(value) Settings.PetWidth = value UnitFrames.CustomFramesApplyLayoutPet(true) end, width = "full", default = Defaults.PetWidth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPet ) end, }, { -- Pet Bars Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_HEIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.PetHeight end, setFunc = function(value) Settings.PetHeight = value UnitFrames.CustomFramesApplyLayoutPet(true) end, width = "full", default = Defaults.PetHeight, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPet ) end, }, { -- Pet - Out-of-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_OOCPACITY), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPET_OOCPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.PetOocAlpha end, setFunc = function(value) Settings.PetOocAlpha = value UnitFrames.CustomFramesApplyInCombat() UnitFrames.CustomFramesApplyLayoutPet(true) end, width = "full", default = Defaults.PetOocAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPet ) end, }, { -- Pet - In-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_ICPACITY), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPET_ICPACITY_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.PetIncAlpha end, setFunc = function(value) Settings.PetIncAlpha = value UnitFrames.CustomFramesApplyInCombat() UnitFrames.CustomFramesApplyLayoutPet(true) end, width = "full", default = Defaults.PetIncAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPet ) end, }, { -- Pet Name Clip type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_NAMECLIP), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPET_NAMECLIP_TP), min = 0, max = 200, step = 1, getFunc = function() return Settings.PetNameClip end, setFunc = function(value) Settings.PetNameClip = value UnitFrames.CustomFramesApplyLayoutPet(true) end, width = "full", default = Defaults.PetNameClip, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPet ) end, }, { -- Pet - Color Target by Class type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPET_USE_CLASS_COLOR), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPET_USE_CLASS_COLOR_TP), getFunc = function() return Settings.PetUseClassColor end, setFunc = function(value) Settings.PetUseClassColor = value UnitFrames.CustomFramesApplyColours(true) end, width = "full", default = Defaults.PetUseClassColor, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesPet ) end, }, { -- Unit Frames Pet Whitelist Header type = "header", name = GetString(SI_LUIE_CUSTOM_LIST_UF_WHITELIST), }, { -- Unit Frames Pet Whitelist Description type = "description", text = GetString(SI_LUIE_LAM_UF_BLACKLIST_DESCRIPT), }, -- Add Pet Names - Necromancer { type = "button", name = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_NECROMANCER), tooltip = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_NECROMANCER_TP), func = function() UnitFrames.AddBulkToCustomList(Settings.whitelist, PetNames.Necromancer) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, width = "half", }, -- Add Pet Names - Sorcerer { type = "button", name = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_SORCERER), tooltip = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_SORCERER_TP), func = function() UnitFrames.AddBulkToCustomList(Settings.whitelist, PetNames.Sorcerer) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, width = "half", }, -- Add Pet Names - Warden { type = "button", name = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_WARDEN), tooltip = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_WARDEN_TP), func = function() UnitFrames.AddBulkToCustomList(Settings.whitelist, PetNames.Warden) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, width = "half", }, -- Add Pet Names - Sets { type = "button", name = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_SETS), tooltip = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_SETS_TP), func = function() UnitFrames.AddBulkToCustomList(Settings.whitelist, PetNames.Sets) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, width = "half", }, -- Add Pet Names - Assistants { type = "button", name = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_ASSISTANTS), tooltip = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_ASSISTANTS_TP), func = function() UnitFrames.AddBulkToCustomList(Settings.whitelist, PetNames.Assistants) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, width = "half", }, -- Add All Currently Active Pets { type = "button", name = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_CURRENT), tooltip = GetString(SI_LUIE_LAM_UF_WHITELIST_ADD_CURRENT_TP), func = function() UnitFrames.AddCurrentPetsToCustomList(Settings.whitelist) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, width = "half", }, -- Clear Whitelist { type = "button", name = GetString(SI_LUIE_LAM_UF_WHITELIST_CLEAR), tooltip = GetString(SI_LUIE_LAM_UF_WHITELIST_CLEAR_TP), func = function() UnitFrames.ClearCustomList(Settings.whitelist) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, width = "half", }, { -- Unit Frames Pet Whitelist (Add) type = "editbox", name = GetString(SI_LUIE_LAM_UF_BLACKLIST_ADDLIST), tooltip = GetString(SI_LUIE_LAM_UF_BLACKLIST_ADDLIST_TP), getFunc = function() end, setFunc = function(value) UnitFrames.AddToCustomList(Settings.whitelist, value) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, }, { -- Unit Frames Pet (Remove) type = "dropdown", name = GetString(SI_LUIE_LAM_UF_BLACKLIST_REMLIST), tooltip = GetString(SI_LUIE_LAM_UF_BLACKLIST_REMLIST_TP), choices = Whitelist, choicesValues = WhitelistValues, scrollable = true, sort = "name-up", getFunc = function() LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) end, setFunc = function(value) UnitFrames.RemoveFromCustomList(Settings.whitelist, value) LUIE_WhitelistUF:UpdateChoices(GenerateCustomList(Settings.whitelist)) UnitFrames.CustomPetUpdate() end, reference = "LUIE_WhitelistUF" }, }, } -- Unit Frames - Custom Unit Frames (Boss) Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMESB_HEADER), controls = { { -- Enable This Addon BOSS frames type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESB_LUIEFRAMESENABLE), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESB_LUIEFRAMESENABLE_TP), getFunc = function() return Settings.CustomFramesBosses end, setFunc = function(value) Settings.CustomFramesBosses = value end, width = "full", default = Defaults.CustomFramesBosses, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Boss HP Bar Format type = "dropdown", name = GetString(SI_LUIE_LAM_UF_SHARED_LABEL), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_LABEL_TP), choices = formatOptions, getFunc = function() return Settings.CustomFormatBoss end, setFunc = function(var) Settings.CustomFormatBoss = var UnitFrames.CustomFramesFormatLabels(true) end, width = "full", disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, default = Defaults.CustomFormatBoss, }, { -- Boss Bars Width type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESB_WIDTH), min = 100, max = 500, step = 5, getFunc = function() return Settings.BossBarWidth end, setFunc = function(value) Settings.BossBarWidth = value UnitFrames.CustomFramesApplyLayoutBosses() end, width = "full", default = Defaults.BossBarWidth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, }, { -- Boss Bars Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESB_HEIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.BossBarHeight end, setFunc = function(value) Settings.BossBarHeight = value UnitFrames.CustomFramesApplyLayoutBosses() end, width = "full", default = Defaults.BossBarHeight, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, }, { -- Out-of-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESB_OPACITYOOC), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESB_OPACITYOOC_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.BossOocAlpha end, setFunc = function(value) Settings.BossOocAlpha = value UnitFrames.CustomFramesApplyInCombat() end, width = "full", default = Defaults.BossOocAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, }, { -- In-Combat frame opacity type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESB_OPACITYIC), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESB_OPACITYIC_TP), min = 0, max = 100, step = 5, getFunc = function() return Settings.BossIncAlpha end, setFunc = function(value) Settings.BossIncAlpha = value UnitFrames.CustomFramesApplyInCombat() end, width = "full", default = Defaults.BossIncAlpha, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, }, { -- Display Armor stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_ARMOR), GetString(SI_LUIE_LAM_UF_SHARED_BOSS)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_ARMOR_TP), getFunc = function() return Settings.BossEnableArmor end, setFunc = function(value) Settings.BossEnableArmor = value end, width = "full", default = Defaults.BossEnableArmor, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, }, { -- Display Power stat change type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_POWER), GetString(SI_LUIE_LAM_UF_SHARED_BOSS)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_POWER_TP), getFunc = function() return Settings.BossEnablePower end, setFunc = function(value) Settings.BossEnablePower = value end, width = "full", default = Defaults.BossEnablePower, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, }, { -- Display Regen Arrows type = "checkbox", name = zo_strformat(GetString(SI_LUIE_LAM_UF_SHARED_REGEN), GetString(SI_LUIE_LAM_UF_SHARED_BOSS)), tooltip = GetString(SI_LUIE_LAM_UF_SHARED_REGEN_TP), getFunc = function() return Settings.BossEnableRegen end, setFunc = function(value) Settings.BossEnableRegen = value end, width = "full", default = Defaults.BossEnableRegen, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.CustomFramesBosses ) end, }, }, } -- Unit Frames - Custom Unit Frames (PvP Target Frame) Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_CFRAMESPVP_HEADER), controls = { { -- Enable additional PvP Target frame type = "checkbox", name = GetString(SI_LUIE_LAM_UF_CFRAMESPVP_TARGETFRAME), tooltip = GetString(SI_LUIE_LAM_UF_CFRAMESPVP_TARGETFRAME_TP), getFunc = function() return Settings.AvaCustFramesTarget end, setFunc = function(value) Settings.AvaCustFramesTarget = value end, width = "full", default = Defaults.AvaCustFramesTarget, warning = GetString(SI_LUIE_LAM_RELOADUI_WARNING), disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- PvP Target Bars Width type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPVP_TARGETFRAME_WIDTH), min = 300, max = 700, step = 5, getFunc = function() return Settings.AvaTargetBarWidth end, setFunc = function(value) Settings.AvaTargetBarWidth = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.AvaTargetBarWidth, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.AvaCustFramesTarget ) end, }, { -- PvP Target Bars Height type = "slider", name = GetString(SI_LUIE_LAM_UF_CFRAMESPVP_TARGETFRAME_HEIGHT), min = 20, max = 70, step = 1, getFunc = function() return Settings.AvaTargetBarHeight end, setFunc = function(value) Settings.AvaTargetBarHeight = value UnitFrames.CustomFramesApplyLayoutPlayer(true) end, width = "full", default = Defaults.AvaTargetBarHeight, disabled = function() return not ( LUIE.SV.UnitFrames_Enabled and Settings.AvaCustFramesTarget ) end, }, }, } -- Unit Frames - Common Options Submenu optionsDataUnitFrames[#optionsDataUnitFrames + 1] = { type = "submenu", name = GetString(SI_LUIE_LAM_UF_COMMON_HEADER), controls = { { -- Shorten numbers type = "checkbox", name = GetString(SI_LUIE_LAM_UF_SHORTNUMBERS), tooltip = GetString(SI_LUIE_LAM_UF_SHORTNUMBERS_TP), getFunc = function() return Settings.ShortenNumbers end, setFunc = function(value) Settings.ShortenNumbers = value UnitFrames.CustomFramesFormatLabels(true) end, width = "full", default = Defaults.ShortenNumbers, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Default Caption Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_COMMON_CAPTIONCOLOR), getFunc = function() return unpack(Settings.Target_FontColour) end, setFunc = function(r,g,b,a) Settings.Target_FontColour={r,g,b} end, width = "full", default = { r=Defaults.Target_FontColour[1], g=Defaults.Target_FontColour[2], b=Defaults.Target_FontColour[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Friendly NPC Font Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_COMMON_NPCFONTCOLOR), getFunc = function() return unpack(Settings.Target_FontColour_FriendlyNPC) end, setFunc = function(r,g,b,a) Settings.Target_FontColour_FriendlyNPC={r,g,b} end, width = "full", default = { r=Defaults.Target_FontColour_FriendlyNPC[1], g=Defaults.Target_FontColour_FriendlyNPC[2], b=Defaults.Target_FontColour_FriendlyNPC[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Friendly Player Font Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_COMMON_PLAYERFONTCOLOR), getFunc = function() return unpack(Settings.Target_FontColour_FriendlyPlayer) end, setFunc = function(r,g,b,a) Settings.Target_FontColour_FriendlyPlayer={r,g,b} end, width = "full", default = { r=Defaults.Target_FontColour_FriendlyPlayer[1], g=Defaults.Target_FontColour_FriendlyPlayer[2], b=Defaults.Target_FontColour_FriendlyPlayer[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Hostile Font Color type = "colorpicker", name = GetString(SI_LUIE_LAM_UF_COMMON_HOSTILEFONTCOLOR), getFunc = function() return unpack(Settings.Target_FontColour_Hostile) end, setFunc = function(r,g,b,a) Settings.Target_FontColour_Hostile={r,g,b} end, width = "full", default = { r=Defaults.Target_FontColour_Hostile[1], g=Defaults.Target_FontColour_Hostile[2], b=Defaults.Target_FontColour_Hostile[3] }, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Apply same settings to reticle type = "checkbox", name = GetString(SI_LUIE_LAM_UF_COMMON_RETICLECOLOR), tooltip = GetString(SI_LUIE_LAM_UF_COMMON_RETICLECOLOR_TP), getFunc = function() return Settings.ReticleColourByReaction end, setFunc = UnitFrames.ReticleColourByReaction, width = "full", default = Defaults.ReticleColourByReaction, disabled = function() return not LUIE.SV.UnitFrames_Enabled end, }, { -- Interactible Reticle Color type = "colorpicker", name = zo_strformat("\t\t\t\t\t<<1>>", GetString(SI_LUIE_LAM_UF_COMMON_RETICLECOLORINTERACT)), getFunc = function() return unpack(Settings.ReticleColour_Interact) end, setFunc = function(r,g,b,a) Settings.ReticleColour_Interact={r,g,b} end, width = "full", default = { r=Defaults.ReticleColour_Interact[1], g=Defaults.ReticleColour_Interact[2], b=Defaults.ReticleColour_Interact[3] }, disabled = function() return not (LUIE.SV.UnitFrames_Enabled and Settings.ReticleColourByReaction) end, }, }, } -- Register the settings panel if LUIE.SV.UnitFrames_Enabled then LAM:RegisterAddonPanel(LUIE.name .. 'UnitFramesOptions', panelDataUnitFrames) LAM:RegisterOptionControls(LUIE.name .. 'UnitFramesOptions', optionsDataUnitFrames) end end
local awful = require('awful') local gears = require('gears') local config_dir = gears.filesystem.get_configuration_dir() local colorschemes_dir = os.getenv('HOME') .. '/.config/awesome/themes/colorschemes/' local xresources = require('beautiful.xresources') local dpi = xresources.apply_dpi local Themes_path = config_dir .. '/awesome/themes/' local theme = {} -- Font theme.font = 'Open Sans 11' -- Define 16 colors base local ColorScheme = {} for line in io.lines(colorschemes_dir .. 'Doom_One_Dark' .. '.conf') do table.insert(ColorScheme, line) end theme.color2 = ColorScheme[7] theme.color3 = ColorScheme[9] theme.color4 = ColorScheme[11] theme.color5 = ColorScheme[13] theme.color6 = ColorScheme[15] theme.color7 = ColorScheme[17] theme.color9 = ColorScheme[6] theme.color11 = ColorScheme[10] theme.color12 = ColorScheme[12] theme.color13 = ColorScheme[14] theme.color14 = ColorScheme[16] theme.bg_normal = ColorScheme[1] .. 'd0' theme.fg_normal = ColorScheme[2] theme.bg_empty = ColorScheme[18] .. '2f' theme.fg_urgent = ColorScheme[5] theme.fg_occupied = ColorScheme[5] theme.taglist_fg_occupied = ColorScheme[7] theme.taglist_bg_occupied = nil theme.taglist_bg_empty = nil theme.taglist_bg_focus = theme.fg_occupied theme.bg_systray = theme.bg_normal -- Border colors theme.border_width = dpi(1) theme.border_normal = theme.bg_normal theme.border_focus = theme.fg_occupied -- tooltip theme.tooltip_border_color = theme.border_focus theme.tooltip_bg = theme.bg_normal theme.tooltip_fg = theme.fg_normal theme.tooltip_font = theme.font theme.tooltip_border_width = dpi(0) theme.tooltip_opacity = 0.85 theme.tooltip_align = 'top' -- wibar theme.wibar_fg = theme.fg_normal theme.wibar_border_width = dpi(0) theme.wibar_border_color = theme.border_focus -- hotkeys theme.hotkeys_bg = theme.bg_normal theme.hotkeys_font = theme.font theme.hotkeys_fg = theme.fg_normal theme.hotkeys_border_width = dpi(1) theme.hotkeys_border_color = theme.border_focus theme.hotkeys_opacity = 0.85 theme.hotkeys_modifiers_fg = theme.border_focus theme.hotkeys_description_font = theme.font theme.hotkeys_shape = function(cr, width, height) gears.shape.rounded_rect(cr, width, height, awful.screen.focused().geometry.width * 0.004) end -- tasklist theme.tasklist_fg_focus = theme.fg_normal theme.tasklist_bg_normal = theme.bg_empty theme.tasklist_disable_icon = true theme.tasklist_plain_task_name = true theme.tasklist_font = theme.font theme.tasklist_align = 'center' theme.icon_theme = '/usr/share/icons/Papirus-Dark/48x48/apps' theme.layout_fairh = Themes_path..'layouts/fairhw.png' theme.layout_fairv = Themes_path..'layouts/fairvw.png' theme.layout_floating = Themes_path..'layouts/floatingw.png' theme.layout_max = Themes_path..'layouts/maxw.png' theme.layout_fullscreen = Themes_path..'layouts/fullscreenw.png' theme.layout_tilebottom = Themes_path..'layouts/tilebottomw.png' theme.layout_tile = Themes_path..'layouts/tilew.png' theme.layout_spiral = Themes_path..'layouts/spiralw.png' theme.layout_dwindle = Themes_path..'layouts/dwindlew.png' -- menu theme.menu_font = 'Inter 12' theme.menu_height = dpi(20) theme.menu_width = dpi(160) theme.menu_border_color = '#0000' theme.menu_border_width = dpi(2) theme.menu_submenu = "ᐅ " -- current temp theme.temp_cold = ColorScheme[11] theme.temp_norm = ColorScheme[9] theme.temp_hot = ColorScheme[5] theme.temp_min = ColorScheme[15] theme.temp_max = ColorScheme[14] theme.titlebar_bg = theme.border_focus theme.titlebar_fg = theme.fg_normal theme.titlebar_close_button_normal = "/home/hisham/.config/awesome/icons/buttons/close.svg" theme.titlebar_close_button_focus = "/home/hisham/.config/awesome/icons/buttons/close.svg" theme.titlebar_sticky_button_normal_inactive = "/home/hisham/.config/awesome/icons/buttons/sticky_button.svg" theme.titlebar_sticky_button_focus_inactive = "/home/hisham/.config/awesome/icons/buttons/sticky_button.svg" theme.titlebar_sticky_button_normal_active = "/home/hisham/.config/awesome/icons/buttons/sticky_button.svg" theme.titlebar_sticky_button_focus_active = "/home/hisham/.config/awesome/icons/buttons/sticky_button.svg" theme.titlebar_floating_button_normal_inactive = "/home/hisham/.config/awesome/icons/buttons/floating_button.svg" theme.titlebar_floating_button_focus_inactive = "/home/hisham/.config/awesome/icons/buttons/floating_button.svg" theme.titlebar_floating_button_normal_active = "/home/hisham/.config/awesome/icons/buttons/floating_button.svg" theme.titlebar_floating_button_focus_active = "/home/hisham/.config/awesome/icons/buttons/floating_button.svg" theme.titlebar_maximized_button_normal_inactive = "/home/hisham/.config/awesome/icons/buttons/maximize.svg" theme.titlebar_maximized_button_focus_inactive = "/home/hisham/.config/awesome/icons/buttons/maximize.svg" theme.titlebar_maximized_button_normal_active = "/home/hisham/.config/awesome/icons/buttons/maximize.svg" theme.titlebar_maximized_button_focus_active = "/home/hisham/.config/awesome/icons/buttons/maximize.svg" -- Configure the window switcher theme.window_switcher_widget_bg = theme.bg_normal -- The bg color of the widget theme.window_switcher_widget_border_width = dpi(1) -- The border width of the widget theme.window_switcher_widget_border_radius = dpi(8) -- The border radius of the widget theme.window_switcher_widget_border_color = theme.border_focus -- The border color of the widget theme.window_switcher_clients_spacing = 20 -- The space between each client item theme.window_switcher_client_icon_horizontal_spacing = 5 -- The space between client icon and text theme.window_switcher_client_width = 350 -- The width of one client widget theme.window_switcher_client_height = 350 -- The height of one client widget theme.window_switcher_client_margins = 10 -- The margin between the content and the border of the widget theme.window_switcher_thumbnail_margins = 10 -- The margin between one client thumbnail and the rest of the widget theme.thumbnail_scale = true -- If set to true, the thumbnails fit policy will be set to "fit" instead of "auto" theme.window_switcher_name_margins = 10 -- The margin of one clients title to the rest of the widget theme.window_switcher_name_valign = "center" -- How to vertically align one clients title theme.window_switcher_name_forced_width = 200 -- The width of one title theme.window_switcher_name_font = "Inter 10" -- The font of all titles theme.window_switcher_name_normal_color = theme.fg_normal -- The color of one title if the client is unfocused theme.window_switcher_name_focus_color = ColorScheme[14] -- The color of one title if the client is focused theme.window_switcher_icon_valign = "center" -- How to vertically align the one icon theme.window_switcher_icon_width = 40 return theme
function test() print( "hello" ) end
GM = GM or GAMEMODE local PLUGIN = {} timer.Simple(1, function() OUTFIT_REGISTERED = { -- EXTENDED ENHANCED CITIZEN SUPPORT efemale = { { name = "model", }, { name = "face", outfits = function(entity) local faces = {} local mdl = entity:GetModel() local woo = OUTFIT_DATA[mdl:lower()] if (!woo) then return faces end local facemaps = woo.skins for i = 1, facemaps do table.insert(faces, {data = (i - 1), name = "facemap", price = 9500}) end return faces end, func = function(entity, outfit, orig) if (outfit) then local facemap = tonumber(outfit.data) if (facemap) then entity:SetSkin(facemap) end end end, }, { bodygroup = 4, name = "head", outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 1, name = "bodygroup", price = 4500}, {data = 2, name = "bodygroup", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { name = "torso", bodygroup = 1, outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 5, name = "bodygroup", price = 4500}, {data = 6, name = "bodygroup", price = 4500}, {data = 7, name = "bodygroup", price = 4500}, {data = 8, name = "bodygroup", price = 4500}, {data = 9, name = "bodygroup", price = 4500}, {data = 15, name = "bodygroup", price = 4500}, {data = 16, name = "bodygroup", price = 4500}, {data = 17, name = "bodygroup", price = 4500}, {data = "citizensheetf/scrubs1_shtfe",name = "sheet", price = 4500}, {data = "citizensheetf/scrubs2_shtfe", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_01", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_02", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_03", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_04", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_05", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_06", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_07", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_08", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_09", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_10", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_11", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_12", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_13", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_14", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_15", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_suit", name = "sheet", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local find = "models/bloo_ltcom_zel/citizens/female/citizen_sheet" local part = orig.bodygroup local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (!bodygroup) then if (part) then entity:SetBodygroup(part, 0) end if (matIndex) then entity:SetSubMaterial(matIndex, outfit.data) end else if (matIndex) then entity:SetSubMaterial(matIndex) end if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { bodygroup = 3, name = "gloves", outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 1, name = "bodygroup", price = 4500}, {data = 2, name = "bodygroup", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { bodygroup = 2, name = "pants", outfits = { {data = 1, name = "bodygroup", price = 4500}, {data = "citizensheetf/scrubs1_shtfe",name = "sheet", price = 4500}, {data = "citizensheetf/scrubs2_shtfe", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_01", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_02", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_03", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_04", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_05", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_06", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_07", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_08", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_09", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_10", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_11", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_12", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_13", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_14", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_15", name = "sheet", price = 4500}, {data = "citizensheetf/sheet_suit", name = "sheet", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local find = "models/bloo_ltcom_zel/citizens/female/citizen_sheet2" local part = orig.bodygroup local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (!bodygroup) then if (part) then entity:SetBodygroup(part, 1) end if (matIndex) then entity:SetSubMaterial(matIndex, outfit.data) end else if (matIndex) then entity:SetSubMaterial(matIndex) end if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, }, emale = { { name = "model", }, { name = "face", outfits = function(entity) local faces = {} local mdl = entity:GetModel() local woo = OUTFIT_DATA[mdl:lower()] if (!woo) then return faces end local facemaps = woo.skins for i = 1, facemaps do table.insert(faces, {data = (i - 1), name = "facemap", price = 9500}) end return faces end, func = function(entity, outfit, orig) if (outfit) then local facemap = tonumber(outfit.data) if (facemap) then entity:SetSkin(facemap) end end end, }, { bodygroup = 4, name = "head", outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 1, name = "bodygroup", price = 4500}, {data = 2, name = "bodygroup", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { name = "torso", bodygroup = 1, outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 5, name = "bodygroup", price = 4500}, {data = 6, name = "bodygroup", price = 4500}, {data = 7, name = "bodygroup", price = 4500}, {data = 8, name = "bodygroup", price = 4500}, {data = 9, name = "bodygroup", price = 4500}, {data = 15, name = "bodygroup", price = 4500}, {data = 16, name = "bodygroup", price = 4500}, {data = 17, name = "bodygroup", price = 4500}, {data = 18, name = "bodygroup", price = 4500}, {data = 19, name = "bodygroup", price = 4500}, {data = 20, name = "bodygroup", price = 4500}, {data = "citizensheet/sheet_02", name = "sheet", price = 4500}, {data = "citizensheet/sheet_03", name = "sheet", price = 4500}, {data = "citizensheet/sheet_reich", name = "sheet", price = 4500}, {data = "citizensheet/scrubs1_sheet", name = "sheet", price = 4500}, {data = "citizensheet/scrubs2_sheet", name = "sheet", price = 4500}, {data = "citizensheet/sheet_suit", name = "sheet", price = 4500}, {data = "citizensheet/sheet_04", name = "sheet", price = 4500}, {data = "citizensheet/sheet_08", name = "sheet", price = 4500}, {data = "citizensheet/sheet_10", name = "sheet", price = 4500}, {data = "citizensheet/sheet_14", name = "sheet", price = 4500}, {data = "citizensheet/sheet_18", name = "sheet", price = 4500}, {data = "citizensheet/sheet_17", name = "sheet", price = 4500}, {data = "citizensheet/sheet_19", name = "sheet", price = 4500}, {data = "citizensheet/sheet_20", name = "sheet", price = 4500}, {data = "citizensheet/sheet_21", name = "sheet", price = 4500}, {data = "citizensheet/sheet_22", name = "sheet", price = 4500}, {data = "citizensheet/sheet_23", name = "sheet", price = 4500}, {data = "citizensheet/sheet_24", name = "sheet", price = 4500}, {data = "citizensheet/sheet_25", name = "sheet", price = 4500}, {data = "citizensheet/sheet_26", name = "sheet", price = 4500}, {data = "citizensheet/sheet_27", name = "sheet", price = 4500}, {data = "citizensheet/sheet_28", name = "sheet", price = 4500}, {data = "citizensheet/sheet_29", name = "sheet", price = 4500}, {data = "citizensheet/sheet_30", name = "sheet", price = 4500}, {data = "citizensheet/sheet_31", name = "sheet", price = 4500}, {data = "citizensheet/costage_sheet", name = "sheet", price = 4500}, {data = "citizensheet/hostage_sheet", name = "sheet", price = 4500}, {data = "citizensheet/security_sheet", name = "sheet", price = 4500}, {data = "citizensheet/military_sheet", name = "sheet", price = 4500}, {data = "citizensheet/monk_sheet", name = "sheet", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local find = "models/bloo_ltcom_zel/citizens/citizen_sheet" local part = orig.bodygroup local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (!bodygroup) then if (part) then entity:SetBodygroup(part, 0) end if (matIndex) then entity:SetSubMaterial(matIndex, outfit.data) end else if (matIndex) then entity:SetSubMaterial(matIndex) end if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { bodygroup = 3, name = "gloves", outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 1, name = "bodygroup", price = 4500}, {data = 2, name = "bodygroup", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { bodygroup = 2, name = "pants", outfits = { {data = 1, name = "bodygroup", price = 4500}, {data = "citizensheet/sheet_02", name = "sheet", price = 4500}, {data = "citizensheet/sheet_03", name = "sheet", price = 4500}, {data = "citizensheet/sheet_reich", name = "sheet", price = 4500}, {data = "citizensheet/scrubs1_sheet", name = "sheet", price = 4500}, {data = "citizensheet/scrubs2_sheet", name = "sheet", price = 4500}, {data = "citizensheet/sheet_suit", name = "sheet", price = 4500}, {data = "citizensheet/sheet_04", name = "sheet", price = 4500}, {data = "citizensheet/sheet_08", name = "sheet", price = 4500}, {data = "citizensheet/sheet_10", name = "sheet", price = 4500}, {data = "citizensheet/sheet_14", name = "sheet", price = 4500}, {data = "citizensheet/sheet_18", name = "sheet", price = 4500}, {data = "citizensheet/sheet_17", name = "sheet", price = 4500}, {data = "citizensheet/sheet_19", name = "sheet", price = 4500}, {data = "citizensheet/sheet_20", name = "sheet", price = 4500}, {data = "citizensheet/sheet_21", name = "sheet", price = 4500}, {data = "citizensheet/sheet_22", name = "sheet", price = 4500}, {data = "citizensheet/sheet_23", name = "sheet", price = 4500}, {data = "citizensheet/sheet_24", name = "sheet", price = 4500}, {data = "citizensheet/sheet_25", name = "sheet", price = 4500}, {data = "citizensheet/sheet_26", name = "sheet", price = 4500}, {data = "citizensheet/sheet_27", name = "sheet", price = 4500}, {data = "citizensheet/sheet_28", name = "sheet", price = 4500}, {data = "citizensheet/sheet_29", name = "sheet", price = 4500}, {data = "citizensheet/sheet_30", name = "sheet", price = 4500}, {data = "citizensheet/sheet_31", name = "sheet", price = 4500}, {data = "citizensheet/costage_sheet", name = "sheet", price = 4500}, {data = "citizensheet/hostage_sheet", name = "sheet", price = 4500}, {data = "citizensheet/security_sheet", name = "sheet", price = 4500}, {data = "citizensheet/military_sheet", name = "sheet", price = 4500}, {data = "citizensheet/monk_sheet", name = "sheet", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local find = "models/bloo_ltcom_zel/citizens/citizen_sheet2" local part = orig.bodygroup local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (!bodygroup) then if (part) then entity:SetBodygroup(part, 1) end if (matIndex) then entity:SetSubMaterial(matIndex, outfit.data) end else if (matIndex) then entity:SetSubMaterial(matIndex) end if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, }, -- BLACK TEA CITIZEN COMPILATION SUPPORT bmale = { { name = "face", canDisplay = function() end, outfits = function(entity) local mdl = entity:GetModel() local faces = {} local woo = OUTFIT_DATA[mdl:lower()] if (!woo) then return faces end if (woo.facemap) then local mdl = entity:GetModel() local facemaps = woo.skins table.insert(faces, {mat = woo.facemap, price = 9500}) if (facemaps) then for i = 1, #facemaps do table.insert(faces, {mat = facemaps[i], price = 9500}) end end end return faces end, func = function(entity, outfit, orig) local mdl = entity:GetModel() local woo = OUTFIT_DATA[mdl:lower()] if (outfit and woo and woo.facemap) then local find = woo.facemap local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end end end, }, { name = "torso", bodygroup = 1, outfits = { {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "models/btcitizen/citizen_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_02"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_03"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_reich"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_suit"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_04"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_08"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_10"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_14"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_18"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_17"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_19"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_20"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_21"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_22"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_23"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_24"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_25"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_26"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_27"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_28"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_29"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_30"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/sheet_31"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/costage_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/hostage_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/security_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/military_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 0, mat = "citizensheet/monk_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 1, mat = "citizensheet/sheet_27"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 1, mat = "citizensheet/sheet_30"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 1, mat = "citizensheet/sheet_29"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 1, mat = "citizensheet/sheet_28"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 1, mat = "citizensheet/sheet_26"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 1, mat = "citizensheet/sheet_25"}, {price = 5000, find = "models/btcitizen/citizen_sheet", group = 1, mat = "citizensheet/sheet_reich"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 2, mat = "models/btcitizen/prague_civ_rioter_body_col_a"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 2, mat = "models/btcitizen/prague_civ_rioter_body_col_b"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 2, mat = "models/btcitizen/prague_civ_rioter_body_col_c"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 3, mat = "models/btcitizen/prague_civ_rioter_body_col_a"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 3, mat = "models/btcitizen/prague_civ_rioter_body_col_b"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 3, mat = "models/btcitizen/prague_civ_rioter_body_col_c"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 4, mat = "models/btcitizen/prague_civ_rioter_body_col_a"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 4, mat = "models/btcitizen/prague_civ_rioter_body_col_b"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 4, mat = "models/btcitizen/prague_civ_rioter_body_col_c"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/citizen_summer"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer2"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer3"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer4"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer5"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer6"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer7"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer8"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer9"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer10"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer11"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 5, mat = "models/btcitizen/summersheet/citizen_summer_camo"}, {price = 5000, group = 6}, }, func = function(entity, outfit, orig) if (orig.bodygroup) then local find = outfit.find local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end if (outfit.group) then entity:SetBodygroup(orig.bodygroup, outfit.group) end end end, }, { bodygroup = 3, name = "shoes", outfits = { {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "models/btcitizen/citizen_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/sheet_02"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/sheet_03"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/sheet_17"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/sheet_24"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/sheet_26"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/hostage_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/security_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/military_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_shoes", group = 0, mat = "citizensheet/monk_sheet"}, {price = 5000, group = 1}, {price = 5000, group = 2}, {price = 5000, group = 3}, }, func = function(entity, outfit, orig) /* local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end*/ if (orig.bodygroup) then local find = outfit.find if (find) then local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end end if (outfit.group) then entity:SetBodygroup(orig.bodygroup, outfit.group) end end end, }, { bodygroup = 4, name = "gloves", outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 1, name = "bodygroup", price = 4500}, {data = 2, name = "bodygroup", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { bodygroup = 2, name = "pants", outfits = { {price = 5000, group = 0, find = "models/btcitizen/citizen_sheet_legs", mat = "models/btcitizen/citizen_sheet_legs",}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_02"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_03"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_reich"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_suit"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_04"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_08"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_14"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_18"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_17"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_19"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_20"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_23"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_24"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_25"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_26"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_27"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_28"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_29"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_30"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/sheet_31"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/costage_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/hostage_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/security_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/military_sheet"}, {price = 5000, find = "models/btcitizen/citizen_sheet_legs", group = 0, mat = "citizensheet/monk_sheet"}, {price = 5000, group = 2}, }, func = function(entity, outfit, orig) if (orig.bodygroup) then local find = outfit.find local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end if (outfit.group) then entity:SetBodygroup(orig.bodygroup, outfit.group) end end end, }, }, bfemale = { { name = "face", canDisplay = function() end, outfits = function(entity) local mdl = entity:GetModel() local faces = {} local woo = OUTFIT_DATA[mdl:lower()] if (!woo) then return faces end if (woo.facemap) then local mdl = entity:GetModel() local facemaps = woo.skins table.insert(faces, {mat = woo.facemap, price = 9500}) if (facemaps) then for i = 1, #facemaps do table.insert(faces, {mat = facemaps[i], price = 9500}) end end end return faces end, func = function(entity, outfit, orig) local mdl = entity:GetModel() local woo = OUTFIT_DATA[mdl:lower()] if (outfit and woo.facemap) then local find = woo.facemap local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end end end, }, { name = "torso", bodygroup = 1, outfits = { {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "models/btcitizen/female/citizen_sheet"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_01"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_02"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_03"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_04"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_05"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_06"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_07"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_08"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_09"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_10"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_11"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_12"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_13"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_14"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_15"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 0, mat = "citizensheetf/sheet_suit"}, /* {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_01"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_02"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_03"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_04"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_05"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_06"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_07"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_08"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_09"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_10"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_11"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_12"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_13"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_14"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_15"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet", group = 1, mat = "citizensheetf/sheet_suit"}, */ {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 2, mat = "models/btcitizen/prague_civ_rioter_body_col_a"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 2, mat = "models/btcitizen/prague_civ_rioter_body_col_b"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 2, mat = "models/btcitizen/prague_civ_rioter_body_col_c"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 3, mat = "models/btcitizen/prague_civ_rioter_body_col_a"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 3, mat = "models/btcitizen/prague_civ_rioter_body_col_b"}, {price = 5000, find = "models/btcitizen/prague_civ_rioter_body_col_a", group = 3, mat = "models/btcitizen/prague_civ_rioter_body_col_c"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/citizen_summer"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer2"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer3"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer4"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer5"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer6"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer7"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer8"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer9"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer10"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer11"}, {price = 5000, find = "models/btcitizen/citizen_summer", group = 4, mat = "models/btcitizen/summersheet/citizen_summer_camo"}, }, func = function(entity, outfit, orig) if (orig.bodygroup) then local find = outfit.find local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end if (outfit.group) then entity:SetBodygroup(orig.bodygroup, outfit.group) end end end, }, { bodygroup = 3, name = "shoes", outfits = { {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "models/btcitizen/female/citizen_sheet"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_01"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_02"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_03"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_04"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_05"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_06"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_07"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_08"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_09"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_10"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_11"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_12"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_13"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_14"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_15"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_shoes", group = 0, mat = "citizensheetf/sheet_suit"}, {price = 5000, group = 1}, }, func = function(entity, outfit, orig) /* local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end*/ if (orig.bodygroup) then local find = outfit.find if (find) then local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end end if (outfit.group) then entity:SetBodygroup(orig.bodygroup, outfit.group) end end end, }, { bodygroup = 4, name = "gloves", outfits = { {data = 0, name = "bodygroup", price = 4500}, {data = 1, name = "bodygroup", price = 4500}, {data = 2, name = "bodygroup", price = 4500}, }, func = function(entity, outfit, orig) local bodygroup = tonumber(outfit.data) local part = orig.bodygroup if (bodygroup) then if (part) then entity:SetBodygroup(part, bodygroup) end end end, }, { bodygroup = 2, name = "pants", outfits = { {price = 5000, group = 0, find = "models/btcitizen/female/citizen_sheet_legs", mat = "models/btcitizen/female/citizen_sheet_legs",}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_01"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_02"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_03"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_04"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_05"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_06"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_07"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_08"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_09"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_10"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_11"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_12"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_13"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_14"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_15"}, {price = 5000, find = "models/btcitizen/female/citizen_sheet_legs", group = 0, mat = "citizensheetf/sheet_suit"}, {price = 5000, group = 2}, }, func = function(entity, outfit, orig) if (orig.bodygroup) then local find = outfit.find local matIndex for k, v in ipairs(entity:GetMaterials()) do if (v == find) then matIndex = k - 1 break end end if (matIndex and outfit.mat) then entity:SetSubMaterial(matIndex, outfit.mat) end if (outfit.group) then entity:SetBodygroup(orig.bodygroup, outfit.group) end end end, }, }, } end)
-- Taken from https://github.com/RockManEXEZone/MMBN-Table-Files/blob/master/done/bn3-utf8.tbl local TEXT_TABLE = { [" "] = 0x0 , ["0"] = 0x1 , ["1"] = 0x2 , ["2"] = 0x3 , ["3"] = 0x4 , ["4"] = 0x5 , ["5"] = 0x6 , ["6"] = 0x7 , ["7"] = 0x8 , ["8"] = 0x9 , ["9"] = 0xA , A = 0xB , B = 0xC , C = 0xD , D = 0xE , E = 0xF , F = 0x10 , G = 0x11 , H = 0x12 , I = 0x13 , J = 0x14 , K = 0x15 , L = 0x16 , M = 0x17 , N = 0x18 , O = 0x19 , P = 0x1A , Q = 0x1B , R = 0x1C , S = 0x1D , T = 0x1E , U = 0x1F , V = 0x20 , W = 0x21 , X = 0x22 , Y = 0x23 , Z = 0x24 , a = 0x25 , b = 0x26 , c = 0x27 , d = 0x28 , e = 0x29 , f = 0x2A , g = 0x2B , h = 0x2C , i = 0x2D , j = 0x2E , k = 0x2F , l = 0x30 , m = 0x31 , n = 0x32 , o = 0x33 , p = 0x34 , q = 0x35 , r = 0x36 , s = 0x37 , t = 0x38 , u = 0x39 , v = 0x3A , w = 0x3B , x = 0x3C , y = 0x3D , z = 0x3E , ["-"] = 0x3F , Multiply = 0x40 , ["="] = 0x41 , [":"] = 0x42 , ["+"] = 0x43 , Divide = 0x44 , Punctuation_Mark = 0x45 , ["*"] = 0x46 , ["!"] = 0x47 , ["?"] = 0x48 , ["%"] = 0x49 , ["&"] = 0x4A , [","] = 0x4B , Ellipses = 0x4C , ["."] = 0x4D , Quote = 0x4E , [";"] = 0x4F , Single_Quote = 0x50 , Double_Quote = 0x51 , ["~"] = 0x52 , ["/"] = 0x53 , ["("] = 0x54 , [")"] = 0x55 , ["["] = 0x56 , ["]"] = 0x57 , ["\005"] = 0x58 , -- v2 ["\006"] = 0x59 , -- v3 ["\007"] = 0x5A , -- v4 ["\008"] = 0x5B , -- v5 ["@"] = 0x5C , Heart = 0x5D , Music_Note = 0x5E , MB = 0x5F , Black_Square = 0x60 , ["_"] = 0x61 , Circle1 = 0x62 , Circle2 = 0x63 , Cross1 = 0x64 , Cross2 = 0x65 , Bracket1 = 0x66 , Bracket2 = 0x67 , ModTools1 = 0x68 , ModTools2 = 0x69 , ModTools3 = 0x6A , ["\004"] = 0x6B , -- sigma ["\003"] = 0x6C , -- omega ["\001"] = 0x6D , -- alpha ["\002"] = 0x6E , -- beta ["#"] = 0x6F , Ellipses = 0x70 , [">"] = 0x71 , ["<"] = 0x72 , Japanese_Symbol = 0x73 , BowneGlobal1 = 0x74 , BowneGlobal2 = 0x75 , BowneGlobal3 = 0x76 , BowneGlobal4 = 0x77 , BowneGlobal5 = 0x78 , BowneGlobal6 = 0x79 , BowneGlobal7 = 0x7A , BowneGlobal8 = 0x7B , BowneGlobal9 = 0x7C , BowneGlobal10 = 0x7D , BowneGlobal11 = 0x7E , End_Of_String = 0xE7, Newline = 0xE8 , } return TEXT_TABLE
object_draft_schematic_armor_component_armor_assault_segment = object_draft_schematic_armor_component_shared_armor_assault_segment:new { } ObjectTemplates:addTemplate(object_draft_schematic_armor_component_armor_assault_segment, "object/draft_schematic/armor/component/armor_assault_segment.iff")
juggernaut_basic_attack = class({}) LinkLuaModifier("modifier_juggernaut_basic_attack_stacks", "abilities/heroes/juggernaut/juggernaut_basic_attack/modifier_juggernaut_basic_attack_stacks", LUA_MODIFIER_MOTION_NONE) function juggernaut_basic_attack:GetCastPoint() if IsServer() then return self:GetCaster():GetAttackAnimationPoint() end end function juggernaut_basic_attack:GetCooldown(iLevel) if IsServer() then local attacks_per_second = self:GetCaster():GetAttacksPerSecond() local attack_speed = (1 / attacks_per_second) return self.BaseClass.GetCooldown(self, self:GetLevel()) + attack_speed end end function juggernaut_basic_attack:GetCastAnimationCustom() return ACT_DOTA_ATTACK_EVENT end function juggernaut_basic_attack:GetPlaybackRateOverride() return 1.2 end function juggernaut_basic_attack:GetAnimationTranslate() return "odachi" end function juggernaut_basic_attack:GetCastPointSpeed() return self:GetSpecialValueFor('cast_point_speed_pct') end function juggernaut_basic_attack:OnSpellStart() local caster = self:GetCaster() local origin = caster:GetOrigin() local point = ClampPosition(origin, CustomAbilitiesLegacy:GetCursorPosition(self), self:GetCastRange(Vector(0,0,0), nil), self:GetCastRange(Vector(0,0,0), nil)) self.radius = self:GetSpecialValueFor("radius") + CustomEntitiesLegacy:GetMeeleExtraRadius(caster) local cooldown_reduction = self:GetSpecialValueFor("cooldown_reduction") local cooldown_reduction_counter = self:GetSpecialValueFor("cooldown_reduction_counter") local mana_gain_pct = self:GetSpecialValueFor("mana_gain_pct") local direction = Direction2D(origin, point) local modifier = CustomEntitiesLegacy:SafeGetModifier(caster, "modifier_juggernaut_ex_counter") if modifier then local color = Vector(0, 255, 0) MeeleEFX(caster, direction, self.radius, color) else MeeleEFX(caster, direction, self.radius, nil) end CustomEntitiesLegacy:MeeleAttack(caster, { vDirection = direction, vOrigin = origin, fRadius = self.radius, bIsBasicAttack = true, iMaxTargets = 1, Callback = function(hTarget) CustomEntitiesLegacy:AttackWithBaseDamage(caster, { hTarget = hTarget, hAbility = self, }) if not CustomEntitiesLegacy:IsObstacle(hTarget) then if CustomEntitiesLegacy:ProvidesMana(hTarget) then CustomEntitiesLegacy:GiveManaAndEnergyPercent(caster, mana_gain_pct, true) end caster:AddNewModifier(caster, self, "modifier_juggernaut_basic_attack_stacks", {}) self:ReduceCooldown(caster, 'juggernaut_second_attack', cooldown_reduction) self:ReduceCooldown(caster, 'juggernaut_ex_second_attack', cooldown_reduction) if self:GetLevel() >= 2 then self:ReduceCooldown(caster, 'juggernaut_counter', cooldown_reduction_counter) self:ReduceCooldown(caster, 'juggernaut_ex_counter', cooldown_reduction_counter) end end self:PlayEffectsOnImpact(hTarget) end }) self:PlayEffectsOnMiss(point) end function juggernaut_basic_attack:ReduceCooldown(hCaster, sAbilityName, iCooldownReduction) local ability = hCaster:FindAbilityByName(sAbilityName) if ability then local ability_cd = ability:GetCooldownTimeRemaining() local new_cd = ability_cd - iCooldownReduction if (new_cd) < 0 then ability:EndCooldown() else ability:EndCooldown() ability:StartCooldown(new_cd) end end end function juggernaut_basic_attack:PlayEffectsOnImpact(hTarget) EFX('particles/juggernaut/juggernaut_basic_attack_impact.vpcf', PATTACH_ABSORIGIN, hTarget, { release = true }) EmitSoundOn("Hero_Juggernaut.Attack", hTarget) end function juggernaut_basic_attack:PlayEffectsOnMiss(pos) EmitSoundOnLocationWithCaster(pos, "Hero_Juggernaut.PreAttack", self:GetCaster()) end if IsClient() then require("wrappers/abilities") end Abilities.Castpoint(juggernaut_basic_attack)
local awful = require("awful") local gears = require("gears") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") local lain = require("lain") local http = require("socket.http") local json = require("JSON") local ltn12 = require("ltn12") local secrets = require("secrets") local markup = require("lain.util.markup") local helpers = require("utils.helpers") local my_table = awful.util.table or gears.table local pad = helpers.pad local theme_pad = awful.util.theme_functions.pad_fn local keygrabber = require("awful.keygrabber") local createAnimObject = require("utils.animation").createAnimObject local margin = wibox.container.margin local place = wibox.container.place local background = wibox.container.background local constraint = wibox.container.constraint local textbox = wibox.widget.textbox local font = awful.util.theme_functions.font_fn local exit_screen = wibox { visible = false, screen = nil } local backdrop = wibox {type = "dock", x = 0, y = 0} local exit_screen_grabber local isLocked = false function exit_screen_show(is_locked) isLocked = is_locked and true or false local s = awful.screen.focused() local screen_width = s.geometry.width local screen_height = s.geometry.height backdrop = wibox( { type = "dock", height = screen_height, width = screen_width, x = 0, y = 0, screen = s, ontop = true, visible = true, opacity = 1, bg = "#00000000" } ) exit_screen = wibox( { x = 0, y = 0, visible = true, ontop = true, screen = s, type = "dock", height = screen_height, width = screen_width, opacity = 1, bg = "#12121266" } ) createAnimObject(0.6, exit_screen, {opacity = 1}, "outCubic") createAnimObject(0.6, backdrop, {opacity = 1}, "outCubic") exit_screen_setup(s) end function exit_screen_hide() local s = awful.screen.focused() local screen_height = s.geometry.height createAnimObject(0.6, exit_screen, {opacity = 0}, "outCubic") createAnimObject( 0.6, backdrop, {opacity = 0}, "outCubic", function() backdrop.visible = false exit_screen.visible = false end ) gears.timer { autostart = true, single_shot = true, timeout = 0.3, callback = function() awful.keygrabber.stop(exit_screen_grabber) end } end local widgets = { layout = wibox.layout.fixed.horizontal } function exit_button(title, command) local button = wibox.widget { layout = wibox.layout.stack, margin(textbox(markup("#00000033", markup.font("Roboto Bold 120", title))), 2, 0, 3), textbox(markup("#ffffff", markup.font("Roboto Bold 120", title))) } button:buttons(awful.util.table.join(awful.button({}, 1, command))) return margin(button, 30, 30, 0, 0) end local function lock_command() exit_screen_hide() gears.timer { autostart = true, single_shot = true, timeout = 0.3, callback = action_screen_toggle("show", "lock") } end local function poweroff_command() awful.spawn.with_shell("shutdown now") end local function reboot_command() awful.spawn.with_shell("reboot") end local function suspend_command() lock_screen_show() exit_screen_hide() awful.spawn.with_shell("systemctl suspend") end local function exit_command() awful.spawn.with_shell("rm /tmp/started") awesome.quit() end function exit_screen_setup(s) gears.timer { autostart = true, single_shot = true, timeout = 0.3, callback = function() backdrop:buttons( awful.util.table.join( awful.button( {}, 1, function() exit_screen_hide() end ) ) ) exit_screen_grabber = awful.keygrabber.run( function(_, key, event) if event == "release" then return end if key == "Escape" or key == "q" or key == "x" then exit_screen_hide() end end ) end } local lock = margin(isLocked and wibox.widget {} or exit_button("Lock", lock_command), 500) lock.opacity = 0 local suspend = margin(exit_button("Suspend", suspend_command), 500) suspend.opacity = 0 local reboot = margin(exit_button("Restart", reboot_command), 500) reboot.opacity = 0 local poweroff = margin(exit_button("Shutdown", poweroff_command), 500) poweroff.opacity = 0 local exit = margin(exit_button("Exit", exit_command), 500) exit.opacity = 0 createAnimObject( 0.3, lock, {left = 0, opacity = 1}, "outCubic", function() end ) createAnimObject( 0.3, suspend, {left = 0, opacity = 1}, "outCubic", function() end, 0.05 ) createAnimObject( 0.3, reboot, {left = 0, opacity = 1}, "outCubic", function() end, 0.1 ) createAnimObject( 0.3, poweroff, {left = 0, opacity = 1}, "outCubic", function() end, 0.15 ) createAnimObject( 0.3, exit, {left = 0, opacity = 1}, "outCubic", function() end, 0.2 ) exit_screen:setup( { layout = wibox.layout.flex.vertical, margin( { layout = wibox.layout.flex.vertical, lock, suspend, reboot, poweroff, exit }, 30 ) } ) end
slot0 = class_C("Component", ClassLoader:aquireClass("Entity")) slot0.onCreate = function (slot0) slot0.super.onCreate(slot0) slot0:addProperty("owner") end slot0.onLoad = function (slot0) return end slot0.onUnload = function (slot0) return end slot0.onReset = function (slot0) return end return slot0
-- minetest/creative/init.lua creative = {} local player_inventory = {} local creative_mode = minetest.setting_getbool("creative_mode") -- Create detached creative inventory after loading all mods creative.init_creative_inventory = function(owner) local owner_name = owner:get_player_name() player_inventory[owner_name] = { size = 0, filter = "", start_i = 1, tab_id = 2, } minetest.create_detached_inventory("creative_" .. owner_name, { allow_move = function(inv, from_list, from_index, to_list, to_index, count, player) if creative_mode and not to_list == "main" then return count else return 0 end end, allow_put = function(inv, listname, index, stack, player) return 0 end, allow_take = function(inv, listname, index, stack, player) if creative_mode then return -1 else return 0 end end, on_move = function(inv, from_list, from_index, to_list, to_index, count, player) end, on_put = function(inv, listname, index, stack, player) end, on_take = function(inv, listname, index, stack, player) local player_name, stack_name = player:get_player_name(), stack:get_name() --print(player_name .. " takes item from creative inventory; listname = " .. listname .. ", index = " .. index .. ", stack = " .. dump(stack:to_table())) if stack then minetest.log("action", player_name .. " takes " .. stack_name .. " from creative inventory") --print("Stack name: " .. stack_name .. ", Stack count: " .. stack:get_count()) end end, }) creative.update_creative_inventory(owner_name) --print("creative inventory size: " .. player_inventory[player_name].size) end local function tab_category(tab_id) local id_category = { nil, -- Reserved for crafting tab. minetest.registered_items, minetest.registered_nodes, minetest.registered_tools, minetest.registered_craftitems } -- If index out of range, show default ("All") page. return id_category[tab_id] or id_category[2] end function creative.update_creative_inventory(player_name) local creative_list = {} local player_inv = minetest.get_inventory({type = "detached", name = "creative_" .. player_name}) local inv = player_inventory[player_name] for name, def in pairs(tab_category(inv.tab_id)) do if not (def.groups.not_in_creative_inventory == 1) and def.description and def.description ~= "" and (def.name:find(inv.filter, 1, true) or def.description:lower():find(inv.filter, 1, true)) then creative_list[#creative_list+1] = name end end table.sort(creative_list) player_inv:set_size("main", #creative_list) player_inv:set_list("main", creative_list) inv.size = #creative_list end -- Create the trash field local trash = minetest.create_detached_inventory("creative_trash", { -- Allow the stack to be placed and remove it in on_put() -- This allows the creative inventory to restore the stack allow_put = function(inv, listname, index, stack, player) if creative_mode then return stack:get_count() else return 0 end end, on_put = function(inv, listname) inv:set_list(listname, {}) end, }) trash:set_size("main", 1) creative.formspec_add = "" creative.set_creative_formspec = function(player, start_i) local player_name = player:get_player_name() local inv = player_inventory[player_name] local pagenum = math.floor(start_i / (3*8) + 1) local pagemax = math.ceil(inv.size / (3*8)) player:set_inventory_formspec([[ size[8,8.6] image[4.06,3.4;0.8,0.8;creative_trash_icon.png] list[current_player;main;0,4.7;8,1;] list[current_player;main;0,5.85;8,3;8] list[detached:creative_trash;main;4,3.3;1,1;] listring[] tablecolumns[color;text;color;text] tableoptions[background=#00000000;highlight=#00000000;border=false] button[5.4,3.2;0.8,0.9;creative_prev;<] button[7.25,3.2;0.8,0.9;creative_next;>] button[2.1,3.4;0.8,0.5;creative_search;?] button[2.75,3.4;0.8,0.5;creative_clear;X] tooltip[creative_search;Search] tooltip[creative_clear;Reset] listring[current_player;main] ]] .. "field[0.3,3.5;2.2,1;creative_filter;;" .. minetest.formspec_escape(inv.filter) .. "]" .. "listring[detached:creative_" .. player_name .. ";main]" .. "tabheader[0,0;creative_tabs;Crafting,All,Nodes,Tools,Items;" .. tostring(inv.tab_id) .. ";true;false]" .. "list[detached:creative_" .. player_name .. ";main;0,0;8,3;" .. tostring(start_i) .. "]" .. "table[6.05,3.35;1.15,0.5;pagenum;#FFFF00," .. tostring(pagenum) .. ",#FFFFFF,/ " .. tostring(pagemax) .. "]" .. default.get_hotbar_bg(0,4.7) .. default.gui_bg .. default.gui_bg_img .. default.gui_slots .. creative.formspec_add ) end creative.set_crafting_formspec = function(player) player:set_inventory_formspec([[ size[8,8.6] list[current_player;craft;2,0.75;3,3;] list[current_player;craftpreview;6,1.75;1,1;] list[current_player;main;0,4.7;8,1;] list[current_player;main;0,5.85;8,3;8] list[detached:creative_trash;main;0,2.75;1,1;] image[0.06,2.85;0.8,0.8;creative_trash_icon.png] image[5,1.75;1,1;gui_furnace_arrow_bg.png^[transformR270] tabheader[0,0;creative_tabs;Crafting,All,Nodes,Tools,Items;1;true;false] listring[current_player;main] listring[current_player;craft] ]] .. default.get_hotbar_bg(0,4.7) .. default.gui_bg .. default.gui_bg_img .. default.gui_slots ) end minetest.register_on_joinplayer(function(player) -- If in creative mode, modify player's inventory forms if not creative_mode then return end creative.init_creative_inventory(player) creative.set_creative_formspec(player, 0) end) minetest.register_on_player_receive_fields(function(player, formname, fields) if formname ~= "" or not creative_mode then return end local player_name = player:get_player_name() local inv = player_inventory[player_name] if fields.quit then if inv.tab_id == 1 then creative.set_crafting_formspec(player) end elseif fields.creative_tabs then local tab = tonumber(fields.creative_tabs) inv.tab_id = tab player_inventory[player_name].start_i = 1 if tab == 1 then creative.set_crafting_formspec(player) else creative.update_creative_inventory(player_name) creative.set_creative_formspec(player, 0) end elseif fields.creative_clear then player_inventory[player_name].start_i = 1 inv.filter = "" creative.update_creative_inventory(player_name) creative.set_creative_formspec(player, 0) elseif fields.creative_search then player_inventory[player_name].start_i = 1 inv.filter = fields.creative_filter:lower() creative.update_creative_inventory(player_name) creative.set_creative_formspec(player, 0) else local start_i = player_inventory[player_name].start_i or 0 if fields.creative_prev then start_i = start_i - 3*8 if start_i < 0 then start_i = inv.size - (inv.size % (3*8)) if inv.size == start_i then start_i = math.max(0, inv.size - (3*8)) end end elseif fields.creative_next then start_i = start_i + 3*8 if start_i >= inv.size then start_i = 0 end end player_inventory[player_name].start_i = start_i creative.set_creative_formspec(player, start_i) end end) if creative_mode then local digtime = 0.5 local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 3} minetest.register_item(":", { type = "none", wield_image = "wieldhand.png", wield_scale = {x = 1, y = 1, z = 2.5}, range = 10, tool_capabilities = { full_punch_interval = 0.5, max_drop_level = 3, groupcaps = { crumbly = caps, cracky = caps, snappy = caps, choppy = caps, oddly_breakable_by_hand = caps, }, damage_groups = {fleshy = 10}, } }) minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) return true end) function minetest.handle_node_drops(pos, drops, digger) if not digger or not digger:is_player() then return end local inv = digger:get_inventory() if inv then for _, item in ipairs(drops) do item = ItemStack(item):get_name() if not inv:contains_item("main", item) then inv:add_item("main", item) end end end end end
local icons = require('ky.ui').icons local signs = { Error = icons.error, Warn = icons.warn, Hint = icons.hint, Info = icons.info } for type, icon in pairs(signs) do local hl = 'DiagnosticSign' .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end vim.diagnostic.config { severity_sort = true, virtual_text = false, -- virtual_text = { -- source = 'always', -- prefix = '●', -- severity = vim.diagnostic.severity.ERROR, -- }, float = { border = require('ky.ui').border, source = 'always', }, } vim.keymap.set('n', '<LocalLeader>e', vim.diagnostic.open_float) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) vim.keymap.set('n', ']d', vim.diagnostic.goto_next) vim.keymap.set('n', '<LocalLeader>dq', vim.diagnostic.setqflist) vim.keymap.set('n', '<LocalLeader>dl', vim.diagnostic.setloclist)
local Effect = require("mod.elona.api.Effect") local Rand = require("api.Rand") local Gui = require("api.Gui") local Event = require("api.Event") local Chara = require("api.Chara") local ElonaMagic = require("mod.elona.api.ElonaMagic") local I18N = require("api.I18N") local Enum = require("api.Enum") local RANGE_BOLT = 6 + 1 local function make_buff(opts) data:add { _id = "buff_" .. opts._id, _type = "base.skill", elona_id = opts.elona_id, type = opts.type, related_skill = opts.related_skill, cost = opts.cost, range = opts.range, difficulty = opts.difficulty, target_type = opts.target_type, calc_desc = function(chara, power, dice) local buff_data = data["elona_sys.buff"]:ensure("elona." .. opts._id) local params = { power = 0, duration = 0 } if buff_data.params then params = buff_data:params({ power = power, chara = chara }) end if type(params.power) == "table" then for i = 1, #params.power do params.power[i] = math.floor(params.power[i]) end else params.power = { math.floor(params.power) } end return tostring(math.floor(params.duration)) .. I18N.get("ui.spell.turn_counter") .. I18N.space() .. I18N.get("buff." .. "elona" .. "." .. opts._id .. ".description", table.unpack(params.power)) end, effect_id = "elona.buff_" .. opts._id, } data:add { _id = "buff_" .. opts._id, _type = "elona_sys.magic", elona_id = opts.elona_id, params = { "target" }, alignment = (opts.type == "hex" and "negative") or "positive", cast = function(self, params) return ElonaMagic.apply_buff("elona." .. opts._id, params) end } end make_buff { _id = "holy_shield", elona_id = 442, type = "spell", related_skill = "elona.stat_will", cost = 8, range = 0, difficulty = 150, target_type = "self_or_nearby", } data:add { _id = "holy_shield", _type = "elona_sys.buff", type = "blessing", image = 1, params = function(self, params) return { duration = 10 + params.power / 10, power = params.power } end, on_refresh = function(self, chara) chara:mod("pv", self.power, "add") chara:set_effect_turns("elona.fear", 0) end } make_buff { _id = "mist_of_silence", elona_id = 443, type = "spell", related_skill = "elona.stat_perception", cost = 24, range = RANGE_BOLT, difficulty = 620, target_type = "enemy", } data:add { _id = "mist_of_silence", _type = "elona_sys.buff", type = "hex", image = 2, params = function(self, params) return { duration = 5 + params.power / 40, power = 0 } end, on_refresh = function(self, chara) -- No-op, handled in events end } make_buff { _id = "regeneration", elona_id = 444, type = "spell", related_skill = "elona.stat_will", cost = 16, range = 0, difficulty = 400, target_type = "self", } data:add { _id = "regeneration", _type = "elona_sys.buff", type = "blessing", image = 3, params = function(self, params) return { duration = 12 + params.power / 20, power = 0 } end, on_refresh = function(self, chara) chara:mod_skill_level("elona.healing", 40, "add") end } make_buff { _id = "elemental_shield", elona_id = 445, type = "spell", related_skill = "elona.stat_will", cost = 14, range = 0, difficulty = 350, target_type = "self", } data:add { _id = "elemental_shield", _type = "elona_sys.buff", type = "blessing", image = 4, params = function(self, params) return { duration = 4 + params.power / 20, power = 0 } end, on_refresh = function(self, chara) chara:mod_resist_level("elona.fire", 100, "add") chara:mod_resist_level("elona.cold", 100, "add") chara:mod_resist_level("elona.lightning", 100, "add") end } make_buff { _id = "speed", elona_id = 446, type = "spell", related_skill = "elona.stat_will", cost = 28, range = 0, difficulty = 1050, target_type = "self", } data:add { _id = "speed", _type = "elona_sys.buff", type = "blessing", image = 5, target_rider = true, params = function(self, params) return { duration = 8 + params.power / 30, power = 50 + math.sqrt(params.power / 5) } end, on_add = function(self, params) local target = params.target if Effect.is_cursed(params.curse_state) then target.age = target.age - Rand.rnd(3) + 1 Gui.mes_c_visible("magic.speed", target, "Purple") end end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_speed", self.power, "add") end } make_buff { _id = "slow", elona_id = 447, type = "spell", related_skill = "elona.stat_magic", cost = 10, range = RANGE_BOLT, difficulty = 450, target_type = "enemy", } data:add { _id = "slow", _type = "elona_sys.buff", type = "hex", image = 6, params = function(self, params) return { duration = 8 + params.power / 30, power = math.min(20 + params.power / 20, 50) } end, on_add = function(self, params) local target = params.target if params.curse_state == Enum.CurseState.Blessed then target.age = math.min(target.age + Rand.rnd(3) + 1, save.base.date.year - 12) Gui.mes_c_visible("magic.slow", target, "Green") end end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_speed", -self.power, "add") end } make_buff { _id = "hero", elona_id = 448, type = "spell", related_skill = "elona.stat_will", cost = 12, range = 0, difficulty = 80, target_type = "self_or_nearby", } data:add { _id = "hero", _type = "elona_sys.buff", type = "blessing", image = 7, params = function(self, params) return { duration = 10 + params.power / 4, power = 5 + params.power / 30 } end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_strength", self.power, "add") chara:mod_skill_level("elona.stat_dexterity", self.power, "add") chara:set_effect_turns("elona.fear", 0) chara:set_effect_turns("elona.confusion", 0) end } make_buff { _id = "mist_of_frailness", elona_id = 449, type = "spell", related_skill = "elona.stat_magic", cost = 8, range = RANGE_BOLT, difficulty = 300, target_type = "enemy", } data:add { _id = "mist_of_frailness", _type = "elona_sys.buff", type = "hex", image = 8, params = function(self, params) return { duration = 6 + params.power / 10, power = { 30 + params.power / 10, 5 + params.power / 15 } } end, on_refresh = function(self, chara) chara:mod("dv", math.floor(chara:calc("dv") / 2), "set") chara:mod("pv", math.floor(chara:calc("pv") / 2), "set") end } make_buff { _id = "element_scar", elona_id = 450, type = "spell", related_skill = "elona.stat_magic", cost = 15, range = RANGE_BOLT, difficulty = 600, target_type = "enemy", } data:add { _id = "element_scar", _type = "elona_sys.buff", type = "hex", image = 9, params = function(self, params) return { duration = 4 + params.power / 15, power = 0, } end, on_refresh = function(self, chara) chara:mod_resist_level("elona.fire", -100, "add") chara:mod_resist_level("elona.cold", -100, "add") chara:mod_resist_level("elona.lightning", -100, "add") end } make_buff { _id = "holy_veil", elona_id = 451, type = "spell", related_skill = "elona.stat_will", cost = 20, range = 0, difficulty = 900, target_type = "self_or_nearby", } data:add { _id = "holy_veil", _type = "elona_sys.buff", type = "blessing", image = 10, params = function(self, params) return { duration = 15 + params.power / 5, power = 50 + params.power / 3 * 2, } end, on_refresh = function(self, chara) -- No-op, handled in events end } make_buff { _id = "nightmare", elona_id = 452, type = "spell", related_skill = "elona.stat_perception", cost = 15, range = RANGE_BOLT, difficulty = 500, target_type = "enemy", } data:add { _id = "nightmare", _type = "elona_sys.buff", type = "hex", image = 11, params = function(self, params) return { duration = 4 + params.power / 15, power = 0, } end, on_refresh = function(self, chara) chara:mod_resist_level("elona.nerve", -100, "add") chara:mod_resist_level("elona.mind", -100, "add") end } make_buff { _id = "divine_wisdom", elona_id = 453, type = "spell", related_skill = "elona.stat_learning", cost = 22, range = 0, difficulty = 350, target_type = "self", } data:add { _id = "divine_wisdom", _type = "elona_sys.buff", type = "blessing", image = 12, params = function(self, params) return { duration = 10 + params.power / 4, power = { 6 + params.power / 40, 3 + params.power / 100}, } end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_learning", self.power[1], "add") chara:mod_skill_level("elona.stat_magic", self.power[1], "add") chara:mod_skill_level("elona.literacy", self.power[2], "add") end } make_buff { _id = "punishment", elona_id = 622, type = "action", related_skill = "elona.stat_will", cost = 15, range = RANGE_BOLT, difficulty = 500, target_type = "enemy", } data:add { _id = "punishment", _type = "elona_sys.buff", type = "hex", image = 13, no_remove_on_heal = true, params = function(self, params) return { duration = params.power, power = 20, } end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_speed", -self.power, "add") local pv = chara:calc("pv") if pv > 1 then chara:mod("pv", -pv / 5, "add") end end } make_buff { _id = "lulwys_trick", elona_id = 625, type = "action", related_skill = "elona.stat_dexterity", cost = 20, range = 0, difficulty = 500, target_type = "self", } data:add { _id = "lulwys_trick", _type = "elona_sys.buff", type = "blessing", image = 14, target_rider = true, params = function(self, params) return { duration = 7, power = 155 + params.power / 5, } end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_speed", self.power, "add") end } make_buff { _id = "incognito", elona_id = 458, type = "spell", related_skill = "elona.stat_perception", cost = 38, range = 0, difficulty = 250, target_type = "self", } data:add { _id = "incognito", _type = "elona_sys.buff", type = "blessing", image = 15, params = function(self, params) return { duration = 4 + params.power / 40, power = 0 } end, on_add = function(self, params) local target = params.target if target:is_player() then Effect.start_incognito(target) end end, on_refresh = function(self, chara) chara:mod("is_incognito", true) end, on_remove = function(self, chara) if chara:is_player() then Effect.end_incognito(chara) end end } make_buff { _id = "death_word", elona_id = 646, type = "action", related_skill = "elona.stat_will", cost = 15, range = RANGE_BOLT, difficulty = 500, target_type = "enemy", } data:add { _id = "death_word", _type = "elona_sys.buff", type = "hex", image = 16, params = function(self, params) return { duration = 20, power = 0 } end, on_refresh = function(self, chara) chara:calc("is_under_death_word", true) end, on_expire = function(self, chara) chara:damage_hp(9999, "elona.death_word") end, on_remove = function(self, chara) chara:reset("is_under_death_word", false) end } local function remove_death_word_on_all_charas(chara) if chara:calc("is_death_master") then Gui.mes("damage.death_word_breaks") for _, other in Chara.iter() do other:remove_buff("elona.death_word") end end end Event.register("base.on_chara_killed", "Remove Death Word on all characters if death master killed", remove_death_word_on_all_charas) make_buff { _id = "boost", elona_id = 647, type = "action", related_skill = "elona.stat_will", cost = 50, range = RANGE_BOLT, difficulty = 500, target_type = "self", } data:add { _id = "boost", _type = "elona_sys.buff", type = "blessing", image = 17, params = function(self, params) return { duration = 5, power = 120 } end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_speed", self.power, "add") chara:mod_skill_level("elona.stat_strength", chara:skill_level("elona.stat_strength") * 150 / 100 + 10, "set") chara:mod_skill_level("elona.stat_dexterity", chara:skill_level("elona.stat_dexterity") * 150 / 100 + 10, "set") chara:mod_skill_level("elona.healing", 50, "add") chara:mod("pv", math.floor(chara:calc("pv") * 150 / 100 + 25), "set") chara:mod("dv", math.floor(chara:calc("dv") * 150 / 100 + 25), "set") chara:mod_skill_level("elona.stat_strength", chara:skill_level("elona.stat_strength") * 150 / 100 + 50, "set") end } make_buff { _id = "contingency", elona_id = 462, type = "spell", related_skill = "elona.stat_will", cost = 25, range = 0, difficulty = 1250, target_type = "self_or_nearby", } data:add { _id = "contingency", _type = "elona_sys.buff", type = "blessing", image = 18, params = function(self, params) return { duration = 66, power = math.clamp(25 + params.power/17, 25, 80) } end, on_refresh = function(self, chara) -- No-op, handled in events end } data:add { _id = "lucky", _type = "elona_sys.buff", type = "blessing", image = 19, params = function(self, params) return { duration = 777, power = params.power } end, on_refresh = function(self, chara) chara:mod_skill_level("elona.stat_luck", self.power, "add") end } local function make_food_buff(opts) data:add { _id = opts._id, _type = "elona_sys.buff", type = "food", image = opts.image, params = function(self, params) return { duration = 10 + params.power / 10, power = params.power } end, on_refresh = function(self, chara) chara.temp.growth_buffs = chara.temp.growth_buffs or {} chara.temp.growth_buffs[opts.skill_id] = self.power end } end make_food_buff { _id = "food_str", image = 20, skill_id = "elona.stat_strength" } make_food_buff { _id = "food_end", image = 21, skill_id = "elona.stat_constitution" } make_food_buff { _id = "food_dex", image = 22, skill_id = "elona.stat_dexterity" } make_food_buff { _id = "food_per", image = 23, skill_id = "elona.stat_perception" } make_food_buff { _id = "food_ler", image = 24, skill_id = "elona.stat_learning" } make_food_buff { _id = "food_wil", image = 25, skill_id = "elona.stat_will" } make_food_buff { _id = "food_mag", image = 26, skill_id = "elona.stat_magic" } make_food_buff { _id = "food_chr", image = 27, skill_id = "elona.stat_charisma" } make_food_buff { _id = "food_spd", image = 28, skill_id = "elona.stat_speed" }
local PANEL = {} --[[--------------------------------------------------------- Function: Init -----------------------------------------------------------]] function PANEL:Init() --> Variables self.color = windowsSettings.data.scheme() end --[[--------------------------------------------------------- Function: Paint -----------------------------------------------------------]] function PANEL:Paint(w, h) --> Background draw.RoundedBox(0, 0, 0, w, h, self.color) --> Hover if self.Hovered then draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 50)) end end --[[--------------------------------------------------------- Function: SetScheme -----------------------------------------------------------]] function PANEL:SetScheme(scheme) --> Color self.color = windowsSettings.data.scheme(scheme) end --[[--------------------------------------------------------- Define: windowsFrame -----------------------------------------------------------]] derma.DefineControl("windowsButton", "windowsButton", PANEL, "DButton")
local pairs = pairs local smatch = string.match local slen = string.len local http = require("resty.http") local json = require("orange.utils.json") local encode_base64 = ngx.encode_base64 local string_format = string.format local lor = require("lor.index") local socket = require("socket") local orange_db = require("orange.store.orange_db") local ip_utils = require "lua_ip" return function(config, store) local node_router = lor:Router() local node_model = require("dashboard.model.node")(config) local function get_nodes() return node_model:query_all() end -- 节点同步 local function sync_nodes(nodes, plugins) for _, node in pairs(nodes) do if node.ip and node.port and node.api_username and node.api_password then local httpc = http.new() -- 设置超时时间 1000 ms httpc:set_timeout(1000) local url = string_format("http://%s:%s", node.ip, node.port) local authorization = encode_base64(string_format("%s:%s", node.api_username, node.api_password)) local path = '/node/sync?seed=' .. ngx.time() ngx.log(ngx.INFO, url .. path) local resp, err = httpc:request_uri(url, { method = "POST", path = path, headers = { ["Authorization"] = authorization } }) local sync_status = '' if not resp or err then ngx.log(ngx.ERR, string_format("%s : %s", node.ip, err)) sync_status = '{"ERROR":false}' else ngx.log(ngx.ERR, resp.body) local body = json.decode(resp.body) sync_status = json.encode(body.data) end node_model:update_node_status(node.id, sync_status) httpc:close() end end return get_nodes() end function node_router:register() local local_ip = ip_utils.get_ipv4() node_model:registry(local_ip, 7777, config.api.credentials[1]) end node_router:post("/node/register", function(req, res, next) node_router:register() res:json({ success = true, data = { nodes = get_nodes() } }) end) node_router:get("/node/manage", function(req, res, next) res:render("node") end) node_router:get("/node/persist", function(req,res,next) local enable = orange_db.get("persist.enable") local id = req.query.id or '' local ip = req.query.ip or '' if enable then local url = string.format("/persist?id=%s&ip=%s", id, ip) res:redirect(url) else res:send("没有启用 persist 插件") end end) node_router:post("/node/remove_error_nodes", function(req, res, next) node_model:remove_error_nodes() res:json({ success = true, data = { nodes = get_nodes() } }) end) node_router:get("/nodes", function(req, res, next) return res:json({ success = true, data = { nodes = get_nodes(), } }) end) node_router:post("/node/new", function(req, res, next) local name = req.body.name local ip = req.body.ip local api_username = req.body.api_username local api_password = req.body.api_password -- name if not name or not ip or name == "" or ip == "" then return res:json({ success = false, msg = "节点名和IP不得为空." }) end local name_len = slen(name) if name_len < 1 or name_len > 20 then return res:json({ success = false, msg = "节点名长度应为1~20位." }) end -- ip local ip_len = slen(ip) if ip_len < 7 and ip_len > 15 then return res:json({ success = false, msg = "IP 长度应为 7-15 位." }) end -- port local port = tonumber(req.body.port) if port < 1 or port > 65535 then return json:json({ success = false, msg = "端口号为 1~65535 间的数字" }) end -- check ip local result, err = node_model:query_by_ip(ip) local isExist = false if result and not err then isExist = true end if isExist == true then return res:json({ success = false, msg = "该节点 IP 已添加到节点集群中" }) else -- save node info to db local result, err = node_model:new(name, ip, port, api_username, api_password) if result and not err then return res:json({ success = true, msg = "新建节点成功.", data = { nodes = get_nodes() } }) else return res:json({ success = false, msg = "新建节点失败." }) end end end) node_router:post("/node/modify", function(req, res, next) local id = req.body.id local name = req.body.name local ip = req.body.ip local port = tonumber(req.body.port) local api_username = req.body.api_username local api_password = req.body.api_password -- id if not id then return res:json({ success = false, msg = "节点id不能为空" }) end if not name or not ip or name == "" or ip == "" or port == "" then return res:json({ success = false, msg = "节点名、IP、端口不得为空." }) end -- name local name_len = slen(name) if name_len < 1 or name_len > 20 then return res:json({ success = false, msg = "节点名长度应为1~20位." }) end -- ip local ip_len = slen(ip) if ip_len < 7 and ip_len > 15 then return res:json({ success = false, msg = "IP 长度应为 7-15 位." }) end -- port if port < 1 or port > 65535 then return json:json({ success = false, msg = "端口号为 1~65535 间的数字" }) end -- update node info to db local result = node_model:update_node(id, name, ip, port, api_username, api_password) if result then return res:json({ success = true, msg = "修改节点成功.", data = { nodes = get_nodes() } }) else return res:json({ success = false, msg = "修改节点失败." }) end end) node_router:post("/node/delete", function(req, res, next) local id = req.body.id if not id then return res:json({ success = false, msg = "节点id不能为空" }) end local result = node_model:delete(id) if result then return res:json({ success = true, msg = "删除节点成功.", data = { nodes = get_nodes() } }) else return res:json({ success = false, msg = "删除节点失败." }) end end) node_router:post("/node/sync", function(req, res, next) ngx.log(ngx.INFO, "sync configure to orange nodes") local nodes = get_nodes() local results = {} if nodes then results = sync_nodes(nodes, config.plugins) end return res:json({ success = true, msg = "同步已提交, 请查看同步状态", data = { nodes = results, } }) end) return node_router end
-- A solution contains projects, and defines the available configurations solution "sdl2template" configurations { "Debug", "Release"} flags { "Unicode" , "NoPCH"} projectName = "sdl2template" sourcePath = "src" binPath = "bin" -- A project defines one build target project (projectName) kind "ConsoleApp" language "C++" targetdir ( binPath ) configuration { "windows" } buildoptions "" linkoptions { "/NODEFAULTLIB:msvcrt" } -- https://github.com/yuriks/robotic/blob/master/premake5.lua configuration { "linux" } buildoptions "-std=c++11" --http://industriousone.com/topic/xcode4-c11-build-option toolset "gcc" configuration {} files { path.join(sourcePath, "**.h"), path.join(sourcePath, "**.cpp") } -- build all .h and .cpp files recursively excludes { "./graphics_dependencies/**" } -- don't build files in graphics_dependencies/ -- where are header files? configuration "windows" includedirs { "./graphics_dependencies/SDL2/include", "./graphics_dependencies/SDL2/include/SDL2", "./graphics_dependencies/glew/include", "./graphics_dependencies/glm", "./graphics_dependencies/SDL2_image/include", "./graphics_dependencies/SDL2_ttf/include", "./graphics_dependencies/SDL2_mixer/include", } configuration { "linux" } includedirs { -- should be installed as in ./graphics_dependencies/README.asciidoc } configuration {} -- what libraries need linking to configuration "windows" links { "SDL2", "SDL2main", "opengl32", "glew32", "SDL2_image", "SDL2_ttf", "SDL2_mixer" } configuration "linux" links { "SDL2", "SDL2main", "GL", "GLEW", "SDL2_image", "SDL2_ttf", "SDL2_mixer" } configuration {} -- where are libraries? configuration "windows" libdirs { "./graphics_dependencies/glew/lib/Release/Win32", "./graphics_dependencies/SDL2/lib/win32", "./graphics_dependencies/SDL2_image/lib/x86/", "./graphics_dependencies/SDL2_ttf/lib/x86/", "./graphics_dependencies/SDL2_mixer/lib/x86/", } configuration "linux" -- should be installed as in ./graphics_dependencies/README.asciidoc configuration {} configuration "*Debug" defines { "DEBUG" } flags { "Symbols" } optimize "Off" targetsuffix "-debug" configuration "*Release" defines { "NDEBUG" } optimize "On" targetsuffix "-release" -- copy dlls on windows print("OS is:", os.get()) if os.get() == "windows" then print("Copying binaries for Windows ...") os.mkdir(binPath) -- SDL2 print(" ... SDL2") os.copyfile("./graphics_dependencies/SDL2/lib/win32/SDL2.dll", path.join(binPath, "SDL2.dll")) -- SDL2_image print(" ... SDL2_image") os.copyfile("./graphics_dependencies/SDL2_image/lib/x86/SDL2_image.dll", path.join(binPath, "SDL2_image.dll")) os.copyfile("./graphics_dependencies/SDL2_image/lib/x86/libjpeg-9.dll", path.join(binPath, "libjpeg-9.dll")) os.copyfile("./graphics_dependencies/SDL2_image/lib/x86/libpng16-16.dll", path.join(binPath, "libpng16-16.dll")) os.copyfile("./graphics_dependencies/SDL2_image/lib/x86/libtiff-5.dll", path.join(binPath, "libtiff-5.dll")) os.copyfile("./graphics_dependencies/SDL2_image/lib/x86/libwebp-4.dll", path.join(binPath, "libwebp-4.dll")) os.copyfile("./graphics_dependencies/SDL2_image/lib/x86/zlib1.dll", path.join(binPath, "zlib1.dll")) -- SDL2_ttf print(" ... SDL2_ttf") os.copyfile("./graphics_dependencies/SDL2_ttf/lib/x86/SDL2_ttf.dll", path.join(binPath, "SDL2_ttf.dll")) os.copyfile("./graphics_dependencies/SDL2_ttf/lib/x86/libfreetype-6.dll", path.join(binPath, "libfreetype-6.dll")) -- also requires zlib1, but copied already -- SDL2_mixer print(" ... SDL2_mixer") os.copyfile("./graphics_dependencies/SDL2_mixer/lib/x86/SDL2_mixer.dll", path.join(binPath, "SDL2_mixer.dll")) os.copyfile("./graphics_dependencies/SDL2_mixer/lib/x86/libFLAC-8.dll", path.join(binPath, "libFLAC-8.dll")) os.copyfile("./graphics_dependencies/SDL2_mixer/lib/x86/libmodplug-1.dll", path.join(binPath, "libmodplug-1.dll")) os.copyfile("./graphics_dependencies/SDL2_mixer/lib/x86/libogg-0.dll", path.join(binPath, "libogg-0.dll")) os.copyfile("./graphics_dependencies/SDL2_mixer/lib/x86/libvorbis-0.dll", path.join(binPath, "libvorbis-0.dll")) os.copyfile("./graphics_dependencies/SDL2_mixer/lib/x86/libvorbisfile-3.dll", path.join(binPath, "libvorbisfile-3.dll")) os.copyfile("./graphics_dependencies/SDL2_mixer/lib/x86/smpeg2.dll", path.join(binPath, "smpeg2.dll")) -- glew print(" ... glew") os.copyfile("./graphics_dependencies/glew/bin/Release/Win32/glew32.dll", path.join(binPath, "glew32.dll")) end
NewFileModal = {} NewFileModal.__index = NewFileModal function NewFileModal:Init() local _renameModal = {} -- our new object setmetatable(_renameModal, NewFileModal) -- make Account handle lookup local width = 224 local height = 72 _renameModal.canvas = NewCanvas(width, height) local displaySize = Display() _renameModal.title = "Rename File" _renameModal.rect = { x = math.floor(((displaySize.x - width) * .5) / 8) * 8, y = math.floor(((displaySize.y - height) * .5) / 8) * 8, w = width, h = height } _renameModal.currentSelection = 1 _renameModal.message = message _renameModal.editable = true return _renameModal end function NewFileModal:SetText(title, inputText, message, editable) self.editable = editable self.title = title -- self.message = description self.defaultText = inputText self.selectionValue = false local wrap = WordWrap(message, (self.rect.w / 4) - 4) self.lines = SplitLines(wrap) end function NewFileModal:GetText() return self.inputField.text end function NewFileModal:Open() self.keyDelay = .2 self.keyTime = 0 self.canvas:Clear() -- Save a snapshot of the TilemapCache -- Draw the black background self.canvas:SetStroke({0}, 1, 1) self.canvas:SetPattern({0}, 1, 1) self.canvas:DrawSquare(0, 0, self.canvas.width - 1, self.canvas.height - 1, true) -- Draw the brown background self.canvas:SetStroke({12}, 1, 1) self.canvas:SetPattern({11}, 1, 1) self.canvas:DrawSquare(2, 8, self.canvas.width - 3, self.canvas.height - 3, true) local tmpX = (self.canvas.width - (#self.title * 4)) * .5 self.canvas:DrawText(self.title:upper(), tmpX, 0, "small", 15, - 4) self.canvas:SetStroke({15}, 1, 1) self.canvas:DrawLine(2, 8, self.canvas.width - 4, 8) self.canvas:DrawLine(2, 8, 2, self.canvas.height - 4) self.buttons = {} local backBtnData = self.editorUI:CreateButton({x = self.rect.x + 184, y = self.rect.y + 48}, "modalokbutton", "Accept the changes.") backBtnData.onAction = function() -- Set value to true when ok is pressed self.selectionValue = true if(self.onParentClose ~= nil) then self.onParentClose() end end local cancelBtnData = self.editorUI:CreateButton({x = self.rect.x + 144, y = self.rect.y + 48}, "modalcancelbutton", "Cancel renaming.") cancelBtnData.onAction = function() -- Set value to true when cancel is pressed self.selectionValue = false -- Close the panel if(self.onParentClose ~= nil) then self.onParentClose() end end table.insert(self.buttons, backBtnData) table.insert(self.buttons, cancelBtnData) local spriteData = renameinputfield self.canvas:DrawSprites(spriteData.spriteIDs, 8, 16 + 8, spriteData.width) self.inputField = self.editorUI:CreateInputField({x = self.rect.x + 16, y = self.rect.y + 32, w = 192}, "Untitled", "Enter a new filename.", "file") local startX = 16 local startY = 16 local total = #self.lines -- We want to render the text from the bottom of the screen so we offset it and loop backwards. for i = 1, total do self.canvas:DrawText(self.lines[i]:upper(), startX, (startY + ((i - 1) * 8)), "medium", 0, - 4) end for i = 1, #self.buttons do self.editorUI:Invalidate(self.buttons[i]) end self.canvas:DrawPixels(self.rect.x, self.rect.y, DrawMode.TilemapCache) if(self.inputField ~= nil) then self.editorUI:ChangeInputField(self.inputField, self.defaultText, false) end self.editorUI:Enable(self.inputField, self.editable) end function NewFileModal:ShutdownTextField() self.editorUI:EditInputArea(self.inputField, false) self.editorUI:ResetValidation(self.inputField) end function NewFileModal:Update(timeDelta) for i = 1, #self.buttons do self.editorUI:UpdateButton(self.buttons[i]) end self.editorUI:UpdateInputField(self.inputField) if(self.inputField.editing == false) then -- print("Key Input") self.keyTime = self.keyTime + timeDelta if((self.keyTime > self.keyDelay)) then if(Key(Keys.Enter, InputState.Released)) then self.selectionValue = true self.onParentClose() elseif(Key(Keys.Escape, InputState.Released)) then self.selectionValue = false self.onParentClose() end end else self.keyTime = 0 end end
-- Base neovim configuration local Options = require('configuration.options') local StatusLine = require('configuration.statusline') return { Options = Options, StatusLine = StatusLine, setup = function() -- Configure neovim options Options.setup() -- Enable custom statusline StatusLine.setup() end }
-- language specific higlights local lush = require("lush") local base = require("codeschool.base") local M = {} M = lush(function() return { jsxTagName {base.CodeschoolAqua}, jsxComponentName {base.CodeschoolGreen}, jsxCloseString {base.CodeschoolFg4}, jsxAttrib {base.CodeschoolYellow}, jsxEqual {base.CodeschoolAqua}, } end) return M
local versionMajor = "2" local versionMinor = "2" --[[ Original by Dustpuppy Modified & Extended by MMaster Gui functions Needs a screen tier 2 or tier 3 All x, y coordinates are relative to the gui, not the screen ------------------------------------------------------------------------ gui.Version() returns the version of the library gui.clearScreen() clears the screen to background color, sets top and back line gui.setTop(text) prints a text centered on the top line gui.setBottom(text) prints a text centered on the bottom line gui.newGui(x, y, w, h, frame, text, bg, fg) setup a new gui frame = true/false needs: x, y, w, h, frame gui.displayGui(guiID) displays the whole gui and his widgets needs to be called before handling the gui first call of runGui will do it gui.newLabel(guiID, x, y, text, bg, fg) register a new label to gui returns id of the label needs: guiID, x, y, text) gui.newCheckbox(guiID, x, y, status) register a new checkbox to the gui returns id of the checkbox status can be true or false gui.newRadio(guiID, x, y) registers a new radio button returns id of the radio button a gui can have only one set of radio buttons gui.newButton(guiID, x, y, text, func, bg, fg, clickedBg, clickedFg, disabledBg, disabledFg) register a new button to gui returns id of the button func will be called if button is clicked with func(guiID, buttonID) needs: guiID, x, y, text gui.newText(guiID, x, y, lenght, text, func) register a new text input to gui returns id of the text input func will be called if input is finished and enter is pressed with func(guiID, textID, text) needs: guiID, x, y, lenght, text gui.newProgress(guiID, x, y, lenght, maxValue, value, func, number) register a new progress bar to the gui returns the id of the progress bar func will be called if value reached max value with func(guiID, progressID) if number is given, it displays a % value in the middle on top of the bar Progressbar will be paused if an text input is active needs: guiID, x, y, lenght, maxValue, value gui.newVProgress(guiID, x, y, lenght, maxValue, value, func, direction) register a new vertical progress bar to the gui returns the id of the progress bar func will be called if value reached max value with func(guiID, progressID) If direction is 0 or not given, the bar runs from top to bottom. If direction is 1 then bar runs from bottom to top Progressbar will be paused if an text input is active needs: guiID, x, y, lenght, maxValue, value gui.newList(guiID, x, y, width, height, tab, func, text) register a new selection list to the gui tab = table with entries returns the id of the list func will be called, if scrolling in list, or entry is selected with func(guiID, listID, selectedID, selectedText) needs: guiID, x, y, width, height, tab gui.newFrame(guiID, x, y, width, height, text, bg, fg) register a new frame to the gui needs: guiID, x, y, width, height gui.newHLine(guiID, x, y, width) register a new horizontal line gui.getCheckboxStatus(guiID, widgetID) returns the status of the checkbox (true = enabled or false = disabled) gui.getSelected(guiID, listID) returns the number and the text of the selected entrie in a list gui.setMax(guiID, progressID, maxValue) set the maximum value of a progress bar gui.setValue(guiID, progressID, value) set the value of a progress bar gui.resetProgress(guiID, progressID) resets a progress bar to 0, so it can be used again gui.setText(guiID, widgetID, text) sets text of an element can be used on label, text inputs and lists gui.getText(guiID, widgetID) returns text of an input field can be used on label, text inputs and lists gui.setEnable(guiID, widgetID, state) enable or disable element state = true/false gui.setVisible(guiID, widgetID, state) shows or hides an element state = true/false will also enable or disable the element. setEnable needs to be called if state is set back to true gui.clearList(guiID, listID) clears a list to use it again gui.insertList(guiID, listID, value) insert an entry into a list gui.getRadio(guiID) resturns id of the selected radio button or -1 if none is selected gui.runGui(guiID) needs to be called in a loop to run gui actions it's possible to setup guis and run each seperated. gui.processEvent(guiID, isAuthorizedFunc, e, x, y, button, player) processes event collected somewhere else runGui uses it like this: function gui.runGui(guiID, isAuthorizedFunc) if displayed == false then displayed = true gui.displayGui(guiID) end local e, _, x, y, button, player = event.pull(0.1, "touch") if e == nil then return false end gui.processEvent(guiID, isAuthorizedFunc, e, x, y, button, player) end gui.showError(msg1, msg2, msg3) displays a centered error message, with exit program as button gui.showMsg(msg1, msg2, msg3) displays a message box gui.getYesNo(msg1, msg2, msg3) displays a yes-No question returns true or false gui.exit() clears the screen to black and exits the program --------------------------------------------------------------- Example: local component = require("component") local gpu = component.gpu local gui = require("gui") local prgName = "Test" local version = gui.Version() function buttonCallback(guiID, id) local result = gui.getYesNo("", "Do you really want to exit?", "") if result == true then gui.exit() end gui.displayGui(myGui) end myGui = gui.newGui(2, 2, 78, 23, true) button = gui.newButton(myGui, "center", 21, "exit", buttonCallback) gui.clearScreen() gui.setTop(prgName .. " " .. version) while true do gui.runGui(myGui) end ]] local component = require("component") local gpu = component.gpu local event = require("event") local ser = require("serialization") local computer = require("computer") local gui = {} local colorScreenBackground = 0x000000 local colorScreenForeground = 0x7F7F7F local colorTopLineBackground = 0x131411 local colorTopLineForeground = 0x90908A local colorBottomLineBackground = 0x131411 local colorBottomLineForeground = 0x90908A local colorFrameBackground = 0x272822 local colorFrameForeground = 0x75715E local colorButtonBackground = 0x39392F local colorButtonForeground = 0xF8F8F2 local colorButtonClickedBackground = 0x272822 local colorButtonClickedForeground = 0xFFFFFF local colorButtonDisabledBackground = 0x131411 local colorButtonDisabledForeground = 0x888882 local colorTextBackground = 0x131411 local colorTextForeground = 0xE6DB74 local colorInputBackground = 0x131411 local colorInputForeground = 0xF8F8F2 local colorProgressBackground = 0x39392F local colorProgressForeground = 0xA6E22E local colorProgressNumberForeground = 0x000000 local colorListBackground = 0x131411 local colorListForeground = 0xE6DB74 local colorListActiveBackground = 0x39392F local colorListActiveForeground = 0xF8F8F2 local colorListDisabledBackground = 0x131411 local colorListDisabledForeground = 0x90908A local colorVProgressBackground = colorProgressBackground local colorVProgressForeground = colorProgressForeground local colorVSliderBackground = 0x131411 local colorVSliderForeground = 0x66D9EF local colorChartBackground = 0x131411 local colorChartForeground = 0xF92672 local screenWidth, screenHeight = gpu.getResolution() function gui.Version() return versionMajor .. "." .. versionMinor, versionMajor, versionMinor end function gui.checkVersion(major, minor) local ret = true if major < tonumber(versionMajor) then ret = false else if minor < tonumber(versionMinor) then ret = false end end return ret end -- displays the gui frame, if set or just clears the display area local function _displayFrame(gui) gpu.setBackground(gui.bg) gpu.setForeground(gui.fg) gpu.fill(gui.x, gui.y, gui.width, gui.height, " ") if gui.frame == true then gpu.fill(gui.x, gui.y, 1, gui.height, "¦") gpu.fill(gui.x + gui.width - 1, gui.y, 1, gui.height, "¦") gpu.fill(gui.x, gui.y, gui.width, 1, "-") gpu.fill(gui.x, gui.y + gui.height - 1, gui.width, 1, "-") gpu.set(gui.x, gui.y, "+") gpu.set(gui.x + gui.width - 1 , gui.y, "+") gpu.set(gui.x, gui.y + gui.height - 1 , "+") gpu.set(gui.x + gui.width - 1 , gui.y + gui.height - 1, "+") if gui.text then gpu.set(gui.x + math.floor((gui.width/2)) - math.floor((string.len(gui.text)/2)), gui.y, gui.text) end end end -- displays a frame local function _displayAFrame(guiID, frameID) gpu.setBackground(guiID.bg) gpu.setForeground(guiID.fg) gpu.fill(guiID[frameID].x, guiID[frameID].y, 1, guiID[frameID].height, "¦") gpu.fill(guiID[frameID].x + guiID[frameID].width - 1, guiID[frameID].y, 1, guiID[frameID].height, "¦") gpu.fill(guiID[frameID].x, guiID[frameID].y, guiID[frameID].width, 1, "-") gpu.fill(guiID[frameID].x, guiID[frameID].y + guiID[frameID].height - 1, guiID[frameID].width, 1, "-") gpu.set(guiID[frameID].x, guiID[frameID].y, "+") gpu.set(guiID[frameID].x + guiID[frameID].width - 1 , guiID[frameID].y, "+") gpu.set(guiID[frameID].x, guiID[frameID].y + guiID[frameID].height - 1 , "+") gpu.set(guiID[frameID].x + guiID[frameID].width - 1 , guiID[frameID].y + guiID[frameID].height - 1, "+") if guiID[frameID].text then gpu.set(guiID[frameID].x + math.floor((guiID[frameID].width/2)) - math.floor((string.len(guiID[frameID].text)/2)+1), guiID[frameID].y, " " .. guiID[frameID].text .. " ") end end --display a horizontal line local function _displayHLine(guiID, lineID) gpu.setBackground(guiID.bg) gpu.setForeground(guiID.fg) gpu.fill(guiID[lineID].x, guiID[lineID].y, guiID[lineID].width, 1, "-") end -- displays a checkbox local function _displayCheckbox(guiID, checkboxID) if guiID[checkboxID].visible == true then gpu.setBackground(guiID.bg) gpu.setForeground(guiID.fg) local x = 0 x =guiID.x + guiID[checkboxID].x if guiID[checkboxID].status == true then gpu.set(x, guiID[checkboxID].y, "[v]") else gpu.set(x, guiID[checkboxID].y, "[ ]") end end end -- displays a radio button local function _displayRadio(guiID, radioID) if guiID[radioID].visible == true then gpu.setBackground(guiID.bg) gpu.setForeground(guiID.fg) local x = 0 x =guiID.x + guiID[radioID].x if guiID[radioID].status == true then gpu.set(x, guiID[radioID].y, "(x)") else gpu.set(x, guiID[radioID].y, "( )") end end end -- displays a label local function _displayLabel(guiID, labelID) if guiID[labelID].visible == true then gpu.setBackground(guiID[labelID].bg) gpu.setForeground(guiID[labelID].fg) local x = 0 if guiID[labelID].x == "center" then x = guiID.x + math.floor((guiID.width / 2)) - math.floor((string.len(guiID[labelID].text)) / 2) else x =guiID.x + guiID[labelID].x end gpu.set(x, guiID[labelID].y, guiID[labelID].text) end end -- displays a button local function _displayButton(guiID, buttonID) if guiID[buttonID].visible == true then if guiID[buttonID].active == true then if guiID[buttonID].clickBg then gpu.setBackground(guiID[buttonID].clickBg) else gpu.setBackground(colorButtonClickedBackground) end if guiID[buttonID].clickFg then gpu.setForeground(guiID[buttonID].clickFg) else gpu.setForeground(colorButtonClickedForeground) end elseif guiID[buttonID].enabled == false then if guiID[buttonID].disabledBg then gpu.setBackground(guiID[buttonID].disabledBg) else gpu.setBackground(colorButtonDisabledBackground) end if guiID[buttonID].disabledFg then gpu.setForeground(guiID[buttonID].disabledFg) else gpu.setForeground(colorButtonDisabledForeground) end else if guiID[buttonID].bg then gpu.setBackground(guiID[buttonID].bg) else gpu.setBackground(colorButtonBackground) end if guiID[buttonID].fg then gpu.setForeground(guiID[buttonID].fg) else gpu.setForeground(colorButtonForeground) end end local x = 0 if guiID[buttonID].x == "center" then x = guiID.x + math.floor((guiID.width / 2)) - math.floor((guiID[buttonID].lenght / 2)) else x = guiID.x + guiID[buttonID].x end gpu.fill(x, guiID[buttonID].y, guiID[buttonID].lenght, 1, " ") gpu.set(x, guiID[buttonID].y, guiID[buttonID].text) end end -- displays a text local function _displayText(guiID, textID) if guiID[textID].visible == true then gpu.setBackground(colorTextBackground) gpu.setForeground(colorTextForeground) local x = 0 if guiID[textID].x == "center" then x = guiID.x + math.floor((guiID.width / 2)) - math.floor((guiID[textID].lenght) / 2) else x = guiID.x + guiID[textID].x end gpu.fill(x, guiID[textID].y , guiID[textID].lenght, 1, " ") gpu.set(x, guiID[textID].y, string.sub(guiID[textID].text, 1, guiID[textID].lenght)) end end -- displays a vertical slider local function _displayVslider(guiID, sliderID) if guiID[sliderID].visible == true then gpu.setBackground(colorVSliderBackground) gpu.setForeground(colorVSliderForeground) local x = 0 x = guiID.x + guiID[sliderID].x gpu.fill(x, guiID[sliderID].y , guiID[sliderID].lenght + 2, 1, " ") gpu.setBackground(colorButtonBackground) gpu.setForeground(colorButtonForeground) gpu.set(x, guiID[sliderID].y, "-") gpu.set(x + guiID[sliderID].lenght + 1, guiID[sliderID].y, "+") end end -- displays a progress bar local function _displayProgress(guiID, progressID) if guiID[progressID].visible == true then gpu.setBackground(colorProgressForeground) gpu.setForeground(colorProgressBackground) local x = 0 local proz = math.floor(100 / guiID[progressID].max * guiID[progressID].value) if proz > 100 then proz = 100 if guiID[progressID].finished == false and guiID[progressID].func then guiID[progressID].func(guiID, progressID) end guiID[progressID].finished = true end local length = guiID[progressID].lenght if guiID[progressID].displayNumber == true then length = length - 4 end if guiID[progressID].x == "center" then x = guiID.x + math.floor((guiID.width / 2)) - math.floor(length / 2) else x = guiID.x + guiID[progressID].x end local pos = math.floor(length / 100 * proz) gpu.fill(x, guiID[progressID].y , pos, 1, " ") gpu.setBackground(colorProgressBackground) gpu.setForeground(colorProgressForeground) gpu.fill(x + pos, guiID[progressID].y, length - pos, 1, " ") gpu.setBackground(guiID.bg) gpu.setForeground(guiID.fg) if guiID[progressID].displayNumber == true then -- gpu.fill(x, guiID[progressID].y - 1, guiID[progressID].lenght, 1, " ") gpu.set(x + guiID[progressID].lenght - #("" .. proz) - 1, guiID[progressID].y, proz .. "%") end end end -- displays a vertical progress bar local function _displayVProgress(guiID, progressID) if guiID[progressID].visible == true then local x = 0 if guiID[progressID].x == "center" then x = guiID.x + math.floor((guiID.width / 2)) - math.floor((guiID[progressID].lenght) / 2) else x = guiID.x + guiID[progressID].x end local proz = math.floor(100 / guiID[progressID].max * guiID[progressID].value) if proz > 100 then proz = 100 if guiID[progressID].finished == false and guiID[progressID].func then guiID[progressID].func(guiID, progressID) end guiID[progressID].finished = true end local pos = math.floor(guiID[progressID].lenght / 100 * proz) for i = 1, guiID[progressID].width do if guiID[progressID].direction == 0 then gpu.setBackground(colorProgressForeground) gpu.setForeground(colorProgressBackground) gpu.fill(x+i-1, guiID[progressID].y , 1, pos, " ") gpu.setBackground(colorProgressBackground) gpu.setForeground(colorProgressForeground) gpu.fill(x+i-1, guiID[progressID].y + pos, 1, guiID[progressID].lenght - pos, " ") end if guiID[progressID].direction == 1 then gpu.setBackground(colorProgressBackground) gpu.setForeground(colorProgressForeground) gpu.fill(x+i-1, guiID[progressID].y, 1, guiID[progressID].lenght, " ") gpu.setBackground(colorProgressForeground) gpu.setForeground(colorProgressBackground) gpu.fill(x+i-1, guiID[progressID].y + guiID[progressID].lenght - pos , 1, pos, " ") end end end end -- display list local function _displayList(guiID, listID) if guiID[listID].visible == true then if guiID[listID].enabled == true then gpu.setBackground(colorListBackground) gpu.setForeground(colorListForeground) else gpu.setBackground(colorListDisabledBackground) gpu.setForeground(colorListDisabledForeground) end gpu.fill(guiID[listID].x, guiID[listID].y, guiID[listID].width, guiID[listID].height, " ") gpu.fill(guiID[listID].x, guiID[listID].y, guiID[listID].width, 1, "-") if guiID[listID].text then gpu.set( guiID[listID].x + (guiID[listID].width/2) - (string.len(guiID[listID].text)/2), guiID[listID].y, "¦" .. guiID[listID].text .. "?") end if guiID[listID].active + guiID[listID].height - 3 > #guiID[listID].entries then l = #guiID[listID].entries else l = guiID[listID].active + guiID[listID].height - 3 end gpu.fill(guiID[listID].x, guiID[listID].y +guiID[listID].height - 1, guiID[listID].width, 1, "-") gpu.set(guiID[listID].x, guiID[listID].y + guiID[listID].height - 1, "[<]") gpu.set(guiID[listID].x + guiID[listID].width - 3, guiID[listID].y + guiID[listID].height - 1, "[>]") for v = guiID[listID].active, l do if v == guiID[listID].selected then gpu.setBackground(colorListActiveBackground) gpu.setForeground(colorListActiveForeground) else if guiID[listID].enabled == true then gpu.setBackground(colorListBackground) gpu.setForeground(colorListForeground) else gpu.setBackground(colorListDisabledBackground) gpu.setForeground(colorListDisabledForeground) end end gpu.fill(guiID[listID].x, guiID[listID].y + v - guiID[listID].active + 1, guiID[listID].width, 1 , " ") gpu.set(guiID[listID].x + 1, guiID[listID].y + v - guiID[listID].active + 1, guiID[listID].entries[v] ) end end end -- displays a chart local function _displayChart(guiID, chartID) if guiID[chartID].visible == true then gpu.setBackground(colorChartBackground) gpu.setForeground(colorChartForeground) for x = 1, #guiID[chartID].data do local proz = math.floor(100 / guiID[chartID].max * guiID[chartID].data[x]) local dotPos = guiID[chartID].height - math.floor( guiID[chartID].height / guiID[chartID].max * guiID[chartID].data[x]) for y = 1, guiID[chartID].height do if dotPos == y then gpu.setBackground(colorChartForeground) else gpu.setBackground(colorChartBackground) end gpu.set(x + guiID[chartID].x, y + guiID[chartID].y, " ") end end end end -- display the gui and all widgets function gui.displayGui(guiID) _displayFrame(guiID) for i = 1, #guiID do if guiID[i].type == "label" then _displayLabel(guiID, i) elseif guiID[i].type == "button" then _displayButton(guiID, i) elseif guiID[i].type == "text" then _displayText(guiID, i) elseif guiID[i].type == "progress" then _displayProgress(guiID, i) elseif guiID[i].type == "vprogress" then _displayVProgress(guiID, i) elseif guiID[i].type == "list" then _displayList(guiID, i) elseif guiID[i].type == "frame" then _displayAFrame(guiID, i) elseif guiID[i].type == "hline" then _displayHLine(guiID, i) elseif guiID[i].type == "checkbox" then _displayCheckbox(guiID, i) elseif guiID[i].type == "radio" then _displayRadio(guiID, i) elseif guiID[i].type == "vslider" then _displayVslider(guiID, i) elseif guiID[i].type == "chart" then _displayChart(guiID, i) end end end function gui.exit() gpu.setBackground(0x000000) gpu.setForeground(0xFFFFFF) gpu.fill(1, 1, screenWidth, screenHeight, " ") os.exit() end function gui.clearScreen() gpu.setBackground(colorScreenBackground) gpu.setForeground(colorScreenForeground) gpu.fill(1, 1, screenWidth, screenHeight, " ") gpu.setBackground(colorTopLineBackground) gpu.setForeground(colorTopLineForeground) gpu.fill(1, 1, screenWidth, 1, " ") gpu.setBackground(colorBottomLineBackground) gpu.setForeground(colorBottomLineForeground) gpu.fill(1, screenHeight, screenWidth, 1, " ") end function gui.setTop(text) gpu.setBackground(colorTopLineBackground) gpu.setForeground(colorTopLineForeground) gpu.set( (screenWidth / 2) - (string.len(text) / 2), 1, text) end function gui.setBottom(text) gpu.setBackground(colorBottomLineBackground) gpu.setForeground(colorBottomLineForeground) gpu.set( (screenWidth / 2) - (string.len(text) / 2), screenHeight, text) end -- need to be called first to setup a new dialog function gui.newGui(x, y, w, h, frame, text, bg, fg) local tmpTable = {} if x == "center" then tmpTable["x"] = math.floor((screenWidth / 2) - (w / 2)) else tmpTable["x"] = x end if y == "center" then tmpTable["y"] = math.floor((screenHeight / 2) - (h / 2)) else tmpTable["y"] = y end tmpTable["bg"] = bg or colorFrameBackground tmpTable["fg"] = fg or colorFrameForeground tmpTable["width"] = w tmpTable["height"] = h tmpTable["frame"] = frame if text then tmpTable["text"] = "¦" .. text .. "?" end return tmpTable end -- checkbox function gui.newCheckbox(guiID, x, y, status) local tmpTable = {} tmpTable["type"] = "checkbox" tmpTable["status"] = status or false tmpTable["y"] = y + guiID.y tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["x"] = x table.insert(guiID, tmpTable) return #guiID end -- radio button function gui.newRadio(guiID, x, y) local tmpTable = {} tmpTable["type"] = "radio" tmpTable["status"] = false tmpTable["y"] = y + guiID.y tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["x"] = x table.insert(guiID, tmpTable) return #guiID end -- label function gui.newLabel(guiID, x, y, text, bg, fg) local tmpTable = {} tmpTable["type"] = "label" tmpTable["y"] = y + guiID.y tmpTable["text"] = text tmpTable["lenght"] = string.len(text) tmpTable["bg"] = bg or guiID.bg tmpTable["fg"] = fg or guiID.fg tmpTable["visible"] = true tmpTable["x"] = x table.insert(guiID, tmpTable) return #guiID end -- button function gui.newButton(guiID, x, y, text, func, bg, fg, clickBg, clickFg, disabledBg, disabledFg) local tmpTable = {} tmpTable["type"] = "button" tmpTable["y"] = y + guiID.y tmpTable["text"] = text tmpTable["lenght"] = string.len(tmpTable.text) tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["active"] = false tmpTable["bg"] = bg tmpTable["fg"] = fg tmpTable["clickBg"] = clickBg tmpTable["clickFg"] = clickFg tmpTable["disabledBg"] = disabledBg tmpTable["disabledFg"] = disabledFg tmpTable["func"] = func tmpTable["x"] = x table.insert(guiID, tmpTable) return #guiID end -- text input field function gui.newText(guiID, x, y, lenght, text, func) local tmpTable = {} tmpTable["type"] = "text" tmpTable["x"] = x tmpTable["y"] = y + guiID.y tmpTable["text"] = text tmpTable["lenght"] = lenght tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["func"] = func table.insert(guiID, tmpTable) return #guiID end -- progressbar function gui.newProgress(guiID, x, y, lenght, maxValue, value, func, number) local tmpTable = {} tmpTable["type"] = "progress" tmpTable["x"] = x tmpTable["y"] = y + guiID.y tmpTable["lenght"] = lenght tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["max"] = maxValue tmpTable["value"] = value tmpTable["func"] = func tmpTable["finished"] = false tmpTable["displayNumber"] = number table.insert(guiID, tmpTable) return #guiID end -- vertical progress function gui.newVProgress(guiID, x, y, lenght, width, maxValue, value, func, direction) local tmpTable = {} tmpTable["type"] = "vprogress" tmpTable["x"] = x tmpTable["y"] = y + guiID.y tmpTable["lenght"] = lenght tmpTable["width"] = width tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["max"] = maxValue tmpTable["value"] = value tmpTable["func"] = func tmpTable["direction"] = direction or 0 tmpTable["finished"] = false table.insert(guiID, tmpTable) return #guiID end -- vertical slider function gui.newVSlider(guiID, x, y, lenght, minValue, maxValue, value, func) local tmpTable = {} tmpTable["type"] = "vslider" tmpTable["x"] = x tmpTable["y"] = y + guiID.y tmpTable["lenght"] = lenght tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["min"] = minValue tmpTable["max"] = maxValue tmpTable["value"] = value tmpTable["func"] = func table.insert(guiID, tmpTable) return #guiID end -- list function gui.newList(guiID, x, y, width, height, tab, func, text) local tmpTable = {} tmpTable["type"] = "list" tmpTable["x"] = x + guiID.x tmpTable["y"] = y + guiID.y tmpTable["width"] = width tmpTable["height"] = height tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["func"] = func tmpTable["selected"] = 1 tmpTable["active"] = 1 tmpTable["entries"] = tab tmpTable["text"] = text table.insert(guiID, tmpTable) return #guiID end --frame function gui.newFrame(guiID, x, y, width, height, text, bg, fg) local tmpTable = {} tmpTable["type"] = "frame" tmpTable["x"] = x + guiID.x tmpTable["y"] = y + guiID.y tmpTable["bg"] = bg or colorFrameBackground tmpTable["fg"] = fg or colorFrameForeground tmpTable["width"] = width tmpTable["height"] = height tmpTable["visible"] = true tmpTable["enabled"] = true tmpTable["text"] = text table.insert(guiID, tmpTable) return #guiID end -- hline function gui.newHLine(guiID, x, y, width) local tmpTable = {} tmpTable["type"] = "hline" tmpTable["x"] = x + guiID.x tmpTable["y"] = y + guiID.y tmpTable["width"] = width tmpTable["visible"] = true tmpTable["enabled"] = true table.insert(guiID, tmpTable) return #guiID end -- chart function gui.newChart(guiID, x, y, minValue, maxValue, data, lenght, height, bg, fg) local tmpTable = {} tmpTable["type"] = "chart" tmpTable["y"] = y + guiID.y tmpTable["lenght"] = lenght tmpTable["height"] = height tmpTable["bg"] = bg or guiID.bg tmpTable["fg"] = fg or guiID.fg tmpTable["visible"] = true tmpTable["x"] = x + guiID.x tmpTable["data"] = data tmpTable["min"] = minValue tmpTable["max"] = maxValue table.insert(guiID, tmpTable) return #guiID end function gui.getSelected(guiID, listID) return guiID[listID].selected, guiID[listID].entries[guiID[listID].selected] end function gui.setSelected(guiID, listID, selection) if selection<= #guiID[listID] then guiID[listID].selected = selection _displayList(guiID, listID) end end function gui.setMax(guiID, widgetID, maxValue) guiID[widgetID].max = maxValue _displayProgress(guiID, widgetID) end function gui.setChartData(guiID, chartID, data) guiID[chartID].data = data _displayChart(guiID, chartID) end function gui.setValue(guiID, widgetID, value) guiID[widgetID].value = value if guiID[widgetID].type == "progress" then _displayProgress(guiID, widgetID) end if guiID[widgetID].type == "vprogress" then _displayVProgress(guiID, widgetID) end end function gui.resetProgress(guiID, progressID) guiID[progressID].finished = false _displayProgress(guiID, progressID) end -- sets the text of a widget function gui.setText(guiID, widgetID, text) guiID[widgetID].text = text if guiID[widgetID].type == "text" then _displayText(guiID, widgetID) end if guiID[widgetID].type == "label" then _displayLabel(guiID, widgetID) end -- gui.displayGui(guiID) end function gui.getText(guiID, widgetID) return guiID[widgetID].text end function gui.getCheckboxStatus(guiID, widgetID) return guiID[widgetID].status end function gui.setEnable(guiID, widgetID, state) guiID[widgetID].enabled = state gui.displayGui(guiID) end function gui.setVisible(guiID, widgetID, state) if state == false then guiID[widgetID].visible = state guiID[widgetID].enabled = state elseif state == true then guiID[widgetID].visible = state end gui.displayGui(guiID) end function gui.setBackground(guiID, widgetID, color) guiID[widgetID].bg = color if guiID[widgetID].type == "label" then _displayLabel(guiID, widgetID) end end function gui.setForeground(guiID, widgetID, color) guiID[widgetID].fg = color if guiID[widgetID].type == "label" then _displayLabel(guiID, widgetID) end end function gui.clearList(guiID, listID) guiID[listID].entries = {} end function gui.insertList(guiID, listID, value) table.insert(guiID[listID].entries, value) _displayList(guiID, listID) end function gui.getRadio(guiID) for i = 1, #guiID do if guiID[i].type == "radio" then if guiID[i].status == true then return i end end end return -1 end function gui.setRadio(guiID, radioID) for i = 1, #guiID do if guiID[i].type == "radio" then guiID[i].status = false end end guiID[radioID].status = true return -1 end local function runInput(guiID, textID) local inputText = guiID[textID].text gpu.setBackground(colorInputBackground) gpu.setForeground(colorInputForeground) local x = 0 if guiID[textID].x == "center" then x = guiID.x + math.floor((guiID.width / 2)) - math.floor((guiID[textID].lenght) / 2) else x =guiID.x + guiID[textID].x end local loopRunning = true while loopRunning == true do gpu.fill(x, guiID[textID].y, guiID[textID].lenght, 1, " ") tmpStr = inputText if string.len(tmpStr) + 1 > guiID[textID].lenght then tmpStr = string.sub(tmpStr, string.len(tmpStr) - guiID[textID].lenght + 2, string.len(tmpStr)) end gpu.set(x, guiID[textID].y, tmpStr .. "_") local e, _, character, code = event.pullMultiple(0.1, "key_down", "touch") if e == "key_down" then if character == 8 then -- backspace inputText = string.sub(inputText, 1, string.len(inputText) - 1) elseif character == 13 then -- return guiID[textID].text = inputText if guiID[textID].func then guiID[textID].func(guiID, textID, inputText) end loopRunning = false elseif character > 31 and character < 128 then inputText = inputText .. string.char(character) end elseif e == "touch" then if character < x or character > (x + guiID[textID].lenght) or guiID[textID].y ~= code then guiID[textID].text = inputText _displayText(guiID, textID) if guiID[textID].func then guiID[textID].func(guiID, textID, inputText) end loopRunning = false computer.pushSignal("touch", _, character, code) end end end end local displayed = false function gui.log(logname, message) file=io.open(logname,"a") file:write(os.date("[%c] ") .. message .. "\n") file:close() end local showErrGui = false function errGuiOK() showErrGui = false end function gui.runGui(guiID, isAuthorizedFunc) if displayed == false then displayed = true gui.displayGui(guiID) end local e, _, x, y, button, player = event.pull(0.1, "touch") if e == nil then return false end gui.processEvent(guiID, isAuthorizedFunc, e, x, y, button, player) end function gui.processEvent(guiID, isAuthorizedFunc, e, x, y, button, player) if e == nil or e ~= "touch" then return false end local ix = 0 if isAuthorizedFunc and not isAuthorizedFunc(guiID, player) then gui.log("touches.log", "Not authorized: " .. player) local errGui = gui.newGui(2, "center", screenWidth - 2, 8, true, "ERROR", 0xFF0000, 0xFFFF00) local errMsgLabel = gui.newLabel(errGui, "center", 3, player) local errMsgLabel2 = gui.newLabel(errGui, "center", 4, "not authorized!") local errButton = gui.newButton(errGui, "center", 6, "OK", errGuiOK) showErrGui = true gui.displayGui(errGui) local cnt = 200 while showErrGui do gui.runGui(errGui) cnt = cnt - 1 if cnt <= 0 then showErrGui = false end end showErrGui = false gui.displayGui(guiID) return false end for i = 1, #guiID do if guiID[i].type == "button" then if guiID[i].x == "center" then ix = guiID.x + math.floor((guiID.width / 2)) - math.floor((guiID[i].lenght / 2)) else ix = guiID.x + guiID[i].x end if x >= ix and x < (ix + guiID[i].lenght) and guiID[i].y == y then if guiID[i].func and guiID[i].enabled == true then guiID[i].active = true gui.displayGui(guiID) os.sleep(0.05) guiID[i].active = false guiID[i].usedBy = player gui.displayGui(guiID) guiID[i].func(guiID, i) end end elseif guiID[i].type == "checkbox" then ix = guiID.x + guiID[i].x + 1 if x == ix and guiID[i].y == y then if guiID[i].enabled == true then if guiID[i].status == true then guiID[i].status = false else guiID[i].status = true end _displayCheckbox(guiID, i) end end elseif guiID[i].type == "radio" then ix = guiID.x + guiID[i].x + 1 if x == ix and guiID[i].y == y then if guiID[i].enabled == true then for c = 1, #guiID do if guiID[c].type == "radio" then guiID[c].status = false _displayRadio(guiID, c) end end guiID[i].status = true _displayRadio(guiID, i) end end elseif guiID[i].type == "text" then if guiID[i].x == "center" then ix = guiID.x + math.floor((guiID.width / 2)) - math.floor((guiID[i].lenght / 2)) else ix = guiID.x + guiID[i].x end if x >= ix and x < (ix + guiID[i].lenght) and guiID[i].y == y then if guiID[i].enabled == true then runInput(guiID, i) end end elseif guiID[i].type == "list" and guiID[i].enabled == true then if x == guiID[i].x +1 and y == guiID[i].y + guiID[i].height - 1 then guiID[i].active = guiID[i].active - guiID[i].height + 2 if guiID[i].active < 1 then guiID[i].active = 1 end gpu.setBackground(colorListActiveBackground) gpu.setForeground(colorListActiveForeground) gpu.set(guiID[i].x, guiID[i].y + guiID[i].height - 1, "[<]") guiID[i].selected = guiID[i].active -- _displayList(guiID, i) if guiID[i].func then gpu.setBackground(colorButtonClickedBackground) gpu.setForeground(colorButtonClickedForeground) gpu.set(guiID[i].x, guiID[i].y + guiID[i].height - 1, "[<]") os.sleep(0.05) gpu.setBackground(colorListBackground) gpu.setForeground(colorListForeground) guiID[i].usedBy = player gpu.set(guiID[i].x, guiID[i].y + guiID[i].height - 1, "[<]") guiID[i].func(guiID, i, guiID[i].selected, guiID[i].entries[guiID[i].selected]) end end if x == guiID[i].x + guiID[i].width - 2 and y == guiID[i].y + guiID[i].height - 1 then if guiID[i].active + guiID[i].height - 2 < #guiID[i].entries then guiID[i].active = guiID[i].active + guiID[i].height - 2 guiID[i].selected = guiID[i].active end gpu.setBackground(colorListActiveBackground) gpu.setForeground(colorListActiveForeground) gpu.set(guiID[i].x + guiID[i].width - 3, guiID[i].y + guiID[i].height - 1, "[>]") -- _displayList(guiID, i) if guiID[i].func then gpu.setBackground(colorButtonClickedBackground) gpu.setForeground(colorButtonClickedForeground) gpu.set(guiID[i].x + guiID[i].width - 3, guiID[i].y + guiID[i].height - 1, "[>]") os.sleep(0.05) gpu.setBackground(colorListBackground) gpu.setForeground(colorListForeground) guiID[i].usedBy = player gpu.set(guiID[i].x + guiID[i].width - 3, guiID[i].y + guiID[i].height - 1, "[>]") guiID[i].func(guiID, i, guiID[i].selected, guiID[i].entries[guiID[i].selected]) end end if x > guiID[i].x - 1 and x < guiID[i].x + guiID[i].width and y > guiID[i].y and y < guiID[i].y + guiID[i].height - 1 then if guiID[i].active + y - guiID[i].y - 1 <= #guiID[i].entries then guiID[i].selected = guiID[i].active + y - guiID[i].y - 1 -- _displayList(guiID, i) if guiID[i].func then guiID[i].usedBy = player guiID[i].func(guiID, i, guiID[i].selected, guiID[i].entries[guiID[i].selected]) end end end _displayList(guiID, i) elseif guiID[i].type == "chart" and guiID[i].enabled == true then _displayChart(guiID, i) end end -- gui.displayGui(guiID) end errorGui = gui.newGui("center", "center", screenWidth / 3 * 2, 10, true, "ERROR", 0xFF0000, 0xFFFF00) errorMsgLabel1 = gui.newLabel(errorGui, "center", 3, "") errorMsgLabel2 = gui.newLabel(errorGui, "center", 4, "") errorMsgLabel3 = gui.newLabel(errorGui, "center", 5, "") errorButton = gui.newButton(errorGui, "center", 8, "exit", gui.exit) function gui.showError(msg1, msg2, msg3) gui.setText(errorGui, errorMsgLabel1, msg1 or "") gui.setText(errorGui, errorMsgLabel2, msg2 or "") gui.setText(errorGui, errorMsgLabel3, msg3 or "") gui.displayGui(errorGui) while true do gui.runGui(errorGui) end end local msgRunning = true function msgCallback() msgRunning = false end msgGui = gui.newGui("center", "center", 40, 10, true, "Info") msgLabel1 = gui.newLabel(msgGui, "center", 3, "") msgLabel2 = gui.newLabel(msgGui, "center", 4, "") msgLabel3 = gui.newLabel(msgGui, "center", 5, "") msgButton = gui.newButton(msgGui, "center", 8, "ok", msgCallback) function gui.showMsg(msg1, msg2, msg3) gui.setText(msgGui, msgLabel1, msg1 or "") gui.setText(msgGui, msgLabel2, msg2 or "") gui.setText(msgGui, msgLabel3, msg3 or "") msgRunning = true gui.displayGui(msgGui) while msgRunning == true do gui.runGui(msgGui) end end local yesNoRunning = true local yesNoValue = false local function yesNoCallbackYes() yesNoRunning = false yesNoValue = true end local function yesNoCallbackNo() yesNoRunning = false yesNoValue = false end yesNoGui = gui.newGui("center", "center", screenWidth / 3 * 2, 8, true, "Question") yesNoMsgLabel1 = gui.newLabel(yesNoGui, "center", 2, "") yesNoMsgLabel2 = gui.newLabel(yesNoGui, "center", 3, "") yesNoMsgLabel3 = gui.newLabel(yesNoGui, "center", 4, "") yesNoYesButton = gui.newButton(yesNoGui, 3, 6, "yes", yesNoCallbackYes) yesNoNoButton = gui.newButton(yesNoGui, screenWidth / 3 * 2 - 4, 6, "no", yesNoCallbackNo) function gui.getYesNo(msg1, msg2, msg3) yesNoRunning = true gui.setText(yesNoGui, yesNoMsgLabel1, msg1 or "") gui.setText(yesNoGui, yesNoMsgLabel2, msg2 or "") gui.setText(yesNoGui, yesNoMsgLabel3, msg3 or "") gui.displayGui(yesNoGui) while yesNoRunning == true do gui.runGui(yesNoGui) end return yesNoValue end -- File handling function gui.splitString(str, sep) local sep, fields = sep or ":", {} local pattern = string.format("([^%s]+)", sep) str:gsub(pattern, function(c) fields[#fields+1] = c end) return fields end local function convert( chars, dist, inv ) return string.char( ( string.byte( chars ) - 32 + ( inv and -dist or dist ) ) % 95 + 32 ) end function gui.string2key(str) tmpTable = {} for i = 1, string.len(str) do tmpTable[i] = string.byte(str,i) end while #tmpTable < 5 do table.insert(tmpTable,100) end return tmpTable end function gui.crypt(str,inv,k) if not k then k = {1,2,3,4,5} end while #k < 5 do table.insert(k,100) end local enc= ""; for i=1,#str do if(#str-k[#k] >= i or not inv)then for inc=0,3 do if(i%4 == inc)then enc = enc .. convert(string.sub(str,i,i),k[inc+1],inv); break; end end end end if(not inv)then for i=1,k[#k] do enc = enc .. string.char(math.random(32,126)); end end return enc; end --// exportstring( string ) --// returns a "Lua" portable version of the string local function exportstring( s ) s = string.format( "%q",s ) -- to replace s = string.gsub( s,"\\\n","\\n" ) s = string.gsub( s,"\r","\\r" ) s = string.gsub( s,string.char(26),"\"..string.char(26)..\"" ) return s end --// The Save Function function gui.saveTable(tbl,filename ) local charS,charE = " ","\n" local file,err -- create a pseudo file that writes to a string and return the string if not filename then file = { write = function( self,newstr ) self.str = self.str..newstr end, str = "" } charS,charE = "","" -- write table to tmpfile elseif filename == true or filename == 1 then charS,charE,file = "","",io.tmpfile() -- write table to file -- use io.open here rather than io.output, since in windows when clicking on a file opened with io.output will create an error else file,err = io.open( filename, "w" ) if err then print ("Gui-lib: Error saving table " .. filename .." -> " .. err) return _,err end end -- initiate variables for save procedure local tables,lookup = { tbl },{ [tbl] = 1 } file:write( "return {"..charE ) for idx,t in ipairs( tables ) do if filename and filename ~= true and filename ~= 1 then file:write( "-- Table: {"..idx.."}"..charE ) end file:write( "{"..charE ) local thandled = {} for i,v in ipairs( t ) do thandled[i] = true -- escape functions and userdata if type( v ) ~= "userdata" then -- only handle value if type( v ) == "table" then if not lookup[v] then table.insert( tables, v ) lookup[v] = #tables end file:write( charS.."{"..lookup[v].."},"..charE ) elseif type( v ) == "function" then file:write( charS.."loadstring("..exportstring(string.dump( v )).."),"..charE ) else local value = ( type( v ) == "string" and exportstring( v ) ) or tostring( v ) file:write( charS..value..","..charE ) end end end for i,v in pairs( t ) do -- escape functions and userdata if (not thandled[i]) and type( v ) ~= "userdata" then -- handle index if type( i ) == "table" then if not lookup[i] then table.insert( tables,i ) lookup[i] = #tables end file:write( charS.."[{"..lookup[i].."}]=" ) else local index = ( type( i ) == "string" and "["..exportstring( i ).."]" ) or string.format( "[%d]",i ) file:write( charS..index.."=" ) end -- handle value if type( v ) == "table" then if not lookup[v] then table.insert( tables,v ) lookup[v] = #tables end file:write( "{"..lookup[v].."},"..charE ) elseif type( v ) == "function" then file:write( "loadstring("..exportstring(string.dump( v )).."),"..charE ) else local value = ( type( v ) == "string" and exportstring( v ) ) or tostring( v ) file:write( value..","..charE ) end end end file:write( "},"..charE ) end file:write( "}" ) -- Return Values -- return stringtable from string if not filename then -- set marker for stringtable return file.str.."--|" -- return stringttable from file elseif filename == true or filename == 1 then file:seek ( "set" ) -- no need to close file, it gets closed and removed automatically -- set marker for stringtable return file:read( "*a" ).."--|" -- close file and return 1 else file:close() return 1 end end --// The Load Function function gui.loadTable( sfile ) local tables, err, _ -- catch marker for stringtable if string.sub( sfile,-3,-1 ) == "--|" then tables,err = loadstring( sfile ) else tables,err = loadfile( sfile ) end if err then print("Gui-lib: Error loading table " ..sfile .. " -> " ..err) return _,err end tables = tables() for idx = 1,#tables do local tolinkv,tolinki = {},{} for i,v in pairs( tables[idx] ) do if type( v ) == "table" and tables[v[1]] then table.insert( tolinkv,{ i,tables[v[1]] } ) end if type( i ) == "table" and tables[i[1]] then table.insert( tolinki,{ i,tables[i[1]] } ) end end -- link values, first due to possible changes of indices for _,v in ipairs( tolinkv ) do tables[idx][v[1]] = v[2] end -- link indices for _,v in ipairs( tolinki ) do tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil end end return tables[1] end function gui.sepString(str) tmpTable = {} for i = 1, string.len(str) do tmpTable[i] = string.char(string.byte(str,i)) end return tmpTable end return gui
-- -- Copyright(c) 2010-2015 Intel Corporation. -- Copyright(c) 2016-2018 Viosoft Corporation. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in -- the documentation and/or other materials provided with the -- distribution. -- * Neither the name of Intel Corporation nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- dofile("bundle_maker.lua") if (test_system_id == nil) then error("test_system_id not set") end offset = 8 * test_system_id c_2s0, s_3s0 = setup_bundles(128 + offset, ss) c_4s0, s_5s0 = setup_bundles(129 + offset, ss) c_2s0h, s_3s0h = setup_bundles(130 + offset, ss) c_4s0h, s_5s0h = setup_bundles(131 + offset, ss) c_6s0, s_7s0 = setup_bundles(132 + offset, ss) c_8s0, s_9s0 = setup_bundles(133 + offset, ss) c_6s0h, s_7s0h = setup_bundles(134 + offset, ss) c_8s0h, s_9s0h = setup_bundles(135 + offset, ss) ---------------- c_2s1, s_3s1 = setup_bundles(64 + offset, ss) c_4s1, s_5s1 = setup_bundles(65 + offset, ss) c_2s1h, s_3s1h = setup_bundles(66 + offset, ss) c_4s1h, s_5s1h = setup_bundles(67 + offset, ss) c_6s1, s_7s1 = setup_bundles(68 + offset, ss) c_8s1, s_9s1 = setup_bundles(69 + offset, ss) c_6s1h, s_7s1h = setup_bundles(70 + offset, ss) c_8s1h, s_9s1h = setup_bundles(71 + offset, ss) if (max_setup_rate == nil) then error("max_setup_rate not set") end if (connections == nil) then error("connections not set") end port_a_clients="2s0,4s0,2s0h,4s0h,6s0,8s0,6s0h,8s0h" port_b_servers="3s0,5s0,3s0h,5s0h,7s0,9s0,7s0h,9s0h" port_c_clients="2s1,4s1,2s1h,4s1h,6s1,8s1,6s1h,8s1h" port_d_servers="3s1,5s1,3s1h,5s1h,7s1,9s1,7s1h,9s1h" all_clients = port_a_clients .. "," .. port_c_clients all_servers = port_b_servers .. "," .. port_d_servers all_workers = all_clients .. "," .. all_servers all_ld = "1s0,1s0h,1s1,1s1h" client_port_count = 2; bps = 1250000000/task_count(port_a_clients) msr = max_setup_rate/client_port_count/task_count(port_a_clients) conn = connections/client_port_count/task_count(port_a_clients) mempool_size = connections if (mempool_size > 100000) then mempool_size = 100000 elseif (mempool_size < 2048) then mempool_size = 2048 end