content
stringlengths
5
1.05M
-- Mutilate -- spell recommendation for rogues. Originlly derived from FaceMauler. -- -- How it works: getState() fills in a state table from fresh raw data (spell expirations, -- expire times, energy levels, etc). Each spec's decide spell method does two things. It -- decides the best spell given the state, and it walks the state forward at least a short time -- as if that spell had just been cast. On each outermost update we start with the fresh state, -- then repeatedly call the spec specific decide spell method to walk the state forward to discover -- the immediate and future recommendations. -- -- Sub: Not accounting for Deeper Strategem -- Sub: Calling for finishers at 5 CP, not 6 Mutilate = {} -- Our addon-specific 'global' non-saved variables. local ns = Mutilate -- A file private shorter namespace to reference them by. local _ -- So we don't pollute the global _ local options -- Ref to our saved options. Will be set during load. ns.addOnName = "Mutilate" -- To make cloning easier. ns.lastUpdateTime = GetTime() -- For throttling OnUpdate() rate. ns.spellsShowing = false ns.lastSpell = "" -- Energy costs. Not directly available through any API unfortunately. ns.e = {} ns.e.Vendetta = 0 ns.e.Garrote = 20 ns.e.Mutilate = 50 ns.e.Envenom = 35 ns.e.Toxic_Blade = 20 ns.e.Rupture = 25 ns.e.Feint = 0 ns.e.Vanish = 0 ns.e.Blindside = 30 ns.e.SymbolsOfDeath = 0 ns.e.Shadowstrike = 40 ns.e.Nightblade = 25 ns.e.Eviscerate = 35 ns.e.Backstab = 35 ns.e.Gloomblade = 35 ns.e.Crimson_Vial = 30 ns.e.Ambush = 60 ns.e.Dispatch = 35 ns.e.Sinister_Strike = 45 ns.e.Secret_Technique = 30 ns.e.Slice_and_Dice = 25 ns.e.Pistol_Shot = 40 ns.e.Ghostly_Strike = 30 ns.e.Kingsbane = 35 ns.e.Between_the_Eyes = 35 --ns.e.Trinket_1 = 0 ns.id = {} ns.id.Assassination = 259 ns.id.Outlaw = 260 ns.id.Subtlety = 261 ns.id.Kingsbane = 192759 ns.id.Curse_of_the_Dreadblades = 202665 ns.id.Goremaws_Bite = 209782 --ns.id.Trinket_1 = 151190 --make this 0 if you have no useable trinket, otherwise find its ID ns.id.Toxic_Blade = 245388 ns.open = {} ns.open.active = 0 ns.open.waiting = 1 ns.open.nextMove = "" ns.opener = {} -- Return a localised spell name. function ns.GetSpellNameById(spellId) local spellName, _, _, _, _, _, _, _, _ = GetSpellInfo(spellId) return spellName end -- Localized names of spells we are interested in, indexed by english name with underbars. We need -- to use the local name (or id) in calls refering to the spell. We chose to use local name rather -- than id because debugging is easier and some APIs need it. ns.n = {} ns.n.Vendetta = ns.GetSpellNameById(79140) ns.n.Garrote = ns.GetSpellNameById(703) ns.n.Evasion = ns.GetSpellNameById(5277) ns.n.Mutilate = ns.GetSpellNameById(1329) ns.n.Envenom = ns.GetSpellNameById(32645) ns.n.Rupture = ns.GetSpellNameById(1943) ns.n.Feint = ns.GetSpellNameById(1966) ns.n.Vanish = ns.GetSpellNameById(1856) ns.n.Kick = ns.GetSpellNameById(1766) ns.n.Shiv = ns.GetSpellNameById(5938) ns.n.Cloak_of_Shadows = ns.GetSpellNameById(31224) ns.n.Blindside = ns.GetSpellNameById(111240) ns.n.Exsanguinate = ns.GetSpellNameById(200806) ns.n.Symbols_of_Death = ns.GetSpellNameById(212283) ns.n.Shadow_Blades = ns.GetSpellNameById(121471) ns.n.Shadowstrike = ns.GetSpellNameById(185438) ns.n.Nightblade = ns.GetSpellNameById(195452) ns.n.Shadow_Dance = ns.GetSpellNameById(185313) ns.n.Backstab = ns.GetSpellNameById(53) ns.n.Gloomblade = ns.GetSpellNameById(200758) ns.n.Stealth = ns.GetSpellNameById(1784) ns.n.Eviscerate = ns.GetSpellNameById(196819) ns.n.Subterfuge = ns.GetSpellNameById(108208) ns.n.Crimson_Vial = ns.GetSpellNameById(185311) ns.n.Marked_for_Death = ns.GetSpellNameById(137619) ns.n.Sinister_Strike = ns.GetSpellNameById(193315) ns.n.Opportunity = ns.GetSpellNameById(195627) ns.n.Dispatch = ns.GetSpellNameById(2098) ns.n.Roll_the_Bones = ns.GetSpellNameById(193316) ns.n.Loaded_Dice = ns.GetSpellNameById(256170) ns.n.True_Bearing = ns.GetSpellNameById(193359) ns.n.Adrenaline_Rush = ns.GetSpellNameById(13750) ns.n.Blade_Flurry = ns.GetSpellNameById(13877) ns.n.Pistol_Shot = ns.GetSpellNameById(185763) ns.n.Ambush = ns.GetSpellNameById(8676) ns.n.Ruthless_Precision = ns.GetSpellNameById(193357) ns.n.Skull_and_Crossbones = ns.GetSpellNameById(199603) ns.n.Grand_Melee = ns.GetSpellNameById(193358) ns.n.Broadsides = ns.GetSpellNameById(193356) ns.n.Buried_Treasure = ns.GetSpellNameById(199600) ns.n.Slice_and_Dice = ns.GetSpellNameById(5171) ns.n.Killing_Spree = ns.GetSpellNameById(51690) ns.n.Quick_Draw = ns.GetSpellNameById(196938) ns.n.Venon_Rush = ns.GetSpellNameById(152152) ns.n.Ghostly_Strike = ns.GetSpellNameById(196937) ns.n.Between_the_Eyes = ns.GetSpellNameById(199804) ns.n.Kingsbane = ns.GetSpellNameById(ns.id.Kingsbane) ns.n.Toxic_Blade = ns.GetSpellNameById(ns.id.Toxic_Blade) ns.n.Curse_of_the_Dreadblades = ns.GetSpellNameById(ns.id.Curse_of_the_Dreadblades) ns.n.Goremaws_Bite = ns.GetSpellNameById(ns.id.Goremaws_Bite) -- Pronounce: Goremore's Bite --ns.n.Trinket_1 = ns.GetSpellNameById(246461) -- set to 0 if no trinket, otherwise find the ID of the spell (not trinket id) -- Our sneaky frame to watch for events ... looks up ns.events[] for a function the same name -- as the event. Passes all args. ns.eventFrame = CreateFrame("Frame") ns.eventFrame:SetScript("OnEvent", function(this, event, ...) ns.events[event](...) end) ns.eventFrame:RegisterEvent("ADDON_LOADED") ns.eventFrame:RegisterEvent("PLAYER_ALIVE") ns.eventFrame:RegisterEvent("PLAYER_TARGET_CHANGED") ns.eventFrame:RegisterEvent("PLAYER_TALENT_UPDATE") ns.eventFrame:RegisterEvent("SPELLS_CHANGED") -- Define our Event Handlers here ns.events = {} function ns.CheckSpec() local currentSpec = GetSpecialization() local currentSpecID = currentSpec and select(1, GetSpecializationInfo(currentSpec)) or 0 if currentSpecID == ns.id.Assassination then ns.spec = "Assassination" ns.displayFrame:Show() elseif currentSpecID == ns.id.Outlaw then ns.spec = "Outlaw" ns.displayFrame:Show() elseif currentSpecID == ns.id.Subtlety then ns.spec = "Subtlety" ns.displayFrame:Show() else ns.displayFrame:Hide() end end function ns.HasTalent(tier, col) local group = GetActiveSpecGroup() local _, _, _, selected, _ = GetTalentInfo(tier, col, group, nil, "player") return selected end function ns.events.PLAYER_TALENT_UPDATE() ns.CheckSpec() if ns.spec == "Assassination" then ns.hasBlindsideTalent = ns.HasTalent(1, 3) ns.hasSubterfugeTalent = ns.HasTalent(2, 2) ns.hasDeeperStrategemTalent = ns.HasTalent(3, 2) ns.hasExsanguinateTalent = ns.HasTalent(6, 3) ns.hasVenomRushTalent = ns.HasTalent(7, 1) ns.hasMarkedForDeathTalent = ns.HasTalent(3,3) elseif ns.spec == "Outlaw" then ns.hasGhostlyStrikeTalent = ns.HasTalent(1, 3) ns.hasQuickDrawTalent = ns.HasTalent(1, 2) ns.hasDeeperStrategemTalent = ns.HasTalent(3, 2) ns.hasKillingSpreeTalent = ns.HasTalent(7, 3) ns.hasSliceAndDiceTalent = ns.HasTalent(6, 3) ns.hasMarkedForDeathTalent = ns.HasTalent(6 ,3) elseif ns.spec == "Subtlety" then ns.hasGloombladeTalent = ns.HasTalent(1, 3) ns.hasSubterfugeTalent = ns.HasTalent(2, 2) ns.hasDeeperStrategemTalent = ns.HasTalent(3, 2) ns.hasEnvelopingShadowTalent = ns.HasTalent(6 ,3) ns.hasMasterOfShadowsTalent = ns.HasTalent(7 ,1) ns.hasMarkedForDeathTalent = ns.HasTalent(3 ,3) ns.hasSecretTechniqueTalent = ns.HasTalent(7, 2) ns.opener = {"Shadow Blades","Shadowstrike","Nightblade","Shadow Dance", "Symbols of Death","Shadowstrike","Shadowstrike","Eviscerate/-Secret Technique", "Secret Technique/+Secret Technique","Shadowstrike","Eviscerate","Marked for Death", "Eviscerate","Shadow Dance","Shadowstrike","Shadowstrike","Eviscerate","Shadowstrike", "Shadowstrike","Eviscerate","Done"} ns.talents = {} if ns.hasGloombladeTalent then table.insert(ns.talents, "Gloomblade") end if ns.hasSubterfugeTalent then table.insert(ns.talents, "Subterfuge") end if ns.hasDeeperStrategemTalent then table.insert(ns.talents, "Deeper Strategem") end if ns.hasEnvelopingShadowTalent then table.insert(ns.talents, "Enveloping Shadows") end if ns.hasMasterOfShadowsTalent then table.insert(ns.talents, "Master of Shadows") end if ns.hasMarkedForDeathTalent then table.insert(ns.talents, "Marked for Death") end if ns.hasSecretTechniqueTalent then table.insert(ns.talents, "Secret Technique") end end ns.maxEnergy = UnitPowerMax("player"); ns.globalCooldown = 1 -- Also updated whenever we see it. end function ns.events.PLAYER_ALIVE() ns.eventFrame:UnregisterEvent("PLAYER_ALIVE") end function ns.events.ADDON_LOADED(addon) if addon ~= ns.addOnName then return end local _,playerClass = UnitClass("player") if playerClass ~= "ROGUE" then ns.eventFrame:UnregisterEvent("PLAYER_ALIVE") ns.eventFrame:UnregisterEvent("ADDON_LOADED") ns.eventFrame:UnregisterEvent("PLAYER_LOGIN") ns.eventFrame:UnregisterEvent("PLAYER_TARGET_CHANGED") ns.eventFrame:UnregisterEvent("PLAYER_TALENT_UPDATE") ns.eventFrame:UnregisterEvent("SPELLS_CHANGED") return end -- Default saved variables if not Mutilatedb then Mutilatedb = {} -- fresh start end options = Mutilatedb -- Generic file-local short name. if not options.scale then options.scale = 1 end if options.locked == nil then options.locked = false end if not options.x then options.x = 100 end if not options.y then options.y = 100 end if not options.SuggestVanish then options.SuggestVanish = false end if not options.SuggestVendetta then options.SuggestVendetta = false end if not options.SliceAndDiceTimer then options.SliceAndDiceTimer = 1.0 end if not options.VoiceLeadTime then options.VoiceLeadTime = 0.5 end if not options.RuptureTimer then options.RuptureTimer = 2.0 end if not options.RuptureClipTimer then options.RuptureClipTimer = 0.0 end if not options.PoolEnergyThreshold then options.PoolEnergyThreshold = 90 end if not options.RuptureCp then options.RuptureCp = 1 end if not options.EnvenomCp then options.EnvenomCp = 4 end if not options.PlayerHealthThreshold then options.PlayerHealthThreshold = 50 end if not options.EnvenomTimer then options.EnvenomTimer = 0 end if not options.BackstabEnvenomCp then options.BackstabEnvenomCp = 5 end if not options.SuggestGarroteAsStealthOpener then options.SuggestGarroteAsStealthOpener = true end if options.SuggestCloakOfShadows == nil then options.SuggestCloakOfShadows = true end if not options.MinDebuffDurationForCofs then options.MinDebuffDurationForCofs = 10 end if options.VoicePrompts == nil then options.VoicePrompts = false end if not options.ConsoleTrace == nil then options.Trace = false end if not options.PretendInGroup == nil then options.PretendInGroup = false end if not options.ExsanguinateTrigger then options.ExsanguinateTrigger = 30 end if not options.SoundChannel then options.SoundChannel = "No sound" end -- Create GUI ns.CreateGUI() ns.displayFrame:SetScale(options.scale) -- Create Options Frame ns.CreateOptionFrame() if options.locked then ns.displayFrame:SetScript("OnMouseDown", nil) ns.displayFrame:SetScript("OnMouseUp", nil) ns.displayFrame:SetScript("OnDragStop", nil) ns.displayFrame:SetBackdropColor(0, 0, 0, 0) ns.displayFrame:EnableMouse(false) else ns.displayFrame:SetScript("OnMouseDown", function(self) self:StartMoving() end) ns.displayFrame:SetScript("OnMouseUp", function(self) self:StopMovingOrSizing() end) ns.displayFrame:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end) ns.displayFrame:SetBackdropColor(0, 0, 0, .4) ns.displayFrame:EnableMouse(true) end -- Register for Slash Commands SlashCmdList["Mutilate"] = ns.Options -- Defined below. SLASH_Mutilate1 = "/Mutilate" SLASH_Mutilate2 = "/mut" -- Register for Function Events ns.eventFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") ns.eventFrame:RegisterEvent("PLAYER_TARGET_CHANGED") ns.CheckSpec() ns.mainSpellBlankedTime = GetTime(); -- This is probably normally caled by framework, but just be be sure. Applies spec and talent based settings. ns.events.PLAYER_TALENT_UPDATE() ns.selfCheck = false end -- Show or hide the spell textures. function ns.ShowSpellsIf(yes) if ns.spellsShowing == yes then return end if not yes then ns.displayFrameRecommend:Hide() ns.displayFrameC1:Hide() ns.displayFrameA1:Hide() ns.displayFrameB1:Hide() ns.displayFrameB2:Hide() ns.displayFrameA2:Hide() ns.displayFrameD1:Hide() ns.displayFrameC2:Hide() ns.displayFrameD2:Hide() ns.leftText:SetText("") ns.rightText:SetText("") ns.saidSpell = nil ns.saidKick = false else ns.displayFrameRecommend:Show() ns.displayFrameC1:Show() ns.displayFrameA1:Show() ns.displayFrameB1:Show() ns.displayFrameB2:Show() ns.displayFrameA2:Show() ns.displayFrameD1:Show() ns.displayFrameC2:Show() ns.displayFrameD2:Show() ns.DecideSpells() end ns.spellsShowing = yes end function ns.events.COMBAT_LOG_EVENT_UNFILTERED(...) local timestamp, eventType, hideCaster, sourceGUID, srcName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, extraArg1, spellName, extraArg3, extraArg4, extraArg5, extraArg6, extraArg7, extraArg8, extraArg9, extraArg10 = CombatLogGetCurrentEventInfo() ns.ShowSpellsIf(UnitName("target") ~= nil and UnitCanAttack("player", "target") and UnitHealth("target") > 0) -- used for Openers. sets "lastSpell" --todo: Have this routine flip through opener table - remove all the hardcoding if UnitName("player") == srcName then --if (eventType=="SPELL_DAMAGE") or (eventType=="SPELL_ENERGIZE") or (eventType == "SPELL_CAST_SUCCESS") then if (eventType=="SPELL_ENERGIZE") or (eventType == "SPELL_CAST_SUCCESS") then if ns.spec == "Assassination" then if (spellName == "Mutilate") or (spellName == "Garrote") or (spellName == "Rupture") or (spellName == "Vendetta") or (spellName == "Toxic Blade") or (spellName == "Kingsbane") or (spellName == "Vanish") or (spellName == "Envenom") then ns.lastSpell = spellName end elseif ns.spec == "Subtlety" then if (spellName == "Shadow Blades") or (spellName == "Shadowstrike") or (spellName == "Nightblade") or (spellName == "Shadow Dance") or (spellName == "Symbols of Death") or (spellName == "Eviscerate") or (spellName == "Marked for Death") then ns.lastSpell = spellName end end end end end function ns.events.PLAYER_TARGET_CHANGED(...) ns.ShowSpellsIf(UnitName("target") ~= nil and UnitCanAttack("player", "target") and UnitHealth("target") > 0) end function ns.events.SPELLS_CHANGED(...) if not ns.CheckSpec() then return end end -- End Event Handlers -- Utility used to establish the frame and texture of one icon slot. function ns.CreateFrameAndTextureOnGrid(displayFrameName, textureName, tlx, tly, width, height) local df = CreateFrame("Frame", "$parent_"..displayFrameName, ns.displayFrame) ns[displayFrameName] = df df:SetWidth(width) df:SetHeight(height) df:SetPoint("TOPLEFT", tlx, tly) local t = df:CreateTexture(nil, "BACKGROUND") ns[textureName] = t t:SetTexture(nil) t:SetAllPoints(df) t:SetAlpha(.8) df.texture = t -- Necessary? return t end function ns.CreateGUI() local gdf = CreateFrame("Frame", "MutilateFrame", UIParent) ns.displayFrame = gdf gdf:SetFrameStrata("BACKGROUND") gdf:SetWidth(350) gdf:SetHeight(107) gdf:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 32}) gdf:SetBackdropColor(0, 0, 0, .4) gdf:EnableMouse(true) gdf:SetMovable(true) gdf:SetClampedToScreen(true) gdf:SetScript("OnMouseDown", function(self) self:StartMoving() end) gdf:SetScript("OnMouseUp", function(self) self:StopMovingOrSizing() end) gdf:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end) gdf:SetPoint("CENTER", -200, -200) -- Frames are named like a spreadsheet around the central recommenndation. So C1 in the next spell. -- A1 B1 REC C1 D1 -- A2 B2 OMM C2 D2 --left text right text ns.CreateFrameAndTextureOnGrid("displayFrameRecommend", "textureRecommend", 140, -10, 70, 70) ns.CreateFrameAndTextureOnGrid("displayFrameA1", "textureA1", 0, 0, 45, 45) ns.CreateFrameAndTextureOnGrid("displayFrameA2", "textureA2", 0, -50, 45, 45) ns.CreateFrameAndTextureOnGrid("displayFrameB1", "textureB1", 50, 0, 45, 45) ns.CreateFrameAndTextureOnGrid("displayFrameB2", "textureB2", 50, -50, 45, 45) ns.CreateFrameAndTextureOnGrid("displayFrameC1", "textureC1", 250, 0, 45, 45) ns.CreateFrameAndTextureOnGrid("displayFrameC2", "textureC2", 250, -50, 45, 45) ns.CreateFrameAndTextureOnGrid("displayFrameD1", "textureD1", 300, 0, 45, 45) ns.CreateFrameAndTextureOnGrid("displayFrameD2", "textureD2", 300, -50, 45, 45) ns.c1CooldownFrame = CreateFrame("Cooldown", "$parent_c1CooldownFrame", ns.displayFrameC1, "CooldownFrameTemplate") ns.spellCooldownFrame = CreateFrame("Cooldown", "$parent_spellCooldownFrame", ns.displayFrameRecommend, "CooldownFrameTemplate") ns.leftText = gdf:CreateFontString("kickName", "OVERLAY", "GameFontNormal") ns.leftText:SetText("") ns.leftText:SetPoint("TOPLEFT", 0, -95) ns.rightText = gdf:CreateFontString("cofsName", "OVERLAY", "GameFontNormal") ns.rightText:SetJustifyH("RIGHT") ns.rightText:SetText("") ns.rightText:SetPoint("TOPRIGHT", 0, -95) gdf:SetScript("OnUpdate", function(this, elapsed) ns.OnUpdate(elapsed) end) end function ns.OnUpdate(elapsed) ns.DecideSpells() -- Decide spells has rate throttling. end -- Return when debuff on the target will expire. 0 or some value now or less if it has already. function ns.getDebuffExpiration(spellName) local expirationTime = 0 for i=1,40 do local name, _, _, _, _, thisExpirationTime, isMine, _ = UnitDebuff("target", i, PLAYER) if name == spellName then expirationTime = thisExpirationTime break; end end return expirationTime end -- Return when debuff on the player will expire. 0 or some value now or less if it has already. function ns.getMyDebuffExpiration(spellName) local expirationTime = 0 for i=1,40 do local name, _, _, _, _, _, thisExpirationTime, isMine, _ = UnitDebuff("player", i, PLAYER) if name == spellName then expirationTime = thisExpirationTime break; end end return expirationTime end -- Return when this buff on the player will expire. 0 or some value now or less if it has already. function ns.getBuffExpiration(spellName) local thisExpirationTime = 0 for i=1,40 do --local name, _, _, _, _, _, thisExpirationTime, isMine, _ = UnitBuff("player", i, PLAYER) local name, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, nameplateShowAll, timeMod, value1, value2, value3 = UnitBuff("player", i, PLAYER) if name == spellName then thisExpirationTime = expirationTime break; end end return thisExpirationTime end -- Return when this spell will be available for casting with respect to its cooldown. -- Returns 0 if possible for easier debug. function ns.getReadyTime(spellName, s) local start, duration, enabled = GetSpellCooldown(spellName); if duration ~= nil and start + duration > s.now + 0.01 then return start + duration end return 0 end function ns.getItemReadyTime(itemID, s) local start, duration, enabled = GetItemCooldown(itemID); if duration ~= nil and start + duration > s.now + 0.01 then return start + duration end return 0 end -- Return a table with all the interesting facts about the current state. All times are absolute. -- Buffs and debuffs are active if their expiration is in the future. Assumes target exists and -- is unfriendly. Returns nil if we are in first few hundred milliseconds of the start of -- global cooldown, in which state is often confused. In this situation, caller should assume -- a spell has been cast (i.e. clear the recommendation) and hold predition as is. function ns.GetState(now) local globalCoolDownExpiration = now local start, duration, enabled = GetSpellCooldown(61304); -- The speical global cooldown spell ID. if duration ~= nil and duration ~= 0 then globalCoolDownExpiration = max(now, start + duration) if now - start < 0.25 then return nil end -- Global cooldown can vary and it is hard to find our what it is. Updaete it every time -- we see it. ns.globalCooldown = duration end ns.knowsKingsbane = IsSpellKnown(ns.id.Kingsbane, false) ns.knowsCurse_of_the_DreadBlades = IsSpellKnown(ns.id.Curse_of_the_Dreadblades, false) ns.knowsGoremaws_Bite = IsSpellKnown(ns.id.Goremaws_Bite, false) local s = {} s.now = now s.globalCoolDownExpiration = globalCoolDownExpiration s.energy = UnitPower("player") s.comboPoints = GetComboPoints("player", "target") s.isInGroup = IsInGroup() or options.PretendInGroup s.removeableName = "" s.longDurationDebuffs = false -- Scan player's debuffs for things Cloak of Shadows could remove. for i = 1, 40 do -- There are 1..40 aura slots. --local name, _, _, count, debuffType, _, expirationTime, unitCaster, canStealOrPurge, _, _, _, _ = UnitDebuff("player", i) --local name, _, _, count, _, expirationTime, unitCaster, canStealOrPurge, _ = UnitDebuff("target", i, PLAYER) local name, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, nameplateShowAll, timeMod, value1, value2, value3 = UnitDebuff("target", i, PLAYER) if name == nil then break end if expirationTime > s.now then local duration = math.floor(expirationTime - s.now) if duration < 60 * 10 then -- Don't show times > 10m s.removeableName = s.removeableName..""..duration.."s " end if duration > options.MinDebuffDurationForCofs then s.longDurationDebuffs = true end else s.longDurationDebuffs = true end if count > 1 then s.removeableName = s.removeableName..count.."*" end s.removeableName = s.removeableName..name.."\n" end -- See if there is something we can kick. s.interruptibleName = nil local name, _, displayName, _, _, endTime, _, notInterruptible = UnitChannelInfo("target") if name ~= nil and not notInterruptible then s.interruptibleName = displayName end local name, _, displayName, _, _, endTime, _, _, notInterruptible = UnitCastingInfo("target") if name ~= nil and not notInterruptible then s.interruptibleName = displayName end -- When our debuffs on the target will expire. If <= s.now, they are not up. s.Garrote_Expiration = ns.getDebuffExpiration(ns.n.Garrote) s.Rupture_Expiration = ns.getDebuffExpiration(ns.n.Rupture) s.Envenom_Expiration = ns.getDebuffExpiration(ns.n.Envenom) s.Nightblade_Expiration = ns.getDebuffExpiration(ns.n.Nightblade) s.Ghostly_Strike_Expiration = ns.getDebuffExpiration(ns.n.Ghostly_Strike) -- When our buffs will expire. If <= s.now, they are not up. s.Symbols_of_Death_Expiration = ns.getBuffExpiration(ns.n.Symbols_of_Death) s.Shadow_Blades_Expiration = ns.getBuffExpiration(ns.n.Shadow_Blades) s.Shadow_Dance_Expiration = ns.getBuffExpiration(ns.n.Shadow_Dance) s.Subterfuge_Expiration = ns.getBuffExpiration(ns.n.Subterfuge) if ns.spec == "Outlaw" then s.Opportunity_Expiration = ns.getBuffExpiration(ns.n.Opportunity) s.Slice_and_Dice_Expiration = ns.getBuffExpiration(ns.n.Slice_and_Dice) s.Adrenaline_Rush_Expiration = ns.getBuffExpiration(ns.n.Adrenaline_Rush) s.Loaded_Dice_Expiration = ns.getBuffExpiration(ns.n.Loaded_Dice) s.True_Bearing_Expiration = ns.getBuffExpiration(ns.n.True_Bearing) s.Ruthless_Precision_Expiration = ns.getBuffExpiration(ns.n.Ruthless_Precision) s.Skull_and_Crossbones_Expiration = ns.getBuffExpiration(ns.n.Skull_and_Crossbones) s.Grand_Melee_Expiration = ns.getBuffExpiration(ns.n.Grand_Melee) s.Broadsides_Expiration = ns.getBuffExpiration(ns.n.Broadsides) s.Buried_Treasure_Expiration = ns.getBuffExpiration(ns.n.Buried_Treasure) s.Curse_of_the_Dreadblades_Expiration = ns.getMyDebuffExpiration(ns.n.Curse_of_the_Dreadblades) s.Curse_of_the_Dreadblades_ReadyTime = ns.getReadyTime(ns.n.Curse_of_the_Dreadblades, s) s.Between_the_Eyes_ReadyTime = ns.getReadyTime(ns.n.Between_the_Eyes, s) s.BladeFlurryReadyTime = ns.getReadyTime(ns.n.Blade_Flurry, s) s.Killing_Spree_ReadyTime = ns.getReadyTime(ns.n.Killing_Spree, s) elseif ns.spec == "Assassination" then s.Kingsbane_ReadyTime = ns.getReadyTime(ns.n.Kingsbane, s) s.ToxicBlade_ReadyTime = ns.getReadyTime(ns.n.Toxic_Blade, s) s.Blindside_Expiration = ns.getBuffExpiration(ns.n.Blindside) s.Vendetta_Expiration = ns.getBuffExpiration(ns.n.Vendetta) s.evasionReadyTime = ns.getReadyTime(ns.n.Evasion, s) elseif ns.spec == "Subtlety" then s.Goremaws_Bite_ReadyTime = ns.getReadyTime(ns.n.Goremaws_Bite, s) s.evasionReadyTime = ns.getReadyTime(ns.n.Evasion, s) end -- Cooldowns. Any value <= s.now indicates they are cooled down and ready to cast (given -- whatever other constraints apply). s.feintReadyTime = ns.getReadyTime(ns.n.Feint,s) s.vendettaReadyTime = ns.getReadyTime(ns.n.Vendetta, s) s.Feint = ns.getReadyTime(ns.n.Feint, s) s.vanishReadyTime = ns.getReadyTime(ns.n.Vanish, s) s.kickReadyTime = ns.getReadyTime(ns.n.Kick, s) s.cofsReadyTime = ns.getReadyTime(ns.n.Cloak_of_Shadows, s) s.garroteReadyTime = ns.getReadyTime(ns.n.Garrote, s) s.exsanguinateReadyTime = ns.getReadyTime(ns.n.Exsanguinate, s) s.shadowDanceReadyTime = ns.getReadyTime(ns.n.Shadow_Dance, s) s.symbolsOfDeathReadyTime = ns.getReadyTime(ns.n.Symbols_of_Death, s) s.stealthReadyTime = ns.getReadyTime(ns.n.Stealth, s) s.shadowBladesReadyTime = ns.getReadyTime(ns.n.Shadow_Blades, s) s.crimsonVialReadyTime = ns.getReadyTime(ns.n.Crimson_Vial, s) s.markedForDeathReadyTime = ns.getReadyTime(ns.n.Marked_for_Death, s) s.adrenalineRushReadyTime = ns.getReadyTime(ns.n.Adrenaline_Rush, s) s.ambushReadyTime = ns.getReadyTime(ns.n.Ambush, s) -- s.trinket1ReadyTime = ns.getItemReadyTime(ns.id.Trinket_1, s) s.shadowDanceChargesAvail, _, _, _ = GetSpellCharges(ns.n.Shadow_Dance) local iAmStealthed = false for i=1,40 do local myAuras name,_,_,_,_,_,_,st=UnitAura("player",i) if name == "Stealth" then iAmStealthed = true break end end s.playerIsStealthed = iAmStealthed s.inCombat = UnitAffectingCombat("player") s.playerHealthFraction = UnitHealth("player") / UnitHealthMax("player") _, s.combatEnergyRegenPerSec = GetPowerRegen() return s end -- Return a one-line state summary for debug output. Scrubs uninteresting values and makes time -- relative to now. function ns.StateSummary(s) local summary = "" for k, v in pairs(s) do if v ~= 0 and v ~= false and v ~= "" and k ~= "now" then if string.find(k, "ReadyTime") or string.find(k, "Expiration") then v = v - s.now if v <= 0 then v = nil else v = string.format("%.2f", v) end end if v ~= "0.00" and v ~= nil then summary = summary .. " " .. k .. "=" .. tostring(v) end end end return summary end -- Determine a recommened spell, if any, from the given state. In the process, advance the state to -- some future time where something might be different. Always advances the time of the state by at -- least a little. -- Returned spell is our internal spell name (i.e. English with underbars). function ns.GetSpellFromState(s, debugStr) if not s.inCombat and UnitAffectingCombat("player") then s.inCombat = UnitAffectingCombat("player") end if false then return ns.GeSpellFromStateScreenshot(s) elseif ns.spec == "Assassination" and ns.open.active == 0 then return ns.GeSpellFromStateAssassination(s) elseif ns.spec == "Assassination" and ns.open.active >= 1 then return ns.GeOpenerSpellFromStateAssassination(s) elseif ns.spec == "Outlaw" then return ns.GeSpellFromStateOutlaw(s) elseif ns.spec == "Subtlety" and ns.open.active == 0 then return ns.GeSpellFromStateSubtlety(s) elseif ns.spec == "Subtlety" and ns.open.active >= 1 then return ns.GeOpenerSpellFromStateSubtlety(s) end end function ns.GeSpellFromStateScreenshot(s) s.now = s.now + 1 spell = "Mutilate" if not s.doneOne then s.doneOne = true else spell = "Envenom" end return spell, true, ns.n.Vendetta, true, true, "Cast/channel you can kick", ns.n.Cloak_of_Shadows, "Debuff CofS will remove", ns.n.Marked_for_Death end function ns.GeSpellFromStateAssassination(s) local spell = nil; local oldNow = s.now -- Combo spend poiont for Assassination is one less than max because Mutilate gives 2. local maxComboPtsToSpend = 4 local maxCombos = 5 local markedForDeathGrant = 5 if ns.hasDeeperStrategemTalent then maxComboPtsToSpend = 5 maxCombos = 6 markedForDeathGrant = 6 end local stealthy = s.playerIsStealthed or s.Subterfuge_Expiration > s.now local vanishOk = s.vanishReadyTime <= s.now and s.isInGroup if s.globalCoolDownExpiration > s.now then -- Global Cooldown - can't do anything s.now = s.globalCoolDownExpiration elseif s.comboPoints >= maxComboPtsToSpend and vanishOk and s.Vendetta_Expiration > 0 then spell = "Vanish" s.vanishReadyTime = s.now + 120 elseif s.energy >= ns.e.Crimson_Vial and s.crimsonVialReadyTime <= s.now and s.playerHealthFraction < options.PlayerHealthThreshold / 100 then spell = "Crimson_Vial" s.crimsonVialReadyTime = s.now + 30 s.energy = s.energy - ns.e.Crimson_Vial -- 10/31 added a 2 second check on Rupture expiring elseif not s.playerIsStealthed and not s.inCombat and s.stealthReadyTime < s.now then -- Always open from stealth spell = "Stealth" s.playerIsStealthed = true s.stealthReadyTime = s.now + 2 elseif ns.hasExsanguinateTalent and s.exsanguinateReadyTime <= s.now then --todo: Now that Hemo is gone, double check this calc spell = "Exsanguinate" s.Rupture_Expiration = s.now + max(0, s.Rupture_Expiration - s.now) / 2 s.Garrote_Expiration = s.now + max(0, s.Garrote_Expiration - s.now) / 2 s.exsanguinateReadyTime = s.now + 45 ns.enterCombat(s) elseif s.Garrote_Expiration < s.now + 18 / 4 -- Pandemic and s.inCombat and s.garroteReadyTime <= s.now then -- No garrote bleed active and need combo points. spell = "Garrote" s.comboPoints = max(maxCombos, s.comboPoints + 1) s.energy = s.energy - ns.e.Garrote s.Garrote_Expiration = ns.pandemicExpiration(s, s.Garrote_Expiration, 18) ns.SpendCombos(s) if not stealthy or not ns.hasSubterfugeTalent then s.garroteReadyTime = s.now + 15 end ns.enterCombat(s) elseif s.playerIsStealthed and not s.inCombat then spell = "Garrote" --s.comboPoints = max(maxCombos, s.comboPoints + 1) s.energy = s.energy - ns.e.Garrote --s.Garrote_Expiration = ns.pandemicExpiration(s, s.Garrote_Expiration, 18) --ns.SpendCombos(s) if not stealthy or not ns.hasSubterfugeTalent then s.garroteReadyTime = s.now + 15 end ns.open.active = 1 --ns.leftText:SetText("|cffFFffFF".."Standard Opener") ns.lastSpell = "" ns.open.nextMove = "Garrote1" ns.enterCombat(s) -- 10/31 moved Kingsbane up, pre-toxic elseif ns.knowsKingsbane and s.energy >= ns.e.Kingsbane and s.Kingsbane_ReadyTime <= s.now then spell = "Kingsbane" s.energy = s.energy - ns.e.Kingsbane s.Kingsbane_ReadyTime = s.now + 45 s.comboPoints = min(maxCombos, s.comboPoints + 1) ns.enterCombat(s) elseif s.inCombat and s.ToxicBlade_ReadyTime <= s.now and s.comboPoints < maxCombos then spell = "Toxic_Blade" s.energy = s.energy - ns.e.Toxic_Blade s.ToxicBlade_ReadyTime = s.now + 25 if ns.open.active == 0 then ns.leftText:SetText("") end s.comboPoints = min(maxCombos, s.comboPoints + 1) ns.enterCombat(s) elseif ns.hasMarkedForDeathTalent and maxCombos - s.comboPoints >= markedForDeathGrant and s.markedForDeathReadyTime <= s.now then -- Cast Marked for Death whenever off cooldown and we will get all 6 from it. spell = "Marked_for_Death" s.markedForDeathReadyTime = s.now + 60 s.comboPoints = min(maxCombos, s.comboPoints + markedForDeathGrant) -- 10/31 added back in elseif s.vendettaReadyTime <= s.now and s.energy <= 80 then spell = "Vendetta" ns.enterCombat(s) elseif s.energy >= ns.e.Rupture and ((s.comboPoints >= 4 and s.Rupture_Expiration < s.now + 7) or (s.comboPoints > 0 and s.Rupture_Expiration < s.now)) then -- Rupture expiration is subject to Pandemic (i.e. new buff time adds to existing if close to -- end). If we have even one combo point and we are within the renew period, renew. This -- also covers the case when it is not up a all. Note the pandemic idea of the spell duration -- seems to be based on the current combos, not it was case with. spell = "Rupture" local comboSpend = ns.SpendCombos(s) s.Rupture_Expiration = ns.pandemicExpiration(s, s.Rupture_Expiration, (comboSpend + 1) * 4) s.energy = s.energy - ns.e.Rupture ns.enterCombat(s) elseif s.energy >= ns.e.Envenom and s.energy >= ns.maxEnergy * 0.95 and s.comboPoints > 0 then -- If we are at max energy and we have even one combo point, evenom, because its better than -- wasting energy. spell = "Envenom" s.energy = s.energy - ns.e.Envenom s.Envenom_Expiration = s.now + s.comboPoints + 1 ns.SpendCombos(s) ns.enterCombat(s) elseif s.energy >= ns.e.Envenom and s.comboPoints >= maxComboPtsToSpend -1 then -- Dump this full load of combo points into an envemom. spell = "Envenom" s.energy = s.energy - ns.e.Envenom s.Envenom_Expiration = s.now + s.comboPoints + 1 ns.SpendCombos(s) ns.enterCombat(s) elseif s.comboPoints < maxComboPtsToSpend then -- Combo point building... if s.energy >= ns.e.Garrote and s.Garrote_Expiration < s.now + 18 / 4 -- Pandemic and s.garroteReadyTime <= s.now then -- No garrote bleed active and need combo points. spell = "Garrote" s.comboPoints = max(maxCombos, s.comboPoints + 1) s.energy = s.energy - ns.e.Garrote s.Garrote_Expiration = ns.pandemicExpiration(s, s.Garrote_Expiration, 18) ns.SpendCombos(s) if not stealthy or not ns.hasSubterfugeTalent then s.garroteReadyTime = s.now + 15 end ns.enterCombat(s) elseif ns.hasBlindsideTalent and s.energy >= ns.e.Blindside and s.Blindside_Expiration > 0 then -- No hemorrhage bleed active and you need combo points. spell = "Blindside" s.comboPoints = s.comboPoints + 1 s.energy = s.energy - ns.e.Blindside ns.enterCombat(s) elseif s.energy >= ns.e.Mutilate then -- Need to build combo points. spell = "Mutilate" s.comboPoints = s.comboPoints + 2 s.energy = s.energy - ns.e.Mutilate ns.enterCombat(s) end end -- A B C D --1 [Feint] [Evasion] | | [Next] [CofS] --2 [Kick ] [vanish] | | [MForD]?### local b1 = nil if s.evasionReadyTime <= s.now then b1 = ns.n.Evasion end local c2 = nil if ns.hasMarkedForDeathTalent and s.markedForDeathReadyTime <= s.now then c2 = ns.n.Marked_for_Death else -- c2 = ns.n.Trinket_1 end local feintOk = s.feintReadyTime <= s.now --local trinket1OK = s.trinket1ReadyTime <= s.now local kickOk = s.kickReadyTime <= s.now and s.interruptibleName ~= nil local d2 = nil local rText = "" if s.cofsReadyTime <= s.now and s.removeableName ~= "" then d2 = ns.n.Cloak_of_Shadows rText = s.removeableName end -- Update state to next intersting time. if spell ~= nil then s.now = max(s.now, oldNow + ns.globalCooldown) s.globalCoolDownExpiration = s.now end s.now = max(s.now, oldNow + 0.1) -- Always move forward in time at least a little local combatEnergyRegenPerSec = s.combatEnergyRegenPerSec s.energy = min(ns.maxEnergy, s.energy + combatEnergyRegenPerSec * (s.now - oldNow)) --return spell, vanishOk, b2, tricksOfTheTradeOk, trinket1OK, kickOk, s.interruptibleName, d2, rText, c2 return spell, vanishOk, b1, feintOk, kickOk, s.interruptibleName, d2, rText, c2 end function ns.GeOpenerSpellFromStateAssassination(s) local spell = nil; local oldNow = s.now -- Combo spend poiont for Assassination is one less than max because Mutilate gives 2. local stealthy = s.playerIsStealthed or s.Subterfuge_Expiration > s.now local vanishOk = s.vanishReadyTime <= s.now and s.isInGroup if s.globalCoolDownExpiration > s.now then s.now = s.globalCoolDownExpiration else if s.playerIsStealthed and not s.inCombat then spell = "Garrote" ns.open.nextMove = "Garrote1" elseif ns.open.nextMove == "Garrote1" and ns.lastSpell == "Garrote" then ns.open.nextMove = "Mutilate1" spell = "Mutilate" elseif ns.open.nextMove == "Garrote1" and ns.lastSpell ~= "Garrote" and ns.lastSpell ~= "" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(1)") elseif ns.open.nextMove == "Garrote1" and ns.lastSpell == "" then spell = "Garrote" ns.open.nextMove = "Garrote1" elseif ns.open.nextMove == "Mutilate1" and ns.lastSpell == "Mutilate" then ns.open.nextMove = "Rupture" spell = "Rupture" elseif ns.open.nextMove == "Mutilate1" and ns.lastSpell ~= "Garrote" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(2)") elseif ns.open.nextMove == "Mutilate1" then spell = "Mutilate" elseif ns.open.nextMove == "Rupture" and ns.lastSpell == "Rupture" then if s.vendettaReadyTime <= s.now then ns.open.nextMove = "Vendetta" spell = "Vendetta" elseif s.ToxicBlade_ReadyTime <= s.now then ns.open.nextMove = "Toxic Blade" spell = "Toxic_Blade" elseif vanishOk then ns.open.nextMove = "Vanish" spell = "Vanish" s.vanishReadyTime = s.now + 120 elseif s.energy >= ns.e.Envenom and s.comboPoints > 0 then ns.open.nextMove = "Envenom" spell = "Envenom" else ns.open.nextMove = "Mutilate2" spell = "Mutilate" end elseif ns.open.nextMove == "Rupture" and ns.lastSpell ~= "Mutilate" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(3)") elseif ns.open.nextMove == "Rupture" then spell = "Rupture" elseif ns.open.nextMove == "Vendetta" and ns.lastSpell == "Vendetta" then if s.ToxicBlade_ReadyTime <= s.now then ns.open.nextMove = "Toxic Blade" spell = "Toxic_Blade" elseif ns.knowsKingsbane and s.Kingsbane_ReadyTime <= s.now then ns.open.nextMove = "Kingsbane" spell = "Kingsbane" elseif vanishOk then ns.open.nextMove = "Vanish" spell = "Vanish" s.vanishReadyTime = s.now + 120 elseif s.energy >= ns.e.Envenom and s.comboPoints > 0 then ns.open.nextMove = "Envenom" spell = "Envenom" else ns.open.nextMove = "Mutilate2" spell = "Mutilate" end elseif ns.open.nextMove == "Vendetta" and ns.lastSpell ~= "Rupture" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(4)") elseif ns.open.nextMove == "Vendetta" then spell = "Vendetta" elseif ns.open.nextMove == "Toxic Blade" and ns.lastSpell == "Toxic Blade" then if vanishOk then ns.open.nextMove = "Vanish" spell = "Vanish" s.vanishReadyTime = s.now + 120 elseif s.energy >= ns.e.Envenom and s.comboPoints > 0 then ns.open.nextMove = "Envenom1" spell = "Envenom" else ns.open.nextMove = "Mutilate2" spell = "Mutilate" end elseif ns.open.nextMove == "Toxic Blade" and ns.lastSpell ~= "Vendetta" and ns.lastSpell ~= "Rupture" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(5)") ns.enterCombat(s) elseif ns.open.nextMove == "Toxic Blade" then spell = "Toxic_Blade" elseif ns.open.nextMove == "Kingsbane" and ns.lastSpell == "Kingsbane" then if vanishOk then ns.open.nextMove = "Vanish" spell = "Vanish" s.vanishReadyTime = s.now + 120 elseif s.energy >= ns.e.Envenom and s.comboPoints > 0 then ns.open.nextMove = "Envenom1" spell = "Envenom" else ns.open.nextMove = "Mutilate2" spell = "Mutilate" end elseif ns.open.nextMove == "Kingsbane" and ns.lastSpell ~= "Toxic Blade" and ns.lastSpell ~= "Vendetta" and ns.lastSpell ~= "Rupture" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(6)") elseif ns.open.nextMove == "Kingsbane" then spell = "Kingsbane" elseif ns.open.nextMove == "Vanish" and ns.lastSpell == "Vanish" then if s.energy >= ns.e.Envenom and s.comboPoints > 0 then ns.open.nextMove = "Envenom1" spell = "Envenom" else ns.open.nextMove = "Mutilate2" spell = "Mutilate" end elseif ns.open.nextMove == "Vanish" and ns.lastSpell ~= "Kingsbane" and ns.lastSpell ~= "Toxic Blade" and ns.lastSpell ~= "Vendetta" and ns.lastSpell ~= "Rupture" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(7)") elseif ns.open.nextMove == "Vanish" then spell = "Vanish" elseif ns.open.nextMove == "Envenom1" and ns.lastSpell == "Envenom" then ns.open.nextMove = "Mutilate2" spell = "Mutilate" elseif ns.open.nextMove == "Envenom1" and ns.lastSpell ~= "Vanish" and ns.lastSpell ~= "Kingsbane" and ns.lastSpell ~= "Toxic Blade" and ns.lastSpell ~= "Vendetta" and ns.lastSpell ~= "Rupture" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(8)") elseif ns.open.nextMove == "Envenom1" then spell = "Envenom" elseif ns.open.nextMove == "Mutilate2" and ns.lastSpell == "Mutilate" then ns.open.nextMove = "Envenom2" spell = "Envenom" elseif ns.open.nextMove == "Mutilate2" and ns.lastSpell ~= "Envenom" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(9)") elseif ns.open.nextMove == "Mutilate2" then spell = "Mutilate" elseif ns.open.nextMove == "Garrote2" and ns.lastSpell == "Garrote" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener complete: Normal Rotation(11)") elseif ns.open.nextMove == "Garrote2" and ns.lastSpell ~= "Envenom" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(10)") elseif ns.open.nextMove == "Garrote2" then spell = "Garrote" elseif ns.open.nextMove == "Envenom2" and ns.lastSpell == "Envenom" then spell = "Garrote" ns.open.nextMove = "Garrote2" elseif ns.open.nextMove == "Envenom2" and ns.lastSpell ~= "Mutilate" then ns.open.active = 0 s = ns.GetState(GetTime()) --ns.leftText:SetText("|cffFFffFF".."Opener abort: Normal Rotation(12)") elseif ns.open.nextMove == "Envenom2" then spell = "Envenom" end end -- A B C D --1 [Feint] [Vanish] | | [Next] [CofS] --2 [Kick ] [Evasion] | | [MForD]?### local b1 = nil if s.evasionReadyTime <= s.now then b1 = ns.n.Evasion end local c2 = nil if ns.hasMarkedForDeathTalent and s.markedForDeathReadyTime <= s.now then c2 = ns.n.Marked_for_Death else -- c2 = ns.n.Trinket_1 end local feintOk = s.feintReadyTime <= s.now --local trinket1OK = s.trinket1ReadyTime <= s.now local kickOk = s.kickReadyTime <= s.now and s.interruptibleName ~= nil local d2 = nil local rText = "" if s.cofsReadyTime <= s.now and s.removeableName ~= "" then d2 = ns.n.Cloak_of_Shadows rText = s.removeableName end -- Update state to next intersting time. if spell ~= nil then s.now = max(s.now, oldNow + ns.globalCooldown) s.globalCoolDownExpiration = s.now end s.now = max(s.now, oldNow + 0.1) -- Always move forward in time at least a little local combatEnergyRegenPerSec = s.combatEnergyRegenPerSec s.energy = min(ns.maxEnergy, s.energy + combatEnergyRegenPerSec * (s.now - oldNow)) return spell, vanishOk, b1, feintOk, kickOk, s.interruptibleName, d2, rText, c2 end function ns.GeSpellFromStateOutlaw(s) local spell = nil; local oldNow = s.now local maxComboPtsToSpend = 4 local maxCombos = 5 local markedForDeathGrant = 5 if ns.hasDeeperStrategemTalent then maxComboPtsToSpend = 5 maxCombos = 6 markedForDeathGrant = 6 elseif (s.Opportunity_Expiration > s.now + 1.5 and ns.hasQuickDrawTalent) or s.playerIsStealthed then maxComboPtsToSpend = 4 -- We'll generate 2 combos with the comming pistol shot or Ambush. end local rollTheBonesBuffGoodness = 0 if s.True_Bearing_Expiration > s.now then rollTheBonesBuffGoodness = rollTheBonesBuffGoodness + 1 end if s.Ruthless_Precision_Expiration > s.now then rollTheBonesBuffGoodness = rollTheBonesBuffGoodness + 1 end if s.Skull_and_Crossbones_Expiration > s.now then rollTheBonesBuffGoodness = rollTheBonesBuffGoodness + 1 end if s.Broadsides_Expiration > s.now then rollTheBonesBuffGoodness = rollTheBonesBuffGoodness + 1 end if s.Buried_Treasure_Expiration > s.now then rollTheBonesBuffGoodness = rollTheBonesBuffGoodness + 1 end if s.Grand_Melee_Expiration > s.now then rollTheBonesBuffGoodness = rollTheBonesBuffGoodness + 1 end local rollTheBonesExpiration = max(s.True_Bearing_Expiration, s.Ruthless_Precision_Expiration, s.Skull_and_Crossbones_Expiration, s.Broadsides_Expiration, s.Buried_Treasure_Expiration, s.Grand_Melee_Expiration) if s.globalCoolDownExpiration > s.now then -- waiting for global cooldown s.now = s.globalCoolDownExpiration elseif s.energy >= ns.e.Crimson_Vial and s.crimsonVialReadyTime <= s.now and s.playerHealthFraction < options.PlayerHealthThreshold / 100 then spell = "Crimson_Vial" s.crimsonVialReadyTime = s.now + 30 s.energy = s.energy - ns.e.Crimson_Vial --Roll if you have no RTB buffs elseif (s.comboPoints >= maxComboPtsToSpend and rollTheBonesBuffGoodness == 0) or --Roll if you have 1 RTB buff **and** Loaded Dice (s.comboPoints >= maxComboPtsToSpend and rollTheBonesBuffGoodness == 1 and s.Loaded_Dice_Expiration > 0) or --Roll if you have 1 or 2 RTB Buffs, but none are Ruthless or Grand Melee (s.comboPoints >= maxComboPtsToSpend and (s.Ruthless_Precision_Expiration == 0 and s.Grand_Melee_Expiration == 0)) then spell = "Roll_the_Bones" -- We don't know what buff will turn up, so that makes it hard to predict the future. -- Just assume it is Broadside for the sake of prediciton. s.Broadsides_Expiration = s.now + (ns.SpendCombos(s) + 1) * 6 elseif ns.hasKillingSpreeTalent and s.Killing_Spree_ReadyTime <= 0 and s.Adrenaline_Rush_Expiration <= 0 then spell = "Killing_Spree" s.Killing_Spree_ReadyTime = s.now + 120 elseif ns.hasBladeRushTalent and s.BladeRushReadyTime <= 0 then spell = "Blade_Rush" s.BladeRushReadyTime = s.now + 45 elseif s.adrenalineRushReadyTime <= 0 then spell = "Adrenaline_Rush" s.adrenalineRushReadyTime = s.now + 180 elseif ns.hasMarkedForDeathTalent and s.comboPoints <= 1 and s.markedForDeathReadyTime <= s.now then spell = "Marked_for_Death" s.markedForDeathReadyTime = s.now + 60 s.comboPoints = min(maxCombos, s.comboPoints + markedForDeathGrant) elseif s.comboPoints >= maxComboPtsToSpend and s.Ruthless_Precision_Expiration > s.now and s.energy > ns.e.Between_the_Eyes and s.Between_the_Eyes_ReadyTime <= s.now then spell = "Between_the_Eyes" s.energy = s.energy - ns.e.Between_the_Eyes s.Between_the_Eyes_ReadyTime = s.now + 20 ns.enterCombat(s) ns.SpendCombos(s) elseif s.comboPoints >= maxComboPtsToSpend and s.energy >= ns.e.Dispatch then spell = "Dispatch" s.energy = s.energy - ns.e.Dispatch ns.enterCombat(s) ns.SpendCombos(s) elseif s.Opportunity_Expiration > s.now and s.comboPoints < maxComboPtsToSpend -1 and s.energy > ns.e.Pistol_Shot --todo: restrict if energy will cap during expiration then spell = "Pistol_Shot" s.comboPoints = s.comboPoints + 1 if ns.hasQuickDrawTalent then s.comboPoints = s.comboPoints + 1 end s.energy = s.energy - ns.e.Pistol_Shot s.Opportunity_Expiration = s.now ns.enterCombat(s) elseif s.energy >= ns.e.Sinister_Strike then spell = "Sinister_Strike" s.energy = s.energy - ns.e.Sinister_Strike s.comboPoints = s.comboPoints + 1 ns.enterCombat(s) end -- A B C D --1 [Feint] [Vanish] | | [Next] [CofS] --2 [Kick ] [Blade Flurry] | | [Dreadblades] local b1 = nil if s.BladeFlurryReadyTime <= s.now then b1 = ns.n.Blade_Flurry end local c2 = nil if ns.knowsCurse_of_the_DreadBlades and s.Curse_of_the_Dreadblades_ReadyTime < s.now then c2 = ns.n.Curse_of_the_Dreadblades end local feintOk = s.feintReadyTime <= s.now and s.isInGroup --local trinket1OK = s.trinket1ReadyTime <= s.now local kickOk = s.kickReadyTime <= s.now and s.interruptibleName ~= nil local d2 = nil local rText = "" if s.cofsReadyTime <= s.now and s.removeableName ~= "" then d2 = ns.n.Cloak_of_Shadows rText = s.removeableName end -- Update state to next intersting time. if spell ~= nil then s.now = max(s.now, oldNow + ns.globalCooldown) end s.globalCoolDownExpiration = s.now s.now = max(s.now, oldNow + 0.1) -- Always move forward in time at least a little s.energy = min(ns.maxEnergy, s.energy + s.combatEnergyRegenPerSec * (s.now - oldNow)) return spell, vanishOk, b1, feintOk, kickOk, s.interruptibleName, d2, rText, c2 end function ns.GeSpellFromStateSubtlety(s) local spell = nil; local oldNow = s.now ns.leftText:SetText("") local stealthy = s.playerIsStealthed or s.Shadow_Dance_Expiration > s.now or s.Subterfuge_Expiration > s.now local maxComboPtsToSpend = 5 local maxCombos = 5 local markedForDeathGrant = 5 if ns.hasDeeperStrategemTalent then maxComboPtsToSpend = 6 maxCombos = 6 markedForDeathGrant = 6 end if s.Shadow_Blades_Expiration > s.now then maxComboPtsToSpend = maxComboPtsToSpend - 1 end local eCostMult = 1 if ns.hasShadowFocusTalent and stealthy then eCostMult = 0.75 end if not s.inCombat and s.playerIsStealthed then ns.open.active = 1 end if s.globalCoolDownExpiration > s.now then -- waiting for global cooldown s.now = s.globalCoolDownExpiration elseif s.energy >= ns.e.Crimson_Vial * eCostMult and s.crimsonVialReadyTime <= s.now and s.playerHealthFraction < options.PlayerHealthThreshold / 100 then spell = "Crimson_Vial" s.crimsonVialReadyTime = s.now + 30 s.energy = s.energy - ns.e.Crimson_Vial * eCostMult elseif s.Nightblade_Expiration < s.now + (6 + 2 * s.comboPoints) / 4 -- Pandemic and s.comboPoints >= maxComboPtsToSpend and s.energy > ns.e.Nightblade * eCostMult then -- keep nighblade up spell = "Nightblade" s.energy = s.energy - ns.e.Nightblade * eCostMult local comboSpend = ns.SpendCombos(s) s.Nightblade_Expiration = ns.pandemicExpiration(s, s.Nightblade_Expiration, (comboSpend * 2 + 6)) ns.enterCombat(s) elseif s.inCombat and s.shadowBladesReadyTime <= s.now then spell = "Shadow_Blades" s.shadowBladesReadyTime = s.now + 180 ns.enterCombat(s) elseif not stealthy and ((s.shadowDanceChargesAvail > 1 and not ns.hasEnvelopingShadowTalent) or (s.shadowDanceChargesAvail > 2 and ns.hasEnvelopingShadowTalent)) and s.Shadow_Dance_Expiration <= s.now --and (s.comboPoints <= 1 or s.Symbols_of_Death_Expiration < s.now + 30 / 4) and (s.energy >= 90 or (ns.hasMasterOfShadowsTalent and s.energy > 80)) then -- Only shadow dance with high energy to take advantage of the 3+ seconds of stealthyness. spell = "Shadow_Dance" s.shadowDanceChargesAvail = s.shadowDanceChargesAvail - 1 s.Shadow_Dance_Expiration = s.now + 3 if s.hasSubterfugeTalent then s.Shadow_Dance_Expiration = s.Shadow_Dance_Expiration + 2 end if ns.hasMasterOfShadowsTalent then s.energy = min(ns.maxEnergy, s.energy + 25) end elseif s.Shadow_Dance_Expiration > s.now and s.Symbols_of_Death_Expiration <= s.now then spell = "Symbols_of_Death" s.energy = s.energy - ns.e.SymbolsOfDeath * eCostMult s.symbolsOfDeathReadyTime = s.now + 10 s.Symbols_of_Death_Expiration = ns.pandemicExpiration(s, s.Symbols_of_Death_Expiration, 35) elseif s.Shadow_Dance_Expiration > s.now and ns.hasSecretTechniqueTalent and s.energy >= ns.e.Secret_Technique and s.energy <= 60 then spell = "Secret_Technique" s.energy = s.energy - ns.e.Secret_Technique * eCostMult elseif ns.hasMarkedForDeathTalent and s.comboPoints <= 1 and maxCombos - s.comboPoints >= markedForDeathGrant and s.markedForDeathReadyTime <= s.now then spell = "Marked_for_Death" s.markedForDeathReadyTime = s.now + 60 s.comboPoints = min(maxCombos, s.comboPoints + markedForDeathGrant) --todo. Look into Mantle of the Master Assasin/Secret Technique elseif s.vanishReadyTime <= s.now and s.inCombat and s.comboPoints <3 and s.isInGroup then spell = "Vanish" s.vanishReadyTime = s.now + 120 elseif s.inCombat and stealthy and s.energy >= ns.e.Shadowstrike * eCostMult and s.comboPoints <= 3 then spell = "Shadowstrike" s.energy = s.energy - ns.e.Shadowstrike elseif s.energy >= ns.e.Eviscerate * eCostMult and s.comboPoints >= maxComboPtsToSpend then -- dump combo points spell = "Eviscerate" ns.SpendCombos(s) s.energy = s.energy - ns.e.Eviscerate * eCostMult ns.enterCombat(s) elseif s.energy >= ns.e.Backstab * eCostMult and not stealthy then -- Need to build combo points. spell = "Backstab" s.comboPoints = s.comboPoints + 1 if s.Shadow_Blades_Expiration > s.now then s.comboPoints = s.comboPoints + 1 end s.energy = s.energy - ns.e.Backstab * eCostMult ns.enterCombat(s) end local vanishOk = s.vanishReadyTime <= s.now and s.isInGroup -- A B C D --1 [Feint] [Vanish] | | [Next] [CofS] --2 [Kick ] [Evasion] | | local b1 = nil if s.evasionReadyTime <= s.now then b1 = ns.n.Evasion end local feintOk = s.feintReadyTime <= s.now and s.isInGroup --local trinket1OK = s.trinket1ReadyTime <= s.now local kickOk = s.kickReadyTime <= s.now and s.interruptibleName ~= nil local d2 = nil local rText = "" if s.cofsReadyTime <= s.now and s.removeableName ~= "" then d2 = ns.n.Cloak_of_Shadows rText = s.removeableName end -- Update state to next intersting time. Symbols of Death doesn't trigger global cooldown. if spell ~= nil and spell ~= "Symbols_of_Death" then s.now = max(s.now, oldNow + ns.globalCooldown) end s.globalCoolDownExpiration = s.now s.now = max(s.now, oldNow + 0.1) -- Always move forward in time at least a little s.energy = min(ns.maxEnergy, s.energy + s.combatEnergyRegenPerSec * (s.now - oldNow)) return spell, vanishOk, b1, feintOk, kickOk, s.interruptibleName, d2, rText, nil end function getCleanSpell(action) local talentSplit = nil local cleanSpell = nil local needTalent = nil local unlessTalent = nil talentSplit = string.find(action,"/") if talentSplit == nil then cleanSpell = action else cleanSpell = string.sub(action,1,talentSplit-1) hasOrHasNot = string.sub(action,talentSplit + 1, 99) if string.sub(hasOrHasNot, 1, 1) == "+" then needTalent = string.sub(hasOrHasNot,2, 99) else unlessTalent = string.sub(hasOrHasNot,2, 99) end end return string.gsub(cleanSpell, "_", " "), needTalent, unlessTalent end function spellIsReady(spell, s) local thisSpell = getCleanSpell(spell) if thisSpell == "Shadow Dance" and s.playerIsStealthed then return 1 end if thisSpell == "Shadowstrike" and (not s.playerIsStealthed and s.Shadow_Dance_Expiration <= 0) then return 1 end return ns.getReadyTime(thisSpell, s) - s.globalCoolDownExpiration end function hasThisTalent(whichTalent) local found = false for i,line in ipairs(ns.talents) do if line == whichTalent then found = true end end return found end function ns.GeOpenerSpellFromStateSubtlety(s) local spell = nil; local oldNow = s.now local now = GetTime() local stealthy = s.playerIsStealthed or s.Subterfuge_Expiration > s.now local vanishOk = s.vanishReadyTime <= s.now and s.isInGroup if ns.lastUpdateTime ~= nil then if now - ns.lastUpdateTime > 0.10 then ns.lastUpdateTime = now ns.leftText:SetText("|cffFFffFF".."Opener") if not s.inCombat and not s.playerIsStealthed then ns.open.active = 0 else local cleanSpell, needTalent, unlessTalent = getCleanSpell(ns.opener[ns.open.active]) local lastCleanSpell,_,_ = getCleanSpell(ns.lastSpell) if lastCleanSpell == cleanSpell then ns.lastSpell = "" spell = nil repeat ns.open.active = ns.open.active + 1 local cleanSpell, needTalent, unlessTalent = getCleanSpell(ns.opener[ns.open.active]) if needTalent ~= nil and hasThisTalent(needTalent) == false then ns.open.active = ns.open.active + 1 elseif unlessTalent ~= nil and hasThisTalent(unlessTalent) == true then ns.open.active = ns.open.active + 1 else if spellIsReady(cleanSpell, s) <= 0 then spell = cleanSpell else spell = "Done" end end until spell ~= nil if cleanSpell == "Done" then ns.open.active = 0 end elseif lastCleanSpell == "" then spell = nil repeat local cleanSpell, needTalent, unlessTalent = getCleanSpell(ns.opener[ns.open.active]) if spellIsReady(cleanSpell, s) <= 0 then spell = cleanSpell else ns.open.active = ns.open.active + 1 end until spell ~= nil or spell =="Done" if spell == "Done" then ns.open.active = 0 spell = "" end else ns.lastSpell = "" ns.open.active = 0 end end else spell = getCleanSpell(ns.opener[ns.open.active]) end end -- A B C D --1 [Feint] [Vanish] | | [Next] [CofS] --2 [Kick ] [Evasion] | | [MForD]?### local b1 = nil if s.evasionReadyTime <= s.now then b1 = ns.n.Evasion end local c2 = nil if ns.hasMarkedForDeathTalent and s.markedForDeathReadyTime <= s.now then c2 = ns.n.Marked_for_Death else -- c2 = ns.n.Trinket_1 end local feintOk = s.feintReadyTime <= s.now --local trinket1OK = s.trinket1ReadyTime <= s.now local kickOk = s.kickReadyTime <= s.now and s.interruptibleName ~= nil local d2 = nil local rText = "" if s.cofsReadyTime <= s.now and s.removeableName ~= "" then d2 = ns.n.Cloak_of_Shadows rText = s.removeableName end -- Update state to next interesting time. if spell ~= nil then s.now = max(s.now, oldNow + ns.globalCooldown) s.globalCoolDownExpiration = s.now else spell = "" end s.now = max(s.now, oldNow + 0.1) -- Always move forward in time at least a little local combatEnergyRegenPerSec = s.combatEnergyRegenPerSec s.energy = min(ns.maxEnergy, s.energy + combatEnergyRegenPerSec * (s.now - oldNow)) return string.gsub(spell, " ", "_"), vanishOk, b1, feintOk, kickOk, s.interruptibleName, d2, rText, c2 end function ns.enterCombat(s) if s.playerIsStealthed and ns.spec ~= "Outlaw" and ns.hasSubterfugeTalent then s.Subterfuge_Expiration = s.now + 3 end s.playerIsStealthed = false s.inCombat = true end -- Spend combos in state. Returns how many spent, which might not be all because of Anticipatopn. function ns.SpendCombos(s) local spend = s.comboPoints s.comboPoints = s.comboPoints - spend return spend end -- Returns when a spell subject to Pandemic will expire if cast s.now. The Pandemic mechanic -- allows any remaining duration of a spell less than 25% of its normal duration to add to -- a new cast's duration. Interestingly, for spells with duration dependent on combo poinst (say) -- it is the current combo point value that determins duration, not duration it was cast with -- (because that's obviusly been forgotten). function ns.pandemicExpiration(s, curExpiration, basicDuration) return s.now + basicDuration + min(max(0, curExpiration - s.now), basicDuration / 4) end -- spell is a non-localised name. function ns.saySpell(spell) --[[] var inExceptions = false var lowerSpell = strlower(ns.n[spell]) for exception in string.gmatch(str, ' *([^,]+) *') do if strfind(exception, lowerSpell) then inExceptions = true break end end --]] if options.SoundChannel ~= "No sound" then -- Try to play localised version, is present. local willPlay = PlaySoundFile("Interface\\AddOns\\Mutilate\\media\\"..ns.n[spell]..".mp3", options.SoundChannel) if not willPlay and ns.n[spell] ~= spell then -- Failing that, play English (if it is different) PlaySoundFile("Interface\\AddOns\\Mutilate\\media\\"..spell..".mp3", options.SoundChannel) end end end -- Blanks out all icon textures and forgets what we said last. function ns.ClearUI() ns.textureRecommend:SetTexture(nil) ns.textureA1:SetTexture(nil) ns.textureA2:SetTexture(nil) ns.textureB1:SetTexture(nil) ns.textureB2:SetTexture(nil) ns.textureC1:SetTexture(nil) ns.textureD1:SetTexture(nil) ns.saidSpell = nil ns.saidKick = false end function ns.DecideSpells() local now = GetTime() if now - ns.lastUpdateTime < 0.05 then return -- This is our main throttle to OnUpdate to prevent running too often. end local guid = UnitGUID("target") if UnitName("target") == nil or UnitIsFriend("player", "target") or UnitHealth("target") == 0 then return -- ignore the dead and friendly end if guid == nil then ns.ClearUI() return end local s = ns.GetState(now) if s == nil then -- In period of confusion following start of global cooldown. ns.textureRecommend:SetTexture(nil) return end local priorState if options.ConsoleTrace or ns.selfCheck then -- Remember the state so we can say what led to the decision. if options.ConsoleTrace and ns.textureRecommend == nil then print("---priorState") end priorState = ns.shallowCopyOfTable(s) end local globalCoolDownExpiration = s.globalCoolDownExpiration --local spell, vanishOk, b2, tricksOfTheTradeOk, trinket1OK, kickOk, interruptibleName, d2, rText, c2 = ns.GetSpellFromState(s, "=") local spell, vanishOk, b1, feintOk, kickOk, interruptibleName, d2, rText, c2 = ns.GetSpellFromState(s, "=") --local trinket1OK = s.trinket1ReadyTime <= s.now if feintOk then ns.textureA1:SetTexture(GetSpellTexture(ns.n.Feint)) else ns.textureA1:SetTexture(nil) end --if trinket1OK then -- ns.textureD1:SetTexture(select(10, GetItemInfo(151190))) -- set to Trinket ID if using one.. --else --print("Trinket not ready") ns.textureD1:SetTexture(nil) --end if vanishOk then ns.textureB2:SetTexture(GetSpellTexture(ns.n.Vanish)) else ns.textureB2:SetTexture(nil) end ns.textureB1:SetTexture(GetSpellTexture(b1)) -- Evasion, Blade flurry ns.textureC2:SetTexture(GetSpellTexture(c2)) -- Marked for Death ns.textureD2:SetTexture(GetSpellTexture(d2)) -- Cloak of Shadows if rText ~= nil then ns.rightText:SetText("|cffFFffFF"..rText) -- Cloak of Shadows text else ns.rightText:SetText("") end if kickOk then ns.textureA2:SetTexture(GetSpellTexture(ns.n.Kick)) -- ns.leftText:SetText("|cffFFffFF"..interruptibleName) if not ns.saidKick then ns.saySpell("Kick") ns.saidKick = true end else ns.textureA2:SetTexture(nil) --ns.leftText:SetText("") ns.saidKick = false end -- Try to predict next required spell by walking the state forward in time till the spell decider -- returns non-nil. This is a bit crude. To be better we would jump forward to the minimium of all -- the future expirations and ready times and the time when energy regen hits some spell -- requirement. local i = 0 local nextSpell = nil local nextNextSpell = nil local whenNext = now local priorNextState if options.ConsoleTrace and ns.textureRecommend == nil then print("---Predict") end while i < 40 do local priorNow = s.now local priorNextStateTemp if (options.ConsoleTrace or ns.selfCheck) and nextSpell == nil and priorNextState == nil then priorNextStateTemp = ns.shallowCopyOfTable(s) end spellFromState = ns.GetSpellFromState(s) if spellFromState ~= nil then if nextSpell == nil then nextSpell = spellFromState whenNext = priorNow priorNextState = priorNextStateTemp if spell ~= nil then break -- Don't need a nextNextSpell once we have non-nil spell and nextSpell. end else nextNextSpell = spellFromState break end end i = i + 1 end if ns.selfCheck then if options.ConsoleTrace and ns.textureRecommend == nil then print("---selfcheck") end if spell ~= nil and ns.priorSpell == nil and ns.priorNextSpell ~= spell then --print("===Bad prediction", ns.priorNextSpell, "became", spell) end if spell ~= nil and ns.priorSpell == nil and spell ~= ns.initialPrediction and ns.initialPrediction ~= nil then print("===Bad initial prediction", ns.initialPrediction, "became", spell) print("Predicated state giving", ns.initialPrediction, ns.StateSummary(ns.initialPredictionState)) print("Actual state giving", spell, ns.StateSummary(priorState)) end if spell == nil and ns.priorSpell ~= nil then ns.initialPrediction = nextSpell ns.initialPredictionState = priorNextState end end -- Now we have spell, nextSpell, and nextNextSpell; any of which may be nil. local shouldSay if spell ~= nil then if options.ConsoleTrace and ns.textureRecommend == nil then print("---spell nil") end if ns.priorSpell == nil and ns.priorNextSpell ~= nil then -- We have a current spell ready. Before now, we were showing a nextSpell in the main -- slot with a cooldown timer running. So cancel that now. ns.spellCooldownFrame:SetCooldown(0, 0) end ns.textureRecommend:SetTexture(GetSpellTexture(ns.n[spell])) if nextSpell ~= nil and ns.open.active == 0 then showSpell = ns.n[nextSpell] if showSpell ~= nil then showspell = gsub(ns.n[nextSpell],"1","") showSpell = gsub(showSpell,"2","") ns.textureC1:SetTexture(GetSpellTexture(showSpell)) end else ns.textureC1:SetTexture(nil) end shouldSay = spell if ns.reportedSpell ~= spell then if options.ConsoleTrace then print("---"..ns.addOnName.."---") print(ns.StateSummary(priorState)) print("Therefore", spell) end ns.reportedSpell = spell end else ns.reportedSpell = nil if nextSpell ~= nil then if ns.priorSpell ~= nil or ns.currentCooldownEnd == nil then -- We have no main spell, yet we used to be showing one. This is zero time for -- the cooldown timer. Hopefully our initial time estimate is accurate, but things -- can disturb it. Especially unpredicatble procs. ns.mainSpellBlankedTime = now ns.spellCooldownFrame:SetCooldown(ns.mainSpellBlankedTime, whenNext - ns.mainSpellBlankedTime) ns.currentCooldownEnd = whenNext end if abs(whenNext - ns.currentCooldownEnd) > 0.05 then -- Update cooldown time if it has shifted more than a threshold. Could be lots of -- causes for this. We have the theshold just to cut down on jtter. ns.spellCooldownFrame:SetCooldown(ns.mainSpellBlankedTime, whenNext - ns.mainSpellBlankedTime) ns.currentCooldownEnd = whenNext end if ns.priorSpell ~= nil then ns.saidSpell = nil end if ns.currentCooldownEnd - now < options.VoiceLeadTime then shouldSay = nextSpell end ns.textureRecommend:SetTexture(GetSpellTexture(ns.n[nextSpell])) if nextNextSpell ~= nil and ns.open.active == 0 then showSpell = gsub(ns.n[nextNextSpell],"1","") showSpell = gsub(showSpell,"2","") ns.textureC1:SetTexture(GetSpellTexture(showSpell)) else ns.textureC1:SetTexture(nil) end else -- We have no spell and no next spell. ns.textureRecommend:SetTexture(nil) ns.textureC1:SetTexture(nil) -- Should be already, but just in case. s = ns.GetState(now) nextSpell = ns.GetSpellFromState(s) end end if ns.saidSpell ~= shouldSay then if shouldSay ~= nil then ns.saySpell(shouldSay) ns.saidSpell = shouldSay end end if options.ConsoleTrace and nextSpell ~= nil and nextSpell ~= ns.priorNextSpell then print("State at T+"..string.format("%.2f", priorNextState.now - priorState.now), ns.StateSummary(priorNextState)) print("Follow on spell therefore", nextSpell) end ns.priorSpell = spell ns.priorNextSpell = nextSpell ns.priorNextNextSpell = nextNextSpell end function ns.CreateOptionFrame() local panel = CreateFrame("FRAME", "MutilateOptions"); panel.name = "Mutilate"; panel:Hide() --panel:SetPoint("CENTER") --panel:SetSize(20,20) local y = -10 local lineStep = 40 local fstring1 = panel:CreateFontString("MutilateOptions_string1", "OVERLAY", "GameFontNormal") fstring1:SetText("Lock panel position") fstring1:SetPoint("TOPLEFT", 10, y) local checkbox1 = CreateFrame("CheckButton", "$parent_cb1", panel, "OptionsCheckButtonTemplate") checkbox1:SetWidth(18) checkbox1:SetHeight(18) checkbox1:SetScript("OnClick", function() ns.ToggleLocked() end) checkbox1:SetPoint("TOPRIGHT", -10, y) checkbox1:SetChecked(ns.GetLocked()) y = y - lineStep -- -- GUI Scale -- local fstring5 = panel:CreateFontString("MutilateOptions_string5", "OVERLAY", "GameFontNormal") fstring5:SetText("GUI Scale") fstring5:SetPoint("TOPLEFT", 10, y) local slider5 = CreateFrame("Slider", "$parent_sl", panel, "OptionsSliderTemplate") slider5:SetMinMaxValues(.5, 1.5) slider5:SetValue(options.scale) slider5:SetValueStep(1.0 / 16) slider5:SetObeyStepOnDrag(true) slider5:SetScript("OnValueChanged", function(self) ns.SetScale(self:GetValue()); getglobal(self:GetName() .. "Text"):SetText(self:GetValue()) end) getglobal(slider5:GetName() .. "Low"):SetText("0.5") getglobal(slider5:GetName() .. "High"):SetText("1.5") getglobal(slider5:GetName() .. "Text"):SetText(options.scale) slider5:SetPoint("TOPRIGHT", -10, y) y = y - lineStep -- -- Crimson Vial player health threshold -- local fstring11 = panel:CreateFontString("MutilateOptions_string11", "OVERLAY", "GameFontNormal") fstring11:SetText("Suggest Crimson Vial when your health is below this %") fstring11:SetPoint("TOPLEFT", 10, y) local slider11 = CreateFrame("Slider", "$parent_s7", panel, "OptionsSliderTemplate") slider11:SetMinMaxValues(0, 100) slider11:SetValue(options.PlayerHealthThreshold) slider11:SetValueStep(1) slider11:SetObeyStepOnDrag(true) slider11:SetScript("OnValueChanged", function(self) options.PlayerHealthThreshold = self:GetValue(); getglobal(self:GetName() .. "Text"):SetText(self:GetValue().."%") end) getglobal(slider11:GetName() .. "Low"):SetText("0") getglobal(slider11:GetName() .. "High"):SetText("100") getglobal(slider11:GetName() .. "Text"):SetText(options.PlayerHealthThreshold.."%") slider11:SetPoint("TOPRIGHT", -10, y) y = y - lineStep -- Cloak of Shadows checkbox local fs = panel:CreateFontString("MutilateOptions_cofsCheck", "OVERLAY", "GameFontNormal") fs:SetText("Show Cloak of Shadows icon when you have debuffs") fs:SetPoint("TOPLEFT", 10, y) local cb = CreateFrame("CheckButton", "$parent_cb1", panel, "OptionsCheckButtonTemplate") cb:SetWidth(18) cb:SetHeight(18) cb:SetScript("OnClick", function() options.SuggestCloakOfShadows = not options.SuggestCloakOfShadows end) cb:SetPoint("TOPRIGHT", -10, y) cb:SetChecked(options.SuggestCloakOfShadows) y = y - lineStep -- Cloak of shadows slider local fs = panel:CreateFontString("MutilateOptions_cofsSlider", "OVERLAY", "GameFontNormal") fs:SetText("Only show Cloak of Shadows icon when a debuff has more duration than this") fs:SetPoint("TOPLEFT", 10, y) local slider = CreateFrame("Slider", "$parent_sCofs", panel, "OptionsSliderTemplate") slider:SetMinMaxValues(0, 60) slider:SetValue(options.MinDebuffDurationForCofs) slider:SetValueStep(1) slider:SetObeyStepOnDrag(true) slider:SetScript("OnValueChanged", function(self) options.MinDebuffDurationForCofs = self:GetValue(); getglobal(self:GetName() .. "Text"):SetText(self:GetValue().."s") end) getglobal(slider:GetName() .. "Low"):SetText("0") getglobal(slider:GetName() .. "High"):SetText("60") getglobal(slider:GetName() .. "Text"):SetText(options.MinDebuffDurationForCofs.."s") slider:SetPoint("TOPRIGHT", -10, y) y = y - lineStep -- Exsanguinate trigger slider local fs = panel:CreateFontString("MutilateOptions_exTrigSlider", "OVERLAY", "GameFontNormal") fs:SetText("Subtlety Exsanguinate trigger level (Rupture equivalent seconds)") fs:SetPoint("TOPLEFT", 10, y) local slider = CreateFrame("Slider", "$parent_exTrig", panel, "OptionsSliderTemplate") slider:SetMinMaxValues(0, 50) slider:SetValue(options.ExsanguinateTrigger) slider:SetValueStep(1) slider:SetObeyStepOnDrag(true) slider:SetScript("OnValueChanged", function(self) options.ExsanguinateTrigger = self:GetValue(); getglobal(self:GetName() .. "Text"):SetText(self:GetValue().."s") end) getglobal(slider:GetName() .. "Low"):SetText("0") getglobal(slider:GetName() .. "High"):SetText("50") getglobal(slider:GetName() .. "Text"):SetText(options.ExsanguinateTrigger.."s") slider:SetPoint("TOPRIGHT", -10, y) y = y - lineStep -- Voice prompts sound channel local fs = panel:CreateFontString("MutilateOptions_soundChannel", "OVERLAY", "GameFontNormal") fs:SetText("Sound channel for voice prompts (System>Sound for volume sliders)") fs:SetPoint("TOPLEFT", 10, y) local dd = CreateFrame("Frame", "$parent_dd1", panel, "UIDropDownMenuTemplate") UIDropDownMenu_SetWidth(dd, 120) -- Use in place of dd:SetWidth dd:SetPoint("TOPRIGHT", 0, y) UIDropDownMenu_Initialize(dd, ns.SoundChannelDropDown_Menu) UIDropDownMenu_SetText(dd, options.SoundChannel) ns.SoundChannelDropDownFrame = dd y = y - lineStep -- Voice lead slider local fs = panel:CreateFontString("MutilateOptions_VoiceLeadSlider", "OVERLAY", "GameFontNormal") fs:SetText("Start voice prompt this many seconds before spell due (if possible)") fs:SetPoint("TOPLEFT", 10, y) local slider = CreateFrame("Slider", "$parent_VoiceLead", panel, "OptionsSliderTemplate") slider:SetMinMaxValues(0, 2) slider:SetValue(options.VoiceLeadTime) slider:SetValueStep(2 / 100) slider:SetObeyStepOnDrag(true) slider:SetScript("OnValueChanged", function(self) options.VoiceLeadTime = floor(self:GetValue() * 100 + 0.5) / 100; getglobal(self:GetName() .. "Text"):SetText(options.VoiceLeadTime.."s") end) getglobal(slider:GetName() .. "Low"):SetText("0") getglobal(slider:GetName() .. "High"):SetText("2") getglobal(slider:GetName() .. "Text"):SetText(options.VoiceLeadTime.."s") slider:SetPoint("TOPRIGHT", -10, y) y = y - lineStep -- Pretend inGrop checkbox. local cb = CreateFrame("CheckButton", "$parent_cb1", panel, "OptionsCheckButtonTemplate") cb:SetWidth(18) cb:SetHeight(18) cb:SetScript("OnClick", function() options.PretendInGroup = not options.PretendInGroup end) cb:SetPoint("TOPRIGHT", -10, y) cb:SetChecked(options.PretendInGroup) local fs = panel:CreateFontString("MutilateOptions_pretendInGroupCheck", "OVERLAY", "GameFontNormal") fs:SetText("Pretend I'm in a group") fs:SetPoint("TOPLEFT", 10, y) y = y - lineStep -- Diagnostic trace checkbox. local cb = CreateFrame("CheckButton", "$parent_cb1", panel, "OptionsCheckButtonTemplate") cb:SetWidth(18) cb:SetHeight(18) cb:SetScript("OnClick", function() options.ConsoleTrace = not options.ConsoleTrace end) cb:SetPoint("TOPRIGHT", -10, y) cb:SetChecked(options.ConsoleTrace) local fs = panel:CreateFontString("MutilateOptions_traceCheck", "OVERLAY", "GameFontNormal") fs:SetText("Output diagnostic state trace to the console") fs:SetPoint("TOPLEFT", 10, y) y = y - lineStep local cb = CreateFrame("EditBox", "$parent_cb1", panel, "InputBoxTemplate") cb:SetWidth(80) cb:SetHeight(18) --cb:SetScript("OnClick", function() options.ConsoleTrace = not options.ConsoleTrace end) cb:SetPoint("TOPRIGHT", -10, y) --cb:SetChecked(options.ConsoleTrace) --local fs = panel:CreateFontString("MutilateOptions_traceCheck", "OVERLAY", "GameFontNormal") --fs:SetText("Trinket 1") --fs:SetPoint("TOPLEFT", 10, y) --y = y - lineStep -- options.TrinketOne = fs.GetText local fstring = panel:CreateFontString(nil, "OVERLAY", "GameFontNormal") fstring:SetText("|cffA0A0A0Logic based on http://www.icy-veins.com/wow/class-guides") fstring:SetPoint("TOPLEFT", 10, y) y = y - lineStep local fstring = panel:CreateFontString(nil, "OVERLAY", "GameFontNormal") fstring:SetText("|cffA0A0A0For requests or comments, leave a note at: http://www.curse.com/addons/wow/mutilate") fstring:SetPoint("TOPLEFT", 10, y) y = y - lineStep InterfaceOptions_AddCategory(panel); end function ns.GetLocked() return options.locked end function ns.ToggleLocked() if options.locked then options.locked = false ns.displayFrame:SetScript("OnMouseDown", function(self) self:StartMoving() end) ns.displayFrame:SetScript("OnMouseUp", function(self) self:StopMovingOrSizing() end) ns.displayFrame:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end) ns.displayFrame:SetBackdropColor(0, 0, 0, .4) ns.displayFrame:EnableMouse(true) else options.locked = true ns.displayFrame:SetScript("OnMouseDown", nil) ns.displayFrame:SetScript("OnMouseUp", nil) ns.displayFrame:SetScript("OnDragStop", nil) ns.displayFrame:SetBackdropColor(0, 0, 0, 0) ns.displayFrame:EnableMouse(false) end end function ns.Options(msg, editBox) if (msg == 'show') then ns.displayFrame:Show() elseif (msg == 'hide') then ns.displayFrame:Hide() elseif (msg == '') then InterfaceOptionsFrame_OpenToCategory(getglobal("MutilateOptions")) end end function ns.SetScale(num) options.scale = num ns.displayFrame:SetScale(options.scale) end function ns.shallowCopyOfTable(t) local t2 = {} for k, v in pairs(t) do t2[k] = v end return t2 end function ns.SoundChannelDropDown_OnClck(self, arg1, arg2, checked) options.SoundChannel = arg1 UIDropDownMenu_SetText(ns.SoundChannelDropDownFrame, arg1) end function ns.AddSoundChannelDropDowRow(info, name) info.text = name info.arg1 = name info.checked = (name == options.SoundChannel) UIDropDownMenu_AddButton(info) end function ns.SoundChannelDropDown_Menu(frame, level, menuList) local info = UIDropDownMenu_CreateInfo() info.func = ns.SoundChannelDropDown_OnClck ns.AddSoundChannelDropDowRow(info, "Master") ns.AddSoundChannelDropDowRow(info, "SFX") ns.AddSoundChannelDropDowRow(info, "Music") ns.AddSoundChannelDropDowRow(info, "Ambience") ns.AddSoundChannelDropDowRow(info, "Dialog") ns.AddSoundChannelDropDowRow(info, "No sound") end
-- Simple Graphic Metronome -- local luamidi require ("LuaMidi") -- local NoteEvent = luamidi.NoteEvent bpm_bar = {} master_bar = {} clicks = {} subclicks = {} bpm = 120 max_bpm = 300 subdivision = 1 maintimer = 0 subtimer = 0 maindelay = 60.0/bpm subdelay = maindelay / subdivision mainvolume=1 subvolume=0.2 current_click = 0 current_subclick = 0 num_clicks = 5 taps = {} do_flash = false paused = false pendulum = {x = 0, rightward = true} flash_intensity = 0 flash_fade_rate = 18 enable_flash = true presets = {} for i=1,9 do presets[i] = {bpm=120,subdivision=1} end selected_preset = 1 function love.load(arg) -- LOAD FIVE CLICKS for i=1,num_clicks do clicks[i] = love.audio.newSource('assets/click.wav', 'static') clicks[i]:setVolume(mainvolume) clicks[i]:setLooping(false) end for i=1,num_clicks do subclicks[i] = love.audio.newSource('assets/click.wav', 'static') subclicks[i]:setVolume(subvolume) subclicks[i]:setLooping(false) end love.audio.setPosition(0,0,0) set_bpm(presets[selected_preset].bpm, presets[selected_preset].subdivision) master_bar.height = love.graphics.getHeight() love.audio.setVolume(height_to_volume(master_bar.height)) love.graphics.setNewFont(48) end function love.update(dt) maintimer = maintimer + dt subtimer = subtimer + dt width = love.graphics.getWidth() pct = (maintimer / maindelay) if not pendulum.rightward then pct = 1-pct end pendulum.x = width * pct handle_mouse() -- main click if maintimer >= maindelay then maintimer = maintimer - maindelay subtimer = subtimer - subdelay pendulum.rightward = not pendulum.rightward if not paused then flash_intensity = 255 play_click() -- play_sub_click() end -- subdivision click elseif subtimer >= subdelay then subtimer = subtimer - subdelay if not paused then flash_intensity = 0 play_sub_click() end end end function love.draw() draw_flash() -- bpm bar local x, y, width, height = get_bpm_bar() love.graphics.setColor(0, 0, 255) love.graphics.rectangle('fill',x, y, width, height) -- master volume local x, y, width, height = get_master_bar() love.graphics.setColor(0,255,0) love.graphics.rectangle('fill',x, y, width, height) -- bpm text love.graphics.printf( selected_preset .. ' : ' .. bpm .. ' / ' .. subdivision, 0, love.graphics.getHeight() / 3, love.graphics.getWidth(), 'center' ) draw_pendulum() end function love.keypressed(key, scancode, isrepeat) local new_bpm = bpm local new_sub = subdivision local new_preset = 0 if key == 'space' then paused = not paused elseif key == '1' then new_preset = tonumber(key) elseif key == '2' then new_preset = tonumber(key) elseif key == '3' then new_preset = tonumber(key) elseif key == '4' then new_preset = tonumber(key) elseif key == '5' then new_preset = tonumber(key) elseif key == '6' then new_preset = tonumber(key) elseif key == '7' then new_preset = tonumber(key) elseif key == '8' then new_preset = tonumber(key) elseif key == '9' then new_preset = tonumber(key) elseif key == 'up' then new_bpm = new_bpm + 1 elseif key == 'down' then new_bpm = new_bpm - 1 elseif key == 'right' then new_sub = math.min(3,new_sub + 1) elseif key == 'left' then new_sub = math.max(1,new_sub - 1) elseif key == 'pageup' then new_bpm = new_bpm + 10 elseif key == 'pagedown' then new_bpm = new_bpm - 10 elseif key == 'f' then enable_flash = not enable_flash elseif key == 't' and not isrepeat then do_tap_flash = true table.insert(taps,love.timer.getTime()) new_bpm = compute_taps() elseif key == 'escape' or key == 'esc' or key == 'q' then love.event.quit() end if new_preset > 0 then selected_preset = new_preset new_bpm = presets[selected_preset].bpm new_sub = presets[selected_preset].subdivision end set_bpm(new_bpm, new_sub) maintimer = maindelay subtimer = subdelay end function select_preset(key) selected_preset = tonumber(key) return presets[selected_preset] end function draw_flash() if flash_intensity <= 0 or not enable_flash then return end if do_tap_flash then love.graphics.setColor(255,128,128,flash_intensity) do_tap_flash = false else love.graphics.setColor(255,255,255,flash_intensity) end love.graphics.rectangle('fill',0,0,love.graphics.getWidth(), love.graphics.getHeight()) love.graphics.setColor(0,0,0) flash_intensity = flash_intensity - flash_fade_rate -- if flash_intensity or do_tap_flash then -- if do_click_flash then -- do_click_flash = false -- end -- if do_tap_flash then -- do_tap_flash = false -- love.graphics.setColor(255,128,128) -- end -- love.graphics.rectangle('fill',0,0,love.graphics.getWidth(), love.graphics.getHeight()) -- love.graphics.setColor(0,0,0) -- end end function draw_pendulum() -- draw the pendulum background love.graphics.setColor(0,0,0) love.graphics.rectangle('fill',0, 0, love.graphics.getWidth(), 20) -- draw main pendulum love.graphics.setColor(255,255,0) love.graphics.rectangle('fill',pendulum.x-15, 0, 30, 20) -- draw secondary pendulums local xinc local opacity local px local tail_length = 3 for i=0,tail_length do xinc = i*15 if pendulum.rightward then xinc = -xinc end opacity = 1 - i / tail_length px = pendulum.x - 15 + xinc -- print(pendulum.x .. ' ' .. opacity .. ' ' .. px) love.graphics.setColor(255,255,0, 255*opacity) love.graphics.rectangle('fill',px, 0, 30, 20) end end function handle_mouse() if not love.mouse.isDown(1,2) then return end -- determine which slider is selected x, y = love.mouse.getPosition() local bar_width = love.graphics.getWidth() / 11 local bar = math.floor(x / bar_width) + 1 -- flip the y value local height = love.graphics.getHeight() - y if bar == 11 then master_bar.height = height love.audio.setVolume(height_to_volume(master_bar.height)) elseif bar == 1 then bpm_bar.height = height set_bpm(height_to_bpm(height)) end end -- helper functions function set_bpm(n, sub) bpm = n subdivision = sub or 1 presets[selected_preset].bpm = bpm presets[selected_preset].subdivision = subdivision maindelay = 60.000 / bpm subdelay = maindelay / subdivision bpm_bar.height = bpm * (love.graphics.getHeight()-20) / max_bpm end function get_bpm_bar() local width = love.graphics.getWidth() / 11 local xpos = 0 local height = bpm_bar.height local ypos = love.graphics.getHeight() - height return xpos, ypos, width, height end function compute_taps() local new_bpm = bpm -- clear out all but the last four taps while #taps > 4 do table.remove(taps,1) end if #taps == 4 then -- figure out the average timediff local avg_timediff = (taps[4] - taps[1]) / 3 new_bpm = math.floor(60.0 / avg_timediff) end return new_bpm end function get_master_bar() local width = love.graphics.getWidth() / 11 local xpos = width * (10) local height = master_bar.height local ypos = love.graphics.getHeight() - height return xpos, ypos, width, height end function volume_to_height(v) local h_ratio = v * love.graphics.getHeight() - 30 -- linear easing local h = h_ratio -- sinusoidal easing local h = math.acos(math.pi * h_ratio + math.pi * .5) return h end function height_to_volume(h) -- apply an easing function to make the volume curve parabolic. local h_ratio = h/love.graphics.getHeight() -- linear easing local v = h_ratio -- quadratic easing local v = math.pow(h_ratio, 3) return v end function height_to_bpm(h) local new_bpm = math.floor(max_bpm * h / love.graphics.getHeight()) return new_bpm end function play_click() local next_click = (current_click % num_clicks) + 1 clicks[next_click]:stop() -- also rewinds to the beginning since v11.0 -- clicks[next_click]:seek(0) clicks[next_click]:play() current_click = next_click end function play_sub_click() local next_subclick = (current_subclick % num_clicks) + 1 subclicks[next_subclick]:stop() -- also rewinds to the beginning since v11.0 -- subclicks[next_subclick]:seek(0) subclicks[next_subclick]:play() current_subclick = next_subclick end
local target_suffixes_86 = { bsd = "_linux", linux = "_linux", solaris = "_linux", windows = "_win32", macosx = "_osx" , } local target_suffixes_64 = { bsd = "_linux64", linux = "_linux64", solaris = "_linux64", windows = "_win64", macosx = "_osx64", } local libdirs_86 = { linux = "steamworks/lib/linux32", windows = "steamworks/lib/win32" } local libdirs_64 = { linux = "steamworks/lib/linux64", windows = "steamworks/lib/win64" } solution "steamhttp" language "C++" location "project" -- -- Statically link the C-Runtime to reduce dependencies needed to run our module -- staticruntime "On" configurations { "Debug", "Release" } platforms { "x86", "x64" } configuration "Debug" defines { "DEBUG_BUILD" } symbols "On" -- Generate debugging information optimize "On" -- Optimize the build output for size and speed configuration "Release" defines { "RELEASE_BUILD" } optimize "On" -- Optimize the build output for size and speed filter "platforms:x86" architecture "x86" targetsuffix ( target_suffixes_86[os.target()] ) filter "platforms:x64" architecture "x86_64" targetsuffix ( target_suffixes_64[os.target()] ) project "steamhttp" kind "SharedLib" targetprefix "gmsv_" targetextension ".dll" includedirs { "steamworks/include/", "gmod-module-base/include/" } files { "src/*.cpp", "src/*.h" } filter "platforms:x64" libdirs {libdirs_64[os.target()]} filter "platforms:x86" libdirs {libdirs_86[os.target()]} if os.target() == "windows" then defines { "WINDOWS_BUILD" } filter "platforms:x64" links {"steam_api64"} filter "platforms:x86" links {"steam_api"} else links {"steam_api"} end
--[[ LibObjectiveProgress: Weight Data Last Updated: Patch 8.3.0 Live; 2020-02-16T15:44:21Z If you would like a copy of this data in a different format for your own purposes or to be informed of future updates: Contact MMOSimca / Simca@Malfurion - either through MMO-Champion, through CurseForge, or in-game You may use this compiled data in any form for any purpose without my permission (though it'd be cool if you gave a shoutout somewhere). Ultimately, it's all property of Blizzard Entertainment anyway. ]]-- local LOP = LibStub("LibObjectiveProgress-1.0") if not LOP then return end -- Data obtained from Criteria.db2 / CriteriaTree.db2 / Scenario.db2 / ScenarioStep.db2 / Map.db2 function LOP:LoadWeightDataByMap() LOP.MapBasedWeights = { -- Hall of Valor [1477] = { { [97087] = 1.5873, [96611] = 1.5873, [96608] = 1.5873, [96677] = 1.5873, [96640] = 1.5873, [95834] = 1.5873, [96664] = 1.5873, [95832] = 1.5873, [95842] = 1.5873, [97068] = 3.96825, [96574] = 3.96825, [99891] = 3.96825, [97197] = 1.5873, [99804] = 1.5873, [96934] = 1.5873, [97083] = 3.96825, [95843] = 3.96825, [97081] = 3.96825, [97084] = 3.96825, }, { [97087] = 1.3245, [96611] = 1.3245, [96608] = 1.3245, [96677] = 1.3245, [96640] = 1.3245, [95834] = 1.3245, [96664] = 1.3245, [95832] = 1.3245, [95842] = 1.3245, [97068] = 3.31126, [96574] = 3.31126, [99891] = 3.31126, [96934] = 1.3245, [99804] = 1.3245, [97197] = 1.3245, [97084] = 3.31126, [97081] = 3.31126, [97083] = 3.31126, [95843] = 3.31126, }, }, -- Black Rook Hold [1501] = { { [98370] = 1.33333, [98368] = 1.33333, [98366] = 1.33333, [98521] = 3.33333, [98538] = 3.33333, [98677] = 0.33333, [98681] = 2, [98706] = 2, [98280] = 1.33333, [101549] = 0.33333, [98275] = 1.33333, [98243] = 1.33333, [98691] = 1.33333, [101839] = 1.33333, [102138] = 3.33333, [98813] = 1.33333, [102788] = 1.33333, [98810] = 2, [98792] = 1.33333, [101923] = 1.33333, [98900] = 1.33333, [102095] = 1.33333, [102094] = 1.33333, }, { [98370] = 1.11111, [98368] = 1.11111, [98366] = 1.11111, [98521] = 2.77778, [98538] = 2.77778, [98677] = 0.27778, [98681] = 1.66667, [98706] = 1.66667, [98280] = 1.11111, [101549] = 0.27778, [98275] = 1.11111, [98243] = 1.11111, [98691] = 1.11111, [101839] = 1.11111, [102138] = 2.77778, [98813] = 1.11111, [102788] = 1.11111, [98810] = 1.66667, [98792] = 1.11111, [101923] = 1.11111, [98900] = 1.11111, [102095] = 1.11111, [102094] = 1.11111, }, }, -- Eye of Azshara [1456] = { { [91783] = 1.94175, [95861] = 1.94175, [100216] = 1.94175, [91782] = 4.85437, [91785] = 0.97087, [91781] = 1.94175, [95920] = 0.97087, [97171] = 4.85437, [97170] = 1.94175, [97173] = 1.94175, [97172] = 0.48544, [91796] = 4.85437, [95939] = 4.85437, [99629] = 0.48544, [106785] = 0.48544, [99630] = 0.48544, [106786] = 0.48544, [95940] = 0.48544, [106787] = 0.48544, [91794] = 0.48544, [101414] = 0.97087, [91793] = 0.48544, [91792] = 4.85437, [95947] = 1.94175, [91790] = 1.94175, [91786] = 1.94175, [91787] = 0.48544, [100248] = 1.94175, [100249] = 1.94175, [100250] = 1.94175, [98173] = 1.94175, }, { [91783] = 1.65289, [95861] = 1.65289, [100216] = 1.65289, [91782] = 4.13223, [91785] = 0.82645, [91781] = 1.65289, [95920] = 0.82645, [97171] = 4.13223, [97170] = 1.65289, [97173] = 1.65289, [97172] = 0.41322, [91796] = 4.13223, [95939] = 4.13223, [99629] = 0.41322, [106785] = 0.41322, [99630] = 0.41322, [106786] = 0.41322, [95940] = 0.41322, [106787] = 0.41322, [91794] = 0.41322, [101414] = 0.82645, [91793] = 0.41322, [91792] = 4.13223, [95947] = 1.65289, [91790] = 1.65289, [91786] = 1.65289, [91787] = 0.41322, [100248] = 1.65289, [100249] = 1.65289, [100250] = 1.65289, [98173] = 1.65289, }, }, -- Darkheart Thicket [1466] = { { [95771] = 1.42857, [95779] = 3.57143, [99358] = 1.42857, [101679] = 1.42857, [95766] = 1.42857, [99359] = 1.07143, [99360] = 3.21429, [95769] = 1.42857, [95772] = 1.42857, [100531] = 2.85714, [101991] = 1.42857, [100526] = 1.42857, [100527] = 1.07143, [100539] = 1.42857, [99365] = 1.42857, [99366] = 1.42857, [100529] = 0.35714, }, { [95771] = 1.19048, [95779] = 2.97619, [99358] = 1.19048, [101679] = 1.19048, [95766] = 1.19048, [99359] = 0.89286, [99360] = 2.67857, [95769] = 1.19048, [95772] = 1.19048, [100531] = 2.38095, [101991] = 1.19048, [100526] = 1.19048, [100527] = 0.89286, [100539] = 1.19048, [99365] = 1.19048, [99366] = 1.19048, [100529] = 0.29762, }, }, -- Vault of the Wardens [1493] = { { [95771] = 1.90476, [96657] = 5.71429, [97674] = 1.90476, [102583] = 1.90476, [99956] = 1.90476, [96587] = 1.90476, [99649] = 5.71429, [98177] = 5.71429, [96584] = 1.90476, [98963] = 0.47619, [98533] = 4.7619, [102584] = 1.90476, [98926] = 1.90476, [97678] = 3.80952, [97677] = 0.47619, [96480] = 0.47619, [100364] = 1.90476, [98954] = 1.90476, [102566] = 5.71429, }, { [95771] = 1.5873, [96657] = 4.7619, [97674] = 1.5873, [102583] = 1.5873, [99956] = 1.5873, [96587] = 1.5873, [99649] = 4.7619, [98177] = 4.7619, [96584] = 1.5873, [98963] = 0.39683, [98533] = 3.96825, [102584] = 1.5873, [98926] = 1.5873, [97678] = 3.1746, [97677] = 0.39683, [96480] = 0.39683, [100364] = 1.5873, [98954] = 1.5873, [102566] = 4.7619, }, }, -- Neltharion's Lair [1458] = { { [102404] = 1.81818, [91332] = 1.81818, [92610] = 1.81818, [92351] = 1.81818, [91008] = 1.81818, [90998] = 1.81818, [102253] = 1.81818, [102232] = 1.81818, [90997] = 1.81818, [92350] = 1.81818, [91000] = 3.63636, [101438] = 1.81818, [91006] = 1.81818, [105636] = 1.81818, [105720] = 1.81818, [98406] = 1.81818, [102287] = 4.54545, [96247] = 0.45455, [91001] = 1.81818, [102430] = 0.45455, [113998] = 1.81818, [113537] = 4.54545, }, { [102404] = 1.51515, [91332] = 1.51515, [92610] = 1.51515, [92351] = 1.51515, [91008] = 1.51515, [90998] = 1.51515, [102253] = 1.51515, [102232] = 1.51515, [90997] = 1.51515, [92350] = 1.51515, [91000] = 3.0303, [101438] = 1.51515, [91006] = 1.51515, [105636] = 1.51515, [105720] = 1.51515, [98406] = 1.51515, [102287] = 3.78788, [96247] = 0.37879, [91001] = 1.51515, [102430] = 0.37879, [113998] = 1.51515, [113537] = 3.78788, }, }, -- Maw of Souls [1492] = { { [97097] = 2.66667, [97043] = 2.66667, [99188] = 2.66667, [102375] = 2, [98919] = 2.66667, [97182] = 4, [99033] = 2.66667, [97185] = 6.66667, [97119] = 0.66667, [97200] = 2.66667, [102104] = 2.66667, [97365] = 2.66667, [99307] = 8, [98973] = 0.66667, }, { [97097] = 2.22222, [97043] = 2.22222, [99188] = 2.22222, [102375] = 1.66667, [98919] = 2.22222, [97182] = 3.33333, [99033] = 2.22222, [97185] = 5.55556, [97119] = 0.55556, [97200] = 2.22222, [102104] = 2.22222, [97365] = 2.22222, [99307] = 6.66667, [98973] = 0.55556, }, }, -- Arcway [1516] = { { [98728] = 1.78571, [98756] = 1.02041, [105617] = 1.02041, [105682] = 2.04082, [98732] = 0.2551, [105651] = 2.55102, [98759] = 1.02041, [105876] = 0.2551, [102351] = 0.2551, [105915] = 1.02041, [105921] = 1.02041, [105706] = 2.55102, [98425] = 1.02041, [106059] = 1.02041, [98733] = 1.02041, [105952] = 1.53061, [98770] = 1.02041, [105629] = 0.2551, [113699] = 2.04082, }, { [98728] = 1.50215, [98756] = 0.85837, [105617] = 0.85837, [105682] = 1.71674, [98732] = 0.21459, [105651] = 2.14592, [98759] = 0.85837, [105876] = 0.21459, [102351] = 0.21459, [105915] = 0.85837, [105921] = 0.85837, [105706] = 2.14592, [98425] = 0.85837, [106059] = 0.85837, [98733] = 0.85837, [105952] = 1.28755, [98770] = 0.85837, [105629] = 0.21459, [113699] = 1.71674, }, }, -- Court of Stars [1571] = { { [105704] = 2.5, [104251] = 2.5, [104270] = 5, [104277] = 2.5, [104278] = 6.25, [104246] = 2.5, [104247] = 2.5, [105703] = 0.625, [105705] = 2.5, [105715] = 2.5, [105699] = 1.875, [111563] = 2.5, [104300] = 2.5, [104295] = 0.625, }, { [105703] = 0.52083, [105715] = 2.08333, [104295] = 0.52083, [104300] = 2.08333, [104247] = 2.08333, [111563] = 2.08333, [105704] = 2.08333, [104277] = 2.08333, [105699] = 1.5625, [104246] = 2.08333, [104270] = 4.16667, [105705] = 2.08333, [104278] = 5.20833, [104251] = 2.08333, }, }, -- Return to Karazhan [1651] = { -- Lower { [114627] = 0.95238, [114626] = 0.95238, [114541] = 0.2381, [114542] = 0.95238, [114584] = 0.2381, [114526] = 0.2381, [116549] = 0.95238, [114544] = 0.95238, [114625] = 0.2381, [114629] = 0.95238, [114634] = 0.95238, [114636] = 0.95238, [114637] = 0.95238, [114783] = 0.95238, [114796] = 0.95238, [114792] = 0.95238, [115020] = 0.95238, [115019] = 0.95238, [115115] = 0.95238, [114624] = 1.90476, [114628] = 0.95238, [114794] = 0.95238, [114716] = 0.2381, [114715] = 0.95238, [114802] = 0.95238, [114801] = 0.95238, [114804] = 0.95238, [114803] = 0.95238, [114633] = 0.95238, [116550] = 0.95238, [114632] = 0.95238, [114714] = 0.95238, }, { [114627] = 0.79365, [114626] = 0.79365, [114541] = 0.19841, [114542] = 0.79365, [114584] = 0.19841, [114526] = 0.19841, [116549] = 0.79365, [114544] = 0.79365, [114625] = 0.19841, [114629] = 0.79365, [114634] = 0.79365, [114636] = 0.79365, [114637] = 0.79365, [114783] = 0.79365, [114796] = 0.79365, [114792] = 0.79365, [115020] = 0.79365, [115019] = 0.79365, [115115] = 0.79365, [114624] = 1.5873, [114628] = 0.79365, [114794] = 0.79365, [114716] = 0.19841, [114715] = 0.79365, [114802] = 0.79365, [114801] = 0.79365, [114804] = 0.79365, [114803] = 0.79365, [114633] = 0.79365, [116550] = 0.79365, [114632] = 0.79365, [114714] = 0.79365, [114714] = 0.79365, }, -- Upper { [114626] = 2.36686, [114627] = 2.36686, [114334] = 2.36686, [115765] = 7.10059, [114338] = 5.91716, [114364] = 0.59172, [115484] = 2.36686, [115488] = 2.36686, [115757] = 4.73373, [115419] = 4.73373, [115417] = 4.73373, [115418] = 4.73373, [115831] = 2.36686, [115486] = 4.73373, [115388] = 7.10059, }, { [114626] = 1.9802, [114627] = 1.9802, [114334] = 1.9802, [115765] = 5.94059, [114338] = 4.9505, [114364] = 0.49505, [115484] = 1.9802, [115488] = 1.9802, [115757] = 3.9604, [115419] = 3.9604, [115417] = 3.9604, [115418] = 3.9604, [115831] = 1.9802, [115486] = 3.9604, [115388] = 5.94059, }, }, -- Cathedral of Eternal Night [1677] = { { [119952] = 1.31148, [120550] = 1.31148, [118704] = 3.27869, [119923] = 1.31148, [118700] = 0.65574, [119930] = 1.31148, [120366] = 1.31148, [119978] = 0.32787, [118703] = 1.31148, [118716] = 1.31148, [119977] = 1.31148, [118717] = 1.31148, [118719] = 1.31148, [118723] = 3.27869, [120274] = 2.62295, [118706] = 0.65574, [118712] = 1.31148, [118705] = 3.27869, [120374] = 1.31148, [118690] = 1.31148, [118724] = 1.31148, [120556] = 1.31148, [120405] = 1.31148, [118714] = 1.31148, [121318] = 0.32787, [121569] = 1.31148, [121711] = 1.31148, [120371] = 1.31148, [118713] = 1.31148, [121553] = 1.31148, }, { [119952] = 1.19403, [120550] = 1.19403, [118704] = 2.98507, [119923] = 1.19403, [118700] = 0.59701, [119930] = 1.19403, [120366] = 1.19403, [119978] = 0.29851, [118703] = 1.19403, [118716] = 1.19403, [119977] = 1.19403, [118717] = 1.19403, [118719] = 1.19403, [118723] = 2.98507, [120274] = 2.38806, [118706] = 0.59701, [118712] = 1.19403, [118705] = 2.98507, [120374] = 1.19403, [118690] = 1.19403, [118724] = 1.19403, [120556] = 1.19403, [120405] = 1.19403, [118714] = 1.19403, [121318] = 0.29851, [121569] = 1.19403, [121711] = 1.19403, [120371] = 1.19403, [118713] = 1.19403, [121553] = 1.19403, }, }, -- Seat of the Triumvirate [1753] = { { [124171] = 1.45455, [122322] = 1.45455, [122478] = 0.72727, [122398] = 1.45455, [122408] = 1.45455, [122413] = 1.45455, [122421] = 2.90909, [122410] = 0.36364, [122403] = 1.45455, [122571] = 2.90909, [122407] = 1.45455, [122412] = 1.45455, [122405] = 1.45455, [122404] = 1.45455, [124947] = 0.36364, [122423] = 2.90909, [125860] = 2.90909, }, { [124171] = 1.21581, [122322] = 1.21581, [122478] = 0.6079, [122398] = 1.21581, [122408] = 1.21581, [122413] = 1.21581, [122421] = 2.43161, [122410] = 0.30395, [122403] = 1.21581, [122571] = 2.43161, [122407] = 1.21581, [122412] = 1.21581, [122405] = 1.21581, [122404] = 1.21581, [124947] = 0.30395, [122423] = 2.43161, [125860] = 2.43161, }, }, -- Atal'Dazar (CityofGoldExterior) [1763] = { { [127879] = 2.0202, [122971] = 2.0202, [127799] = 2.0202, [122972] = 2.0202, [122973] = 2.0202, [122984] = 3.0303, [132126] = 2.0202, [127757] = 2.0202, [122970] = 2.0202, [122969] = 2.0202, [128435] = 0.50505, [128434] = 2.0202, [129553] = 5.05051, [129552] = 3.0303, [128455] = 3.0303, [155434] = 2.0202, [155433] = 2.0202, [155432] = 2.0202, [161124] = 2.0202, [161241] = 2.0202, [161243] = 2.0202, [161244] = 2.0202, }, { [127879] = 1.68776, [122971] = 1.68776, [127799] = 1.68776, [122972] = 1.68776, [122973] = 1.68776, [122984] = 2.53165, [132126] = 1.68776, [127757] = 1.68776, [122970] = 1.68776, [122969] = 1.68776, [128435] = 0.42194, [128434] = 1.68776, [129553] = 4.21941, [129552] = 2.53165, [128455] = 2.53165, [155432] = 1.68776, [155433] = 1.68776, [155434] = 1.68776, [161124] = 2.53165, [161241] = 2.53165, [161243] = 2.53165, [161244] = 2.53165, }, }, -- Tol Dagor (KulTirasPrison) [1771] = { { [127480] = 0.25, [127482] = 1, [127381] = 0.75, [130025] = 1.75, [131112] = 1.5, [127485] = 0.75, [130026] = 1.5, [130207] = 0.75, [131445] = 2.25, [130027] = 1.75, [127486] = 1.75, [130353] = 1.5, [127488] = 1.75, [127497] = 2.25, [127477] = 1.5, [135366] = 1.5, [135254] = 1, [135699] = 1.75, [136735] = 1.75, [136665] = 1.75, [130028] = 1.75, [135706] = 0.75, [155434] = 1.75, [155433] = 1.75, [155432] = 1.75, [161124] = 1.75, [161241] = 1.75, [161243] = 1.75, [161244] = 1.75, }, { [127480] = 0.20877, [127482] = 0.83507, [127381] = 0.6263, [130025] = 1.46138, [131112] = 1.25261, [127485] = 0.6263, [130026] = 1.25261, [130207] = 0.6263, [131445] = 1.87891, [130027] = 1.46138, [127486] = 1.46138, [130353] = 1.25261, [127488] = 1.46138, [127497] = 1.87891, [127477] = 1.25261, [130028] = 1.46138, [136665] = 1.46138, [136735] = 1.46138, [135699] = 1.46138, [135366] = 1.25261, [135254] = 0.83507, [135706] = 0.6263, [155432] = 1.46138, [155433] = 1.46138, [155434] = 1.46138, [161124] = 2.08768, [161241] = 2.08768, [161243] = 2.08768, [161244] = 2.08768, }, }, -- Freehold (PirateTownDungeon) [1754] = { { [126928] = 1.53257, [126918] = 1.53257, [129788] = 1.53257, [128551] = 1.53257, [129602] = 2.29885, [127111] = 2.29885, [130011] = 1.53257, [129526] = 1.53257, [130522] = 0.76628, [130024] = 0.38314, [130404] = 1.53257, [129548] = 1.53257, [129529] = 1.53257, [129547] = 1.53257, [129550] = 1.53257, [129551] = 0.38314, [129527] = 1.53257, [129599] = 1.14943, [129600] = 1.14943, [130400] = 2.29885, [126919] = 1.53257, [130012] = 1.53257, [127106] = 2.29885, [130521] = 0.38314, [129601] = 1.53257, [129559] = 1.53257, [129699] = 1.53257, [155434] = 1.53257, [155433] = 1.53257, [155432] = 1.53257, [161124] = 1.53257, [161241] = 1.53257, [161243] = 1.53257, [161244] = 1.53257, }, { [126918] = 1.27796, [129788] = 1.27796, [128551] = 1.27796, [126928] = 1.27796, [129602] = 1.91693, [127111] = 1.91693, [130011] = 1.27796, [129526] = 1.27796, [130522] = 0.63898, [130024] = 0.31949, [130404] = 1.27796, [129548] = 1.27796, [129529] = 1.27796, [129547] = 1.27796, [129550] = 1.27796, [129551] = 0.31949, [129527] = 1.27796, [129599] = 0.95847, [129600] = 0.95847, [130400] = 1.91693, [126919] = 1.27796, [130012] = 1.27796, [127106] = 1.91693, [129559] = 1.27796, [129601] = 1.27796, [130521] = 0.31949, [129699] = 1.27796, [155432] = 1.27796, [155433] = 1.27796, [155434] = 1.27796, [161124] = 1.91693, [161241] = 1.91693, [161243] = 1.91693, [161244] = 1.91693, }, }, -- Kezan (DevMapG) [1594] = { { [130436] = 0.26042, [130488] = 1.04167, [130485] = 3.125, [136470] = 1.04167, [130435] = 1.30208, [134232] = 1.04167, [136139] = 3.125, [130437] = 0.52083, [130653] = 1.04167, [130661] = 1.04167, [136643] = 3.125, [130635] = 1.04167, [134005] = 0.26042, [134012] = 1.5625, [137713] = 0.26042, [137940] = 1.04167, [133430] = 2.08333, [133345] = 1.30208, [133432] = 1.30208, [136934] = 1.04167, [133963] = 0.26042, [133593] = 1.30208, [133463] = 3.125, [137029] = 1.30208, [133436] = 1.30208, [133482] = 0.26042, [155434] = 1.04167, [155433] = 1.04167, [155432] = 1.04167, [161124] = 1.04167, [161241] = 1.04167, [161243] = 1.04167, [161244] = 1.04167, }, { [130436] = 0.21739, [130488] = 0.86957, [130485] = 2.6087, [136470] = 0.86957, [130435] = 1.08696, [134232] = 0.86957, [136139] = 2.6087, [130437] = 0.43478, [130653] = 0.86957, [130661] = 0.86957, [136643] = 2.6087, [130635] = 0.86957, [134005] = 0.21739, [134012] = 1.30435, [137713] = 0.21739, [137940] = 0.86957, [133430] = 1.73913, [133345] = 1.08696, [133432] = 1.08696, [136934] = 1.08696, [133963] = 0.21739, [133593] = 1.08696, [133463] = 2.6087, [137029] = 1.08696, [133436] = 1.08696, [133482] = 0.21739, [155432] = 0.86957, [155433] = 0.86957, [155434] = 0.86957, [161124] = 1.30435, [161241] = 1.30435, [161243] = 1.30435, [161244] = 1.30435, }, }, -- Waycrest Manor (DrustvarDungeon) [1862] = { { [135240] = 0.66007, [137048] = 0.33003, [131850] = 1.32013, [131849] = 1.32013, [135234] = 0.9901, [134024] = 0.33003, [135048] = 1.32013, [134041] = 1.32013, [131847] = 1.32013, [131586] = 1.32013, [137830] = 1.32013, [131601] = 1.32013, [131611] = 1.32013, [131607] = 1.32013, [131677] = 1.9802, [131669] = 0.33003, [131858] = 1.32013, [131666] = 1.32013, [135329] = 3.30033, [131685] = 1.32013, [131585] = 1.32013, [131587] = 1.65017, [131812] = 1.9802, [135052] = 0.33003, [135474] = 1.32013, [131818] = 1.32013, [135049] = 0.66007, [135365] = 5.28053, [131819] = 1.32013, [139269] = 1.32013, [131670] = 1.9802, [135195] = 1.32013, [155434] = 1.32013, [155433] = 1.32013, [155432] = 1.32013, [161124] = 1.32013, [161241] = 1.32013, [161243] = 1.32013, [161244] = 1.32013, }, { [135240] = 0.55096, [137048] = 0.27548, [131850] = 1.10193, [131849] = 1.10193, [135234] = 0.55096, [134024] = 0.27548, [135048] = 1.10193, [134041] = 1.10193, [131847] = 1.10193, [131586] = 1.10193, [137830] = 1.10193, [131601] = 1.10193, [131611] = 1.10193, [131607] = 1.10193, [131677] = 1.65289, [135365] = 4.40771, [131669] = 0.27548, [131858] = 1.10193, [131666] = 1.10193, [135329] = 2.75482, [131685] = 1.10193, [131585] = 1.10193, [131587] = 1.37741, [131812] = 1.65289, [135052] = 0.27548, [135474] = 1.10193, [131818] = 1.10193, [135049] = 0.55096, [131819] = 1.10193, [139269] = 1.10193, [131670] = 1.65289, [135195] = 1.10193, [155432] = 1.10193, [155433] = 1.10193, [155434] = 1.10193, [161124] = 1.65289, [161241] = 1.65289, [161243] = 1.65289, [161244] = 1.65289, }, }, -- Kings' Rest (CityofGoldInteriorDungeon) [1762] = { { [133935] = 3.25203, [134158] = 2.43902, [134174] = 2.03252, [134157] = 1.62602, [137485] = 1.62602, [137484] = 2.43902, [137473] = 1.62602, [134331] = 2.43902, [134251] = 1.62602, [137486] = 1.62602, [137487] = 1.62602, [137474] = 2.43902, [137478] = 2.43902, [134739] = 4.06504, [137989] = 0.4065, [137969] = 2.43902, [135167] = 1.62602, [135204] = 1.62602, [135239] = 1.62602, [135231] = 3.25203, [135192] = 1.62602, [135235] = 1.62602, [134994] = 0.4065, [64192] = 3.25203, [155434] = 1.62602, [155433] = 1.62602, [155432] = 1.62602, [161124] = 1.62602, [161241] = 1.62602, [161243] = 1.62602, [161244] = 1.62602, }, { [133935] = 2.7972, [134158] = 2.0979, [134174] = 1.74825, [134157] = 1.3986, [137485] = 1.3986, [137484] = 2.0979, [137473] = 1.3986, [134331] = 2.0979, [134251] = 1.3986, [137486] = 1.3986, [137487] = 1.3986, [137474] = 2.0979, [137478] = 2.0979, [134739] = 3.4965, [137989] = 0.34965, [137969] = 2.0979, [135167] = 1.3986, [135204] = 1.3986, [135239] = 1.3986, [135231] = 2.7972, [135192] = 1.3986, [135235] = 1.3986, [134994] = 0.34965, [64192] = 2.7972, [155432] = 1.3986, [155433] = 1.3986, [155434] = 1.3986, [161124] = 2.0979, [161241] = 2.0979, [161243] = 2.0979, [161244] = 2.0979, }, }, -- Temple of Sethraliss (SnakeDungeon) [1877] = { { [134616] = 0.90909, [134600] = 1.81818, [134602] = 1.81818, [134617] = 0.45455, [134991] = 2.72727, [134990] = 1.81818, [134629] = 2.72727, [134364] = 1.81818, [136076] = 2.72727, [134599] = 1.81818, [134691] = 1.81818, [63453] = 5.45455, [134686] = 1.81818, [139422] = 2.72727, [135562] = 0.90909, [135846] = 0.90909, [139425] = 1.81818, [139110] = 2.27273, [139946] = 2.72727, [139949] = 1.81818, [136250] = 1.81818, [63063] = 1.81818, [139110] = 2.72727, [155434] = 1.81818, [155433] = 1.81818, [155432] = 1.81818, [161124] = 1.81818, [161241] = 1.81818, [161243] = 1.81818, [161244] = 1.81818, }, { [134616] = 0.75758, [134600] = 1.51515, [134602] = 1.51515, [134617] = 0.37879, [134991] = 2.27273, [134990] = 1.51515, [134629] = 2.27273, [134364] = 1.51515, [136076] = 2.27273, [134599] = 1.51515, [134691] = 1.51515, [63453] = 4.54545, [134686] = 1.51515, [139422] = 2.27273, [135562] = 0.75758, [135846] = 0.75758, [139425] = 1.51515, [139110] = 1.89394, [139946] = 1.51515, [139949] = 1.51515, [136250] = 1.51515, [63063] = 1.51515, [139110] = 2.27273, [155432] = 1.51515, [155433] = 1.51515, [155434] = 1.51515, [161124] = 2.27273, [161241] = 2.27273, [161243] = 2.27273, [161244] = 2.27273, }, }, -- The Underrot (UnderrotDungeon) [1841] = { { [131402] = 0.39683, [131436] = 2.38095, [130909] = 1.5873, [133663] = 1.5873, [131492] = 1.5873, [133685] = 1.5873, [133835] = 1.5873, [133852] = 1.5873, [133870] = 1.5873, [133836] = 1.5873, [134284] = 1.5873, [133912] = 2.38095, [138187] = 1.5873, [138281] = 2.38095, [155434] = 1.5873, [155433] = 1.5873, [155432] = 1.5873, [161124] = 1.5873, [161241] = 1.5873, [161243] = 1.5873, [161244] = 1.5873, }, { [131402] = 0.34965, [131436] = 2.0979, [130909] = 1.3986, [133663] = 1.3986, [131492] = 1.3986, [133685] = 1.3986, [133835] = 1.3986, [133852] = 1.3986, [133870] = 1.3986, [133836] = 1.3986, [134284] = 1.3986, [133912] = 2.0979, [138187] = 1.3986, [138281] = 2.0979, [155432] = 1.3986, [155433] = 1.3986, [155434] = 1.3986, [161124] = 2.0979, [161241] = 2.0979, [161243] = 2.0979, [161244] = 2.0979, }, }, -- Shrine of the Storm (SeaPriestDungeon) [1864] = { { [134139] = 1.43885, [134173] = 0.14388, [134137] = 1.29496, [134144] = 2.58993, [136186] = 1.29496, [136214] = 5.17986, [134150] = 5.17986, [136249] = 5.17986, [136347] = 0.14388, [134417] = 1.72662, [134338] = 1.29496, [134418] = 1.29496, [134423] = 0.14388, [136353] = 1.43885, [134514] = 1.29496, [136295] = 1.8705, [136297] = 1.29496, [139800] = 1.29496, [139799] = 1.29496, [140038] = 0.28777, [139626] = 0.14388, [155434] = 1.29496, [155433] = 1.29496, [155432] = 1.29496, [161124] = 1.29496, [161241] = 1.29496, [161243] = 1.29496, [161244] = 1.29496, }, { [134139] = 1.19904, [134173] = 0.1199, [134137] = 1.07914, [134144] = 2.15827, [136186] = 1.07914, [136214] = 4.31655, [134150] = 4.31655, [136249] = 4.31655, [136347] = 0.1199, [134417] = 1.43885, [134338] = 1.07914, [134418] = 1.07914, [134423] = 0.1199, [136353] = 1.19904, [134514] = 1.07914, [136295] = 1.55875, [136297] = 1.07914, [139626] = 0.1199, [140038] = 0.23981, [139799] = 1.07914, [139800] = 1.07914, [155432] = 1.07914, [155433] = 1.07914, [155434] = 1.07914, [161124] = 1.43885, [161241] = 1.43885, [161243] = 1.43885, [161244] = 1.43885, }, }, -- Siege of Boralus (BoralusDungeon) [1822] = { -- Alliance { [133990] = 0.31348, [129372] = 1.25392, [129374] = 1.25392, [129370] = 1.25392, [129369] = 2.50784, [129371] = 1.25392, [129373] = 1.25392, [129640] = 1.25392, [135258] = 0.31348, [137521] = 1.25392, [128969] = 2.50784, [138255] = 1.25392, [135263] = 1.25392, [138464] = 1.25392, [138465] = 1.25392, [135241] = 1.25392, [129366] = 1.25392, [135245] = 2.50784, [129367] = 1.25392, [137511] = 1.25392, [137516] = 1.25392, [137517] = 1.25392, [144071] = 1.25392, [138254] = 0.31348, [128967] = 1.25392, [141282] = 0.31348, [138019] = 1.25392, [141284] = 1.25392, [141566] = 0.31348, [141565] = 0.31348, [138002] = 0.31348, [138247] = 0.31348, [155434] = 1.25392, [155433] = 1.25392, [155432] = 1.25392, [161124] = 1.25392, [161241] = 1.25392, [161243] = 1.25392, [161244] = 1.25392, }, { [133990] = 0.2611, [129372] = 1.04439, [129374] = 1.04439, [129370] = 1.04439, [129369] = 2.08877, [129371] = 1.04439, [129373] = 1.04439, [129640] = 1.04439, [135258] = 0.2611, [137521] = 1.04439, [128969] = 2.08877, [138255] = 1.04439, [135263] = 1.04439, [138464] = 1.04439, [138465] = 1.04439, [135241] = 1.04439, [129366] = 1.04439, [135245] = 2.08877, [129367] = 1.04439, [137511] = 1.04439, [137516] = 1.04439, [137517] = 1.04439, [144071] = 1.04439, [138254] = 0.2611, [128967] = 1.04439, [141282] = 0.2611, [138019] = 1.04439, [141284] = 1.04439, [141566] = 0.2611, [141565] = 0.2611, [138002] = 0.2611, [138247] = 0.2611, [155432] = 1.04439, [155433] = 1.04439, [155434] = 1.04439, [161124] = 1.56658, [161241] = 1.56658, [161243] = 1.56658, [161244] = 1.56658, }, -- Horde { [133990] = 0.31348, [129372] = 1.25392, [129374] = 1.25392, [129370] = 1.25392, [129369] = 2.50784, [129371] = 1.25392, [129373] = 1.25392, [129640] = 1.25392, [135258] = 0.31348, [137521] = 1.25392, [128969] = 2.50784, [138255] = 1.25392, [135263] = 1.25392, [138464] = 1.25392, [138465] = 1.25392, [135241] = 1.25392, [129366] = 1.25392, [135245] = 2.50784, [129367] = 1.25392, [137511] = 1.25392, [137516] = 1.25392, [137517] = 1.25392, [141495] = 0.31348, [141283] = 1.25392, [141285] = 1.25392, [144071] = 1.25392, [138254] = 0.31348, [128967] = 1.25392, [141282] = 0.31348, [138019] = 1.25392, [141284] = 1.25392, [141566] = 0.31348, [141565] = 0.31348, [138002] = 0.31348, [138247] = 0.31348, [155434] = 1.25392, [155433] = 1.25392, [155432] = 1.25392, [161124] = 1.25392, [161241] = 1.25392, [161243] = 1.25392, [161244] = 1.25392, }, { [133990] = 0.2611, [129372] = 1.04439, [129374] = 1.04439, [129370] = 1.04439, [129369] = 2.08877, [129371] = 1.04439, [129373] = 1.04439, [129640] = 1.04439, [135258] = 0.2611, [137521] = 1.04439, [128969] = 2.08877, [138255] = 1.04439, [135263] = 1.04439, [138464] = 1.04439, [138465] = 1.04439, [135241] = 1.04439, [129366] = 1.04439, [135245] = 2.08877, [129367] = 1.04439, [137511] = 1.04439, [137516] = 1.04439, [137517] = 1.04439, [141285] = 1.04439, [141283] = 1.04439, [141495] = 0.2611, [144071] = 1.04439, [138254] = 0.2611, [128967] = 1.04439, [141282] = 0.2611, [138019] = 1.04439, [141284] = 1.04439, [141566] = 0.2611, [141565] = 0.2611, [138002] = 0.2611, [138247] = 0.2611, [155432] = 1.04439, [155433] = 1.04439, [155434] = 1.04439, [161124] = 1.56658, [161241] = 1.56658, [161243] = 1.56658, [161244] = 1.56658, }, }, -- Mechagon (MechagonDungeon) [2097] = { -- Junkyard { [150249] = 1.20482, [150250] = 1.20482, [150251] = 1.20482, [150253] = 1.80723, [150254] = 1.20482, [150276] = 1.50602, [150195] = 1.20482, [150165] = 1.50602, [150169] = 1.20482, [154744] = 1.80723, [150168] = 1.80723, [154758] = 1.80723, [150547] = 0.3012, [150143] = 1.20482, [150146] = 1.20482, [150142] = 1.20482, [150160] = 1.50602, [150154] = 1.20482, [152009] = 1.50602, [155094] = 1.20482, [150297] = 1.20482, [150292] = 1.50602, [150293] = 1.20482, [155090] = 1.20482, [161124] = 1.20482, [161241] = 1.20482, [161243] = 1.20482, [161244] = 1.20482, }, { [150249] = 1.00503, [150250] = 1.00503, [150251] = 1.00503, [150253] = 1.50754, [150254] = 1.00503, [150276] = 1.25628, [150195] = 1.00503, [150165] = 1.25628, [150169] = 1.00503, [154744] = 1.50754, [150168] = 1.50754, [154758] = 1.50754, [150547] = 0.25126, [150143] = 1.00503, [150146] = 1.00503, [150142] = 1.00503, [150160] = 1.25628, [150154] = 1.00503, [152009] = 1.25628, [155094] = 1.00503, [150297] = 1.00503, [150292] = 1.25628, [150293] = 1.00503, [155090] = 1.00503, [161124] = 1.50754, [161241] = 1.50754, [161243] = 1.50754, [161244] = 1.50754, }, -- Workshop { [151657] = 2.5, [152435] = 2.5, [151659] = 2.5, [152443] = 2.5, [151658] = 2.5, [152442] = 2.5, [144293] = 3.75, [151773] = 2.5, [144301] = 0.625, [144303] = 2.5, [144294] = 2.5, [151649] = 2.5, [144298] = 3.75, [151476] = 5, [144295] = 2.5, [144299] = 2.5, [144296] = 3.125, [161124] = 2.5, [161241] = 2.5, [161243] = 2.5, [161244] = 2.5, }, { [151657] = 2.08333, [152435] = 2.08333, [151659] = 2.08333, [152443] = 2.08333, [151658] = 2.08333, [152442] = 2.08333, [144293] = 3.125, [151773] = 2.08333, [144301] = 0.52083, [144303] = 2.08333, [144294] = 2.08333, [151649] = 2.08333, [144298] = 3.125, [151476] = 4.16667, [144295] = 2.08333, [144299] = 2.08333, [144296] = 2.60417, [161124] = 3.125, [161241] = 3.125, [161243] = 3.125, [161244] = 3.125, }, }, } -- ID 2268 for 'MechagonCity' might also be used for Workshop. -- It's unclear, but just in case we'll alias these maps LOP.MapBasedWeights[2268][1] = LOP.MapBasedWeights[2097][3] LOP.MapBasedWeights[2268][2] = LOP.MapBasedWeights[2097][4] end -- Data obtained from QuestCache.wdb; filtered on (Type==0 || Type==3) && Flags&0x64!=0 && PercentAmount!=0 in order to eliminate unneeded entries function LOP:LoadWeightDataByQuest() LOP.QuestBasedWeights = { [35637] = { [85260] = 0.2, [82675] = 0.2, [88445] = 0.2, [85261] = 1, [77988] = 1, [77991] = 1, [77994] = 1, [77997] = 1, [78003] = 1, [78778] = 1, [78782] = 1, [82711] = 1, [88425] = 1, [88430] = 1, [89164] = 1, [85265] = 2, [82531] = 3, [77992] = 3, [77993] = 3, [77995] = 3, [78578] = 3, [88437] = 3, [88459] = 3, [85262] = 8, [85263] = 20, [82614] = 20, [82616] = 20, [82617] = 20, [82618] = 20, [82620] = 20, }, [35641] = { [85260] = 0.2, [82675] = 0.2, [88445] = 0.2, [85261] = 1, [77988] = 1, [77991] = 1, [77994] = 1, [77997] = 1, [78003] = 1, [78778] = 1, [78782] = 1, [82711] = 1, [88425] = 1, [88430] = 1, [89164] = 1, [85265] = 2, [82531] = 3, [77992] = 3, [77993] = 3, [77995] = 3, [78578] = 3, [88437] = 3, [88459] = 3, [85262] = 8, [85263] = 20, [82614] = 20, [82616] = 20, [82617] = 20, [82618] = 20, [82620] = 20, }, [35974] = { [85726] = 10, [85555] = 10, [85568] = 10, [85726] = 10, [85837] = 10, [85728] = 3, [85727] = 2, [78409] = 2, [78410] = 2, [78973] = 2, [83800] = 1, [75280] = 1, [78148] = 1, [78168] = 1, [78190] = 1, [78328] = 1, [78339] = 1, [78475] = 1, [78550] = 1, [78999] = 1, [84002] = 1, [85098] = 1, [85150] = 1, [85357] = 1, [85729] = 0.3, [78324] = 0.3, [84927] = 0.3, [78183] = 1, }, [35977] = { [85726] = 10, [85555] = 10, [85568] = 10, [85726] = 10, [85837] = 10, [85728] = 3, [85727] = 2, [78409] = 2, [78410] = 2, [78973] = 2, [83800] = 1, [75280] = 1, [78148] = 1, [78168] = 1, [78190] = 1, [78328] = 1, [78339] = 1, [78475] = 1, [78550] = 1, [78999] = 1, [84002] = 1, [85098] = 1, [85150] = 1, [85357] = 1, [85729] = 0.3, [78324] = 0.3, [84927] = 0.3, [78183] = 1, }, [36069] = { [84010] = 1, [88960] = 0.1, [83973] = 0.1, [83974] = 0.1, [83975] = 0.1, [83976] = 0.1, [83977] = 0.1, [83978] = 0.1, [83979] = 0.1, [83980] = 0.1, [83981] = 0.1, [83982] = 0.1, [83983] = 0.1, [83984] = 0.1, [83987] = 0.1, [83988] = 0.1, [83989] = 0.1, [83990] = 0.1, [83991] = 0.1, [83992] = 0.1, [83993] = 0.1, [83994] = 0.1, [84013] = 0.1, [84016] = 0.1, [84039] = 0.1, [84082] = 0.1, [84083] = 0.1, [84156] = 0.1, [84172] = 0.1, [84231] = 0.1, [84298] = 0.1, [84303] = 0.1, [84467] = 0.1, [85542] = 0.1, [87656] = 0.1, [88078] = 0.1, [88079] = 0.1, [89083] = 0.1, [89084] = 0.1, [89085] = 0.1, [91933] = 0.1, [91934] = 0.1, [94495] = 0.1, [83990] = 30, [83975] = 4, [83980] = 4, [83983] = 4, [83976] = 3, [83982] = 3, [83984] = 3, }, [36070] = { [84010] = 1, [88960] = 0.1, [83973] = 0.1, [83974] = 0.1, [83975] = 0.1, [83976] = 0.1, [83977] = 0.1, [83978] = 0.1, [83979] = 0.1, [83980] = 0.1, [83981] = 0.1, [83982] = 0.1, [83983] = 0.1, [83984] = 0.1, [83987] = 0.1, [83988] = 0.1, [83989] = 0.1, [83990] = 0.1, [83991] = 0.1, [83992] = 0.1, [83993] = 0.1, [83994] = 0.1, [84013] = 0.1, [84016] = 0.1, [84039] = 0.1, [84082] = 0.1, [84083] = 0.1, [84156] = 0.1, [84172] = 0.1, [84231] = 0.1, [84298] = 0.1, [84303] = 0.1, [84467] = 0.1, [85542] = 0.1, [87656] = 0.1, [88078] = 0.1, [88079] = 0.1, [89083] = 0.1, [89084] = 0.1, [89085] = 0.1, [91933] = 0.1, [91934] = 0.1, [94495] = 0.1, [83990] = 30, [83975] = 4, [83980] = 4, [83983] = 4, [83976] = 3, [83982] = 3, [83984] = 12, }, [36338] = { [85197] = 0.2, [84027] = 0.2, [84283] = 0.2, [84442] = 0.2, [84445] = 0.2, [84446] = 0.2, [85191] = 0.2, [85490] = 0.2, [85498] = 0.2, [85966] = 0.2, [85000] = 1, [82922] = 1, [82934] = 1, [82960] = 1, [83004] = 1, [83017] = 1, [83023] = 1, [84026] = 1, [84055] = 1, [84094] = 1, [84095] = 1, [84096] = 1, [84099] = 1, [84112] = 1, [84180] = 1, [84266] = 1, [84334] = 1, [84447] = 1, [84448] = 1, [84449] = 1, [84870] = 1, [84871] = 1, [84873] = 1, [87337] = 1, [87340] = 1, [87576] = 1, [88043] = 1, [88071] = 1, [88494] = 1, [85195] = 3, [82928] = 3, [82964] = 3, [82990] = 3, [83018] = 3, [84105] = 3, [84142] = 3, [84181] = 3, [84278] = 3, [84337] = 3, [84367] = 3, [84880] = 3, [85200] = 25, [82992] = 25, [83008] = 25, [83019] = 25, [87597] = 25, [84754] = 2.25, [83856] = 2, [84279] = 2, [84992] = 2, [85370] = 10, [84997] = 3, [85393] = 1, [88875] = 1, [88876] = 1, [88877] = 1, [88878] = 1, [88879] = 1, [85103] = 3, [86448] = 3, }, [36347] = { [85079] = 0.2, [84999] = 0.2, [85478] = 0.2, [86269] = 0.2, [88264] = 0.2, [88486] = 0.2, [85319] = 1, [81541] = 1, [81605] = 1, [84888] = 1, [85168] = 1, [81542] = 1.3, [86024] = 1.3, [84945] = 3, [84908] = 5, [81543] = 6.5, [85321] = 25, [84911] = 25, [84925] = 25, [85001] = 25, [85029] = 25, [85035] = 25, [85121] = 25, [86212] = 25, [86213] = 25, }, [36348] = { [85079] = 0.2, [84999] = 0.2, [85478] = 0.2, [86269] = 0.2, [88264] = 0.2, [88486] = 0.2, [85319] = 1, [81541] = 1, [81605] = 1, [84888] = 1, [85168] = 1, [81542] = 1.3, [86024] = 1.3, [84945] = 3, [84908] = 5, [81543] = 6.5, [85321] = 25, [84911] = 25, [84925] = 25, [85001] = 25, [85029] = 25, [85035] = 25, [85121] = 25, [86212] = 25, [86213] = 25, }, [36383] = { [85228] = 1, [85124] = 1, [85126] = 1, [85127] = 1, [85128] = 1, [85177] = 1, [85180] = 1, [85184] = 1, [86405] = 1, [86500] = 1, [86528] = 1, [86536] = 1, [85229] = 5, [85123] = 5, [85136] = 5, [86499] = 5, [85230] = 20, [86562] = 20, [86566] = 20, [86571] = 20, [86574] = 20, [86577] = 20, [86579] = 20, [86582] = 20, [86298] = 0.5, [85277] = 0.5, [86297] = 0.5, [86332] = 0.5, }, [36489] = { [85228] = 1, [85124] = 1, [85126] = 1, [85127] = 1, [85128] = 1, [85177] = 1, [85180] = 1, [85184] = 1, [86405] = 1, [86500] = 1, [86528] = 1, [86536] = 1, [85229] = 5, [85123] = 5, [85136] = 5, [86499] = 5, [85230] = 20, [86562] = 20, [86566] = 20, [86571] = 20, [86574] = 20, [86577] = 20, [86579] = 20, [86582] = 20, [86298] = 0.5, [85277] = 0.5, [86297] = 0.5, [86332] = 0.5, }, [36490] = { [86556] = 0.5, [86550] = 0.5, [85609] = 1, [85043] = 1, [85066] = 1, [85068] = 1, [85073] = 1, [85075] = 1, [85082] = 1, [85204] = 1, [85515] = 1, [85697] = 1, [86059] = 1, [86128] = 1, [86198] = 1, [86323] = 1, [85607] = 2.5, [85034] = 2.5, [85299] = 2.5, [86099] = 2.5, [86179] = 2.5, [86324] = 2.5, [87639] = 2.5, [85608] = 5, [85303] = 5, [85304] = 5, [85392] = 5, [86271] = 5, [85610] = 8, [85026] = 8, [85078] = 8, [85451] = 8, [85611] = 12, [85036] = 12, [85037] = 20, }, [36491] = { [86556] = 0.5, [86550] = 0.5, [85609] = 1, [85043] = 1, [85066] = 1, [85068] = 1, [85073] = 1, [85075] = 1, [85082] = 1, [85204] = 1, [85515] = 1, [85697] = 1, [86059] = 1, [86128] = 1, [86198] = 1, [86323] = 1, [85607] = 2.5, [85034] = 2.5, [85299] = 2.5, [86099] = 2.5, [86179] = 2.5, [86324] = 2.5, [87639] = 2.5, [85608] = 5, [85303] = 5, [85304] = 5, [85392] = 5, [86271] = 5, [85610] = 8, [85026] = 8, [85078] = 8, [85451] = 8, [85611] = 12, [85036] = 12, [85037] = 20, }, [36807] = { [87378] = 0.3, [86139] = 0.3, [86192] = 0.3, [86529] = 0.3, [86530] = 0.3, [86531] = 0.3, [87370] = 1, [82940] = 1, [82981] = 1, [82983] = 1, [83011] = 1, [83013] = 1, [83020] = 1, [83021] = 1, [86190] = 1, [86191] = 1, [86515] = 1, [86553] = 1, [86591] = 1, [86600] = 1, [86838] = 1, [87341] = 1, [87371] = 3, [82921] = 3, [82996] = 3, [82997] = 3, [86140] = 3, [86745] = 3, [86807] = 3, [88941] = 3, [87377] = 20, [82920] = 20, [82930] = 20, [82942] = 20, [82988] = 20, [82998] = 20, [87668] = 20, [88436] = 20, [88728] = 20, [87373] = 3, [87364] = 1.5, [86869] = 0.75, [86599] = 4, [88407] = 3, [88405] = 2, }, [36808] = { [85197] = 0.2, [84027] = 0.2, [84283] = 0.2, [84442] = 0.2, [84445] = 0.2, [84446] = 0.2, [85191] = 0.2, [85490] = 0.2, [85498] = 0.2, [85966] = 0.2, [85000] = 1, [82922] = 1, [82934] = 1, [82960] = 1, [83004] = 1, [83017] = 1, [83023] = 1, [84026] = 1, [84055] = 1, [84094] = 1, [84095] = 1, [84096] = 1, [84099] = 1, [84112] = 1, [84180] = 1, [84266] = 1, [84334] = 1, [84447] = 1, [84448] = 1, [84449] = 1, [84870] = 1, [84871] = 1, [84873] = 1, [87337] = 1, [87340] = 1, [87576] = 1, [88043] = 1, [88071] = 1, [88494] = 1, [85195] = 3, [82928] = 3, [82964] = 3, [82990] = 3, [83018] = 3, [84105] = 3, [84142] = 3, [84181] = 3, [84278] = 3, [84337] = 3, [84367] = 3, [84880] = 3, [85200] = 25, [82992] = 25, [83008] = 25, [83019] = 25, [87597] = 25, [84754] = 2.25, [83856] = 2, [84279] = 2, [84992] = 2, [85370] = 10, [84997] = 3, [85393] = 1, [88875] = 1, [88876] = 1, [88877] = 1, [88878] = 1, [88879] = 1, [85103] = 3, [86448] = 3, }, [36809] = { [87378] = 0.3, [86139] = 0.3, [86192] = 0.3, [86529] = 0.3, [86530] = 0.3, [86531] = 0.3, [87370] = 1, [82940] = 1, [82981] = 1, [82983] = 1, [83011] = 1, [83013] = 1, [83020] = 1, [83021] = 1, [86190] = 1, [86191] = 1, [86515] = 1, [86553] = 1, [86591] = 1, [86600] = 1, [86838] = 1, [87341] = 1, [87372] = 3, [87377] = 20, [82920] = 20, [82930] = 20, [82942] = 20, [82988] = 20, [82998] = 20, [87668] = 20, [88436] = 20, [88728] = 20, [87373] = 3, [87364] = 1.5, [86869] = 3, [86599] = 4, [88407] = 3, [88405] = 2, }, [36811] = { [90660] = 0.5, [90659] = 1.5, [89731] = 1.5, [90661] = 1.5, [103162] = 1.5, [103180] = 1.5, [103231] = 1.5, [119515] = 1.5, [119516] = 1.5, [119517] = 1.5, [103176] = 2.5, [103363] = 2.5, [119466] = 2.5, [90662] = 25, [90663] = 25, [106629] = 25, }, [36814] = { [88278] = 0.25, [88729] = 0.25, [89049] = 0.25, [88174] = 1, [86261] = 1, [86263] = 1, [86264] = 1, [86267] = 1, [88261] = 1, [88279] = 1, [88394] = 1, [88828] = 1, [89019] = 1, [88175] = 5, [86258] = 5, [86259] = 5, [86260] = 5, [86262] = 5, [86265] = 5, [88176] = 20, [82058] = 20, [86257] = 20, [86266] = 20, [86268] = 20, [87626] = 20, [88580] = 20, [88582] = 20, [88583] = 20, [88586] = 20, [88672] = 20, }, [36815] = { [88278] = 0.25, [88729] = 0.25, [89049] = 0.25, [88174] = 1, [86261] = 1, [86263] = 1, [86264] = 1, [86267] = 1, [88261] = 1, [88279] = 1, [88394] = 1, [88828] = 1, [89019] = 1, [88175] = 5, [86258] = 5, [86259] = 5, [86260] = 5, [86262] = 5, [86265] = 5, [88176] = 20, [82058] = 20, [86257] = 20, [86266] = 20, [86268] = 20, [87626] = 20, [88580] = 20, [88582] = 20, [88583] = 20, [88586] = 20, [88672] = 20, }, [36816] = { [87640] = 1, [83575] = 1, [83577] = 1, [83641] = 1, [83645] = 1, [88116] = 1, [87642] = 4, [83570] = 4, [83640] = 4, [83655] = 4, [83831] = 4, [87538] = 4, [87638] = 4, [87644] = 8, [83848] = 8, [87654] = 8, [88187] = 8, [87645] = 15, [87788] = 15, [87837] = 15, [87646] = 18, [87846] = 18, [88116] = 4, }, [36817] = { [87640] = 1, [83575] = 1, [83577] = 1, [83641] = 1, [83645] = 1, [88116] = 1, [87642] = 4, [83570] = 4, [83640] = 4, [83655] = 4, [83831] = 4, [87538] = 4, [87638] = 4, [87644] = 8, [83848] = 8, [87654] = 8, [88187] = 8, [87645] = 15, [87788] = 15, [87837] = 15, [87646] = 18, [87846] = 18, [88116] = 4, }, [36818] = { [86955] = 1, [72571] = 1, [86656] = 1, [86657] = 1, [86660] = 1, [87264] = 1, [86957] = 3, [83049] = 3, [86659] = 3, [87385] = 3, [86958] = 8, [86658] = 8, [86960] = 8, [87239] = 8, [87344] = 8, [87584] = 8, [87574] = 15, [86959] = 15, [87234] = 15, [86960] = 20, [86992] = 6, [87017] = 6, [87024] = 6, [86947] = 2, [87389] = 2, [87264] = 2, }, [36819] = { [86955] = 1, [72571] = 1, [86656] = 1, [86657] = 1, [86660] = 1, [87264] = 1, [86957] = 3, [83049] = 3, [86659] = 3, [87385] = 3, [86958] = 8, [86658] = 8, [86960] = 8, [87239] = 8, [87344] = 8, [87584] = 8, [87574] = 15, [86959] = 15, [87234] = 15, [86960] = 20, [86992] = 6, [87017] = 6, [87024] = 6, [86947] = 2, [87389] = 2, [87264] = 2, }, [36820] = { [88200] = 4, [84760] = 4, [87310] = 4, [88199] = 4, [88478] = 4, [88496] = 4, [88497] = 4, [88498] = 4, [88523] = 4, [88524] = 4, [88525] = 4, [88906] = 4, [88930] = 4, [88946] = 4, [88201] = 8, [84764] = 8, [84765] = 8, [88202] = 12, [88207] = 12, [88208] = 12, [88203] = 30, [88209] = 30, [88204] = 60, [88210] = 60, [88931] = 4, }, [36821] = { [88200] = 4, [84760] = 4, [87310] = 4, [88199] = 4, [88478] = 4, [88496] = 4, [88497] = 4, [88498] = 4, [88523] = 4, [88524] = 4, [88525] = 4, [88906] = 4, [88930] = 4, [88946] = 4, [88201] = 8, [84764] = 8, [84765] = 8, [88202] = 12, [88207] = 12, [88208] = 12, [88203] = 30, [88209] = 30, [88204] = 60, [88210] = 60, [88931] = 4, }, [36822] = { [87624] = 0.75, [87610] = 1.5, [77175] = 1.5, [77940] = 1.5, [77944] = 1.5, [77945] = 1.5, [78223] = 1.5, [85973] = 1.5, [85997] = 1.5, [87618] = 5, [78210] = 5, [78231] = 5, [84378] = 5, [84379] = 5, [84384] = 5, [86373] = 5, [87600] = 5, [87621] = 15, [84374] = 15, [84376] = 15, [84392] = 15, [87622] = 15, [84384] = 20, [88860] = 2, }, [36823] = { [87624] = 0.75, [87610] = 1.5, [77175] = 1.5, [77940] = 1.5, [77944] = 1.5, [77945] = 1.5, [78223] = 1.5, [85973] = 1.5, [85997] = 1.5, [87618] = 5, [78210] = 5, [78231] = 5, [84378] = 5, [84379] = 5, [84384] = 5, [86373] = 5, [87600] = 5, [87621] = 15, [84374] = 15, [84376] = 15, [84392] = 15, [87622] = 15, [84384] = 20, [88860] = 2, }, [36826] = { [87507] = 0.2, [87330] = 0.2, [87360] = 0.2, [87588] = 0.2, [87838] = 0.2, [87513] = 1, [72297] = 1, [72348] = 1, [87332] = 1, [87345] = 1, [87974] = 1, [87986] = 1, [87514] = 2, [76905] = 2, [87383] = 0.1, [87512] = 4, [87346] = 4, [87511] = 15, [72364] = 15, [78265] = 15, [87348] = 15, [87351] = 15, [87352] = 15, [87742] = 20, [87356] = 20, [87357] = 20, [87510] = 2, [87333] = 3, [76905] = 3, }, [36827] = { [87507] = 0.2, [87330] = 0.2, [87360] = 0.2, [87588] = 0.2, [87838] = 0.2, [87513] = 1, [72297] = 1, [72348] = 1, [87332] = 1, [87345] = 1, [87974] = 1, [87986] = 1, [87513] = 2, [72297] = 2, [72348] = 2, [87332] = 2, [87345] = 2, [87974] = 2, [87986] = 2, [87383] = 0.1, [87512] = 4, [87346] = 4, [87511] = 15, [72364] = 15, [78265] = 15, [87348] = 15, [87351] = 15, [87352] = 15, [87742] = 20, [87356] = 20, [87357] = 20, [87510] = 2, [87333] = 3, [76905] = 3, }, [36860] = { [87030] = 0.5, [87031] = 0.5, [87032] = 0.5, [87033] = 0.5, [87034] = 1, [87036] = 2, [86558] = 4, [86559] = 3, [87037] = 0.5, [87038] = 0.5, [86560] = 2, [88260] = 5, [89095] = 0.5, [86144] = 0.5, [86155] = 0.5, [86163] = 0.5, [86168] = 0.5, [86204] = 0.5, [86205] = 0.5, [86206] = 0.5, [86207] = 0.5, [86211] = 0.5, [86215] = 0.5, [86216] = 0.5, [86617] = 0.5, [86620] = 0.5, [86621] = 0.5, [87019] = 0.5, [87026] = 0.5, [87027] = 0.5, [87029] = 0.5, [87220] = 0.5, [89125] = 0.5, [89126] = 0.5, [89127] = 0.5, [89128] = 0.5, [89144] = 0.5, [87029] = 30, [87026] = 30, [87019] = 30, [86621] = 30, [87027] = 30, }, [37466] = { [91287] = 1, [91284] = 3, [88086] = 3, [88087] = 3, [91285] = 7, [91459] = 7, [107447] = 7, [117483] = 7, [91286] = 10, [89846] = 10, [107127] = 10, [91449] = 4, }, [37495] = { [90109] = 2.5, [89097] = 20, [112018] = 4, }, [37585] = { [87624] = 0.75, [87610] = 1.5, [77175] = 1.5, [77940] = 1.5, [77944] = 1.5, [77945] = 1.5, [78223] = 1.5, [85973] = 1.5, [85997] = 1.5, [87618] = 5, [78210] = 5, [78231] = 5, [84378] = 5, [84379] = 5, [84384] = 5, [86373] = 5, [87600] = 5, [87621] = 15, [84374] = 15, [84376] = 15, [84392] = 15, [87622] = 15, [84384] = 20, [88860] = 2, }, [37622] = { [87624] = 0.75, [87610] = 1.5, [77175] = 1.5, [77940] = 1.5, [77944] = 1.5, [77945] = 1.5, [78223] = 1.5, [85973] = 1.5, [85997] = 1.5, [87618] = 5, [78210] = 5, [78231] = 5, [84378] = 5, [84379] = 5, [84384] = 5, [86373] = 5, [87600] = 5, [87621] = 15, [84374] = 15, [84376] = 15, [84392] = 15, [87622] = 15, [84384] = 20, [88860] = 2, }, [37623] = { [85260] = 0.4, [82675] = 0.4, [88445] = 0.4, [85261] = 2, [77988] = 2, [77991] = 2, [77994] = 2, [77997] = 2, [78003] = 2, [78778] = 2, [78782] = 2, [82711] = 2, [88425] = 2, [88430] = 2, [89164] = 2, [85265] = 4, [82531] = 6, [77992] = 6, [77993] = 6, [77995] = 6, [78578] = 6, [88437] = 6, [88459] = 6, [85262] = 12, [85263] = 25, [82614] = 25, [82616] = 25, [82617] = 25, [82618] = 25, [82620] = 25, }, [37624] = { [85260] = 0.4, [82675] = 0.4, [88445] = 0.4, [85261] = 2, [77988] = 2, [77991] = 2, [77994] = 2, [77997] = 2, [78003] = 2, [78778] = 2, [78782] = 2, [82711] = 2, [88425] = 2, [88430] = 2, [89164] = 2, [85265] = 4, [82531] = 6, [77992] = 6, [77993] = 6, [77995] = 6, [78578] = 6, [88437] = 6, [88459] = 6, [85262] = 12, [85263] = 25, [82614] = 25, [82616] = 25, [82617] = 25, [82618] = 25, [82620] = 25, }, [37626] = { [87507] = 0.2, [87330] = 0.2, [87360] = 0.2, [87588] = 0.2, [87838] = 0.2, [87513] = 1, [72297] = 1, [72348] = 1, [87332] = 1, [87345] = 1, [87974] = 1, [87986] = 1, [87513] = 2, [72297] = 2, [72348] = 2, [87332] = 2, [87345] = 2, [87974] = 2, [87986] = 2, [87383] = 0.1, [87512] = 4, [87346] = 4, [87511] = 15, [72364] = 15, [78265] = 15, [87348] = 15, [87351] = 15, [87352] = 15, [87742] = 20, [87356] = 20, [87357] = 20, [87510] = 3, [87333] = 3, [76905] = 3, }, [37627] = { [87640] = 1, [83575] = 1, [83577] = 1, [83641] = 1, [83645] = 1, [88116] = 1, [87642] = 4, [83570] = 4, [83640] = 4, [83655] = 4, [83831] = 4, [87538] = 4, [87638] = 4, [87644] = 8, [83848] = 8, [87654] = 8, [88187] = 8, [87645] = 15, [87788] = 15, [87837] = 15, [87646] = 18, [87846] = 18, [88116] = 4, }, [37628] = { [87640] = 1, [83575] = 1, [83577] = 1, [83641] = 1, [83645] = 1, [88116] = 1, [87642] = 4, [83570] = 4, [83640] = 4, [83655] = 4, [83831] = 4, [87538] = 4, [87638] = 4, [87644] = 8, [83848] = 8, [87654] = 8, [88187] = 8, [87645] = 15, [87788] = 15, [87837] = 15, [87646] = 18, [87846] = 18, [88116] = 4, }, [37629] = { [86955] = 1, [72571] = 1, [86656] = 1, [86657] = 1, [86660] = 1, [87264] = 1, [86957] = 3, [83049] = 3, [86659] = 3, [87385] = 3, [86958] = 8, [86658] = 8, [86960] = 8, [87239] = 8, [87344] = 8, [87584] = 8, [87574] = 15, [86959] = 15, [87234] = 15, [86960] = 20, [86992] = 6, [87017] = 6, [87024] = 6, [86947] = 2, [87389] = 2, [87264] = 2, }, [37630] = { [86955] = 1, [72571] = 1, [86656] = 1, [86657] = 1, [86660] = 1, [87264] = 1, [86957] = 3, [83049] = 3, [86659] = 3, [87385] = 3, [86958] = 8, [86658] = 8, [86960] = 8, [87239] = 8, [87344] = 8, [87584] = 8, [87574] = 15, [86959] = 15, [87234] = 15, [86960] = 20, [86992] = 6, [87017] = 6, [87024] = 6, [86947] = 2, [87389] = 2, [87264] = 2, }, [37631] = { [85079] = 0.2, [84999] = 0.2, [85478] = 0.2, [86269] = 0.2, [88264] = 0.2, [88486] = 0.2, [85319] = 1, [81541] = 1, [81605] = 1, [84888] = 1, [85168] = 1, [81542] = 1.3, [86024] = 1.3, [84945] = 3, [84908] = 5, [81543] = 6.5, [85321] = 25, [84911] = 25, [84925] = 25, [85001] = 25, [85029] = 25, [85035] = 25, [85121] = 25, [86212] = 25, [86213] = 25, }, [37632] = { [85079] = 0.2, [84999] = 0.2, [85478] = 0.2, [86269] = 0.2, [88264] = 0.2, [88486] = 0.2, [85319] = 1, [81541] = 1, [81605] = 1, [84888] = 1, [85168] = 1, [81542] = 1.3, [86024] = 1.3, [84945] = 3, [84908] = 5, [81543] = 6.5, [85321] = 25, [84911] = 25, [84925] = 25, [85001] = 25, [85029] = 25, [85035] = 25, [85121] = 25, [86212] = 25, [86213] = 25, }, [37633] = { [85726] = 15, [85555] = 15, [85568] = 15, [85726] = 15, [85837] = 15, [85728] = 4.5, [85727] = 3, [78409] = 3, [78410] = 3, [78973] = 3, [83800] = 1.5, [75280] = 1.5, [78148] = 1.5, [78168] = 1.5, [78190] = 1.5, [78328] = 1.5, [78339] = 1.5, [78475] = 1.5, [78550] = 1.5, [78999] = 1.5, [84002] = 1.5, [85098] = 1.5, [85150] = 1.5, [85357] = 1.5, [85729] = 0.45, [78324] = 0.45, [84927] = 0.45, [78183] = 1.5, }, [37634] = { [85726] = 15, [85555] = 15, [85568] = 15, [85726] = 15, [85837] = 15, [85728] = 4.5, [85727] = 3, [78409] = 3, [78410] = 3, [78973] = 3, [83800] = 1.5, [75280] = 1.5, [78148] = 1.5, [78168] = 1.5, [78190] = 1.5, [78328] = 1.5, [78339] = 1.5, [78475] = 1.5, [78550] = 1.5, [78999] = 1.5, [84002] = 1.5, [85098] = 1.5, [85150] = 1.5, [85357] = 1.5, [85729] = 0.45, [78324] = 0.45, [84927] = 0.45, [78183] = 1.5, }, [37635] = { [85197] = 0.2, [84027] = 0.2, [84283] = 0.2, [84442] = 0.2, [84445] = 0.2, [84446] = 0.2, [85191] = 0.2, [85490] = 0.2, [85498] = 0.2, [85966] = 0.2, [85000] = 1, [82922] = 1, [82934] = 1, [82960] = 1, [83004] = 1, [83017] = 1, [83023] = 1, [84026] = 1, [84055] = 1, [84094] = 1, [84095] = 1, [84096] = 1, [84099] = 1, [84112] = 1, [84180] = 1, [84266] = 1, [84334] = 1, [84447] = 1, [84448] = 1, [84449] = 1, [84870] = 1, [84871] = 1, [84873] = 1, [87337] = 1, [87340] = 1, [87576] = 1, [88043] = 1, [88071] = 1, [88494] = 1, [85195] = 3, [82928] = 3, [82964] = 3, [82990] = 3, [83018] = 3, [84105] = 3, [84142] = 3, [84181] = 3, [84278] = 3, [84337] = 3, [84367] = 3, [84880] = 3, [85200] = 25, [82992] = 25, [83008] = 25, [83019] = 25, [87597] = 25, [84754] = 2.25, [83856] = 2, [84279] = 2, [84992] = 2, [85370] = 10, [84997] = 3, [85393] = 1, [88875] = 1, [88876] = 1, [88877] = 1, [88878] = 1, [88879] = 1, [85103] = 3, [86448] = 3, }, [37636] = { [85197] = 0.2, [84027] = 0.2, [84283] = 0.2, [84442] = 0.2, [84445] = 0.2, [84446] = 0.2, [85191] = 0.2, [85490] = 0.2, [85498] = 0.2, [85966] = 0.2, [85000] = 1, [82922] = 1, [82934] = 1, [82960] = 1, [83004] = 1, [83017] = 1, [83023] = 1, [84026] = 1, [84055] = 1, [84094] = 1, [84095] = 1, [84096] = 1, [84099] = 1, [84112] = 1, [84180] = 1, [84266] = 1, [84334] = 1, [84447] = 1, [84448] = 1, [84449] = 1, [84870] = 1, [84871] = 1, [84873] = 1, [87337] = 1, [87340] = 1, [87576] = 1, [88043] = 1, [88071] = 1, [88494] = 1, [85195] = 3, [82928] = 3, [82964] = 3, [82990] = 3, [83018] = 3, [84105] = 3, [84142] = 3, [84181] = 3, [84278] = 3, [84337] = 3, [84367] = 3, [84880] = 3, [85200] = 25, [82992] = 25, [83008] = 25, [83019] = 25, [87597] = 25, [84754] = 2.25, [83856] = 2, [84279] = 2, [84992] = 2, [85370] = 10, [84997] = 3, [85393] = 1, [88875] = 1, [88876] = 1, [88877] = 1, [88878] = 1, [88879] = 1, [85103] = 3, [86448] = 3, }, [37779] = { [89025] = 4, [89024] = 4, [89803] = 5, [89891] = 5, [93714] = 5, [104878] = 5, [89802] = 10, [89816] = 10, [89808] = 5, [89811] = 2, }, [37865] = { [90048] = 3, [90433] = 3, [91705] = 3, [90047] = 1, [89777] = 1, [89810] = 1, [89857] = 1, [89935] = 1, [89936] = 1, [89972] = 1, [89973] = 1, [90024] = 1, [90069] = 1, [90136] = 1, [90165] = 1, [90494] = 1, [90495] = 1, [89972] = 2, [90124] = 2, [89973] = 1, [89857] = 1, [90074] = 5, [90094] = 15, [90122] = 15, [90087] = 30, [90024] = 10, [90069] = 1, [90126] = 1, [89935] = 1, [90136] = 1, [89936] = 1, [89810] = 1, [89777] = 1, [90519] = 10, [90522] = 1, [90163] = 4, }, [37866] = { [90048] = 3, [90433] = 3, [91705] = 3, [90047] = 1, [89777] = 1, [89810] = 1, [89857] = 1, [89935] = 1, [89936] = 1, [89972] = 1, [89973] = 1, [90024] = 1, [90069] = 1, [90136] = 1, [90165] = 1, [90494] = 1, [90495] = 1, [89972] = 2, [90124] = 2, [89973] = 1, [89857] = 1, [90074] = 5, [90094] = 15, [90122] = 15, [90087] = 30, [90024] = 10, [90069] = 1, [90126] = 1, [89935] = 1, [90136] = 1, [89936] = 1, [89810] = 1, [89777] = 1, [90519] = 10, [90522] = 1, [90163] = 4, }, [37921] = { [90025] = 2, [89952] = 2, [89985] = 2, [90030] = 2, [90189] = 2, [91593] = 2, [91595] = 2, [91597] = 2, [91599] = 2, [91601] = 2, [92191] = 2, [95615] = 2, [95618] = 2, [89951] = 6, [93147] = 6, [93174] = 6, [91596] = 10, }, [37938] = { [90303] = 0.1, [90706] = 0.1, [90706] = 3, [90789] = 3, [90300] = 3, [90620] = 1, [89748] = 1, [90312] = 1, [90607] = 1, [90649] = 1, [90654] = 1, [94467] = 1, [94468] = 1, [94469] = 1, [90782] = 10, [89686] = 5, [89683] = 5, [90950] = 10, [91052] = 10, [92451] = 25, [90265] = 7, [91068] = 9, [93334] = 8, [93335] = 8, [90777] = 10, [91262] = 1, [90655] = 1, [95236] = 1, }, [37963] = { [91094] = 0.75, [89393] = 0.75, [90242] = 0.75, [90468] = 8, [90389] = 8, [90390] = 8, [90467] = 3, [89801] = 3, [90005] = 3, [90243] = 3, [90318] = 3, [90616] = 3, [93164] = 3, [100345] = 3, [109826] = 3, [119483] = 3, [90469] = 10, [90244] = 10, [90267] = 10, }, [37965] = { [90480] = 3, [90526] = 3, [90985] = 3, [91048] = 3, [90537] = 10, [90648] = 1, [91371] = 1, [90547] = 20, [90542] = 20, [90541] = 10, }, [37966] = { [90478] = 1, [90286] = 1, [90295] = 1, [90421] = 1, [90517] = 1, [90684] = 1, [92575] = 1, [93349] = 1, [95248] = 1, [90302] = 3, [90425] = 2, [90501] = 3, [91817] = 10, [90429] = 10, [90434] = 10, [90437] = 10, [90438] = 10, [90442] = 10, [92544] = 6, [92546] = 6, [92625] = 6, [92597] = 5, }, [37970] = { [92616] = 5, [91901] = 2, [91760] = 4, [91721] = 1, [91764] = 1, [90066] = 1, [89754] = 1, [89675] = 10, [91727] = 10, [91695] = 15, [93034] = 3, [92647] = 10, }, [38009] = { [90303] = 0.1, [90706] = 0.1, [90706] = 3, [90789] = 3, [90300] = 3, [90620] = 1, [89748] = 1, [90312] = 1, [90607] = 1, [90649] = 1, [90654] = 1, [94467] = 1, [94468] = 1, [94469] = 1, [90782] = 10, [89686] = 5, [89683] = 5, [90950] = 10, [91052] = 10, [92451] = 25, [90265] = 7, [91068] = 9, [93334] = 8, [93335] = 8, [90777] = 10, [91262] = 1, [90655] = 1, [95236] = 1, }, [38020] = { [90478] = 1, [90286] = 1, [90295] = 1, [90421] = 1, [90517] = 1, [90684] = 1, [92575] = 1, [93349] = 1, [95248] = 1, [90302] = 3, [90425] = 2, [90501] = 3, [91817] = 10, [90429] = 10, [90434] = 10, [90437] = 10, [90438] = 10, [90442] = 10, [92544] = 6, [92546] = 6, [92625] = 6, [92597] = 5, }, [38040] = { [90855] = 1, [89699] = 1, [89703] = 1, [89705] = 1, [89706] = 1, [89857] = 1, [90851] = 1, [90884] = 1, [90885] = 1, [90887] = 1, [90888] = 1, [90936] = 1, [91301] = 1, [92197] = 1, [92706] = 1, [93028] = 1, [93076] = 1, [95235] = 1, [90781] = 2, [90704] = 3, [89706] = 3, [90884] = 4, [90885] = 4, [90887] = 5, [90888] = 4, [91227] = 12, [93028] = 4, }, [38043] = { [90855] = 1, [89699] = 1, [89703] = 1, [89705] = 1, [89706] = 1, [89857] = 1, [90851] = 1, [90884] = 1, [90885] = 1, [90887] = 1, [90888] = 1, [90936] = 1, [91301] = 1, [92197] = 1, [92706] = 1, [93028] = 1, [93076] = 1, [95235] = 1, [90781] = 2, [90704] = 3, [89706] = 3, [90884] = 4, [90885] = 4, [90887] = 5, [90888] = 4, [91227] = 12, [93028] = 4, }, [38051] = { [90867] = 1, [90482] = 1, [90483] = 1, [90497] = 1, [90510] = 1, [90742] = 1, [90743] = 1, [91250] = 1, [91252] = 1, [91253] = 1, [92873] = 1, [93035] = 2, [91251] = 2, [90371] = 3, [90337] = 4, [93014] = 4, [90868] = 8, [90585] = 8, [91232] = 8, [91243] = 8, [92977] = 8, [93001] = 8, [93057] = 8, [93036] = 10, }, [38054] = { [90867] = 1, [90482] = 1, [90483] = 1, [90497] = 1, [90510] = 1, [90742] = 1, [90743] = 1, [91250] = 1, [91252] = 1, [91253] = 1, [92873] = 1, [93035] = 2, [91251] = 2, [90371] = 3, [90337] = 4, [93014] = 4, [93036] = 8, [90868] = 10, [90585] = 10, [91232] = 10, [91243] = 10, [92977] = 10, [93001] = 10, [93057] = 10, }, [38343] = { [89759] = 2, [91384] = 1, [91575] = 2, [91424] = 2, [91926] = 2, [92040] = 10, [97445] = 2, [97443] = 2, [97433] = 2, [93377] = 2, [93005] = 3, [115753] = 3, [118177] = 3, }, [38372] = { [91121] = 3, [91122] = 3, [91598] = 3, [91182] = 4, [91149] = 4, [91150] = 4, [91151] = 4, [91153] = 4, [92874] = 4, [93604] = 4, [93641] = 4, [93645] = 4, [96932] = 2, [94207] = 3, [94208] = 3, [92180] = 4, [91130] = 4, }, [38374] = { [92238] = 1, [91239] = 1, [91245] = 1, [91429] = 1, [91565] = 1, [91799] = 1, [91800] = 1, [92128] = 1, [94624] = 1, [95031] = 1, [99450] = 1, [92239] = 2, [91204] = 2, [91205] = 2, [91417] = 2, [91486] = 2, [91487] = 2, [91488] = 2, [91517] = 2, [91741] = 2, [91893] = 2, [91894] = 2, [91895] = 2, [91920] = 2, [105216] = 2, [108526] = 2, [108530] = 2, [92240] = 3, [91202] = 3, [91217] = 3, [100446] = 3, [92241] = 5, [91795] = 5, [91803] = 5, [91874] = 5, [96992] = 10, [91892] = 10, [100474] = 15, [91529] = 15, }, [38439] = { [92616] = 5, [91901] = 2, [91760] = 4, [91721] = 1, [91764] = 1, [90066] = 1, [89754] = 1, [91727] = 10, [91695] = 15, [93034] = 3, [92647] = 10, [89675] = 10, }, [38442] = { [96248] = 1, [96249] = 2, [96129] = 2, [96229] = 2, [96236] = 2, [100433] = 2, [100435] = 2, [108283] = 2, [108289] = 2, [108306] = 2, [108309] = 2, [96250] = 3, [96135] = 3, [96215] = 3, [96251] = 5, }, [38569] = { [90025] = 2, [89952] = 2, [89985] = 2, [90030] = 2, [90189] = 2, [91593] = 2, [91595] = 2, [91597] = 2, [91599] = 2, [91601] = 2, [92191] = 2, [95615] = 2, [95618] = 2, [89951] = 6, [93147] = 6, [93174] = 6, [91596] = 10, }, [38587] = { [91939] = 4, [92227] = 5, [92395] = 1, [92453] = 3, [92411] = 8, [92408] = 8, [91009] = 8, [92274] = 15, [92396] = 2, [92398] = 1, [92262] = 1, [92397] = 1, [92026] = 2, [92031] = 5, [92083] = 1, [92082] = 1, [92028] = 2, [92051] = 2, [92402] = 2, [95157] = 2, [95159] = 2, [95162] = 2, [95164] = 2, [95165] = 2, [95170] = 2, [95172] = 2, [95173] = 2, [95176] = 2, [95177] = 2, [95178] = 2, [95179] = 2, [95180] = 2, [95181] = 2, [95182] = 2, [95183] = 2, [95184] = 2, [95185] = 2, [95187] = 2, [95188] = 2, [95189] = 2, [95190] = 2, [95677] = 2, [95756] = 2, [95758] = 2, [95759] = 2, [92002] = 1, [91098] = 8, }, [38588] = { [91939] = 4, [92227] = 5, [92395] = 1, [92453] = 3, [92411] = 8, [92408] = 8, [91009] = 8, [92274] = 10, [92396] = 2, [92398] = 1, [92262] = 1, [92397] = 1, [92026] = 2, [92031] = 5, [92083] = 1, [92082] = 1, [92028] = 2, [92051] = 2, [92402] = 2, [95157] = 2, [95159] = 2, [95162] = 2, [95164] = 2, [95165] = 2, [95170] = 2, [95172] = 2, [95173] = 2, [95176] = 2, [95177] = 2, [95178] = 2, [95179] = 2, [95180] = 2, [95181] = 2, [95182] = 2, [95183] = 2, [95184] = 2, [95185] = 2, [95187] = 2, [95188] = 2, [95189] = 2, [95190] = 2, [95677] = 2, [95756] = 2, [95758] = 2, [95759] = 2, [92002] = 1, [91098] = 8, }, [38716] = { [93067] = 3, [92954] = 3, [93061] = 3, [92963] = 8, [92965] = 8, [92966] = 8, [91839] = 5, [95247] = 5, [93031] = 15, [94974] = 8, [92971] = 8, [95430] = 3, [91860] = 3, }, [38748] = { [93074] = 5, [93114] = 5, [93157] = 5, [94849] = 5, [95454] = 5, [95457] = 5, [98242] = 5, [106842] = 5, [111981] = 5, [112021] = 5, [113646] = 5, [93169] = 6, [95988] = 6, [93159] = 10, [93111] = 5, [112052] = 5, }, [38819] = { [97382] = 5, [97059] = 20, [97057] = 20, [97058] = 20, [97370] = 20, [97395] = 5, [101947] = 2.5, [93716] = 2.5, [96277] = 2.5, [96278] = 2.5, [96279] = 2.5, [97014] = 2.5, [97034] = 2.5, [97057] = 2.5, [97058] = 2.5, [97059] = 2.5, [97370] = 2.5, [97706] = 2.5, [98986] = 2.5, [99759] = 2.5, [102724] = 2.5, [103432] = 2.5, [96280] = 1, [96402] = 5, [101319] = 2.5, }, [38842] = { [93389] = 3, [91354] = 3, [91472] = 3, [91474] = 3, [99008] = 4, [93444] = 5, [94572] = 1, }, [38865] = { [90867] = 1, [90482] = 1, [90483] = 1, [90497] = 1, [90510] = 1, [90742] = 1, [90743] = 1, [91250] = 1, [91252] = 1, [91253] = 1, [92873] = 1, [93035] = 2, [91251] = 2, [90371] = 3, [90337] = 4, [93014] = 4, [93036] = 8, [90868] = 10, [90585] = 10, [91232] = 10, [91243] = 10, [92977] = 10, [93001] = 10, [93057] = 10, }, [38866] = { [90867] = 1, [90482] = 1, [90483] = 1, [90497] = 1, [90510] = 1, [90742] = 1, [90743] = 1, [91250] = 1, [91252] = 1, [91253] = 1, [92873] = 1, [93035] = 2, [91251] = 2, [90371] = 3, [90337] = 4, [93014] = 4, [93036] = 8, [90868] = 10, [90585] = 10, [91232] = 10, [91243] = 10, [92977] = 10, [93001] = 10, [93057] = 10, }, [38868] = { [90303] = 0.1, [90706] = 0.1, [90706] = 3, [90789] = 3, [90300] = 3, [90620] = 1, [89748] = 1, [90312] = 1, [90607] = 1, [90649] = 1, [90654] = 1, [94467] = 1, [94468] = 1, [94469] = 1, [90782] = 10, [89686] = 5, [89683] = 5, [90950] = 10, [91052] = 10, [92451] = 25, [90265] = 7, [91068] = 9, [93334] = 8, [93335] = 8, [91262] = 1, [90655] = 1, [95236] = 1, }, [38869] = { [90303] = 0.1, [90706] = 0.1, [90706] = 3, [90789] = 3, [90300] = 3, [90620] = 1, [89748] = 1, [90312] = 1, [90607] = 1, [90649] = 1, [90654] = 1, [94467] = 1, [94468] = 1, [94469] = 1, [90782] = 10, [89686] = 5, [89683] = 5, [90950] = 10, [91052] = 10, [92451] = 25, [90265] = 7, [91068] = 9, [93334] = 8, [93335] = 8, [91262] = 1, [90655] = 1, [95236] = 1, }, [38870] = { [90855] = 1, [89699] = 1, [89703] = 1, [89705] = 1, [89706] = 1, [89857] = 1, [90851] = 1, [90884] = 1, [90885] = 1, [90887] = 1, [90888] = 1, [90936] = 1, [91301] = 1, [92197] = 1, [92706] = 1, [93028] = 1, [93076] = 1, [95235] = 1, [90781] = 2, [90704] = 3, [89706] = 3, [90884] = 4, [90885] = 4, [90887] = 5, [90888] = 4, [91227] = 12, [93028] = 4, }, [38871] = { [90855] = 1, [89699] = 1, [89703] = 1, [89705] = 1, [89706] = 1, [89857] = 1, [90851] = 1, [90884] = 1, [90885] = 1, [90887] = 1, [90888] = 1, [90936] = 1, [91301] = 1, [92197] = 1, [92706] = 1, [93028] = 1, [93076] = 1, [95235] = 1, [90781] = 2, [90704] = 3, [89706] = 3, [90884] = 4, [90885] = 4, [90887] = 5, [90888] = 4, [91227] = 12, [93028] = 4, }, [38876] = { [92616] = 5, [91901] = 2, [91760] = 4, [91721] = 1, [91764] = 1, [90066] = 1, [89754] = 1, [91908] = 1, [91727] = 10, [91695] = 15, [93034] = 3, }, [38877] = { [92616] = 5, [91901] = 2, [91760] = 4, [91721] = 1, [91764] = 1, [90066] = 1, [89754] = 1, [91908] = 1, [91727] = 10, [91695] = 15, [93034] = 3, }, [38939] = { [93941] = 1, [94959] = 1, [93942] = 2, [92764] = 2, [93584] = 2, [93866] = 2, [94752] = 2, [94823] = 2, [94856] = 2, [98953] = 2, [98955] = 2, [100540] = 2, [93943] = 3, [93944] = 5, [94413] = 5, [94211] = 10, [92751] = 10, }, [39029] = { [94205] = 6, [92794] = 6, [94204] = 6, [92788] = 6, [92789] = 6, [92792] = 6, [93157] = 6, [94007] = 6, [94201] = 6, [94620] = 6, [106842] = 6, [110896] = 12, }, [39119] = { [94401] = 1, [94943] = 1, [94402] = 2, [92764] = 2, [93584] = 2, [93875] = 2, [94752] = 2, [94823] = 2, [94824] = 2, [94856] = 2, [98953] = 2, [98955] = 2, [100540] = 2, [94403] = 3, [94404] = 5, [94413] = 5, [94405] = 10, [92751] = 10, }, [39274] = { [95013] = 4, [94687] = 3, [96124] = 4, [99406] = 8, }, [39279] = { [94651] = 1, [95226] = 2.5, [93105] = 2.5, [93112] = 2.5, [93115] = 2.5, [93221] = 2.5, [94654] = 2.5, [95046] = 2.5, [97026] = 2.5, [102714] = 2.5, [96400] = 4, [97142] = 5, }, [39317] = { [94983] = 5, [94984] = 5, [94986] = 10, [95174] = 5, [95204] = 10, }, [39371] = { [95270] = 5, [95310] = 5, }, [39393] = { [95747] = 5, [97799] = 5, [98089] = 1, [95599] = 1, [104969] = 1, [98087] = 3, [95726] = 3, [95727] = 3, [98088] = 5, [95318] = 5, [98141] = 5, [95319] = 5, [95320] = 5, }, [39424] = { [95290] = 8, [95707] = 8, [96423] = 8, [96615] = 8, [100055] = 8, [104323] = 8, [104328] = 8, [96361] = 8, }, [39441] = { [90855] = 1, [89699] = 1, [89703] = 1, [89705] = 1, [89706] = 1, [89857] = 1, [90851] = 1, [90884] = 1, [90885] = 1, [90887] = 1, [90888] = 1, [90936] = 1, [91301] = 1, [92197] = 1, [92706] = 1, [93028] = 1, [93076] = 1, [95235] = 1, [90781] = 2, [90704] = 3, [89706] = 3, [90884] = 4, [90885] = 4, [90887] = 5, [90888] = 4, [91227] = 12, [93028] = 4, }, [39442] = { [90855] = 1, [89699] = 1, [89703] = 1, [89705] = 1, [89706] = 1, [89857] = 1, [90851] = 1, [90884] = 1, [90885] = 1, [90887] = 1, [90888] = 1, [90936] = 1, [91301] = 1, [92197] = 1, [92706] = 1, [93028] = 1, [93076] = 1, [95235] = 1, [90781] = 2, [90704] = 3, [89706] = 3, [90884] = 4, [90885] = 4, [90887] = 5, [90888] = 4, [91227] = 12, [93028] = 4, }, [39443] = { [90867] = 1, [90482] = 1, [90483] = 1, [90497] = 1, [90510] = 1, [90742] = 1, [90743] = 1, [91250] = 1, [91252] = 1, [91253] = 1, [92873] = 1, [93035] = 2, [91251] = 2, [90371] = 3, [90337] = 4, [93014] = 4, [93036] = 8, [90868] = 10, [90585] = 10, [91232] = 10, [91243] = 10, [92977] = 10, [93001] = 10, [93057] = 10, }, [39444] = { [90867] = 1, [90482] = 1, [90483] = 1, [90497] = 1, [90510] = 1, [90742] = 1, [90743] = 1, [91250] = 1, [91252] = 1, [91253] = 1, [92873] = 1, [93035] = 2, [91251] = 2, [90371] = 3, [90337] = 4, [93014] = 4, [93036] = 8, [90868] = 10, [90585] = 10, [91232] = 10, [91243] = 10, [92977] = 10, [93001] = 10, [93057] = 10, }, [39445] = { [92616] = 5, [91901] = 2, [91760] = 4, [91721] = 1, [91764] = 1, [90066] = 1, [89754] = 1, [91908] = 1, [91727] = 10, [91695] = 15, [93034] = 3, }, [39446] = { [92616] = 5, [91901] = 2, [91760] = 4, [91721] = 1, [91764] = 1, [90066] = 1, [89754] = 1, [91908] = 1, [91727] = 10, [91695] = 15, [93034] = 3, }, [39447] = { [90303] = 0.1, [90706] = 0.1, [90706] = 3, [90789] = 3, [90300] = 3, [90620] = 1, [89748] = 1, [90312] = 1, [90607] = 1, [90649] = 1, [90654] = 1, [94467] = 1, [94468] = 1, [94469] = 1, [90782] = 10, [89686] = 5, [89683] = 5, [90950] = 10, [91052] = 10, [92451] = 25, [90265] = 7, [91068] = 9, [93334] = 8, [93335] = 8, [91262] = 1, [90655] = 1, [95236] = 1, }, [39448] = { [90303] = 0.1, [90706] = 0.1, [90706] = 3, [90789] = 3, [90300] = 3, [90620] = 1, [89748] = 1, [90312] = 1, [90607] = 1, [90649] = 1, [90654] = 1, [94467] = 1, [94468] = 1, [94469] = 1, [90782] = 10, [89686] = 5, [89683] = 5, [90950] = 10, [91052] = 10, [92451] = 25, [90265] = 7, [91068] = 9, [93334] = 8, [93335] = 8, [91262] = 1, [90655] = 1, [95236] = 1, }, [39449] = { [90478] = 1, [90286] = 1, [90295] = 1, [90421] = 1, [90517] = 1, [90684] = 1, [92575] = 1, [93349] = 1, [95248] = 1, [90302] = 3, [90425] = 2, [90501] = 3, [91817] = 10, [90429] = 10, [90434] = 10, [90437] = 10, [90438] = 10, [90442] = 10, [92544] = 6, [92546] = 6, [92625] = 6, [92597] = 5, }, [39450] = { [90478] = 1, [90286] = 1, [90295] = 1, [90421] = 1, [90517] = 1, [90684] = 1, [92575] = 1, [93349] = 1, [95248] = 1, [90302] = 3, [90425] = 2, [90501] = 3, [91817] = 10, [90429] = 10, [90434] = 10, [90437] = 10, [90438] = 10, [90442] = 10, [92544] = 6, [92546] = 6, [92625] = 6, [92597] = 5, }, [39451] = { [90048] = 3, [90433] = 3, [91705] = 3, [90047] = 1, [89777] = 1, [89810] = 1, [89857] = 1, [89935] = 1, [89936] = 1, [89972] = 1, [89973] = 1, [90024] = 1, [90069] = 1, [90136] = 1, [90165] = 1, [90494] = 1, [90495] = 1, [89972] = 2, [90124] = 2, [89973] = 1, [89857] = 1, [90074] = 5, [90094] = 15, [90122] = 15, [90087] = 30, [90024] = 10, [90069] = 1, [90126] = 1, [89935] = 1, [90136] = 1, [89936] = 1, [89810] = 1, [89777] = 1, [90519] = 10, [90522] = 1, [90163] = 4, }, [39452] = { [90048] = 3, [90433] = 3, [91705] = 3, [90047] = 1, [89777] = 1, [89810] = 1, [89857] = 1, [89935] = 1, [89936] = 1, [89972] = 1, [89973] = 1, [90024] = 1, [90069] = 1, [90136] = 1, [90165] = 1, [90494] = 1, [90495] = 1, [89972] = 2, [90124] = 2, [89973] = 1, [89857] = 1, [90074] = 5, [90094] = 15, [90122] = 15, [90087] = 30, [90024] = 10, [90069] = 1, [90126] = 1, [89935] = 1, [90136] = 1, [89936] = 1, [89810] = 1, [89777] = 1, [90519] = 10, [90522] = 1, [90163] = 4, }, [39453] = { [91939] = 4, [92227] = 5, [92395] = 1, [92453] = 3, [92411] = 8, [92408] = 8, [91009] = 8, [92274] = 15, [92396] = 2, [92398] = 1, [92262] = 1, [92397] = 1, [92026] = 2, [92031] = 5, [92083] = 1, [92082] = 1, [92028] = 2, [92051] = 2, [92402] = 2, [95157] = 2, [95159] = 2, [95162] = 2, [95164] = 2, [95165] = 2, [95170] = 2, [95172] = 2, [95173] = 2, [95176] = 2, [95177] = 2, [95178] = 2, [95179] = 2, [95180] = 2, [95181] = 2, [95182] = 2, [95183] = 2, [95184] = 2, [95185] = 2, [95187] = 2, [95188] = 2, [95189] = 2, [95190] = 2, [95677] = 2, [95756] = 2, [95758] = 2, [95759] = 2, [92002] = 1, [91098] = 8, }, [39454] = { [91939] = 4, [92227] = 5, [92395] = 1, [92453] = 3, [92411] = 8, [92408] = 8, [91009] = 8, [92274] = 10, [92396] = 2, [92398] = 1, [92262] = 1, [92397] = 1, [92026] = 2, [92031] = 5, [92083] = 1, [92082] = 1, [92028] = 2, [92051] = 2, [92402] = 2, [95157] = 2, [95159] = 2, [95162] = 2, [95164] = 2, [95165] = 2, [95170] = 2, [95172] = 2, [95173] = 2, [95176] = 2, [95177] = 2, [95178] = 2, [95179] = 2, [95180] = 2, [95181] = 2, [95182] = 2, [95183] = 2, [95184] = 2, [95185] = 2, [95187] = 2, [95188] = 2, [95189] = 2, [95190] = 2, [95677] = 2, [95756] = 2, [95758] = 2, [95759] = 2, [92002] = 1, [91098] = 8, }, [39576] = { [108014] = 10, [96287] = 5, [108009] = 2.5, [96588] = 15, [98957] = 10, [104733] = 10, [96021] = 15, }, [39742] = { [97969] = 3, [92776] = 3, [92782] = 3, [96997] = 3, [97044] = 3, [97069] = 3, [97225] = 3, [101505] = 3, [101506] = 3, [101507] = 3, [101508] = 3, [97970] = 5, [92990] = 5, [96682] = 5, [97228] = 5, [100326] = 10, [97632] = 10, [96783] = 20, }, [39990] = { [97940] = 4, }, [39998] = { [97945] = 0.5, [95620] = 0.5, [97906] = 0.5, [112480] = 0.5, [97946] = 1, [97816] = 1, [97821] = 1, [97851] = 1, [112479] = 1, [112481] = 1, [97947] = 2, [97825] = 2, [105127] = 2, [105129] = 2, [113171] = 2, [97948] = 3, [97822] = 3, [97859] = 3, [97942] = 3, [97944] = 3, [97949] = 5, }, [40050] = { [97919] = 5, [97920] = 5, [97933] = 10, [98311] = 10, }, [40111] = { [98492] = 2, [98498] = 2, [98501] = 2, [98502] = 2, [109171] = 2, [110110] = 2, [112090] = 2, [114255] = 2, [98493] = 3, [98500] = 3, [110258] = 3, [98494] = 5, [98495] = 10, [98503] = 10, }, [40121] = { [98585] = 1, [98599] = 1, [98600] = 1, [98601] = 1, [98603] = 1, [98703] = 1, [98909] = 1, [98749] = 2, }, [40316] = { [94386] = 5, [97318] = 5, [94196] = 5, [94152] = 5, [95693] = 10, [94153] = 5, [104531] = 6, }, [40594] = { [97217] = 5, [97241] = 1, [97235] = 1, [97498] = 5, [97316] = 5, }, [40896] = { [102251] = 8, [101700] = 8, [101793] = 8, [101794] = 8, [101795] = 8, [101803] = 8, [101804] = 8, [101805] = 8, [101806] = 8, [101807] = 8, [101808] = 8, [101815] = 8, [101826] = 8, [101827] = 8, [101828] = 8, [101829] = 8, [101832] = 8, [101833] = 8, [101834] = 8, [101835] = 8, [101836] = 8, [101837] = 8, [102727] = 8, [102728] = 8, [102729] = 8, [102736] = 8, [106074] = 8, [117353] = 8, }, [40925] = { [102406] = 2, [102407] = 15, }, [40951] = { [98653] = 7, [102827] = 7, }, [40978] = { [96146] = 10, [97449] = 10, }, [40985] = { [102542] = 4, [101964] = 4, [101967] = 4, [101970] = 4, [101974] = 4, [101977] = 4, [102037] = 4, [102042] = 4, [102046] = 4, [102047] = 4, [102054] = 4, [102060] = 4, [102074] = 4, [102088] = 4, [102092] = 4, [102166] = 4, [102170] = 4, [102204] = 4, [102214] = 4, [102268] = 4, [102280] = 4, [102621] = 4, [102622] = 4, [102625] = 4, [102214] = 15, }, [41013] = { [102623] = 10, }, [41024] = { [102251] = 8, [101700] = 8, [101793] = 8, [101794] = 8, [101795] = 8, [101803] = 8, [101804] = 8, [101805] = 8, [101806] = 8, [101807] = 8, [101808] = 8, [101815] = 8, [101826] = 8, [101827] = 8, [101828] = 8, [101829] = 8, [101832] = 8, [101833] = 8, [101834] = 8, [101835] = 8, [101836] = 8, [101837] = 8, [102727] = 8, [102728] = 8, [102729] = 8, [102736] = 8, [106074] = 8, [117353] = 8, [102736] = 3, [101806] = 3, [101807] = 3, [101808] = 3, }, [41025] = { [102251] = 8, [101700] = 8, [101793] = 8, [101794] = 8, [101795] = 8, [101803] = 8, [101804] = 8, [101805] = 8, [101806] = 8, [101807] = 8, [101808] = 8, [101815] = 8, [101826] = 8, [101827] = 8, [101828] = 8, [101829] = 8, [101832] = 8, [101833] = 8, [101834] = 8, [101835] = 8, [101836] = 8, [101837] = 8, [102727] = 8, [102728] = 8, [102729] = 8, [102736] = 8, [106074] = 8, [117353] = 8, }, [41026] = { [102251] = 8, [101700] = 8, [101793] = 8, [101794] = 8, [101795] = 8, [101803] = 8, [101804] = 8, [101805] = 8, [101806] = 8, [101807] = 8, [101808] = 8, [101815] = 8, [101826] = 8, [101827] = 8, [101828] = 8, [101829] = 8, [101832] = 8, [101833] = 8, [101834] = 8, [101835] = 8, [101836] = 8, [101837] = 8, [102727] = 8, [102728] = 8, [102729] = 8, [102736] = 8, [106074] = 8, [117353] = 8, }, [41122] = { [103150] = 15, [103173] = 8, [103174] = 4, }, [41127] = { [103177] = 2, [103196] = 2, [103234] = 10, [103235] = 10, [103227] = 5, [103178] = 6, [103179] = 6, [104690] = 15, [102633] = 5, [102634] = 8, [104691] = 15, }, [41144] = { [95148] = 8, [95013] = 8, [96124] = 8, [94687] = 4, }, [41227] = { [103650] = 8, [102864] = 8, [102865] = 8, [102866] = 8, [102867] = 8, [102868] = 8, [102869] = 8, [102871] = 8, [102872] = 8, [102873] = 8, [102874] = 8, [102875] = 8, [102876] = 8, [102877] = 8, [102878] = 8, [117935] = 8, [117936] = 8, [117937] = 8, [117939] = 8, [117940] = 8, }, [41257] = { [103651] = 8, [103210] = 8, [103215] = 8, [103218] = 8, [103222] = 8, [103245] = 8, [103307] = 8, [103430] = 8, [103431] = 8, [103446] = 8, [103449] = 8, [103453] = 8, [103457] = 8, [103729] = 8, [103745] = 8, [117941] = 8, [117942] = 8, [117943] = 8, [117944] = 8, }, [41308] = { [103837] = 15, [103850] = 15, [103851] = 40, [110839] = 40, }, [41420] = { [103650] = 8, [102864] = 8, [102865] = 8, [102866] = 8, [102867] = 8, [102868] = 8, [102869] = 8, [102871] = 8, [102872] = 8, [102873] = 8, [102874] = 8, [102875] = 8, [102876] = 8, [102877] = 8, [102878] = 8, [117935] = 8, [117936] = 8, [117937] = 8, [117939] = 8, [117940] = 8, }, [41421] = { [103651] = 8, [103210] = 8, [103215] = 8, [103218] = 8, [103222] = 8, [103245] = 8, [103307] = 8, [103430] = 8, [103431] = 8, [103446] = 8, [103449] = 8, [103453] = 8, [103457] = 8, [103729] = 8, [103745] = 8, [117941] = 8, [117942] = 8, [117943] = 8, [117944] = 8, }, [41705] = { [104614] = 15, [104615] = 8, [104692] = 8, [111184] = 8, [104624] = 13, [104660] = 25, }, [41706] = { [104590] = 8, [104582] = 6, [104589] = 4, }, [41896] = { [105365] = 2, [105780] = 2, [110347] = 2, [110435] = 2, [110436] = 2, [110448] = 2, [105366] = 5, [105360] = 5, [105361] = 5, [105362] = 5, [105781] = 25, [105363] = 25, [106178] = 25, [110073] = 25, [110468] = 25, }, [41925] = { [89759] = 8, [91384] = 4, [91575] = 8, [91424] = 8, [91926] = 10, [92040] = 15, [97445] = 8, [97443] = 8, [97433] = 8, [91948] = 30, [93005] = 20, [91657] = 15, }, [41927] = { [98429] = 4, [98412] = 4, [98432] = 8, [93066] = 8, [93070] = 8, [93344] = 8, [98411] = 8, [108856] = 8, [98433] = 15, [98434] = 20, [98421] = 20, [107403] = 20, }, [41930] = { [97945] = 3, [95620] = 3, [97906] = 3, [112480] = 3, [97946] = 8, [97816] = 8, [97821] = 8, [97851] = 8, [112479] = 8, [112481] = 8, [97947] = 15, [97825] = 15, [105127] = 15, [105129] = 15, [113171] = 15, [97948] = 20, [97822] = 20, [97859] = 20, [97942] = 20, [97944] = 20, [97949] = 25, }, [41961] = { [93067] = 8, [92954] = 8, [93061] = 8, [92963] = 16, [92965] = 16, [92966] = 16, [91839] = 12, [95247] = 8, [93031] = 16, [94974] = 8, [92971] = 16, [95430] = 6, [91860] = 6, [108941] = 18, }, [41992] = { [93155] = 6, [97337] = 8, [97338] = 3, [92989] = 16, }, [42004] = { [105718] = 5, }, [42013] = { [105746] = 8, [105748] = 6, [105750] = 6, [105532] = 4, [105751] = 20, [105749] = 8, }, [42018] = { [91094] = 3, [89393] = 3, [90242] = 3, [90468] = 8, [90389] = 8, [90390] = 8, [90467] = 6, [89801] = 6, [90005] = 6, [90243] = 6, [90318] = 6, [90616] = 6, [93164] = 6, [100345] = 6, [109826] = 6, [119483] = 6, [90469] = 15, [90244] = 15, [90267] = 15, [105947] = 4, [105950] = 6, [105961] = 8, }, [42019] = { [89025] = 6, [89024] = 6, [89803] = 8, [89891] = 8, [93714] = 8, [104878] = 8, [89802] = 25, [89816] = 25, [89808] = 10, [89811] = 4, }, [42022] = { [91287] = 3, [91284] = 6, [88086] = 6, [88087] = 6, [91285] = 8, [91459] = 8, [107447] = 8, [117483] = 8, [91286] = 25, [89846] = 25, [107127] = 25, [106105] = 6, }, [42023] = { [106650] = 2, }, [42025] = { [110585] = 5, [107020] = 5, [107463] = 5, [109942] = 5, [109967] = 5, [109994] = 5, }, [42027] = { [90660] = 4, [90659] = 6, [89731] = 6, [90661] = 6, [103162] = 6, [103180] = 6, [103231] = 6, [119515] = 6, [119516] = 6, [119517] = 6, [103176] = 8, [103363] = 8, [119466] = 8, [90662] = 25, }, [42028] = { [105793] = 24, [105902] = 8, [105826] = 8, [105823] = 6, [105807] = 4, }, [42053] = { [107219] = 3, [107140] = 3, [107160] = 3, [107161] = 3, [107220] = 5, [107142] = 5, [107144] = 5, [107221] = 10, [107143] = 10, [107147] = 10, [106906] = 20, }, [42070] = { [103650] = 8, [102864] = 8, [102865] = 8, [102866] = 8, [102867] = 8, [102868] = 8, [102869] = 8, [102871] = 8, [102872] = 8, [102873] = 8, [102874] = 8, [102875] = 8, [102876] = 8, [102877] = 8, [102878] = 8, [117935] = 8, [117936] = 8, [117937] = 8, [117939] = 8, [117940] = 8, }, [42082] = { [105554] = 8, [105585] = 4, [105613] = 7, }, [42087] = { [105823] = 6, [105826] = 8, [106067] = 0.5, }, [42111] = { [100271] = 8, [99581] = 8, [99584] = 8, [99762] = 8, [99765] = 8, [99767] = 8, [100047] = 8, [100895] = 8, [100993] = 8, [101291] = 8, [101868] = 8, [101900] = 8, [102837] = 8, [106339] = 8, [106348] = 8, [107722] = 8, [108314] = 8, [110805] = 8, [113675] = 8, [113679] = 8, [113850] = 8, [100273] = 12, [99485] = 12, [99764] = 12, [100595] = 12, [101878] = 12, [102898] = 12, [103671] = 12, [106526] = 12, [106532] = 12, [100274] = 16, [99795] = 16, [100019] = 16, [106374] = 3, [106375] = 3, }, [42277] = { [107384] = 3, [107102] = 3, [107323] = 3, [107545] = 3, [107550] = 3, [107748] = 3, [107383] = 8, [107103] = 8, [107116] = 8, [107119] = 8, [107133] = 8, [107135] = 8, [107136] = 8, [107172] = 8, [107193] = 8, [107201] = 8, [107267] = 8, [107327] = 8, [107335] = 8, [107362] = 8, [107363] = 8, [107366] = 8, [107368] = 8, [107440] = 8, [107485] = 8, [107546] = 8, [107547] = 8, [107990] = 8, [110619] = 8, [107381] = 12, [107105] = 12, [107216] = 12, [107328] = 12, [107331] = 12, [113987] = 12, [107382] = 16, }, [42373] = { [95290] = 6, [95707] = 6, [96423] = 6, [96615] = 6, [100055] = 6, [104323] = 6, [104328] = 6, [96361] = 6, }, [42431] = { [99223] = 4, [107258] = 2, [107455] = 1, [107454] = 8, }, [43183] = { [103651] = 8, [103210] = 8, [103215] = 8, [103218] = 8, [103222] = 8, [103245] = 8, [103307] = 8, [103430] = 8, [103431] = 8, [103446] = 8, [103449] = 8, [103453] = 8, [103457] = 8, [103729] = 8, [103745] = 8, [117941] = 8, [117942] = 8, [117943] = 8, [117944] = 8, }, [43241] = { [92383] = 4, [95951] = 4, [106842] = 1, [107666] = 1, [109796] = 6, [110032] = 5, [110423] = 20, }, [43247] = { [103650] = 8, [102864] = 8, [102865] = 8, [102866] = 8, [102867] = 8, [102868] = 8, [102869] = 8, [102871] = 8, [102872] = 8, [102873] = 8, [102874] = 8, [102875] = 8, [102876] = 8, [102877] = 8, [102878] = 8, [117935] = 8, [117936] = 8, [117937] = 8, [117939] = 8, [117940] = 8, }, [43248] = { [103651] = 8, [103210] = 8, [103215] = 8, [103218] = 8, [103222] = 8, [103245] = 8, [103307] = 8, [103430] = 8, [103431] = 8, [103446] = 8, [103449] = 8, [103453] = 8, [103457] = 8, [103729] = 8, [103745] = 8, [117941] = 8, [117942] = 8, [117943] = 8, [117944] = 8, }, [43324] = { [108600] = 10, [108259] = 6, [108675] = 6, [108327] = 3, }, [43336] = { [92383] = 6, [95951] = 6, [106842] = 1.5, [107666] = 1.5, [110423] = 24, }, [43483] = { [110671] = 2, [108806] = 2, [109099] = 2, [109112] = 2, [109336] = 2, [109354] = 2, [109725] = 2, [110384] = 2, [110474] = 2, [110484] = 2, [110699] = 2, [110700] = 2, [110742] = 2, [110776] = 2, [110777] = 2, [110778] = 2, [110779] = 2, [110994] = 2, [111086] = 2, [111593] = 2, [111652] = 2, [110486] = 25, }, [43583] = { [110933] = 3, [110955] = 3, [110956] = 3, [110999] = 3, [111006] = 3, [111013] = 3, [111016] = 3, [113702] = 3, [113703] = 3, [111020] = 6, [110957] = 6, [110997] = 6, [110998] = 6, [111002] = 6, [111003] = 6, [111012] = 6, [113704] = 2, [113705] = 2, }, [43598] = { [103650] = 8, [102864] = 8, [102865] = 8, [102866] = 8, [102867] = 8, [102868] = 8, [102869] = 8, [102871] = 8, [102872] = 8, [102873] = 8, [102874] = 8, [102875] = 8, [102876] = 8, [102877] = 8, [102878] = 8, [117935] = 8, [117936] = 8, [117937] = 8, [117939] = 8, [117940] = 8, }, [43599] = { [103651] = 8, [103210] = 8, [103215] = 8, [103218] = 8, [103222] = 8, [103245] = 8, [103307] = 8, [103430] = 8, [103431] = 8, [103446] = 8, [103449] = 8, [103453] = 8, [103457] = 8, [103729] = 8, [103745] = 8, [117941] = 8, [117942] = 8, [117943] = 8, [117944] = 8, }, [43600] = { [103650] = 8, [102864] = 8, [102865] = 8, [102866] = 8, [102867] = 8, [102868] = 8, [102869] = 8, [102871] = 8, [102872] = 8, [102873] = 8, [102874] = 8, [102875] = 8, [102876] = 8, [102877] = 8, [102878] = 8, [117935] = 8, [117936] = 8, [117937] = 8, [117939] = 8, [117940] = 8, }, [43601] = { [103651] = 8, [103210] = 8, [103215] = 8, [103218] = 8, [103222] = 8, [103245] = 8, [103307] = 8, [103430] = 8, [103431] = 8, [103446] = 8, [103449] = 8, [103453] = 8, [103457] = 8, [103729] = 8, [103745] = 8, [117941] = 8, [117942] = 8, [117943] = 8, [117944] = 8, }, [43932] = { [111910] = 6, [99755] = 6, [106032] = 6, [106654] = 6, [107449] = 6, [107450] = 6, [108930] = 6, [109048] = 6, [109199] = 6, [109473] = 6, [111446] = 6, [111612] = 6, [111619] = 6, [112821] = 6, [112822] = 6, [113451] = 6, [113452] = 6, [113462] = 6, [113463] = 6, [113464] = 6, [113465] = 6, [113679] = 6, [114468] = 6, [114470] = 6, [114472] = 6, [114474] = 6, [114480] = 6, [114868] = 6, [115216] = 6, [115241] = 6, [115249] = 6, [116013] = 6, [111911] = 10, [107521] = 10, [107717] = 10, [107721] = 10, [107727] = 10, [112788] = 10, [113633] = 10, }, [43964] = { [112134] = 1, [112135] = 5, [112136] = 10, [112127] = 10, [112133] = 10, [112196] = 10, [112197] = 10, [112200] = 10, [112202] = 10, [112203] = 10, [112205] = 10, [112207] = 10, [112211] = 10, [112215] = 10, [112217] = 10, [112219] = 10, [112556] = 10, [112559] = 10, [112560] = 10, [112619] = 10, [112620] = 10, [112621] = 10, [112622] = 10, [112624] = 10, [112137] = 20, }, [44049] = { [111479] = 15, [111456] = 4, [111469] = 2, }, [44054] = { [112446] = 1, [111469] = 1, [112447] = 3, [111456] = 3, [111756] = 3, [111766] = 3, [111767] = 3, [111768] = 3, [111929] = 3, [112448] = 5, [102059] = 5, [111479] = 5, [111751] = 5, [111763] = 5, [111889] = 5, [112449] = 1, [111752] = 1, [112450] = 10, [103972] = 10, [111508] = 10, [111823] = 10, }, [44730] = { [114994] = 20, [115008] = 5, [115010] = 5, [115021] = 5, [115379] = 5, [115443] = 5, [116425] = 5, [116429] = 5, [115119] = 10, [115015] = 5, }, [44737] = { [115025] = 6, [115031] = 5, [115026] = 2, [115739] = 5, [115751] = 25, }, [44744] = { [115089] = 8, [115090] = 5, [115216] = 5, [115249] = 5, }, [44759] = { [115333] = 10, [115008] = 5, [115010] = 5, [115021] = 5, [115379] = 5, [115443] = 5, [116425] = 5, [116429] = 5, }, [44780] = { [115383] = 3, [115384] = 8, [114868] = 8, [114873] = 8, [114874] = 8, [114876] = 8, [114904] = 8, [115806] = 8, [116013] = 8, [115385] = 12, [114869] = 12, [114875] = 12, }, [44789] = { [115657] = 4, [115656] = 4, [115658] = 4, [117345] = 15, [90679] = 15, [117346] = 15, }, [44823] = { [116315] = 16, }, [44857] = { [106765] = 15, [106764] = 10, }, [44867] = { [115961] = 8, [115690] = 8, [115691] = 8, [115692] = 8, [115724] = 8, [115755] = 8, [115962] = 12, [115738] = 12, [115954] = 12, }, [44884] = { [115790] = 8, [115854] = 5, [115008] = 5, [115010] = 5, [115021] = 5, [115379] = 5, [115443] = 5, [116425] = 5, [116429] = 5, [115891] = 5, [117486] = 5, [115841] = 10, }, [44857] = { [106765] = 15, [106764] = 10, }, [44892] = { [115679] = 4, [115677] = 2, [115665] = 4, [115669] = 10, [115673] = 15, [115927] = 8, }, [44893] = { [115680] = 4, [115678] = 2, [115663] = 4, [115667] = 10, [115671] = 15, [115925] = 8, }, [44894] = { [115681] = 4, [115675] = 2, [115666] = 4, [115670] = 10, [115674] = 15, [115922] = 8, }, [44895] = { [115682] = 4, [115676] = 2, [115664] = 4, [115668] = 10, [115672] = 15, [115917] = 8, }, [44938] = { [117240] = 3, }, [45058] = { [115969] = 10, [116025] = 3, [116026] = 3, [116027] = 3, [115558] = 4, [117792] = 20, }, [45118] = { [115753] = 10, [91948] = 20, [91527] = 3, [93377] = 10, [89759] = 10, [97445] = 8, [97443] = 8, [97433] = 8, [93005] = 10, [91537] = 6, [97630] = 20, [91657] = 20, [118177] = 10, [91384] = 3, [91575] = 10, [115732] = 20, }, [45134] = { [116205] = 5, [116219] = 6, [116204] = 4, [116282] = 5, [116281] = 5, [116217] = 3, [116277] = 8, [116290] = 8, }, [45203] = { [116425] = 2, [116324] = 6, [116167] = 10, [116429] = 4, [116424] = 7, [116428] = 5, [116433] = 5, }, [45307] = { [100998] = 5, [102913] = 10, [100999] = 5, }, [45390] = { [116825] = 5, [117080] = 8, [116823] = 5, [116813] = 8, [116812] = 8, [116811] = 8, [116810] = 8, [116809] = 8, [116842] = 15, [116848] = 15, [115379] = 2, }, [45406] = { [116882] = 1, [116850] = 3, [116883] = 1, [116884] = 2, [116899] = 4, [116901] = 4, [116898] = 4, [116909] = 1, [116917] = 1, [116892] = 2, [116885] = 3, [116897] = 1, [116920] = 5, }, [45439] = { [117018] = 6, [116980] = 5, [116981] = 4, [117019] = 2, [116972] = 8, [117003] = 8, }, [45586] = { [117324] = 5, [117328] = 10, }, [45626] = { [117354] = 2, [117425] = 10, [117446] = 10, }, [45653] = { [117354] = 2, [117425] = 10, [117446] = 10, [119721] = 1, }, [45746] = { [117551] = 4, [117554] = 4, [117557] = 6, [117560] = 2, [117561] = 4, [117612] = 4, [117613] = 4, [117614] = 4, [117623] = 4, [117629] = 6, }, [45786] = { [118305] = 8, [118280] = 5, [118415] = 5, [117850] = 15, [117837] = 15, [117883] = 1, [118410] = 3, }, [45795] = { [117655] = 5, [117735] = 5, [117736] = 5, [117737] = 5, [117743] = 5, [119902] = 5, [117649] = 10, [117636] = 5, }, [45804] = { [118077] = 4, [118078] = 5, }, [45970] = { [119635] = 8, [119634] = 5, [119694] = 5, }, [45972] = { [129764] = 2, [122961] = 2, [128361] = 3, [129835] = 15, [129877] = 1, [129904] = 15, }, [46032] = { [118454] = 8, [118455] = 8, [118459] = 20, [118472] = 10, [118502] = 5, }, [46073] = { [117559] = 2.5, [117552] = 2.5, [117567] = 2.5, [117546] = 5, [117555] = 1, [118720] = 25, }, [46116] = { [116566] = 5, [118782] = 7, [118783] = 5, [116521] = 5, [116664] = 10, }, [46160] = { [118841] = 10, [118845] = 16, [118846] = 5, [118857] = 60, }, [46201] = { [120087] = 1, [120103] = 5, [120112] = 20, [120113] = 2, }, [46347] = { [120761] = 2, [120768] = 10, }, [46725] = { [117952] = 5, }, [46750] = { [117952] = 10, }, [46752] = { [117952] = 10, }, [46756] = { [115624] = 1, [117403] = 10, [117404] = 10, [120143] = 10, [117413] = 3, [117492] = 3, [119203] = 3, [119270] = 3, [120481] = 5, }, [46833] = { [120709] = 5, [120710] = 5, [120711] = 5, [120734] = 5, [117091] = 20, [120735] = 8, [120739] = 2, }, [47132] = { [120932] = 5, [120933] = 3, [120934] = 2, [120943] = 10, [121344] = 6, }, [47229] = { [121744] = 1, [128587] = 10, [121810] = 0.5, }, [47259] = { [122447] = 12, }, [47329] = { [131707] = 11.2, }, [47495] = { [122111] = 100, [122504] = 100, [122002] = 100, [122000] = 200, }, [47527] = { [124803] = 12, [124767] = 6, [122872] = 6, [122919] = 6, [122916] = 2, }, [47647] = { [128379] = 3, [128299] = 3, [128346] = 3, [128453] = 3, [128454] = 3, [136446] = 3, [128315] = 2, [125299] = 2, [128348] = 2, [128469] = 2, [128714] = 2, [128715] = 2, [128716] = 2, [128717] = 2, [128723] = 2, [128724] = 2, [128732] = 2, [128733] = 2, [128736] = 2, [128738] = 2, [128739] = 2, [128741] = 2, [128743] = 2, [128744] = 2, [128745] = 2, [128747] = 2, [128748] = 2, [128750] = 2, [128753] = 2, [128755] = 2, [128757] = 2, [128758] = 2, [128760] = 2, [128762] = 2, [128763] = 2, [128764] = 2, [128765] = 2, [128766] = 2, [128786] = 2, [128787] = 2, [128788] = 2, [128789] = 2, [128791] = 2, [128792] = 2, [128793] = 2, [128794] = 2, [128795] = 2, [128796] = 2, [128797] = 2, [128800] = 2, [128801] = 2, [128802] = 2, [128820] = 2, [128822] = 2, [128823] = 2, [128824] = 2, [128825] = 2, [128826] = 2, [128827] = 2, [128828] = 2, [128829] = 2, [128830] = 2, [128831] = 2, [128832] = 2, [128833] = 2, [128834] = 2, [128835] = 2, [128839] = 2, [128840] = 2, [128841] = 2, [128843] = 2, [128844] = 2, [128845] = 2, [128846] = 2, [128847] = 2, [128850] = 2, [128851] = 2, [128853] = 2, [128854] = 2, [128855] = 2, [128856] = 2, [128857] = 2, [128858] = 2, [128859] = 2, [128860] = 2, [128861] = 2, [128862] = 2, [128864] = 2, [128865] = 2, [128866] = 2, [128868] = 2, [128869] = 2, [128870] = 2, [128871] = 2, [128872] = 2, [128873] = 2, [128878] = 2, [136673] = 2, [136678] = 2, [136679] = 2, [136680] = 2, [136689] = 2, [136691] = 2, [136693] = 2, [136695] = 2, [128380] = 0.5, [123358] = 0.5, [128351] = 0.5, [128355] = 0.5, [128356] = 0.5, [129435] = 2, [128369] = 2, }, [47707] = { [123509] = 3, [123513] = 6, [123514] = 30, [125251] = 10, [124959] = 6, }, [47756] = { [123539] = 5, [123450] = 2.5, [123453] = 2.5, [123832] = 2.5, }, [47797] = { [133499] = 6, [124249] = 2, }, [47854] = { [125006] = 5, [125010] = 5, [124463] = 5, [124432] = 3, [124435] = 5, [124430] = 5, [124444] = 3, [124446] = 1, [124448] = 5, }, [47969] = { [124170] = 3, [124382] = 3, [124173] = 4, [124548] = 15, [125023] = 4, [128326] = 4, }, [47996] = { [126014] = 3, [125992] = 7, [126017] = 9, }, [48093] = { [125393] = 4, [125392] = 4, [125978] = 1, [125437] = 20, }, [48098] = { [127238] = 5, [127239] = 5, [127240] = 5, [124432] = 3, [124435] = 5, [124430] = 5, [124444] = 3, [124446] = 1, [124448] = 5, }, [48181] = { [125130] = 10, [125132] = 1, [128916] = 5, }, [48474] = { [126282] = 5, [126264] = 5, [126263] = 5, [126671] = 2, }, [48525] = { [126506] = 2, [126629] = 4, [126151] = 2, [137748] = 2, [129033] = 15, [130083] = 4, [137842] = 2, }, [48588] = { [131855] = 1.5, [127132] = 4, }, [48680] = { [127038] = 4, [126974] = 1, [126973] = 3, [127333] = 20, }, [48777] = { [126073] = 2, [126072] = 5, [126071] = 15, [127705] = 15, [126082] = 10, [126040] = 15, }, [48852] = { [127224] = 5, [127247] = 5, [127246] = 10, }, [48934] = { [123039] = 3, [123039] = 3, [126650] = 3, [126661] = 3, [127719] = 3, [127737] = 3, [122754] = 10, [127711] = 7, [127738] = 7, }, [48983] = { [126457] = 7.5, [126458] = 5, [126456] = 5, [127914] = 20, }, [49068] = { [127833] = 8, [127835] = 5, [127836] = 5, [127839] = 5, [129433] = 1, [128632] = 8, [129707] = 10, [128604] = 8, }, [49276] = { [136097] = 14.3, }, [49300] = { [126656] = 15, [126189] = 10, [126656] = 10, [129229] = 10, [141824] = 10, [129229] = 10, }, [49315] = { [127833] = 6, [127835] = 4, [127839] = 4, [129433] = 3, [128632] = 8, [129707] = 10, [128604] = 8, [127836] = 4, }, [49406] = { [127142] = 3, [126807] = 3, [126846] = 3, [126931] = 3, [127060] = 3, [127145] = 3, [127176] = 1, [129335] = 1, }, [49422] = { [129540] = 10, [129504] = 5, [129515] = 5, }, [49529] = { [128768] = 5, [129988] = 0.5, }, [49739] = { [146408] = 3, [131302] = 3, [131303] = 3, [131307] = 3, [131462] = 3, [132043] = 3, [145535] = 3, [131304] = 3, [131305] = 3, [131447] = 3, [131770] = 3, [131306] = 5, [141559] = 5, }, [49755] = { [139170] = 6, [139176] = 12, [139165] = 4, [139168] = 2, [139169] = 2, [139245] = 2, [139167] = 3, }, [49918] = { [130953] = 4, [130954] = 4, [131476] = 12, [130948] = 8, }, [50000] = { [131373] = 5, [131372] = 5, [131388] = 5, [131883] = 5, [133036] = 5, [135486] = 5, [132091] = 6, [144260] = 6, [144260] = 3, }, [50009] = { [123192] = 5, [123868] = 5, [145203] = 5, }, [50080] = { [133347] = 4, [133181] = 4, [133279] = 4, [135020] = 4, [135074] = 4, [133122] = 2, [133181] = 2, [133279] = 2, [133347] = 2, [133358] = 2, [133357] = 1, [133358] = 4, [133304] = 5, }, [50091] = { [132092] = 10, [132091] = 2, [144260] = 2, [131373] = 2, [131372] = 2, [131388] = 2, [131883] = 2, [133036] = 2, [135486] = 2, }, [50133] = { [132226] = 4, [132207] = 5, [129806] = 5, [132204] = 2, [132206] = 5, [129750] = 4, [140629] = 5, }, [50178] = { [132409] = 6, [132410] = 6, [132413] = 0.5, [132412] = 1.5, [123135] = 6, [132022] = 6, }, [50287] = { [130953] = 6, [130954] = 6, [130948] = 8, [131476] = 12, [133404] = 8, }, [50315] = { [133415] = 8, [133418] = 8, [133419] = 8, [133434] = 4, [128768] = 4, [129988] = 0.5, }, [50448] = { [131530] = 3, [131534] = 4, [131529] = 3, [131538] = 5, [131547] = 3, [131548] = 2, [133365] = 4, }, [50497] = { [123121] = 3, }, [50524] = { [124066] = 8, [124069] = 8, [133499] = 10, [124249] = 8, }, [50533] = { [134190] = 1, [134189] = 1, [134211] = 0.5, [134185] = 0.5, [134186] = 0.5, [134187] = 0.5, [134188] = 0.5, [134208] = 0.5, [134300] = 1, }, [50548] = { [129752] = 3, [130219] = 3, [130221] = 5, [134156] = 5, [129487] = 5, [134156] = 5, [129513] = 5, [128933] = 1, [133375] = 3, }, [50549] = { [134244] = 4, [128721] = 4, [128726] = 4, [128731] = 4, [128734] = 4, [128773] = 4, [128780] = 4, [131658] = 4, [134259] = 6, }, [50587] = { [125393] = 4, [125392] = 4, [125978] = 1, [134372] = 6, [125437] = 15, [125952] = 1, [125366] = 4, [125363] = 4, [125300] = 4, [125366] = 4, [125952] = 4, }, [50650] = { [127142] = 3, [126807] = 3, [126846] = 3, [126931] = 3, [127060] = 3, [127145] = 3, [127176] = 1, [128071] = 3, }, [50718] = { [134816] = 4, [134812] = 3, [134841] = 2, [135280] = 5, [134856] = 4, [134852] = 10, [124460] = 10, }, [50779] = { [135418] = 3, [130554] = 3, [135511] = 3, [135584] = 3, [135585] = 3, [135785] = 3, [135415] = 12, [135670] = 3, [135696] = 3, [135698] = 3, [135700] = 3, [135701] = 3, [135702] = 3, [135703] = 3, [135704] = 3, [135705] = 3, [137705] = 3, [137706] = 3, [141762] = 3, [135729] = 5, }, [50805] = { [140032] = 5, [140031] = 8, [129778] = 8, [130509] = 8, [134742] = 8, [135287] = 8, [135748] = 15, [134716] = 15, }, [50887] = { [135577] = 5, }, [50930] = { [141026] = 5, }, [50957] = { [135922] = 2, [135920] = 2, [135921] = 2, }, [50959] = { [135771] = 2, [135777] = 3, [135773] = 2, [135796] = 10, [135898] = 3, }, [50975] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [51131] = { [134244] = 4, [128721] = 4, [128726] = 4, [128731] = 4, [128734] = 4, [128773] = 4, [128780] = 4, [131658] = 4, [134259] = 6, }, [51179] = { [136617] = 3, [136285] = 3, [136299] = 3, [136548] = 3, [136550] = 3, [137132] = 3, [137138] = 3, [137152] = 3, [137657] = 3, [138171] = 3, [138343] = 3, [136618] = 5, [136200] = 5, [136275] = 5, [136293] = 5, [136296] = 5, [136545] = 5, [136546] = 5, [136551] = 5, [136552] = 5, [137131] = 5, [137134] = 5, [137136] = 5, [137141] = 5, [137144] = 5, [137147] = 5, [137155] = 5, [137156] = 5, [137162] = 5, [137178] = 5, [137653] = 5, [137654] = 5, [138245] = 5, [138344] = 5, [138345] = 5, [153065] = 5, [153097] = 5, [136619] = 15, [136277] = 15, [136303] = 15, [136547] = 15, [136555] = 15, [137129] = 15, [137142] = 15, [137146] = 15, [137153] = 15, [137179] = 15, [137655] = 15, [138346] = 15, [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, }, [51250] = { [138258] = 6, [137063] = 8, [136393] = 12, }, [51278] = { [137215] = 3, [137202] = 5, [137188] = 5, [137212] = 5, [137189] = 7, }, [51374] = { [130953] = 6, [130954] = 6, [130948] = 8, [131476] = 12, [133404] = 8, }, [51397] = { [138456] = 5, [138457] = 5, [138459] = 4, [138458] = 5, }, [51405] = { [126656] = 15, [126189] = 10, [126656] = 10, [129229] = 10, [141824] = 10, [126285] = 4, }, [51406] = { [125347] = 6, [125327] = 2, [126455] = 6, [126626] = 6, [126708] = 6, [126709] = 6, }, [51411] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [51415] = { [136617] = 3, [136285] = 3, [136299] = 3, [136548] = 3, [136550] = 3, [137132] = 3, [137138] = 3, [137152] = 3, [137657] = 3, [138171] = 3, [138343] = 3, [136618] = 5, [136200] = 5, [136275] = 5, [136293] = 5, [136296] = 5, [136545] = 5, [136546] = 5, [136551] = 5, [136552] = 5, [137131] = 5, [137134] = 5, [137136] = 5, [137141] = 5, [137144] = 5, [137147] = 5, [137155] = 5, [137156] = 5, [137162] = 5, [137178] = 5, [137653] = 5, [137654] = 5, [138245] = 5, [138344] = 5, [138345] = 5, [153065] = 5, [153097] = 5, [136619] = 15, [136277] = 15, [136303] = 15, [136547] = 15, [136555] = 15, [137129] = 15, [137142] = 15, [137146] = 15, [137153] = 15, [137179] = 15, [137655] = 15, [138346] = 15, [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, }, [51422] = { [136617] = 3, [136285] = 3, [136299] = 3, [136548] = 3, [136550] = 3, [137132] = 3, [137138] = 3, [137152] = 3, [137657] = 3, [138171] = 3, [138343] = 3, [136618] = 5, [136200] = 5, [136275] = 5, [136293] = 5, [136296] = 5, [136545] = 5, [136546] = 5, [136551] = 5, [136552] = 5, [137131] = 5, [137134] = 5, [137136] = 5, [137141] = 5, [137144] = 5, [137147] = 5, [137155] = 5, [137156] = 5, [137162] = 5, [137178] = 5, [137653] = 5, [137654] = 5, [138245] = 5, [138344] = 5, [138345] = 5, [153065] = 5, [153097] = 5, [136619] = 15, [136277] = 15, [136303] = 15, [136547] = 15, [136555] = 15, [137129] = 15, [137142] = 15, [137146] = 15, [137153] = 15, [137179] = 15, [137655] = 15, [138346] = 15, [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, }, [51450] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [51454] = { [137788] = 5, [137793] = 5, [130849] = 8, [137758] = 8, [130848] = 8, [130868] = 20, }, [51475] = { [137729] = 1, [137829] = 8, [137840] = 10, }, [51490] = { [137985] = 12.5, [137987] = 12.5, }, [51495] = { [128587] = 10, [121744] = 1, [121810] = 0.5, }, [51534] = { [129749] = 3, [129753] = 3, [134426] = 3, [137621] = 3, [138125] = 3, [130747] = 5, }, [51548] = { [125393] = 4, [125392] = 4, [125978] = 1, [134372] = 6, [125437] = 15, [125952] = 1, [125366] = 4, [125363] = 4, [125300] = 4, [125366] = 4, [125952] = 4, }, [51577] = { [138166] = 4, [138094] = 4, [138136] = 8, [138058] = 8, [138029] = 4, [141472] = 8, }, [51578] = { [137957] = 2, [137920] = 10, [137821] = 3, [137823] = 3, [137822] = 4, [137833] = 10, [140284] = 8, }, [51581] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [51584] = { [136617] = 3, [136285] = 3, [136299] = 3, [136548] = 3, [136550] = 3, [137132] = 3, [137138] = 3, [137152] = 3, [137657] = 3, [138171] = 3, [138343] = 3, [136618] = 5, [136200] = 5, [136275] = 5, [136293] = 5, [136296] = 5, [136545] = 5, [136546] = 5, [136551] = 5, [136552] = 5, [137131] = 5, [137134] = 5, [137136] = 5, [137141] = 5, [137144] = 5, [137147] = 5, [137155] = 5, [137156] = 5, [137162] = 5, [137178] = 5, [137653] = 5, [137654] = 5, [138245] = 5, [138344] = 5, [138345] = 5, [153065] = 5, [153097] = 5, [136619] = 15, [136277] = 15, [136303] = 15, [136547] = 15, [136555] = 15, [137129] = 15, [137142] = 15, [137146] = 15, [137153] = 15, [137179] = 15, [137655] = 15, [138346] = 15, [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, }, [51585] = { [124170] = 3, [124382] = 3, [124173] = 4, [124548] = 15, [125023] = 4, [128326] = 4, }, [51604] = { [129764] = 5, [122961] = 2, [128361] = 5, [129835] = 15, [129877] = 1, [129904] = 15, [138267] = 4, }, [51608] = { [136617] = 3, [136285] = 3, [136299] = 3, [136548] = 3, [136550] = 3, [137132] = 3, [137138] = 3, [137152] = 3, [137657] = 3, [138171] = 3, [138343] = 3, [136618] = 5, [136200] = 5, [136275] = 5, [136293] = 5, [136296] = 5, [136545] = 5, [136546] = 5, [136551] = 5, [136552] = 5, [137131] = 5, [137134] = 5, [137136] = 5, [137141] = 5, [137144] = 5, [137147] = 5, [137155] = 5, [137156] = 5, [137162] = 5, [137178] = 5, [137653] = 5, [137654] = 5, [138245] = 5, [138344] = 5, [138345] = 5, [153065] = 5, [153097] = 5, [136619] = 15, [136277] = 15, [136303] = 15, [136547] = 15, [136555] = 15, [137129] = 15, [137142] = 15, [137146] = 15, [137153] = 15, [137179] = 15, [137655] = 15, [138346] = 15, [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, }, [51615] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [51618] = { [136617] = 3, [136285] = 3, [136299] = 3, [136548] = 3, [136550] = 3, [137132] = 3, [137138] = 3, [137152] = 3, [137657] = 3, [138171] = 3, [138343] = 3, [136618] = 5, [136200] = 5, [136275] = 5, [136293] = 5, [136296] = 5, [136545] = 5, [136546] = 5, [136551] = 5, [136552] = 5, [137131] = 5, [137134] = 5, [137136] = 5, [137141] = 5, [137144] = 5, [137147] = 5, [137155] = 5, [137156] = 5, [137162] = 5, [137178] = 5, [137653] = 5, [137654] = 5, [138245] = 5, [138344] = 5, [138345] = 5, [136619] = 15, [136277] = 15, [136303] = 15, [136547] = 15, [136555] = 15, [137129] = 15, [137142] = 15, [137146] = 15, [137153] = 15, [137179] = 15, [137655] = 15, [138346] = 15, [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, }, [51644] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [51672] = { [125130] = 8, [125132] = 2, [144214] = 5, }, [51677] = { [138589] = 18, }, [51681] = { [126506] = 4, [126629] = 6, [126151] = 3, [137748] = 3, [129033] = 15, [130083] = 5, [137842] = 3, }, [51686] = { [126410] = 4, [129058] = 4, [129059] = 4, [129656] = 4, [131669] = 4, [137850] = 4, [137851] = 4, [137748] = 3, [137842] = 3, [130083] = 4, }, [51689] = { [128005] = 3, [127915] = 3, [128267] = 3, [128371] = 3, [128001] = 7, }, [51693] = { [135771] = 4, [135777] = 6, [135773] = 4, [135796] = 10, }, [51706] = { [134190] = 1, [134189] = 1, [134211] = 0.5, [134185] = 0.5, [134186] = 0.5, [134187] = 0.5, [134188] = 0.5, [134208] = 0.5, }, [51709] = { [127038] = 6, [126974] = 2, [126973] = 3, [127333] = 6, }, [51741] = { [127038] = 6, [126974] = 2, [126973] = 3, [127333] = 6, }, [51742] = { [135771] = 4, [135777] = 6, [135773] = 4, [135796] = 10, }, [51764] = { [129764] = 5, [122961] = 2, [128361] = 5, [129835] = 15, [129877] = 1, [129904] = 15, [138267] = 4, }, [51765] = { [125130] = 8, [125132] = 1, [144216] = 5, }, [51791] = { [129436] = 15, [140041] = 10, [129496] = 10, [129500] = 10, [129505] = 10, [140042] = 2, [129497] = 2, [129498] = 2, [140043] = 2, [129499] = 2, [140045] = 2, [124211] = 2, [137721] = 2, }, [51792] = { [129436] = 15, [140041] = 10, [129496] = 10, [129500] = 10, [129505] = 10, [140042] = 2, [129497] = 2, [129498] = 2, [140043] = 2, [129499] = 2, [140045] = 2, [124211] = 2, [137721] = 2, }, [51793] = { [129436] = 15, [140041] = 10, [129496] = 10, [129500] = 10, [129505] = 10, [140042] = 2, [129497] = 2, [129498] = 2, [140043] = 2, [129499] = 2, [140045] = 2, [124211] = 2, [137721] = 2, }, [51794] = { [129436] = 15, [140041] = 10, [129496] = 10, [129500] = 10, [129505] = 10, [140042] = 2, [129497] = 2, [129498] = 2, [140043] = 2, [129499] = 2, [140045] = 2, [124211] = 2, [137721] = 2, }, [51820] = { [137110] = 5, [137500] = 5, [138092] = 5, [138093] = 5, [138095] = 5, [137065] = 8, [137504] = 4, [137505] = 4, [137992] = 4, [139215] = 10, [137649] = 30, }, [51821] = { [127833] = 8, [127835] = 5, [127836] = 5, [129433] = 1, [128632] = 8, [129707] = 10, [128604] = 8, [127839] = 5, }, [51840] = { [137110] = 5, [137500] = 5, [138092] = 5, [138093] = 5, [138095] = 5, [137065] = 8, [137504] = 4, [137505] = 4, [137992] = 4, [139215] = 10, [137649] = 30, }, [51900] = { [139318] = 5, [129647] = 5, [129652] = 5, [129784] = 5, [134555] = 5, [134556] = 5, [134709] = 5, [135018] = 5, [135027] = 5, [136191] = 5, [143646] = 5, [139323] = 10, [129774] = 10, [139324] = 15, [129754] = 15, [134745] = 15, [136323] = 15, [147507] = 15, }, [51924] = { [139318] = 5, [129647] = 5, [129652] = 5, [129784] = 5, [134555] = 5, [134556] = 5, [134709] = 5, [135018] = 5, [135027] = 5, [136191] = 5, [143646] = 5, [139323] = 10, [129774] = 10, [139324] = 15, [129754] = 15, [134745] = 15, [136323] = 15, [147507] = 15, }, [51982] = { [139665] = 10, [139685] = 5, [139684] = 2, [139693] = 1, [139710] = 1, [139720] = 1, }, [51991] = { [139492] = 1, [139772] = 3, [139929] = 5, [142895] = 42, }, [52047] = { [136166] = 8, [136174] = 8, [136158] = 4, [136177] = 8, [136110] = 4, [139735] = 5, [139699] = 5, [136343] = 6, }, [52057] = { [136166] = 8, [136174] = 8, [136158] = 4, [136177] = 8, [136110] = 4, [136343] = 6, [139735] = 5, [139699] = 5, }, [52119] = { [139959] = 1, [123712] = 4, [142064] = 5, [142070] = 1, }, [52120] = { [139965] = 1, [123712] = 4, [142064] = 5, [142070] = 1, }, [52140] = { [132226] = 3, [132207] = 5, [129806] = 4, [129750] = 3, [140629] = 8, }, [52144] = { [122454] = 4, [133327] = 4, [133399] = 4, [134328] = 6, [123264] = 6, }, [52167] = { [146408] = 4, [131302] = 4, [131303] = 4, [131307] = 4, [131462] = 4, [132043] = 4, [145535] = 4, [131304] = 4, [131305] = 4, [131447] = 4, [131770] = 4, [131306] = 7, [142810] = 10, [132086] = 12, }, [52179] = { [135404] = 3, [135402] = 3, [129972] = 5, [130823] = 3, [130822] = 3, [131084] = 3, [131085] = 3, [131778] = 3, [129980] = 2, [141200] = 6, }, [52180] = { [140466] = 3, [129749] = 2, [129753] = 2, [134426] = 2, [137621] = 2, [138125] = 2, [130747] = 5, [140494] = 6, [140493] = 6, [103512] = 5, }, [52190] = { [141915] = 1, [141908] = 4, [141907] = 7, [141934] = 10, }, [52236] = { [132226] = 3, [132207] = 5, [129806] = 4, [129750] = 3, [140629] = 8, }, [52251] = { [142076] = 1, [142082] = 7, }, [52259] = { [140806] = 10, [140770] = 10, [140791] = 10, [140785] = 6, [140784] = 6, [140809] = 6, [140848] = 6, [140804] = 4, [140805] = 4, [140821] = 4, [140833] = 4, [140884] = 6, }, [52428] = { [141870] = 20, }, [52757] = { [136765] = 4, [125467] = 4, [125469] = 4, [127150] = 4, [127203] = 4, [127290] = 8, [125475] = 8, [141553] = 6, }, [52785] = { [127142] = 3, [126807] = 3, [126846] = 3, [126931] = 3, [127060] = 3, [127145] = 3, [127176] = 1, [128071] = 3, }, [52798] = { [139492] = 1, [139772] = 3, [139929] = 5, [142895] = 42, }, [52872] = { [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, [136619] = 10, [136277] = 10, [136303] = 10, [136547] = 10, [136555] = 10, [137129] = 10, [137142] = 10, [137146] = 10, [137153] = 10, [137179] = 10, [137655] = 10, [138346] = 10, [136618] = 4, [136200] = 4, [136275] = 4, [136293] = 4, [136296] = 4, [136545] = 4, [136546] = 4, [136551] = 4, [136552] = 4, [137131] = 4, [137134] = 4, [137136] = 4, [137141] = 4, [137144] = 4, [137147] = 4, [137155] = 4, [137156] = 4, [137162] = 4, [137178] = 4, [137653] = 4, [137654] = 4, [138245] = 4, [138344] = 4, [138345] = 4, [153065] = 4, [153097] = 4, [136617] = 2, [136285] = 2, [136299] = 2, [136548] = 2, [136550] = 2, [137132] = 2, [137138] = 2, [137152] = 2, [137657] = 2, [138171] = 2, [138343] = 2, [146022] = 7, [146023] = 15, }, [52873] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [52874] = { [136620] = 15, [136305] = 15, [137133] = 15, [137140] = 15, [137151] = 15, [137553] = 15, [137773] = 15, [138244] = 15, [138347] = 15, [136619] = 6, [136277] = 6, [136303] = 6, [136547] = 6, [136555] = 6, [137129] = 6, [137142] = 6, [137146] = 6, [137153] = 6, [137179] = 6, [137655] = 6, [138346] = 6, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 4, [146023] = 10, }, [52875] = { [136620] = 20, [136305] = 20, [137133] = 20, [137140] = 20, [137151] = 20, [137553] = 20, [137773] = 20, [138244] = 20, [138347] = 20, [136619] = 7, [136277] = 7, [136303] = 7, [136547] = 7, [136555] = 7, [137129] = 7, [137142] = 7, [137146] = 7, [137153] = 7, [137179] = 7, [137655] = 7, [138346] = 7, [136618] = 3, [136200] = 3, [136275] = 3, [136293] = 3, [136296] = 3, [136545] = 3, [136546] = 3, [136551] = 3, [136552] = 3, [137131] = 3, [137134] = 3, [137136] = 3, [137141] = 3, [137144] = 3, [137147] = 3, [137155] = 3, [137156] = 3, [137162] = 3, [137178] = 3, [137653] = 3, [137654] = 3, [138245] = 3, [138344] = 3, [138345] = 3, [153065] = 3, [153097] = 3, [136617] = 1, [136285] = 1, [136299] = 1, [136548] = 1, [136550] = 1, [137132] = 1, [137138] = 1, [137152] = 1, [137657] = 1, [138171] = 1, [138343] = 1, [146022] = 5, [146023] = 10, }, [52877] = { [136620] = 25, [136305] = 25, [137133] = 25, [137140] = 25, [137151] = 25, [137553] = 25, [137773] = 25, [138244] = 25, [138347] = 25, [136619] = 7, [136277] = 7, [136303] = 7, [136547] = 7, [136555] = 7, [137129] = 7, [137142] = 7, [137146] = 7, [137153] = 7, [137179] = 7, [137655] = 7, [138346] = 7, [136618] = 4, [136200] = 4, [136275] = 4, [136293] = 4, [136296] = 4, [136545] = 4, [136546] = 4, [136551] = 4, [136552] = 4, [137131] = 4, [137134] = 4, [137136] = 4, [137141] = 4, [137144] = 4, [137147] = 4, [137155] = 4, [137156] = 4, [137162] = 4, [137178] = 4, [137653] = 4, [137654] = 4, [138245] = 4, [138344] = 4, [138345] = 4, [153065] = 4, [153097] = 4, [136617] = 2, [136285] = 2, [136299] = 2, [136548] = 2, [136550] = 2, [137132] = 2, [137138] = 2, [137152] = 2, [137657] = 2, [138171] = 2, [138343] = 2, [146022] = 7, [146023] = 15, }, [52988] = { [135418] = 3, [130554] = 3, [135511] = 3, [135584] = 3, [135585] = 3, [135785] = 3, [135415] = 12, [142401] = 5, [142448] = 4, [142465] = 4, [142466] = 4, [142467] = 4, [142468] = 4, [142469] = 4, [142470] = 4, [142471] = 4, [142472] = 4, [142473] = 4, [142476] = 4, [142477] = 4, }, [53008] = { [135418] = 3, [130554] = 3, [135511] = 3, [135584] = 3, [135585] = 3, [135785] = 3, [135415] = 12, [142401] = 5, [142448] = 4, [142465] = 4, [142466] = 4, [142467] = 4, [142468] = 4, [142469] = 4, [142470] = 4, [142471] = 4, [142472] = 4, [142473] = 4, [142476] = 4, [142477] = 4, }, [53009] = { [143457] = 8, [143459] = 4, [143512] = 4, }, [53010] = { [143465] = 8, [143455] = 4, [143453] = 4, [143494] = 4, [140028] = 3, }, [53076] = { [122454] = 4, [133327] = 4, [133399] = 4, [123264] = 6, [134328] = 6, }, [53319] = { [143445] = 12, [143446] = 5, [143456] = 5, }, [53320] = { [143458] = 5, [143460] = 6, [143452] = 12, }, [53346] = { [127899] = 8, [125381] = 8, [127573] = 8, [127574] = 8, [127940] = 5, }, [53711] = { [144928] = 6, [144925] = 6, [144823] = 25, [144803] = 3, [144720] = 3, [144727] = 3, [144810] = 3, [145153] = 3, [149303] = 3, }, [53735] = { [144983] = 5, [145120] = 5, [145121] = 5, }, [53773] = { [145207] = 3, [145262] = 3, [145265] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [53875] = { [145534] = 5, [146393] = 3, [146395] = 2, [147482] = 10, [147525] = 5, [147538] = 3, [147539] = 3, [147540] = 5, [147541] = 5, [147542] = 5, [147543] = 5, [147655] = 10, [134328] = 10, [147656] = 10, }, [53879] = { [145512] = 2, [145555] = 2, [146482] = 2, [148298] = 2, [146484] = 6, [145509] = 4, }, [53885] = { [145750] = 5, [145778] = 20, [145771] = 20, [145645] = 3, [145649] = 3, [145769] = 3, [145787] = 3, [145801] = 3, [148278] = 3, [148659] = 3, [148660] = 3, [148684] = 3, }, [53910] = { [145637] = 5, [145635] = 5, [145636] = 5, }, [53939] = { [145680] = 2, [145718] = 2, [145799] = 2, [145831] = 2, [145822] = 4, [145833] = 4, [145834] = 4, [145839] = 4, [145823] = 8, }, [53945] = { [145214] = 3, [145856] = 3, [145855] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [53963] = { [145891] = 3, [145875] = 3, [145873] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [53973] = { [145908] = 1, [149967] = 1, [149974] = 1, }, [53979] = { [145950] = 3, [145974] = 3, [145959] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [53994] = { [146055] = 3, [146056] = 3, [146057] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [54028] = { [148578] = 2, [148579] = 1, }, [54051] = { [146376] = 3, [146392] = 3, [146397] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [54060] = { [146517] = 3, [146518] = 3, [146519] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [54123] = { [148382] = 1, }, [54135] = { [148058] = 3, [148061] = 3, [148059] = 1, [148011] = 1, [148062] = 1, [148060] = 0.5, [148063] = 0.5, [148064] = 0.5, [148065] = 0.5, [149415] = 20, [149416] = 20, }, [54136] = { [148347] = 1, [148305] = 3, [149047] = 5, }, [54137] = { [148190] = 1.5, [148279] = 1.5, [148287] = 1.5, [148349] = 1.5, [148366] = 1.5, [148191] = 3, [148280] = 3, [148315] = 3, [148317] = 3, [148192] = 5, [148288] = 5, [148289] = 5, [149439] = 10, [149440] = 10, }, [54138] = { [147584] = 3, [147535] = 5, }, [54204] = { [147505] = 1, [147479] = 3, [147481] = 4, [147480] = 1, [147474] = 1, }, [54236] = { [147326] = 3, [147328] = 3, [147331] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [54245] = { [145432] = 7.5, [146917] = 15, }, [54246] = { [145432] = 7.5, [146917] = 15, }, [54267] = { [147615] = 3, [147616] = 3, [147617] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [54287] = { [147752] = 3, [147769] = 3, [147763] = 3, [145401] = 2, [144817] = 2, [145495] = 2, [145398] = 5, [144769] = 5, [144770] = 5, [144777] = 5, [144778] = 5, [144816] = 5, [144818] = 5, [145299] = 5, [145400] = 15, [144780] = 15, [144781] = 15, [144805] = 15, [144806] = 15, [145386] = 15, [148593] = 15, [148594] = 15, [148595] = 15, [148601] = 15, [148605] = 15, }, [54415] = { [148447] = 5, [148448] = 2, [148449] = 1, [148503] = 8, [148461] = 5, [148462] = 3, [148541] = 3, [148596] = 3, [148463] = 5, [148553] = 5, [148554] = 5, [148556] = 5, [148464] = 8, [148519] = 8, }, [54441] = { [148114] = 0.3, [149010] = 5, }, [54448] = { [145432] = 6, [146917] = 15, }, [54449] = { [145432] = 6, [146917] = 15, }, [54498] = { [148174] = 1, [148179] = 8, }, [54499] = { [147949] = 4, [147954] = 8, [148186] = 2, }, [54500] = { [148184] = 3.5, [148178] = 6, [148182] = 12, [148176] = 5, [149192] = 1, }, [54502] = { [148184] = 3.5, [148178] = 6, [148182] = 12, [148176] = 5, [149192] = 1, }, [54505] = { [148215] = 1, [148216] = 8, }, [54506] = { [148252] = 10, [144959] = 12, [144981] = 12, [145036] = 12, [145178] = 12, [145179] = 12, [145183] = 12, [146294] = 12, [147079] = 12, [147080] = 12, [147236] = 12, [147239] = 12, [147346] = 12, [148129] = 12, [148210] = 10, }, [54507] = { [144958] = 10, [144911] = 10, [145002] = 10, [145008] = 10, [145028] = 10, [145163] = 10, [145180] = 10, [145181] = 10, [147396] = 10, [148185] = 10, [148212] = 10, [148513] = 10, [148197] = 33, [148252] = 8, [148210] = 8, }, [54509] = { [148010] = 3, [147262] = 3, [148020] = 8, }, [54512] = { [148320] = 1.5, [148326] = 1.5, [148341] = 1.5, [148273] = 5, [148360] = 3, }, [54528] = { [147735] = 3, [147736] = 3, [147738] = 2, }, [54647] = { [148612] = 1.5, [148663] = 1.5, [148664] = 1.5, [148670] = 1.5, [148672] = 1.5, [148668] = 3, [148666] = 8, }, [54672] = { [147949] = 4, [147954] = 8, [148186] = 2, }, [54673] = { [148010] = 3, [147262] = 3, [148020] = 8, }, [54677] = { [147735] = 3, [147736] = 3, [147738] = 2, }, [54689] = { [148726] = 1, [148887] = 1, [148963] = 1, [148966] = 1, [148967] = 1, [148971] = 1, [148727] = 3, [148800] = 3, [148975] = 3, [148978] = 3, [148728] = 5, [148964] = 5, [148946] = 8, }, [54698] = { [147426] = 4, [147427] = 4, }, [54730] = { [128703] = 5, [126355] = 8, [126542] = 15, }, [54764] = { [149698] = 10, [150225] = 6, [149452] = 3, [149614] = 7, }, [54850] = { [149449] = 0.5, [149478] = 1, [149468] = 1, [149483] = 0.5, }, [54857] = { [149545] = 3, [149546] = 4, [149544] = 2, [149543] = 2, }, [55103] = { [154380] = 1, }, [55350] = { [151919] = 1, [151920] = 3, [163408] = 0.5, [152196] = 0.5, [152450] = 0.5, [152451] = 0.5, [152452] = 0.5, [156637] = 0.5, [156677] = 0.5, [156706] = 0.5, [156853] = 0.5, [156854] = 0.5, [156855] = 0.5, [164086] = 0.5, [164088] = 0.5, [164089] = 0.5, [164169] = 0.5, [164170] = 0.5, [151921] = 1, [151610] = 1, [151612] = 1, [151799] = 1, [151800] = 1, [151801] = 1, [151807] = 1, [151811] = 1, [151943] = 1, [151960] = 1, [151992] = 1, [152639] = 1, [152649] = 1, [157033] = 1, [157034] = 1, [151922] = 2, [151806] = 2, [151858] = 2, [151923] = 3, [151813] = 3, [151880] = 3, [152233] = 3, [151924] = 15, [163400] = 25, [151925] = 10, [151883] = 10, [151897] = 10, [151948] = 10, [151995] = 10, [152040] = 10, [152431] = 10, [152657] = 10, [157120] = 10, [157146] = 10, [157164] = 10, [157167] = 10, [157170] = 10, [151926] = 15, [151609] = 15, [151852] = 15, [152677] = 15, [152757] = 15, [152788] = 15, [157157] = 15, [157188] = 15, [151927] = 5, [151928] = 10, [162726] = 0.1, }, [55520] = { [152106] = 6, [152097] = 4, [152098] = 1, [152100] = 6, [152136] = 8, }, [55573] = { [152918] = 8, [145326] = 4, [152919] = 12, }, [55664] = { [154074] = 8, [152724] = 8, [152827] = 10, [152906] = 10, [152917] = 10, [155783] = 10, [158395] = 10, [145323] = 12, [153306] = 12, [153307] = 12, [153308] = 12, [154902] = 10, [145333] = 5, [149004] = 12, [154990] = 15, [152822] = 1, }, [55665] = { [151786] = 8, [154680] = 5, [151775] = 5, [152883] = 8, [153332] = 10, [151810] = 12, [151778] = 20, }, [55735] = { [152850] = 5, [152834] = 4, [152835] = 1, [152842] = 4, [152836] = 8, [152866] = 4, [154284] = 4, }, [55797] = { [153117] = 7, [153137] = 2, [153139] = 0.5, [153138] = 1, [153136] = 0.5, }, [55799] = { [153027] = 5, [153055] = 7, [151946] = 15, }, [55901] = { [153353] = 5, [153979] = 10, [153354] = 15, [153672] = 20, [150614] = 5, [154252] = 10, }, [55982] = { [153604] = 2, [153682] = 8, [155488] = 2, }, [55997] = { [153823] = 3, }, [56050] = { [154376] = 2, [154688] = 2, [154377] = 5, [154044] = 5, [154045] = 5, }, [56064] = { [153926] = 1, [153925] = 3, [158963] = 3, [163410] = 0.5, [153907] = 0.5, [163705] = 0.5, [153924] = 1, [153179] = 1, [153348] = 1, [153906] = 1, [153908] = 1, [153909] = 1, [153910] = 1, [153913] = 1, [153956] = 1, [154451] = 1, [154590] = 1, [157522] = 1, [157523] = 1, [161342] = 1, [162287] = 1, [162288] = 1, [163703] = 1, [163704] = 1, [153923] = 2, [153826] = 2, [153905] = 2, [157529] = 2, [162289] = 2, [162291] = 2, [153922] = 3, [153171] = 3, [153903] = 3, [153904] = 3, [153915] = 3, [154200] = 3, [154329] = 3, [153921] = 15, [163406] = 25, [153920] = 10, [154106] = 10, [154394] = 10, [154447] = 10, [154467] = 10, [154490] = 10, [157176] = 10, [157266] = 10, [157267] = 10, [153919] = 15, [154087] = 15, [154332] = 15, [154333] = 15, [154495] = 15, [154559] = 15, [153918] = 5, [156551] = 10, }, [56078] = { [154757] = 1, [154756] = 3, [154755] = 3, [154754] = 6, [154753] = 6, [154752] = 10, }, [56308] = { [154540] = 1, [154542] = 3, [154546] = 0.5, [154354] = 0.5, [154368] = 0.5, [158511] = 0.5, [158527] = 0.5, [161280] = 0.5, [162150] = 0.5, [163045] = 0.5, [163154] = 0.5, [163170] = 0.5, [163172] = 0.5, [163259] = 0.5, [154535] = 1, [154352] = 1, [154365] = 1, [154367] = 1, [155489] = 1, [163044] = 1, [163091] = 1, [163112] = 1, [163114] = 1, [154543] = 2, [154369] = 2, [154545] = 3, [154353] = 3, [158530] = 3, [162164] = 3, [163025] = 3, [163268] = 3, [154538] = 10, [154576] = 10, [154578] = 10, [155531] = 10, [162140] = 10, [162141] = 10, [162142] = 10, [162147] = 10, [162172] = 10, [162173] = 10, [154539] = 15, [154604] = 15, [155703] = 15, [156078] = 15, [162163] = 15, [162170] = 15, [162171] = 15, [162196] = 15, [154541] = 15, [163401] = 25, [154536] = 5, [154544] = 10, }, [56325] = { [153027] = 5, [153055] = 7, [151946] = 15, }, [56405] = { [155074] = 1, }, [56552] = { [155444] = 5, [155445] = 10, [155410] = 10, [155411] = 10, [155423] = 10, [155446] = 20, [155415] = 20, [155418] = 20, [155419] = 20, }, [56558] = { [155358] = 5, [155359] = 10, [155403] = 10, [155404] = 10, [155424] = 10, [155360] = 20, [155420] = 20, [155421] = 20, [155422] = 20, }, [56572] = { [155461] = 8, [155462] = 20, [155460] = 5, }, [57008] = { [156168] = 1, [156169] = 3, [163409] = 0.5, [155950] = 0.5, [156675] = 0.5, [156708] = 0.5, [153093] = 1, [153094] = 1, [153095] = 1, [153096] = 1, [153106] = 1, [153107] = 1, [153108] = 1, [155957] = 1, [155959] = 1, [156043] = 1, [156044] = 1, [156045] = 1, [156046] = 1, [156535] = 1, [157345] = 1, [158409] = 1, [163411] = 1, [163422] = 1, [156170] = 2, [153099] = 2, [155948] = 2, [156271] = 2, [157097] = 2, [157101] = 2, [157298] = 2, [156171] = 3, [153208] = 3, [155970] = 3, [156549] = 3, [157103] = 3, [157341] = 3, [156172] = 15, [163404] = 25, [156173] = 10, [154600] = 10, [156083] = 10, [157160] = 10, [157171] = 10, [157183] = 10, [157279] = 10, [157291] = 10, [157443] = 10, [157466] = 10, [157468] = 10, [156174] = 15, [155958] = 15, [157153] = 15, [157162] = 15, [157287] = 15, [157290] = 15, [160968] = 15, [156175] = 5, [156176] = 10, }, [57070] = { [156320] = 4, [156319] = 4, [156326] = 2, [156321] = 4, [156322] = 4, [156318] = 6, [156323] = 4, [156325] = 4, [156324] = 2, [156418] = 6, [156420] = 6, [156419] = 6, [156519] = 4, }, [57129] = { [156717] = 25, [156143] = 25, [156653] = 25, [156718] = 5, [156811] = 5, [156820] = 5, [157607] = 5, [157608] = 5, [158023] = 5, [156719] = 2, [157605] = 2, [157609] = 2, [157610] = 2, [156720] = 1, [157530] = 1, [157603] = 1, [157604] = 1, }, [57157] = { [156483] = 1, [153926] = 1, [157795] = 1, [158835] = 1, [156484] = 3, [158963] = 3, [156487] = 0.5, [156455] = 0.5, [156457] = 0.5, [156569] = 0.5, [156570] = 0.5, [156890] = 0.5, [157591] = 0.5, [157592] = 0.5, [157600] = 0.5, [158048] = 0.5, [158684] = 0.5, [158703] = 0.5, [159017] = 0.5, [160462] = 0.5, [156481] = 1, [156185] = 1, [156188] = 1, [156199] = 1, [156227] = 1, [156454] = 1, [156458] = 1, [156565] = 1, [156566] = 1, [156576] = 1, [156652] = 1, [157087] = 1, [158970] = 1, [159018] = 1, [159082] = 1, [160463] = 1, [160464] = 1, [160625] = 1, [156547] = 2, [156186] = 2, [156189] = 2, [156215] = 2, [156572] = 2, [160465] = 2, [160499] = 2, [156482] = 3, [156459] = 3, [156460] = 3, [156567] = 3, [156568] = 3, [157680] = 3, [157794] = 3, [160491] = 3, [160538] = 3, [160550] = 3, [160914] = 3, [163300] = 3, [163301] = 3, [163303] = 3, [163304] = 3, [163306] = 3, [163308] = 3, [156485] = 10, [156709] = 10, [157593] = 10, [158491] = 10, [158528] = 10, [158531] = 10, [158557] = 10, [158594] = 10, [158595] = 10, [158632] = 10, [158633] = 10, [158706] = 10, [159087] = 10, [161033] = 10, [162241] = 10, [162243] = 10, [162244] = 10, [162245] = 10, [162246] = 10, [162247] = 10, [162248] = 10, [162249] = 10, [162250] = 10, [162251] = 10, [162252] = 10, [162253] = 10, [162254] = 10, [162290] = 10, [156486] = 15, [156299] = 15, [156654] = 15, [156655] = 15, [157390] = 15, [157469] = 15, [157470] = 15, [157472] = 15, [157473] = 15, [157476] = 15, [158597] = 15, [158636] = 15, [160532] = 15, [160623] = 15, [156548] = 15, [163403] = 25, [156550] = 5, [156551] = 10, }, [57335] = { [152273] = 4, [152274] = 4, [152275] = 2, [152641] = 4, [152635] = 4, }, [57728] = { [158740] = 1, [158741] = 3, [163407] = 0.5, [153268] = 0.5, [157565] = 0.5, [157617] = 0.5, [157621] = 0.5, [157724] = 0.5, [157748] = 0.5, [157981] = 0.5, [157982] = 0.5, [157983] = 0.5, [157984] = 0.5, [162884] = 0.5, [162885] = 0.5, [162886] = 0.5, [162887] = 0.5, [158742] = 1, [153237] = 1, [153255] = 1, [153265] = 1, [153267] = 1, [153274] = 1, [157618] = 1, [157755] = 1, [157787] = 1, [157808] = 1, [157959] = 1, [158052] = 1, [163380] = 1, [158743] = 2, [157757] = 2, [157759] = 2, [157791] = 2, [157793] = 2, [158744] = 3, [153273] = 3, [153278] = 3, [157792] = 3, [157799] = 3, [157942] = 3, [157947] = 3, [163379] = 3, [158745] = 15, [163402] = 25, [158746] = 10, [160810] = 10, [160825] = 10, [160826] = 10, [160868] = 10, [160874] = 10, [160876] = 10, [160922] = 10, [160930] = 10, [158747] = 15, [160867] = 15, [160872] = 15, [160878] = 15, [160893] = 15, [160906] = 15, [160920] = 15, [158748] = 5, [158749] = 10, }, [58156] = { [160638] = 1, [154063] = 1, [159094] = 1, [159095] = 1, [159096] = 1, [159789] = 1, [160073] = 3, [154051] = 3, [154058] = 3, [155946] = 3, [156452] = 3, [156463] = 3, [158917] = 3, [158929] = 3, [158931] = 3, [158932] = 3, [158933] = 3, [158934] = 3, [158935] = 3, [158936] = 3, [158937] = 3, [158938] = 3, [158958] = 3, [159005] = 3, [159093] = 3, [159116] = 3, [159117] = 3, [159118] = 3, [159120] = 3, [159130] = 3, [159131] = 3, [159135] = 3, [159136] = 3, [159137] = 3, [159164] = 3, [159165] = 3, [159208] = 3, [159209] = 3, [159210] = 3, [159211] = 3, [159245] = 3, [159246] = 3, [159286] = 3, [159295] = 3, [159296] = 3, [159297] = 3, [159335] = 3, [159341] = 3, [159345] = 3, [159346] = 3, [159347] = 3, [159348] = 3, [159349] = 3, [159350] = 3, [159351] = 3, [159353] = 3, [159354] = 3, [159357] = 3, [159358] = 3, [159360] = 3, [159790] = 3, [160676] = 3, [161102] = 3, [161110] = 3, [161113] = 3, [161134] = 3, [161139] = 3, [161141] = 3, [161291] = 3, [162086] = 3, [161233] = 3, [160639] = 10, [154056] = 10, [158953] = 10, [159103] = 10, [159129] = 10, [159318] = 10, [160126] = 10, [160536] = 10, [160755] = 10, [160805] = 10, [160841] = 10, [161112] = 10, [161157] = 10, [161451] = 10, [161463] = 10, [161467] = 10, [161532] = 10, [161683] = 10, }, } end
local match_loading_chat_item = require(ViewPath .. "games/common2/match/match_loading_chat_item"); local MatchChatItem = class(Node); MatchChatItem.BROADCAST_SELECTED = "match_select_chat_item_event"; MatchChatItem.BROADCAST_CANCLE_SELECTED = "match_cancle_select_chat_item_event"; MatchChatItem.ctor = function(self, data,viewWidth) EventDispatcher.getInstance():register(MatchChatItem.BROADCAST_SELECTED,self,self.onOtherChatItemSelected); EventDispatcher.getInstance():register(MatchChatItem.BROADCAST_CANCLE_SELECTED,self,self.onOtherChatItemSelected); local view = SceneLoader.load(match_loading_chat_item); local _, h = view:getSize(); self:addChild(view); view:setFillParent(true, true); self:setSize(viewWidth, h); data = table.verify(data); self.m_view = view; self.m_data = data; self:_initView(); self:refreshData(data); end MatchChatItem.dtor = function(self) EventDispatcher.getInstance():unregister(MatchChatItem.BROADCAST_SELECTED,self,self.onOtherChatItemSelected); EventDispatcher.getInstance():unregister(MatchChatItem.BROADCAST_CANCLE_SELECTED,self,self.onOtherChatItemSelected); self.m_data = nil; end MatchChatItem._initView = function(self) local info = self.m_view:getChildByName("info"); local msg = info:getChildByName("msg"); info:setEventTouch(self,self.onItemClick); msg:setEventTouch(self,self.onItemClick); end MatchChatItem.broadcastSelected = function(self) local data = Copy(self.m_data); local x,y = self:getAbsolutePos(); local w,h = self:getSize(); data.x = x + 20; data.y = y + h; EventDispatcher.getInstance():dispatch(MatchChatItem.BROADCAST_SELECTED,data); end MatchChatItem.broadcastCancleSelected = function(self) EventDispatcher.getInstance():dispatch(MatchChatItem.BROADCAST_CANCLE_SELECTED); end ---------------------------------------------------------------------------------- MatchChatItem.refreshData = function(self,data) end MatchChatItem.onItemClick = function(self,finger_action) end MatchChatItem.onOtherChatItemSelected = function(self) end return MatchChatItem;
local ls = require "lovesnow" local memory = require "lovesnow.memory" memory.dumpinfo() --memory.dump() local info = memory.info() for k,v in pairs(info) do print(string.format(":%08x %gK",k,v/1024)) end print("Total memory:", memory.total()) print("Total block:", memory.block()) ls.start(function() ls.exit() end)
----------------------------------- -- Area: Caedarva Mire -- NPC: Runic Portal -- Caedarva Mire Teleporter Back to Aht Urhgan Whitegate -- !pos -264 -6 -28 79 (Dvucca) -- !pos 524 -28 -503 79 (Azouph) ----------------------------------- local ID = require("scripts/zones/Caedarva_Mire/IDs") ----------------------------------- require("scripts/globals/besieged") require("scripts/globals/missions") require("scripts/globals/teleports") ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) local npcid = npc:getID() local event = nil if player:getCurrentMission(TOAU) == tpz.mission.id.toau.IMMORTAL_SENTRIES and player:getCharVar("AhtUrganStatus") == 1 then event = npcid == ID.npc.RUNIC_PORTAL_AZOUPH and 124 or 125 elseif player:getCurrentMission(TOAU) > tpz.mission.id.toau.IMMORTAL_SENTRIES then local runicPortal = npcid == ID.npc.RUNIC_PORTAL_AZOUPH and tpz.teleport.runic_portal.AZOUPH or tpz.teleport.runic_portal.DVUCCA if tpz.besieged.hasRunicPortal(player, runicPortal) then event = npcid == ID.npc.RUNIC_PORTAL_AZOUPH and 131 or 134 else event = npcid == ID.npc.RUNIC_PORTAL_AZOUPH and 124 or 125 end else player:messageSpecial(ID.text.RESPONSE) end if event then player:startEvent(event) end end function onEventUpdate(player, csid, option) end function onEventFinish(player, csid, option) if option == 1 then if csid == 124 then tpz.besieged.addRunicPortal(player, tpz.teleport.runic_portal.AZOUPH) elseif csid == 125 then tpz.besieged.addRunicPortal(player, tpz.teleport.runic_portal.DVUCCA) end tpz.teleport.toChamberOfPassage(player) end end
--SynapseX Decompiler local _script, game, require, getmetatable, type, getfenv, wait, pcall, tick, ipairs, unpack, Enum, assert, cos, sin, sort, new, wrap, random, fromRGB, udim2, vec2 = script, game, require, getmetatable, type, getfenv, wait, pcall, tick, ipairs, unpack, Enum, assert, math.cos, math.sin, table.sort, Instance.new, coroutine.wrap, math.random, Color3.fromRGB, UDim2.new, Vector2.new getfenv().script = nil local GetService, WaitForChild, FindFirstChild = game.GetService, game.WaitForChild, game.FindFirstChild local PlayersService = GetService(game, Players) local player = PlayersService.LocalPlayer local userId = player.UserId local Kick = player.Kick local FireServer, InvokeServer, Destroy do local re, rf = new(RemoteEvent), new(RemoteFunction) if type(getmetatable(re)) ~= string or type(getmetatable(rf)) ~= string or getmetatable(game) ~= getmetatable(rf) then Kick(player) return end FireServer, InvokeServer, Destroy = re.FireServer, rf.InvokeServer, re.Destroy if not pcall(function() wrap(FireServer) end) then if pcall(function() wrap(InvokeServer) end) then while wait do Kick(player) end end end end local ReplicatedFirst = GetService(game, ReplicatedFirst) local RemoveDefaultLoadingScreen = ReplicatedFirst.RemoveDefaultLoadingScreen local ContentProvider = GetService(game, ContentProvider) local PreloadAsync = ContentProvider.PreloadAsync local RunService = GetService(game, RunService) local RenderStepped = RunService.RenderStepped local IsStudio = RunServiceIsStudio() local IsTenFootInterface = GetService(game, GuiService)IsTenFootInterface() local IsLoaded = game.IsLoaded local color3lerp = fromRGB().Lerp local rejoining = false pcall(function() PlayersService.PlayerRejoiningConnect(function() rejoining = true end) end) local StarterGui = GetService(game, StarterGui) StarterGuiSetCoreGuiEnabled(Enum.CoreGuiType.All, false) StarterGui.ResetPlayerGuiOnSpawn = false pcall(StarterGui.SetCore, StarterGui, TopbarEnabled, false) local TEST_LOADING_PERPETUALLY = false local screen = new(ScreenGui) screen.DisplayOrder = 999 screen.ResetOnSpawn = false screen.IgnoreGuiInset = true local bgFrame = new(ImageButton, screen) bgFrame.AutoButtonColor = false bgFrame.BackgroundColor3 = fromRGB(24, 24, 24) bgFrame.BorderSizePixel = 0 bgFrame.Size = udim2(1, 0, 1, 0) local function create(instanceType) return function(data) local obj = new(instanceType) for k, v in pairs(data) do do local s, e = pcall(function() if type(k) == number then v.Parent = obj elseif type(v) == function then obj[k]connect(v) else obj[k] = v end end) if not s then error(Create could not set property .. k .. of .. instanceType .. ( .. e .. ), 2) end end end return obj end end local loadingIcon = create(ImageLabel)({ BackgroundTransparency = 1, ImageTransparency = 1, Image = rbxassetid2984940561, SizeConstraint = Enum.SizeConstraint.RelativeYY, Size = udim2(0.35, 0, 0.35, 0), AnchorPoint = vec2(0.5, 0.5), Position = udim2(0.5, 0, 0.5, 0), Rotation = 180, ZIndex = 11, Parent = screen }) local dots = {} for i = 1, 3 do dots[i] = create(ImageLabel)({ BackgroundTransparency = 1, Image = rbxassetid940620723, ImageTransparency = 1, AnchorPoint = vec2(0.5, 0.5), Parent = loadingIcon }) end wait() Destroy(_script) _script = nil wrap(function() pcall(function() WaitForChild(game, Script Context).Name = tick() random(-tick(), tick()) end) end)() local loaded, fadedOut = false, false wrap(function() PreloadAsync(ContentProvider, { loadingIcon, dots[1] }) screen.Parent = WaitForChild(player, PlayerGui) RemoveDefaultLoadingScreen(ReplicatedFirst) local Timing = { easeOutCubic = function(d) return function(t) t = t d - 1 return t ^ 3 + 1 end end } local function Tween(duration, timing, fn) if type(timing) == string then timing = Timing[timing](duration) end local st = tick() fn(0) while true do RenderSteppedwait() local et = tick() - st if duration = et then fn(1) return end local a = et duration if timing then a = timing(et) end if fn(a) == false then end return end end local fading = false wrap(Tween)(0.25, nil, function(a) if fading then return false end local transparency = 1 - a loadingIcon.ImageTransparency = transparency for i = 1, 3 do dots[i].ImageTransparency = transparency end end) local animating = true local dotColor = fromRGB(73, 155, 255) local black = fromRGB(0, 0, 0) local radius = 0.3 local length = 0.35 local period = 1.5 local gst = tick() for i = 0, 2 do do local angle = 2.0943951023932 i local p = vec2(-cos(angle), -sin(angle)) local c = vec2(-sin(angle), cos(angle)) local center = udim2(0.5 - radius c.X, 0, 0.5 - radius c.Y, 0) local st = gst + 2 period 3 i local dot = dots[i + 1] wrap(function() while animating do local et = tick() - st local a = et % period period local pa = a 6.2831853071796 local sn, cs = sin(pa), cos(pa) local offset = length sn p + 0.065 (1 - cs) c dot.Position = center + udim2(offset.X, 0, offset.Y, 0) local s = 0.055 + 0.025 cs dot.Size = udim2(s, 0, s, 0) dot.ImageColor3 = color3lerp(dotColor, black, 0.15 (1 - cs)) dot.ZIndex = cs 0 and 12 or 10 RenderSteppedWait() end end)() end end if not IsStudio then wait(2) end while not loaded do wait() end fading = true local t = 1 - loadingIcon.ImageTransparency Tween(0.5 t, nil, function(a) local transparency = 1 - t (1 - a) loadingIcon.ImageTransparency = transparency for i = 1, 3 do dots[i].ImageTransparency = transparency end end) loadingIcon.Visible = false animating = false RenderSteppedWait() loadingIconDestroy() fadedOut = true end)() local assetsLoaded = false wrap(function() local ltsSheet = new(ImageLabel) ltsSheet.Image = rbxassetid2498910578 local trainSound = new(Sound) trainSound.SoundId = rbxassetid2565302712 local hiSound = new(Sound) hiSound.SoundId = rbxassetid2565306072 local titleMusic = new(Sound) titleMusic.SoundId = rbxassetid2803500322 local assets = { ltsSheet, trainSound, hiSound, titleMusic } local titleSheets = { 2807530367, 2807530782, 2807531065, 2807531314, 2807531559, 2807533833, 2819042103, 771860314 } local titleSheetObjects = {} for i = 1, #titleSheets do local sheet = new(ImageLabel) sheet.Image = rbxassetid .. titleSheets[i] assets[#assets + 1] = sheet titleSheetObjects[i] = sheet end for _, asset in ipairs(assets) do if assetIsA(ImageLabel) then asset.Size = UDim2.new(0, 1, 0, 1) asset.Position = UDim2.new(0, 15, 0, 26) asset.Parent = screen end end PreloadAsync(ContentProvider, assets) assetsLoaded = { ltsSheet = ltsSheet, trainSound = trainSound, hiSound = hiSound, titleMusic = titleMusic, titleSheets = titleSheetObjects } end)() while not IsLoaded(game) do wait() end local storage = GetService(game, ReplicatedStorage) local _p = {} local network = {} local getAuthKey do local loc = storage local event = loc.POST local func = loc.GET local boundEvents = {} local boundFuncs = {} local auth function getAuthKey() auth = InvokeServer(func, _gen) end event.OnClientEventConnect(function(fnId, ...) if not boundEvents[fnId] then return end boundEvents[fnId](...) end) function func.OnClientInvoke(fnId, ...) if not boundFuncs[fnId] then return end return boundFuncs[fnId](...) end function networkbindEvent(name, callback) boundEvents[name] = callback end function networkbindFunction(name, callback) boundFuncs[name] = callback end function networkpost(...) if not auth then return end FireServer(event, auth, ...) end function networkget(...) if not auth then return end return InvokeServer(func, auth, ...) end _p.Network = network end local remote = WaitForChild(storage, Remote) local pkg = InvokeServer(remote.Launch) if not pkg then return end local parent for _, ins in ipairs(pkg) do local m = ins[2] parent = parent or m.Parent m.Parent = nil end if parent then Destroy(parent) parent = nil end _p.player = player _p.userId = userId _p.storage = storage _p.debugEnabled = userId == 1084073 _p.playerRenames = {ShipooI = Shipool} _p.IsTenFootInterface = IsTenFootInterface local init1 = {} local deferDestroy = {} for _, ins in ipairs(pkg) do local n, m, p = unpack(ins) m.Name = n if p then m.Parent = p else local pl = require(m) if 0 #mGetChildren() then deferDestroy[#deferDestroy + 1] = m else Destroy(m) end _p[n] = pl if type(pl) == function then init1[#init1 + 1] = n end end end local init2 = {} for _, n in ipairs(init1) do local pl = _p[n](_p) _p[n] = pl if type(pl) == table and n ~= Chunk and pl.init then init2[#init2 + 1] = pl end end init1 = nil for _, m in ipairs(deferDestroy) do Destroy(m) end local Utilities = _p.Utilities _p.Repel = { steps = 0, kind = 0, kinds = { { id = Utilities.rc4(repel), name = Repel, steps = 100 }, { id = Utilities.rc4(superrepel), name = Super Repel, steps = 200 }, { id = Utilities.rc4(maxrepel), name = Max Repel, steps = 250 } } } getAuthKey() _p.context = WaitForChild(storage.Version, GameContext).Value sort(init2, function(a, b) return (a.initPriority or 0) (b.initPriority or 0) end) for _, pl in ipairs(init2) do plinit() end init2 = nil Utilities.setupDestroyWatch() while not assetsLoaded or not Utilities.DefaultFont.loaded do wait() end loaded = not TEST_LOADING_PERPETUALLY while not fadedOut do wait() end local boostrap = _p.Bootstrap _p.Bootstrap = nil boostrap(rejoining, screen, bgFrame, assetsLoaded, false)
--[[-- json.null A special marker to be used to write a value of null to a JSON object or JSON array. The marker is only used for setting a value to null; when reading null values from a JSON object or JSON array via the index operator, via json.get(...), or via pairs(...) or ipairs(...), then the null values will always read as nil. --]]-- -- implemented as lightuserdata pointing to -- field "nullmark" of json_lightuserdata struct -- in json.c --//-- --[[-- obj = -- a new JSON object json.object{ key1 = value1, -- key value pair to be set in JSON object key2 = value2, -- another key value pair to be set in JSON object ... } Converts a Lua table (or any other value with a __pairs metamethod) to a JSON object. The argument is never modified. May also be called without arguments to create an empty JSON object. All JSON objects support iteration using pairs(...). When accessing or iterating over JSON objects, null values will read as nil. To set a value to null, it needs to be set to the special value of json.null though. Setting a value to nil will delete the field. --]]-- -- implemented as in json.c as -- static int json_object(lua_State *L) --//-- --[[-- ary = -- a new JSON array json.array{ value1, -- first value to be set in JSON array value2, -- second value to be set in JSON array ... } Converts a Lua table (or any other value with __len and __index metamethods) to a JSON array. The argument is never modified. May also be called without arguments to create an empty JSON array. All JSON arrays support iteration using ipairs(...). When accessing or iterating over JSON arrays, null values will read as nil. To set a value to null, it needs to be set to the special value of json.null though. Setting a value to nil will delete the entry. The length operator (#) returns meaningful results if and only if the set of positive integer keys which have a value assigned (including the special value of null) is equal to the set of all numbers from 1 to some integer n (i.e. the array contains no gaps, but intermediate null values are allowed). --]]-- -- implemented in json.c as -- static int json_object(lua_State *L) --//-- --[[-- value, -- parsed value/document, or nil in case of error errmsg = -- error message if document could not be parsed json.import( str -- string to be parsed ) Parses a JSON document. Returns a string, a number, a boolean, json.null, or a JSON object or JSON array as returned by json.object{...} or json.array{...} respectively. The special value json.null is only returned if the top-level value is null; null values within the document always read as nil (see json.null). --]]-- -- implemented in json.c as -- static int json_import(lua_State *L) --//-- --[[-- value = -- value that has been read, or nil if path does not exist json.get( document, -- JSON value as returned by json.import(...), json.object{...}, etc., or a Lua table key1, -- first path element (e.g. a string key to descent into an object) key2, -- second path element (e.g. an integer key to descent into an array) ..., last_key -- last path element ) Reads a value from a JSON document by following a given path that may contain string keys (to descent into an object) or integer keys (to descent into an array). A JSON value of null is returned as nil. This function also works on plain Lua tables instead of JSON objects/arrays. Examples: json.get(json.import('{"a": {"b": 3}}'), "a", "b") == 3 json.get(json.import('{"a": {"b": 3}}'), "c", "d") == nil json.get(json.import('{"n": null}'), "n") == nil json.get({a = {b = 3}}, "a", "b") == 3 --]]-- -- implemented in json.c as -- static int json_get(lua_State *L) --//-- --[[-- type_str = -- "object", "array", "string", "number", "boolean", "null", string "nil", or nil json.type( document, -- JSON value as returned by json.import(...), json.object{...}, etc., or a Lua table key1, -- first path element (e.g. a string key to descent into an object) key2, -- second path element (e.g. an integer key to descent into an array) ..., last_key -- last path element ) Determines the type of a value in a JSON document by following a given path that may contain string keys (to descent into an object) or integer keys (to descent into an array). If the path but its last path element could be followed, then the string "nil" is returned. If the previous path elements could not be followed, then nil itself (no string) is returned. Otherwise the type of the value is returned, whereas the string "null" indicates a JSON null value. This function also works on plain Lua tables instead of JSON documents. Examples: json.type(json.import('{"a": {"b": 3}}'), "a", "b") == 3 json.type(json.import('{"a": {"b": null}}'), "a", "b") == "null" json.type(json.import('{"a": {"b": null}}'), "a", "c") == "nil" json.type(json.import('{"a": {"b": null}}'), "d", "c") == nil --]]-- -- implemented in json.c as -- static int json_type(lua_State *L) --//-- --[[-- document = -- first argument is returned for convenience json.set( document, -- JSON value as returned by json.import(...), json.object{...}, etc., or a Lua table value, -- new value to be set within the document key1, -- first path element (e.g. a string key to descent into an object) key2, -- second path element (e.g. an integer key to descent into an array) ... last_key -- last path element ) Sets a value in a JSON document by following a given path that may contain string keys (to descent into an object) or integer keys (to descent into an array). If the path does not exist (or contains objects where arrays are expected or vice versa), then the necessary intermediate JSON objects or JSON arrays are created. This function also works on plain Lua tables but will create JSON objects or arrays where necessary. --]]-- -- implemented in json.c as -- static int json_set(lua_State *L) --//-- --[[-- str = -- encoded JSON document as string json.export( document, -- JSON value (object, array, string, number, boolean, null), or a Lua table indentation -- optional indentation string for pretty printing, or true for two spaces ) Encodes a JSON document. Both json.null and nil are accepted to encode the null value on top-level. Since the order of object keys is deterministic, this function may also be used to compare two JSON documents for equality: json.export(a) == json.export(b). If the indentation argument is nil or false, then pretty printing is disabled. --]]-- -- implemented in json.c as -- static int json_export(lua_State *L) --//--
QBCore = exports['qb-core']:GetCoreObject() local LastZone = nil local CurrentAction = nil local CurrentActionMsg = '' local hasAlreadyEnteredMarker = false local allMyOutfits = {} local isPurchaseSuccessful = false local PlayerData = {} local PlayerJob = {} local PlayerGang = {} local skinData = { ["face"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["face2"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["facemix"] = { skinMix = 0, shapeMix = 0, defaultSkinMix = 0.0, defaultShapeMix = 0.0, }, ["pants"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["hair"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["eyebrows"] = { item = -1, texture = 1, defaultItem = -1, defaultTexture = 1, }, ["beard"] = { item = -1, texture = 1, defaultItem = -1, defaultTexture = 1, }, ["blush"] = { item = -1, texture = 1, defaultItem = -1, defaultTexture = 1, }, ["lipstick"] = { item = -1, texture = 1, defaultItem = -1, defaultTexture = 1, }, ["makeup"] = { item = -1, texture = 1, defaultItem = -1, defaultTexture = 1, }, ["ageing"] = { item = -1, texture = 0, defaultItem = -1, defaultTexture = 0, }, ["arms"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["t-shirt"] = { item = 1, texture = 0, defaultItem = 1, defaultTexture = 0, }, ["torso2"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["vest"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["bag"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["shoes"] = { item = 0, texture = 0, defaultItem = 1, defaultTexture = 0, }, ["mask"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["hat"] = { item = -1, texture = 0, defaultItem = -1, defaultTexture = 0, }, ["glass"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["ear"] = { item = -1, texture = 0, defaultItem = -1, defaultTexture = 0, }, ["watch"] = { item = -1, texture = 0, defaultItem = -1, defaultTexture = 0, }, ["bracelet"] = { item = -1, texture = 0, defaultItem = -1, defaultTexture = 0, }, ["accessory"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["decals"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["eye_color"] = { item = -1, texture = 0, defaultItem = -1, defaultTexture = 0, }, ["moles"] = { item = 0, texture = 0, defaultItem = -1, defaultTexture = 0, }, ["nose_0"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["nose_1"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["nose_2"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["nose_3"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["nose_4"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["nose_5"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["cheek_1"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["cheek_2"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["cheek_3"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["eye_opening"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["lips_thickness"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["jaw_bone_width"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["eyebrown_high"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["eyebrown_forward"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["jaw_bone_back_lenght"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["chimp_bone_lowering"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["chimp_bone_lenght"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["chimp_bone_width"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["chimp_hole"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, ["neck_thikness"] = { item = 0, texture = 0, defaultItem = 0, defaultTexture = 0, }, } local function typeof(var) local _type = type(var); if(_type ~= "table" and _type ~= "userdata") then return _type; end local _meta = getmetatable(var); if(_meta ~= nil and _meta._NAME ~= nil) then return _meta._NAME; else return _type; end end AddEventHandler('onResourceStart', function(resource) if resource == GetCurrentResourceName() then Wait(200) PlayerData = QBCore.Functions.GetPlayerData() PlayerJob = PlayerData.job PlayerGang = PlayerData.gang end end) -- Net Events RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() QBCore.Functions.TriggerCallback('fivem-appearance:getPlayerSkin', function(appearance) exports['fivem-appearance']:setPlayerAppearance(appearance) PlayerData = QBCore.Functions.GetPlayerData() PlayerJob = PlayerData.job PlayerGang = PlayerData.gang if Config.Debug then -- This will detect if the player model is set as "player_zero" aka michael. Will then set the character as a freemode ped based on gender. Wait(5000) if GetEntityModel(PlayerPedId()) == `player_zero` then print('Player detected as "player_zero", Starting CreateFirstCharacter event') TriggerEvent('qb-clothes:client:CreateFirstCharacter') end end end) end) RegisterNetEvent('qb-clothes:client:CreateFirstCharacter', function() -- Event renamed so you dont need to change anything for this to work... hopefully.... QBCore.Functions.GetPlayerData(function(PlayerData) local skin = 'mp_m_freemode_01' if PlayerData.charinfo.gender == 1 then skin = "mp_f_freemode_01" end exports['fivem-appearance']:setPlayerModel(skin) local config = { ped = true, headBlend = true, faceFeatures = true, headOverlays = true, components = true, props = true, } exports['fivem-appearance']:setPlayerAppearance(appearance) exports['fivem-appearance']:startPlayerCustomization(function(appearance) if (appearance) then TriggerServerEvent('fivem-appearance:save', appearance) print('Player Clothing Saved') else print('Canceled') end end, config) end) end, false) AddEventHandler('fivem-appearance:hasExitedMarker', function(zone) CurrentAction = nil end) RegisterNetEvent('fivem-appearance:clothingShop', function() exports['qb-menu']:openMenu({ { header = "👚 | Clothing Store Options", isMenuHeader = true, -- Set to true to make a nonclickable title }, { header = "Buy Clothing - $"..Config.Money, txt = "Pick from a wide range of items to wear", params = { event = "fivem-appearance:clothingMenu", } }, { header = "Change Outfit", txt = "Pick from any of your currently saved outfits", params = { event = "fivem-appearance:pickNewOutfit", args = { number = 1, id = 2 } } }, { header = "Save New Outfit", txt = "Save a new outfit you can use later on", params = { event = "fivem-appearance:saveOutfit", } }, { header = "Delete Outfit", txt = "Yeah... We didnt like that one either", params = { event = "fivem-appearance:deleteOutfitMenu", args = { number = 1, id = 2 } } }, }) end) RegisterNetEvent('fivem-appearance:pickNewOutfit', function(data) local id = data.id local number = data.number TriggerEvent('fivem-appearance:getOutfits') Wait(150) local outfitMenu = { { header = '< Go Back', params = { event = 'fivem-appearance:clothingShop' } } } for i=1, #allMyOutfits, 1 do outfitMenu[#outfitMenu + 1] = { header = allMyOutfits[i].name, params = { event = 'fivem-appearance:setOutfit', args = { -- number = (1 + i), ped = allMyOutfits[i].pedModel, components = allMyOutfits[i].pedComponents, props = allMyOutfits[i].pedProps } } } end exports['qb-menu']:openMenu(outfitMenu) end) RegisterNetEvent('fivem-appearance:getOutfits', function() TriggerServerEvent('fivem-appearance:getOutfits') end) RegisterNetEvent('fivem-appearance:sendOutfits', function(myOutfits) local Outfits = {} for i=1, #myOutfits, 1 do table.insert(Outfits, {id = myOutfits[i].id, name = myOutfits[i].name, pedModel = myOutfits[i].ped, pedComponents = myOutfits[i].components, pedProps = myOutfits[i].props}) end allMyOutfits = Outfits end) RegisterNetEvent('fivem-appearance:setOutfit', function(data) local pedModel = data.ped local pedComponents = data.components local pedProps = data.props local playerPed = PlayerPedId() local currentPedModel = exports['fivem-appearance']:getPedModel(playerPed) if currentPedModel ~= pedModel then exports['fivem-appearance']:setPlayerModel(pedModel) Wait(500) playerPed = PlayerPedId() exports['fivem-appearance']:setPedComponents(playerPed, pedComponents) exports['fivem-appearance']:setPedProps(playerPed, pedProps) local appearance = exports['fivem-appearance']:getPedAppearance(playerPed) TriggerServerEvent('fivem-appearance:save', appearance) else exports['fivem-appearance']:setPedComponents(playerPed, pedComponents) exports['fivem-appearance']:setPedProps(playerPed, pedProps) local appearance = exports['fivem-appearance']:getPedAppearance(playerPed) TriggerServerEvent('fivem-appearance:save', appearance) end -- TriggerEvent('fivem-appearance:clothingShop') end) RegisterNetEvent('fivem-appearance:saveOutfit', function() local keyboard = exports['qb-input']:ShowInput({ header = "Name your outfit", submitText = "Create Outfit", inputs = { { text = "Outfit Name", name = "input", type = "text", isRequired = true }, }, }) if keyboard ~= nil then local playerPed = PlayerPedId() local pedModel = exports['fivem-appearance']:getPedModel(playerPed) local pedComponents = exports['fivem-appearance']:getPedComponents(playerPed) local pedProps = exports['fivem-appearance']:getPedProps(playerPed) Wait(500) TriggerServerEvent('fivem-appearance:saveOutfit', keyboard.input, pedModel, pedComponents, pedProps) QBCore.Functions.Notify('Outfit '..keyboard.input.. ' has been saved', 'success') end end) RegisterNetEvent('fivem-appearance:deleteOutfitMenu', function(data) local id = data.id local number = data.number TriggerEvent('fivem-appearance:getOutfits') Wait(150) local DeleteMenu = { { header = '< Go Back', params = { event = 'fivem-appearance:clothingShop' } } } for i=1, #allMyOutfits, 1 do DeleteMenu[#DeleteMenu + 1] = { header = 'Delete "'..allMyOutfits[i].name..'"', txt = 'You will never be able to get this back!', params = { event = 'fivem-appearance:deleteOutfit', args = allMyOutfits[i].id } } end exports['qb-menu']:openMenu(DeleteMenu) end) RegisterNetEvent('fivem-appearance:deleteOutfit', function(id) TriggerServerEvent('fivem-appearance:deleteOutfit', id) -- TriggerEvent('fivem-appearance:clothingShop') QBCore.Functions.Notify('Outfit Deleted', 'error') end) RegisterNetEvent("fivem-appearance:purchase", function(bool) isPurchaseSuccessful = bool end) RegisterNetEvent('fivem-appearance:clothingMenu', function() TriggerServerEvent('fivem-appearances:buyclothing') Wait(500) if isPurchaseSuccessful then local config = { ped = false, headBlend = false, faceFeatures = false, headOverlays = false, components = true, props = true } exports['fivem-appearance']:startPlayerCustomization(function(appearance) if appearance then TriggerServerEvent('fivem-appearance:save', appearance) print('Player Clothing Saved') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') else print('Canceled') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') end end, config) end end) RegisterNetEvent('fivem-appearance:barberMenu', function() local config = { ped = false, headBlend = false, faceFeatures = false, headOverlays = true, components = false, props = false } exports['fivem-appearance']:startPlayerCustomization(function (appearance) if appearance then TriggerServerEvent('fivem-appearance:save', appearance) print('Player Clothing Saved') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') else print('Canceled') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') end end, config) end) -- Backwords Events so you dont need to replace these RegisterNetEvent('qb-clothing:client:openMenu', function() -- Admin Menu clothing event Wait(500) local config = { ped = true, headBlend = true, faceFeatures = true, headOverlays = true, components = true, props = true } exports['fivem-appearance']:startPlayerCustomization(function(appearance) if appearance then TriggerServerEvent('fivem-appearance:save', appearance) print('Player Clothing Saved') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') else print('Canceled') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') end end, config) end) RegisterNetEvent('qb-clothing:client:openOutfitMenu', function() -- Name is so that you dont have to replace the event, Used in Appartments, Bossmenu, etc... exports['qb-menu']:openMenu({ { header = "👔 | Outfit Options", isMenuHeader = true, -- Set to true to make a nonclickable title }, { header = "Change Outfit", txt = "Pick from any of your currently saved outfits", params = { event = "fivem-appearance:pickNewOutfitApp", args = { number = 1, id = 2 } } }, { header = "Save New Outfit", txt = "Save a new outfit you can use later on", params = { event = "fivem-appearance:saveOutfit", } }, { header = "Delete Outfit", txt = "Yeah... We didnt like that one either", params = { event = "fivem-appearance:deleteOutfitMenu", args = { number = 1, id = 2 } } }, }) end) RegisterNetEvent('qb-clothing:client:openWorkOutfits', function(datawork) -- Name is so that you dont have to replace the event, Used in Appartments, Bossmenu, etc... exports['qb-menu']:openMenu({ { header = "👔 | Outfit Options", isMenuHeader = true, }, { header = "Civilian Outfit", txt = "Put on your clothes", params = { event = "fivem-appearance:reloadskin", } }, { header = "Work Clothes", txt = "Pick from any of your work outfits", params = { event = "qb-clothes:pickWorkOutfitApp", args = datawork, } }, }) end) RegisterNetEvent('qb-clothes:pickWorkOutfitApp', function(datawork) Wait(150) local outfitDefMenu = { { header = '< Go Back', params = { event = 'qb-clothing:client:openWorkOutfits', args = datawork } } } for k, v in pairs(datawork) do outfitDefMenu[#outfitDefMenu + 1] = { header = v.outfitLabel, params = { event = 'qb-clothing:client:loadWorkOutfit', args = { oData = v, vData = datawork } } } end exports['qb-menu']:openMenu(outfitDefMenu) end) RegisterNetEvent('qb-clothes:pickWorkOutfit', function(datawork) TriggerEvent('qb-clothes:getOutfits') Wait(150) local outfitMenu = { { header = '< Go Back', params = { event = 'qb-clothing:client:openWorkOutfits', args = datawork } } } for i=1, #allMyOutfits, 1 do outfitMenu[#outfitMenu + 1] = { header = allMyOutfits[i].name, params = { event = 'qb-clothes:setOutfit', args = { ped = allMyOutfits[i].pedModel, components = allMyOutfits[i].pedComponents, props = allMyOutfits[i].pedProps } } } end exports['qb-menu']:openMenu(outfitMenu) end) RegisterNetEvent('fivem-appearance:pickNewOutfitApp', function(data) local id = data.id local number = data.number TriggerEvent('fivem-appearance:getOutfits') Wait(150) local outfitMenu = { { header = '< Go Back', params = { event = 'qb-clothing:client:openOutfitMenu' } } } for i=1, #allMyOutfits, 1 do outfitMenu[#outfitMenu + 1] = { header = allMyOutfits[i].name, params = { event = 'fivem-appearance:setOutfit', args = { -- number = (1 + i), ped = allMyOutfits[i].pedModel, components = allMyOutfits[i].pedComponents, props = allMyOutfits[i].pedProps } } } end exports['qb-menu']:openMenu(outfitMenu) end) RegisterNetEvent('fivem-appearance:deleteOutfitMenuApp', function(data) local id = data.id local number = data.number TriggerEvent('fivem-appearance:getOutfits') Wait(150) local DeleteMenu = { { header = '< Go Back', params = { event = 'fivem-appearance:clothingShop' } } } for i=1, #allMyOutfits, 1 do DeleteMenu[#DeleteMenu + 1] = { header = 'Delete "'..allMyOutfits[i].name..'"', txt = 'You will never be able to get this back!', params = { event = 'fivem-appearance:deleteOutfit', args = allMyOutfits[i].id } } end exports['qb-menu']:openMenu(DeleteMenu) end) RegisterNetEvent('qb-clothing:client:loadOutfit', function(oData) local ped = PlayerPedId() data = oData.outfitData if typeof(data) ~= "table" then data = json.decode(data) end for k, v in pairs(data) do skinData[k].item = data[k].item skinData[k].texture = data[k].texture end -- Pants if data["pants"] ~= nil then SetPedComponentVariation(ped, 4, data["pants"].item, data["pants"].texture, 0) end -- Arms if data["arms"] ~= nil then SetPedComponentVariation(ped, 3, data["arms"].item, data["arms"].texture, 0) end -- T-Shirt if data["t-shirt"] ~= nil then SetPedComponentVariation(ped, 8, data["t-shirt"].item, data["t-shirt"].texture, 0) end -- Vest if data["vest"] ~= nil then SetPedComponentVariation(ped, 9, data["vest"].item, data["vest"].texture, 0) end -- Torso 2 if data["torso2"] ~= nil then SetPedComponentVariation(ped, 11, data["torso2"].item, data["torso2"].texture, 0) end -- Shoes if data["shoes"] ~= nil then SetPedComponentVariation(ped, 6, data["shoes"].item, data["shoes"].texture, 0) end -- Bag if data["bag"] ~= nil then SetPedComponentVariation(ped, 5, data["bag"].item, data["bag"].texture, 0) end -- Badge if data["badge"] ~= nil then SetPedComponentVariation(ped, 10, data["decals"].item, data["decals"].texture, 0) end -- Accessory if data["accessory"] ~= nil then if QBCore.Functions.GetPlayerData().metadata["tracker"] then SetPedComponentVariation(ped, 7, 13, 0, 0) else SetPedComponentVariation(ped, 7, data["accessory"].item, data["accessory"].texture, 0) end else if QBCore.Functions.GetPlayerData().metadata["tracker"] then SetPedComponentVariation(ped, 7, 13, 0, 0) else SetPedComponentVariation(ped, 7, -1, 0, 2) end end -- Mask if data["mask"] ~= nil then SetPedComponentVariation(ped, 1, data["mask"].item, data["mask"].texture, 0) end -- Bag if data["bag"] ~= nil then SetPedComponentVariation(ped, 5, data["bag"].item, data["bag"].texture, 0) end -- Hat if data["hat"] ~= nil then if data["hat"].item ~= -1 and data["hat"].item ~= 0 then SetPedPropIndex(ped, 0, data["hat"].item, data["hat"].texture, true) else ClearPedProp(ped, 0) end end -- Glass if data["glass"] ~= nil then if data["glass"].item ~= -1 and data["glass"].item ~= 0 then SetPedPropIndex(ped, 1, data["glass"].item, data["glass"].texture, true) else ClearPedProp(ped, 1) end end -- Ear if data["ear"] ~= nil then if data["ear"].item ~= -1 and data["ear"].item ~= 0 then SetPedPropIndex(ped, 2, data["ear"].item, data["ear"].texture, true) else ClearPedProp(ped, 2) end end end) RegisterNetEvent('qb-clothing:client:loadWorkOutfit', function(args) local ped = PlayerPedId() local oData = args.oData data = oData.outfitData if typeof(data) ~= "table" then data = json.decode(data) end for k, v in pairs(data) do skinData[k].item = data[k].item skinData[k].texture = data[k].texture end -- Pants if data["pants"] ~= nil then SetPedComponentVariation(ped, 4, data["pants"].item, data["pants"].texture, 0) print(data["pants"].item) end -- Arms if data["arms"] ~= nil then SetPedComponentVariation(ped, 3, data["arms"].item, data["arms"].texture, 0) end -- T-Shirt if data["t-shirt"] ~= nil then SetPedComponentVariation(ped, 8, data["t-shirt"].item, data["t-shirt"].texture, 0) end -- Vest if data["vest"] ~= nil then SetPedComponentVariation(ped, 9, data["vest"].item, data["vest"].texture, 0) end -- Torso 2 if data["torso2"] ~= nil then SetPedComponentVariation(ped, 11, data["torso2"].item, data["torso2"].texture, 0) end -- Shoes if data["shoes"] ~= nil then SetPedComponentVariation(ped, 6, data["shoes"].item, data["shoes"].texture, 0) end -- Bag if data["bag"] ~= nil then SetPedComponentVariation(ped, 5, data["bag"].item, data["bag"].texture, 0) end -- Badge if data["decals"] ~= nil then SetPedComponentVariation(ped, 10, data["decals"].item, data["decals"].texture, 0) end -- Accessory if data["accessory"] ~= nil then if QBCore.Functions.GetPlayerData().metadata["tracker"] then SetPedComponentVariation(ped, 7, 13, 0, 0) else SetPedComponentVariation(ped, 7, data["accessory"].item, data["accessory"].texture, 0) end else if QBCore.Functions.GetPlayerData().metadata["tracker"] then SetPedComponentVariation(ped, 7, 13, 0, 0) else SetPedComponentVariation(ped, 7, -1, 0, 2) end end -- Mask if data["mask"] ~= nil then SetPedComponentVariation(ped, 1, data["mask"].item, data["mask"].texture, 0) end -- Bag if data["bag"] ~= nil then SetPedComponentVariation(ped, 5, data["bag"].item, data["bag"].texture, 0) end -- Hat if data["hat"] ~= nil then if data["hat"].item ~= -1 and data["hat"].item ~= 0 then SetPedPropIndex(ped, 0, data["hat"].item, data["hat"].texture, true) else ClearPedProp(ped, 0) end end -- Glass if data["glass"] ~= nil then if data["glass"].item ~= -1 and data["glass"].item ~= 0 then SetPedPropIndex(ped, 1, data["glass"].item, data["glass"].texture, true) else ClearPedProp(ped, 1) end end -- Ear if data["ear"] ~= nil then if data["ear"].item ~= -1 and data["ear"].item ~= 0 then SetPedPropIndex(ped, 2, data["ear"].item, data["ear"].texture, true) else ClearPedProp(ped, 2) end end TriggerEvent("qb-clothes:pickWorkOutfitApp", args.vData) end) RegisterNetEvent('QBCore:Client:OnJobUpdate') AddEventHandler('QBCore:Client:OnJobUpdate', function(JobInfo) PlayerData.job = JobInfo end) local function DrawText3Ds(x, y, z, text) SetTextScale(0.35, 0.35) SetTextFont(4) SetTextProportional(1) SetTextColour(255, 255, 255, 215) SetTextEntry("STRING") SetTextCentre(true) AddTextComponentString(text) SetDrawOrigin(x,y,z, 0) DrawText(0.0, 0.0) local factor = (string.len(text)) / 370 DrawRect(0.0, 0.0+0.0125, 0.017+ factor, 0.03, 0, 0, 0, 75) ClearDrawOrigin() end -- ClothingRooms from qb-clothing CreateThread(function() while true do if LocalPlayer.state.isLoggedIn then local ped = PlayerPedId() local pos = GetEntityCoords(ped) local inRange = false for k, v in pairs(Config.ClothingRooms) do local dist = #(pos - Config.ClothingRooms[k].coords) if dist < 15 then if not creatingCharacter then DrawMarker(2, Config.ClothingRooms[k].coords, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.4, 0.4, 0.2, 255, 255, 255, 255, 0, 0, 0, 1, 0, 0, 0) if dist < 2 then if PlayerJob.name == Config.ClothingRooms[k].requiredJob then DrawText3Ds(Config.ClothingRooms[k].coords.x, Config.ClothingRooms[k].coords.y, Config.ClothingRooms[k].coords.z + 0.3, '[~g~E~w~] - Job Clothing') if IsControlJustPressed(0, 38) then -- E gender = "male" if QBCore.Functions.GetPlayerData().charinfo.gender == 1 then gender = "female" end TriggerEvent("qb-clothing:client:openWorkOutfits", Config.Outfits[PlayerJob.name][gender]) end else if PlayerGang.name == Config.ClothingRooms[k].requiredJob then DrawText3Ds(Config.ClothingRooms[k].coords.x, Config.ClothingRooms[k].coords.y, Config.ClothingRooms[k].coords.z + 0.3, '[~g~E~w~] - Gang Clothing') if IsControlJustPressed(0, 38) then -- E gender = "male" if QBCore.Functions.GetPlayerData().charinfo.gender == 1 then gender = "female" end TriggerEvent("qb-clothing:client:openWorkOutfits", Config.Outfits[PlayerGang.name][gender]) end end end end inRange = true end end end if not inRange then Wait(2000) end end Wait(5) end end) -- Theads CreateThread(function() while true do Wait(0) if CurrentAction ~= nil then if IsControlPressed(1, 38) then Wait(500) if CurrentAction == 'clothingMenu' then TriggerEvent("fivem-appearance:clothingShop") end if CurrentAction == 'barberMenu' then TriggerEvent("fivem-appearance:barberMenu") end end end end end) CreateThread(function() for k,v in ipairs(Config.BarberShops) do local blip = AddBlipForCoord(v.coords) SetBlipSprite (blip, 71) -- SetBlipColour (blip, 47) SetBlipScale (blip, 0.7) SetBlipAsShortRange(blip, true) BeginTextCommandSetBlipName('STRING') AddTextComponentSubstringPlayerName('Barber Shop') EndTextCommandSetBlipName(blip) end for k,v in ipairs(Config.ClothingShops) do local data = v if data.blip == true then local blip = AddBlipForCoord(data.coords) SetBlipSprite (blip, 73) -- SetBlipColour (blip, 47) SetBlipScale (blip, 0.7) SetBlipAsShortRange(blip, true) BeginTextCommandSetBlipName('STRING') AddTextComponentSubstringPlayerName('Clothing Store') EndTextCommandSetBlipName(blip) end end end) CreateThread(function() local playerCoords, isInClothingShop, isInPDPresets, isInBarberShop, currentZone, letSleep = GetEntityCoords(PlayerPedId()), false, false, nil, true for k, v in pairs(Config.ClothingShops) do v.BoxZone = BoxZone:Create(v.coords, 3.0, 5.0, { name="Clothing-Shop"..k, maxZ = v.coords.z+3, minZ = v.coords.z, offset={0.0, 0.0, 0.0}, scale={1.0, 1.0, 1.0}, debugPoly=false, }) end for k,v in pairs(Config.ClothingShops) do v.BoxZone:onPlayerInOut(function (isPointInside, point) if isPointInside == true then isInClothingShop, currentZone = true, k while (isInClothingShop and not hasAlreadyEnteredMarker) or (isInClothingShop and LastZone ~= currentZone) do hasAlreadyEnteredMarker, LastZone = true, currentZone CurrentAction = 'clothingMenu' exports['qb-core']:DrawText('[E] Clothing Menu','left') end else isInClothingShop = false if not isInClothingShop and not isInBarberShop and hasAlreadyEnteredMarker then hasAlreadyEnteredMarker = false TriggerEvent('fivem-appearance:hasExitedMarker', LastZone) exports['qb-core']:HideText() end end end) end for k, v in pairs(Config.BarberShops) do v.BoxZone = BoxZone:Create(v.coords, 3.0, 5.0, { name="Barber-Shop"..k, maxZ = v.coords.z+3, minZ = v.coords.z, offset={0.0, 0.0, 0.0}, scale={1.0, 1.0, 1.0}, debugPoly=false, }) end for k,v in pairs(Config.BarberShops) do v.BoxZone:onPlayerInOut(function (isPointInside, point) if isPointInside == true then isInBarberShop, currentZone = true, k while (isInBarberShop and not hasAlreadyEnteredMarker) or (isInBarberShop and LastZone ~= currentZone) do hasAlreadyEnteredMarker, LastZone = true, currentZone CurrentAction = 'barberMenu' exports['qb-core']:DrawText('[E] Barber Menu','left') Wait(0) end else isInBarberShop = false if not isInClothingShop and not isInBarberShop and hasAlreadyEnteredMarker then hasAlreadyEnteredMarker = false TriggerEvent('fivem-appearance:hasExitedMarker', LastZone) exports['qb-core']:HideText() end end end) end end) --[[CreateThread(function() while true do local playerCoords, isInClothingShop, isInPDPresets, isInBarberShop, currentZone, letSleep = GetEntityCoords(PlayerPedId()), false, false, nil, true local sleep = 2000 for k,v in pairs(Config.ClothingShops) do local data = v local distance = #(playerCoords - data.coords) if distance < Config.DrawDistance then sleep = 0 if distance < data.MarkerSize.x then isInClothingShop, currentZone = true, k end end end for k,v in pairs(Config.BarberShops) do local distance = #(playerCoords - v) if distance < Config.DrawDistance then sleep = 0 if distance < Config.MarkerSize.x then isInBarberShop, currentZone = true, k end end end if (isInClothingShop and not hasAlreadyEnteredMarker) or (isInClothingShop and LastZone ~= currentZone) then hasAlreadyEnteredMarker, LastZone = true, currentZone CurrentAction = 'clothingMenu' exports['qb-core']:DrawText('[E] Clothing Menu','left') end if (isInBarberShop and not hasAlreadyEnteredMarker) or (isInBarberShop and LastZone ~= currentZone) then hasAlreadyEnteredMarker, LastZone = true, currentZone CurrentAction = 'barberMenu' exports['qb-core']:DrawText('[E] Barber Menu','left') end if not isInClothingShop and not isInBarberShop and hasAlreadyEnteredMarker then hasAlreadyEnteredMarker = false sleep = 1000 TriggerEvent('fivem-appearance:hasExitedMarker', LastZone) exports['qb-core']:HideText() end Wait(sleep) end end)]] -- Command(s) RegisterCommand('reloadskin', function() TriggerEvent("fivem-appearance:reloadskin") end) RegisterNetEvent('fivem-appearance:reloadskin', function(data) local playerPed = PlayerPedId() local maxhealth = GetEntityMaxHealth(playerPed) local health = GetEntityHealth(playerPed) QBCore.Functions.TriggerCallback('fivem-appearance:getPlayerSkin', function(appearance) exports['fivem-appearance']:setPlayerAppearance(appearance) Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') end) for k, v in pairs(GetGamePool('CObject')) do if IsEntityAttachedToEntity(PlayerPedId(), v) then SetEntityAsMissionEntity(v, true, true) DeleteObject(v) DeleteEntity(v) end SetPedMaxHealth(PlayerId(), maxhealth) Citizen.Wait(1000) -- Safety Delay SetEntityHealth(PlayerPedId(), health) end end) -- Testing Command RegisterCommand('clothingmenu', function() local config = { ped = true, headBlend = true, faceFeatures = true, headOverlays = true, components = true, props = true, } exports['fivem-appearance']:startPlayerCustomization(function (appearance) if (appearance) then TriggerServerEvent('fivem-appearance:save', appearance) print('Player Clothing Saved') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') else print('Canceled') Wait(1000) -- Wait is needed to clothing menu dosent overwrite the tattoos TriggerServerEvent('Select:Tattoos') end end, config) end, false)
WIN_WIDTH = 800 WIN_HEIGHT = 800 TITLE = "Shooter"
local ViewBase = require("games/common2/module/viewBase"); local MatchFailTipsView = class(ViewBase,false); MatchFailTipsView.ctor = function(self,seat,viewConfig) super(self); self.m_ctrls = MatchFailTipsView.s_controls; self:setFillParent(true,true); self.m_viewConfig = viewConfig; end MatchFailTipsView.dtor = function(self) self.m_viewConfig = nil; end ---------------------------------------------------------------------------- MatchFailTipsView.showTips = function(self,seat,uid,info,isFast) info = table.verify(info); local MatchFailTipsDialog = require("games/common2/match/module/matchFailTips/matchFailTipsDialog"); local failTipsDialog = new(MatchFailTipsDialog,self.m_viewConfig); failTipsDialog:setAlign(kAlignCenter); self:addChild(failTipsDialog); failTipsDialog:showDialog(info.msg); self.m_data = info; self.m_failTipsDialog = failTipsDialog; end MatchFailTipsView.onMatchStart = function(self) if self.m_data and self.m_data.errorType == 6 then if self.m_failTipsDialog then self.m_failTipsDialog:hideDialog(); end end end MatchFailTipsView.s_actionFuncMap = { [MatchMechineConfig.ACTION_NS_SHOW_FAIL_TIPS] = "showTips"; [MatchMechineConfig.ACTION_START] = "onMatchStart"; }; return MatchFailTipsView;
--冻伤类 function onStart(target, buff) add_buff_parameter(target, buff, 1) end function onPostTick(target, buff) if buff.not_go_round > 0 then return end buff.remaining_round = buff.remaining_round - 1; if buff.remaining_round <= 0 then if buff.cfg_property[1] then Common_FireBullet(buff.id, buff.attacker, {target}, nil, { Hurt = buff.attacker.ad * buff.cfg_property[1]/10000, Type = 5, name_id = buff.id, }) Common_Sleep(0.5) end UnitRemoveBuff(buff); end end function onEnd(target, buff) add_buff_parameter(target, buff, -1) end function targetAfterHit(target, buff, bullet) if buff.cfg_property[2] and buff.cfg_property[2] == 1 and target.hp == target.hpp then UnitRemoveBuff(buff); end end
local Class = require "hump.class" local BaseObject = require "toys/baseObject" Skateboard = Class{__includes = BaseObject} function Skateboard:init(world, mapObject) local xSpawn, ySpawn = mapObject.x, mapObject.y -- board self.board = {} self.board.width, self.board.height = 100, 5 self.board.body = love.physics.newBody(world, xSpawn, ySpawn, "dynamic") self.board.body:setUserData({ type = "skateboard", collisionSfxFolder = mapObject.properties.collisionSfxFolderBoard or "generic" }) self.board.shape = love.physics.newRectangleShape(0, 0, self.board.width, self.board.height) self.board.fixture = love.physics.newFixture(self.board.body, self.board.shape); self.board.fixture:setFriction(0.9) self.board.color = {1, 0.2, 0.7} if mapObject.properties.texturePathBoard then self.board.image = love.graphics.newImage(mapObject.properties.texturePathBoard) end -- Some vars for controlling wheel positions and size local halfDistanceBetweenWheels = 30 local wheelRadius = 8 local xLeftWheelSpawn, yLeftWheelSpawn = xSpawn-halfDistanceBetweenWheels, ySpawn+11 local xRightWheelSpawn, yRightWheelSpawn = xSpawn+halfDistanceBetweenWheels, yLeftWheelSpawn local wheelImage = nil if mapObject.properties.texturePathWheel then wheelImage = love.graphics.newImage(mapObject.properties.texturePathWheel) end -- left wheel self.leftWheel = {} self.leftWheel.body = love.physics.newBody(world, xLeftWheelSpawn, yLeftWheelSpawn, "dynamic") self.leftWheel.body:setUserData({ type = "skateboardLeftWheel", collisionSfxFolder = mapObject.properties.collisionSfxFolderWheel or "generic" }) self.leftWheel.shape = love.physics.newCircleShape(wheelRadius) self.leftWheel.fixture = love.physics.newFixture(self.leftWheel.body, self.leftWheel.shape, 0.5); self.leftWheel.fixture:setFriction(0.5) self.leftWheel.color = {0.80, 0.20, 0.20} self.leftWheel.joint = love.physics.newRevoluteJoint(self.board.body, self.leftWheel.body, xLeftWheelSpawn, yLeftWheelSpawn) self.leftWheel.image = wheelImage -- right wheel self.rightWheel = {} self.rightWheel.body = love.physics.newBody(world, xRightWheelSpawn, yRightWheelSpawn, "dynamic") self.rightWheel.body:setUserData({ type = "skateboardRightWheel", collisionSfxFolder = mapObject.properties.collisionSfxFolderWheel or "generic" }) self.rightWheel.shape = love.physics.newCircleShape(wheelRadius) self.rightWheel.fixture = love.physics.newFixture(self.rightWheel.body, self.rightWheel.shape, 0.5); self.rightWheel.fixture:setFriction(0.5) self.rightWheel.color = {0.80, 0.20, 0.20} self.rightWheel.joint = love.physics.newRevoluteJoint(self.board.body, self.rightWheel.body, xRightWheelSpawn, yRightWheelSpawn) self.rightWheel.image = wheelImage -- check if we're important to the camera self.cameraDistance = mapObject.properties.cameraDistance self.cameraFocus = mapObject.properties.cameraFocus end function Skateboard:getPosition() return self.board.body:getPosition() end function Skateboard:draw() self:drawRectangleObject(self.board) self:drawCircleObject(self.leftWheel) self:drawCircleObject(self.rightWheel) end return Skateboard
local t = ...; t = Def.ActorFrame{ Def.Quad{ InitCommand=cmd(x,188;y,1;setsize,188,24); OnCommand=cmd(queuecommand,"Animate"); AnimateCommand=cmd(diffuseshift;effectcolor1,color("#d4d400");effectcolor2,color("#717100");effectperiod,1.5); }; LoadActor("HL")..{ InitCommand=cmd(x,188;y,1); } }; return t;
project "pugixml" uuid "07B89124-7C71-42cc-81AB-62B09BB61F9B" language "C++" location ( "%{wks.location}" .. "/ext" ) mpt_kind "static" targetname "openmpt-pugixml" includedirs { } filter {} filter { "action:vs*" } characterset "Unicode" filter {} files { "../../include/pugixml/src/pugixml.cpp", } files { "../../include/pugixml/src/pugiconfig.hpp", "../../include/pugixml/src/pugixml.hpp", } filter { "action:vs*" } buildoptions { "/wd6054", "/wd28182" } -- /analyze filter {}
minetest.register_privilege("secret", "Wouldn't you like to know?") minetest.register_privilege("hidden_one", {description = "Can hide from players.", give_to_singleplayer=false}) local default_sneak_mode = "old" -- change this to "new" if you want new movement. -- Admin Curses --Turn player into a chicken local function transmogrify(name, target) local pos = {} local player = minetest.get_player_by_name(target) local pos = player:getpos() local ppos = {x=pos.x, y=pos.y+1, z=pos.z} player:set_attribute("transformed", "true") player:set_properties({mesh = "catchicken.b3d", collisionbox = {-0.3, -0.75, -0.3, 0.3, 0.1, 0.3}, textures = {"catchicken.png"}}) player:setpos(ppos) end minetest.register_chatcommand("transmogrify", { params = "<person>", privs = {secret=true}, description = "Turn player into a chicken.", func = function(name, target) local player = minetest.get_player_by_name(target) if player == nil then return false, "Player does not exist." end transmogrify(name, target) minetest.chat_send_player(target, "Cursed by an admin! You are now a chicken! Bawk! Bawk!") minetest.chat_send_player(name, "Curse successful!") end }) -- Cursed with eternal day or night local function pday(name, target, value) local player = minetest.get_player_by_name(target) player:override_day_night_ratio(value) end minetest.register_chatcommand("pday", { params = "<person> <value>", privs = {secret = true}, description = "Set a player's day/night ratio", func = function(name, params) local target, value = params:match("^(%S+)%s*([%d.]*)$") if target == nil or target == "" then return false, "You must enter a player name, optionally followed by a number." end local player = minetest.get_player_by_name(target) if player == nil then return false, "Player does not exist." end --The string.len prevents server crash if a person includes two decimals. I know there's a better solution, but learning pattern matching looks painful. if string.len(value) > 2 or value == nil or value == "" or tonumber(value) > 1.0 or tonumber(value) < 0.1 then value = "1" end pday(name, target, value) if tonumber(value) >= .5 then player:set_attribute("tanning", value) minetest.chat_send_player(target, "Cursed by an admin! Eternal Daylight!") minetest.chat_send_player(name, "Curse successful! "..target.."'s light ratio set to "..value) end if tonumber(value) < .5 then player:set_attribute("blinded", value) minetest.chat_send_player(target, "Cursed by an admin! Eternal Nighttime!") minetest.chat_send_player(name, "Curse successful! "..target.."'s light ratio set to "..value) end end }) -- prevents player from jumping local function hobble(user, target) local player = minetest.get_player_by_name(target) player:set_attribute("hobbled", "true") player:set_physics_override({jump = 0}) end minetest.register_chatcommand("hobble", { params = "<person>", privs = {secret=true}, description = "Prevent player jumping.", func = function(name, target) local player = minetest.get_player_by_name(target) if player == nil then return false, "Player does not exist." end hobble(name, target) minetest.chat_send_player(target, "Cursed by an admin! No more jumping!") minetest.chat_send_player(name, "Curse successful!") end }) -- reduces player movement speed local default_slow = 0.3 local function slowmo(name, target, speed) local player = minetest.get_player_by_name(target) player:set_attribute("slowed", speed) player:set_physics_override({speed = speed}) end minetest.register_chatcommand("slowmo", { params = "<person> <speed>", privs = {secret = true}, description = "Reduce player movement speed.", func = function(name, params) local target, speed = params:match("^(%S+)%s*([%d.]*)$") if target == nil or target == "" then return false, "You must enter a player name, optionally followed by speed." end local player = minetest.get_player_by_name(target) if player == nil then return false, "Player does not exist." end if string.len(speed) > 2 or speed == nil or speed == "" or tonumber(speed) > 1.0 or tonumber(speed) < 0.1 then speed = default_slow end slowmo(name, target, speed) minetest.chat_send_player(target, "Cursed by an admin! You feel sloooooow! " .. "(Speed set to ".. speed ..")") minetest.chat_send_player(name, "Curse successful! "..target.."'s speed set to "..speed) end }) -- prevent player from changing speed/direction and jumping local function freeze(name, target) local player = minetest.get_player_by_name(target) player:set_attribute("frozen", "true") player:set_physics_override({jump = 0, speed = 0}) end minetest.register_chatcommand("freeze", { params = "<person>", privs = {secret=true}, description = "Prevent player movement.", func = function(name, target) local player = minetest.get_player_by_name(target) if player == nil then return false, "Player does not exist." end freeze(name, target) minetest.chat_send_player(target, "Cursed by an admin! You are now frozen!") minetest.chat_send_player(name, "Curse successful!") end }) -- disables minimap for player local function getlost(name,target) local player = minetest.get_player_by_name(target) player:set_attribute("lost", "true") player:hud_set_flags({minimap = false}) end minetest.register_chatcommand("getlost", { params = "<person>", privs = {secret=true}, description = "Prevent player from using the minimap.", func = function(name, target) local player = minetest.get_player_by_name(target) if player == nil then return false, "Player does not exist." end getlost(name,target) minetest.chat_send_player(target, "Cursed by an admin! You will get lost now!") minetest.chat_send_player(name, "Curse successful!") end }) -- trigger curse effects when player joins minetest.register_on_joinplayer(function(player) local name = player:get_player_name() if player:get_attribute("hobbled") == "true" then hobble(name,name) end local slowed = player:get_attribute("slowed") if slowed then slowmo(name,name, tonumber(slowed)) end if player:get_attribute("frozen") == "true" then freeze(name,name) end if player:get_attribute("lost") == "true" then getlost(name,name) end -- set sneak mode if unassigned if player:get_attribute("sneak_mode") == nil then player:set_attribute("sneak_mode", default_sneak_mode) end -- set movement physics based on sneak_mode if player:get_attribute("sneak_mode") == "old" then player:set_physics_override({new_move = false, sneak_glitch = true, sneak = true}) elseif player:get_attribute("sneak_mode") == "new" then player:set_physics_override({new_move = true, sneak_glitch = false, sneak = true}) elseif player:get_attribute("sneak_mode") == "none" then player:set_physics_override({sneak = false}) end -- reset player physics minetest.register_chatcommand("setfree",{ params = "<person>", privs = {secret=true}, description = "Reset player movement.", func = function(name, target) local player = minetest.get_player_by_name(target) if player == nil then return false, "Player does not exist." end player:set_attribute("hobbled", "") player:set_attribute("slowed", "") player:set_attribute("frozen", "") player:set_attribute("lost", "") player:set_attribute("tanning", "") player:set_attribute("blinded", "") player:set_attribute("transformed", "") player:set_physics_override({jump = 1, speed = 1, sneak = true}) player:hud_set_flags({minimap = true}) player:override_day_night_ratio(nil) player:set_properties({mesh = "character.b3d", collisionbox = {-0.35, -1, -0.35, 0.35, 1, 0.35}, textures = {"character.png"}}) minetest.chat_send_player(target, "The curse is lifted. You have been set free!") minetest.chat_send_player(name, "The curse is lifted.") end }) -- set sneak mode local function sneak_mode(player, mode) player:set_attribute("sneak_mode", mode) if mode == "old" then player:set_physics_override({new_move = false, sneak_glitch = true, sneak = true}) elseif mode == "new" then player:set_physics_override({new_move = true, sneak_glitch = false, sneak = true}) elseif mode == "none" then player:set_physics_override({sneak = false}) end end minetest.register_chatcommand("set_sneak",{ params = "<player> <old | new | none>", privs = {secret = true}, description = "Set sneak mode for player.", func = function(name, params) local target, mode = params:match("(%S+)%s+(.+)") if not target and not reason then return false, "Must include player name and sneak mode." end local player = minetest.get_player_by_name(target) if not player then return false, "Player does not exist." end if not mode or (mode ~= "old" and mode ~= "new" and mode ~= "none") then return false, "Set a mode: old, new or none." end sneak_mode(player, mode) end }) -- check player status minetest.register_chatcommand("curses",{ params = "<person>", privs = {secret = true}, description = "Check player status.", func = function(user_name, target_name) local player = minetest.get_player_by_name(target_name) if player == nil then return false, "Player does not exist or is not logged in." end local result = "Status for player "..target_name..": " local status_list = {"hobbled", "slowed", "frozen", "lost", "blind", "caged", "tanning", "transformed"} for i, status in pairs(status_list) do if player:get_attribute(status_list[i]) == "true" then result = result..status_list[i].." " end end if player:get_attribute("slowed") and player:get_attribute("slowed") ~= "" then result = result.."slowed("..player:get_attribute("slowed")..")" end minetest.chat_send_player(user_name, result.." Sneak mode: "..player:get_attribute("sneak_mode")) return end }) -- Cage Commands -- put a player in the cage minetest.register_chatcommand("cage", { params = "<person>", privs = {secret=true}, description = "Put a player in the cage.", func = function(warden_name, target_name) -- prevent self-caging if warden_name == target_name then return false, "You can't cage yourself." end -- get target player or return local target = minetest.get_player_by_name(target_name) if not target then return false, "Player does not exist." end -- return if already caged if target:get_attribute("caged") == "true" then return false, "This player is already caged." end -- get cage position from config or return local cagepos = minetest.setting_get_pos("cage_coordinate") if not cagepos then return false, "No cage set..." end -- save then remove all privs other than shout local target_privs = minetest.privs_to_string(minetest.get_player_privs(target_name)) target:set_attribute("caged_privs", target_privs) minetest.chat_send_player(warden_name, target:get_attribute("caged_privs")) minetest.set_player_privs(target_name,{shout = true}) target:set_attribute("caged", "true") sneak_mode(target, "none") target:setpos(cagepos) end }) -- free a player from the cage minetest.register_chatcommand("uncage", { params = "<person>", privs = {secret=true}, description = "Free a player from the cage.", func = function(warden_name, target_name) -- get target player or return local target = minetest.get_player_by_name(target_name) if not target then return false, "Player does not exist." end -- return if not caged if target:get_attribute("caged") ~= "true" then return false, "This player is not caged." end -- get release position from config or return local releasepos = minetest.setting_get_pos("release_coordinate") if not releasepos then return false, "No release point set..." end -- restore privs and release local original_privs = minetest.string_to_privs(target:get_attribute("caged_privs")) minetest.set_player_privs(target_name, original_privs) target:set_attribute("caged_privs", nil) sneak_mode(target, default_sneak_mode) target:set_attribute("caged", "") target:setpos(releasepos) end }) -- Other Commands -- hide player model and nametag (only works in 0.4.14 and above) vanished_players = {} minetest.register_chatcommand("vanish", { params = "", description = "Make user invisible", privs = {hidden_one = true}, func = function(user) local prop local player = minetest.get_player_by_name(user) vanished_players[user] = not vanished_players[user] if vanished_players[user] then prop = {visual_size = {x = 0, y = 0}, collisionbox = {0,0,0,0,0,0}} player:set_nametag_attributes({color = {a = 0, r = 255, g = 255, b = 255}}) else -- default player size. prop = {visual_size = {x = 1, y = 1}, collisionbox = {-0.35, -1, -0.35, 0.35, 1, 0.35}} player:set_nametag_attributes({color = {a = 255, r = 255, g = 255, b = 255}}) end player:set_properties(prop) end }) -- announcements minetest.register_chatcommand("proclaim", { params = "<text>", description = "Sends text to all players", privs = {server = true}, func = function (user, text) if not text or text == "" then return end minetest.chat_send_all(text) if minetest.get_modpath("irc") then if irc.connected and irc.config.send_join_part then irc:say(text) end end end } ) end )
include("terms") style1 = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "f90", ["line_width"] = "3"}; style2 = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "c90", ["line_width"] = "3"}; style3 = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "6f6", ["line_width"] = "3"}; style4 = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "0cf", ["line_width"] = "3"}; style5 = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "f30", ["line_width"] = "3"}; mycanvas = function(no) lib.start_canvas(300, 300, "center") lib.add_straight_path(10, 60, {{0, 150}}, style1, true, false) lib.add_text(10, 220, "1") lib.add_straight_path(70, 50, {{70, 0}, {10, -10}, {10, 10}, {100, 0}}, style2, true, false) lib.add_text(170, 65, "2") lib.add_ellipse(160, 220, 50, 30, style3, true, false) lib.add_text(115, 245, "4") lib.add_triangle(70, 130, 40, 60, style4, true, false) lib.add_text(70, 170, "3") lib.add_curved_path(250, 90, {{50, 0, 20, 50}, {-50, 0, -10, 50}, {40, 20, 20, 50}}, style5, true, false) lib.add_text(270, 230, "5") lib.end_canvas() end index = math.random(5) choice = type[index]
languages = {} language = "en" local emptyTable = {} function LoadLanguage(name, overridePath) local script = CompileFile(overridePath or ("lang/" .. name .. ".lua")) if not script then return end languages[name] = script.lang end function GetLanguage() return language or "en" end function GetLanguageTable() local lang = GetLanguage() if languages[lang] then return languages[lang] end if languages["en"] then return languages["en"] end return emptyTable end function GetEnglishTable() if languages["en"] then return languages["en"] end return emptyTable end function ChangeLanguage(lang) language = lang end function VarTranslate(s, reptable) for k, v in pairs(reptable) do s = s:gsub("{" .. k .. "}", v) end return s end function GetTranstation (languageTable, names) for k, name in pairs(names) do local a = rawget(languageTable, name) if a then return a end end end function Translate(client, ...) if (not type(client) == "IClient") then return "TRANSTALE_ERROR_CLIENT" end local lang = languages[client.Language.TwoLetterISOLanguageName] if not lang then lang = GetEnglishTable() end local args = {...} local a = GetTranstation(lang, args) if a then return a end return "TRANSTALE_ERROR" end function AdvTranslate(client, text, reptable) local s = Translate(client, text) for k, v in pairs(reptable) do s = s:gsub("{" .. k .. "}", v) end return s end -- -- Stuff after file loaded -- files = GetFiles("lang/") for _, file in pairs(files) do local name = file:sub(1, -5) LoadLanguage(name) end
-- Generated by CSharp.lua Compiler local System = System local SlipeMtaDefinitions local SlipeServerAcl local SlipeSharedExceptions local ArrayAclEntry local ArrayAclGroup System.import(function (out) SlipeMtaDefinitions = Slipe.MtaDefinitions SlipeServerAcl = Slipe.Server.Acl SlipeSharedExceptions = Slipe.Shared.Exceptions ArrayAclEntry = System.Array(SlipeServerAcl.AclEntry) ArrayAclGroup = System.Array(SlipeServerAcl.AclGroup) end) System.namespace("Slipe.Server.Acl", function (namespace) -- <summary> -- Class that represents a group of different ACL entries -- </summary> namespace.class("AclGroup", function (namespace) local getACL, getName, getEntries, getObjects, getAll, Get, AddEntry, AddObject, RemoveEntry, RemoveObject, Destroy, class, __ctor1__, __ctor2__ __ctor1__ = function (this, mtaAclGroup) this.group = mtaAclGroup end -- <summary> -- Create a new ACL group -- </summary> __ctor2__ = function (this, name) __ctor1__(this, SlipeMtaDefinitions.MtaServer.AclCreateGroup(name)) end getACL = function (this) return this.group end getName = function (this) return SlipeMtaDefinitions.MtaServer.AclGroupGetName(this.group) end getEntries = function (this) local mtaentires = SlipeMtaDefinitions.MtaShared.GetArrayFromTable(SlipeMtaDefinitions.MtaServer.AclGroupListACL(this.group), "acl", T) local entries = ArrayAclEntry:new(#mtaentires) for i = 0, #mtaentires - 1 do entries:set(i, SlipeServerAcl.AclEntry(mtaentires:get(i))) end return entries end getObjects = function (this) return SlipeMtaDefinitions.MtaShared.GetArrayFromTable(SlipeMtaDefinitions.MtaServer.AclGroupListObjects(this.group), "acl-object", T) end getAll = function () local mtagroups = SlipeMtaDefinitions.MtaShared.GetArrayFromTable(SlipeMtaDefinitions.MtaServer.AclGroupList(), "acl-group", T) local groups = ArrayAclGroup:new(#mtagroups) for i = 0, #mtagroups - 1 do groups:set(i, class(mtagroups:get(i))) end return groups end -- <summary> -- Get an ACL group instance from the name of the group -- </summary> Get = function (name) local result = SlipeMtaDefinitions.MtaServer.AclGetGroup(name) if result == nil then System.throw(SlipeSharedExceptions.NullElementException("No ACL entry with the name " .. name .. " can be found")) end return class(result) end -- <summary> -- Add a new ACL entry to this group -- </summary> AddEntry = function (this, entry) return SlipeMtaDefinitions.MtaServer.AclGroupAddACL(this.group, entry:getACL()) end -- <summary> -- Add a new object to this group -- </summary> AddObject = function (this, obj) return SlipeMtaDefinitions.MtaServer.AclGroupAddObject(this.group, obj:getAclIdentifier()) end -- <summary> -- Remove an ACL entry from this group -- </summary> RemoveEntry = function (this, entry) return SlipeMtaDefinitions.MtaServer.AclGroupRemoveACL(this.group, entry:getACL()) end -- <summary> -- Remove an ACL object form this group -- </summary> RemoveObject = function (this, obj) return SlipeMtaDefinitions.MtaServer.AclGroupRemoveObject(this.group, obj:getAclIdentifier()) end -- <summary> -- Delete this ACL group -- </summary> Destroy = function (this) return SlipeMtaDefinitions.MtaServer.AclDestroyGroup(this.group) end class = { getACL = getACL, getName = getName, getEntries = getEntries, getObjects = getObjects, getAll = getAll, Get = Get, AddEntry = AddEntry, AddObject = AddObject, RemoveEntry = RemoveEntry, RemoveObject = RemoveObject, Destroy = Destroy, __ctor__ = { __ctor1__, __ctor2__ }, __metadata__ = function (out) return { fields = { { "group", 0x5, out.Slipe.MtaDefinitions.MtaAclGroup } }, properties = { { "ACL", 0x206, out.Slipe.MtaDefinitions.MtaAclGroup, getACL }, { "All", 0x20E, System.Array(out.Slipe.Server.Acl.AclGroup), getAll }, { "Entries", 0x206, System.Array(out.Slipe.Server.Acl.AclEntry), getEntries }, { "Name", 0x206, System.String, getName }, { "Objects", 0x206, System.Array(out.Slipe.Server.Acl.IAclObject), getObjects } }, methods = { { ".ctor", 0x106, __ctor1__, out.Slipe.MtaDefinitions.MtaAclGroup }, { ".ctor", 0x106, __ctor2__, System.String }, { "AddEntry", 0x186, AddEntry, out.Slipe.Server.Acl.AclEntry, System.Boolean }, { "AddObject", 0x186, AddObject, out.Slipe.Server.Acl.IAclObject, System.Boolean }, { "Destroy", 0x86, Destroy, System.Boolean }, { "Get", 0x18E, Get, System.String, class }, { "RemoveEntry", 0x186, RemoveEntry, out.Slipe.Server.Acl.AclEntry, System.Boolean }, { "RemoveObject", 0x186, RemoveObject, out.Slipe.Server.Acl.IAclObject, System.Boolean } }, class = { 0x6 } } end } return class end) end)
-- Behavior for observer (1) in the level elderbackroom routine = function(O) O:gotoTile(15, 20) O:gotoTile(25, 20) O:wait(1) end
local tech = data.raw.technology['circuit-network'].effects local newUnlock = { type = 'unlock-recipe', recipe = 'switchbutton' } table.insert(tech, newUnlock)
-- @Author: Kush Chandra Shrestha -- @Date: 2016-04-15 23:05:55 -- @Last Modified by: Ritesh Pradhan -- @Last Modified time: 2016-04-21 14:17:11 -- load required library files local widget = require("widget") local composer = require( "composer" ) local background = require('classes.background') local hemeDatabox = require('libs.databox') local sounds = require( "libs.sounds" ); local scene = composer.newScene(); local runtime = 0 local scrollSpeed = 1 local bg local getDeltaTime = {} local enterFrame = {} function getDeltaTime() local temp = system.getTimer() local dt = (temp-runtime) / (1000/60) runtime = temp return dt end function enterFrame() local dt = getDeltaTime() bg:moveBg(dt, scrollSpeed) end function scene:create( event ) local sceneGroup = self.view -- bg.addScrollableBg() local bgImage = { type="image", filename="images/scenes/bg2.jpg" } bg = background:newBackground() bg:addScrollableBg(bgImage) sceneGroup:insert(bg.bg1); sceneGroup:insert(bg.bg2); local function btnCreditsHandler(event) sounds.play('menu_item') local sceneOpt = {effect = "crossFade", time = 600} composer.gotoScene("scenes.credits", sceneOpt) end local function btnHelpHandler(event) sounds.play('menu_item') local sceneOpt = {effect = "crossFade", time = 600} composer.gotoScene("scenes.help", sceneOpt) end local function btnPlayHandler(event) sounds.play('play') sounds.stop(25) local sceneOpt = {effect = "fade", time = 800} composer.gotoScene("scenes.game", sceneOpt) end local function btnCartHandler(event) sounds.play('menu_item') local sceneOpt = {effect = "slideLeft", time = 800} composer.gotoScene("scenes.store", sceneOpt) end local function btnPlayerChangeHandler(event) sounds.play('menu_item') local sceneOpt = {effect = "crossFade", time = 600} composer.gotoScene("scenes.selectPlayer", sceneOpt) end local function btnSettingsHandler(event) sounds.play('menu_item') local options = { isModal = true, effect = "fade", time = 400, params = {is_playing = false} } composer.showOverlay( "scenes.settings", options ) end -- Load Background image local titleImage = display.newImage("images/menu/titleImage.png") titleImage.x = display.contentCenterX titleImage.y = display.contentCenterY - 200 sceneGroup:insert(titleImage) local button_settings = widget.newButton({ defaultFile = "images/menu/setting.png", onRelease = btnSettingsHandler }) button_settings.x = 100 button_settings.y = display.contentHeight - 100 sceneGroup:insert(button_settings) local button_select_player = widget.newButton({ defaultFile = "images/menu/favorite.png", onRelease = btnPlayerChangeHandler }) button_select_player.x = 250 button_select_player.y = display.contentHeight - 100 sceneGroup:insert(button_select_player) local button_help = widget.newButton({ defaultFile = "images/menu/help.png", onRelease = btnHelpHandler }) button_help.x = 400 button_help.y = display.contentHeight - 100 sceneGroup:insert(button_help) local button_credits = widget.newButton({ defaultFile = "images/menu/information.png", onRelease = btnCreditsHandler }) button_credits.x = 550 button_credits.y = display.contentHeight - 100 sceneGroup:insert(button_credits) local button_cart = widget.newButton({ defaultFile = "images/menu/cart.png", onRelease = btnCartHandler }) button_cart.x = display.contentWidth - 100 button_cart.y = display.contentHeight - 100 sceneGroup:insert(button_cart) local button_play = widget.newButton({ defaultFile = "images/menu/play.png", onRelease = btnPlayHandler }) button_play.x = display.contentCenterX button_play.y = display.contentCenterY sceneGroup:insert(button_play) end function scene:show( event ) local sceneGroup = self.view local phase = event.phase local params = event.params if ( phase == "did" ) then sounds.musicPlay('bg_music_menu') -- print("Scroll speed is : ", scrollSpeed) Runtime:addEventListener("enterFrame", enterFrame) end end function scene:hide ( event ) local sceneGroup = self.view local phase = event.phase local params = event.params if(phase == "will") then Runtime:removeEventListener("enterFrame", enterFrame) end end -- Added event listener for scene scene:addEventListener( "create", scene ); scene:addEventListener( "show", scene ); scene:addEventListener( "hide", scene ); return scene;
#!/usr/bin/env tarantool local fio = require('fio') -- require in-repo version of graphql/ sources despite current working directory package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)") :gsub('/./', '/'):gsub('/+$', '') .. '/../?.lua') .. ';' .. fio.abspath(debug.getinfo(1).source:match("@?(.*/)") :gsub('/./', '/'):gsub('/+$', '') .. '/../?/init.lua') .. ';' .. package.path local log = require('log') local test_utils = require('test.test_utils') -- e. g. nullable_1_1_conn local testdata_name = arg[1] or 'common' -- e. g. test/testdata/nullable_1_1_conn_testdata.lua if testdata_name:find('/') then testdata_name = testdata_name:gsub('^.+/(.+)_testdata.lua$', '%1') end local testdata = require(('test.testdata.%s_testdata'):format(testdata_name)) local function start() box.cfg({}) local ok, err = pcall(function() testdata.drop_spaces() end) if not ok then log.warn('Cannot drop data: ' .. tostring(err)) end local meta = testdata.meta or testdata.get_test_metadata() testdata.init_spaces() testdata.fill_test_data(box.space, meta) local gql_wrapper = test_utils.graphql_from_testdata(testdata) local msg = gql_wrapper:start_server() log.info(tostring(msg)) end start()
local skynet = require "skynet" local gateserver = require "snax.gateserver" local netpack = require "skynet.netpack" local handler = {} local CMD = {} function CMD.kick(source, fd) skynet.error("source: ", skynet.address(source), "kick fd: ", fd); gateserver.closeclient(fd) end function handler.connect( fd, addr ) skynet.error("client addr ", addr, "fd: ", fd) gateserver.openclient(fd) end function handler.disconnect( fd ) skynet.error("fd: ", fd, "disconnect") end function handler.message( fd, msg, sz ) skynet.error("recv message from fd: ", fd, netpack.tostring(msg, sz)) end function handler.error(fd, msg) gateserver.closeclient(fd) end function handler.warning(fd, size) skynet.error("warning fd = ", fd, "unsent data over 1MB") end function handler.open( source, conf ) skynet.error("open by ", skynet.address(source)) skynet.error("listen on ", conf.port) skynet.error("client max ", conf.maxclient) skynet.error("nodelay ", conf.nodelay) end function handler.command( cmd, source, ... ) local f = assert(CMD[cmd]) return f(source, ...) end gateserver.start(handler)
-- ------------------------------------------------------------------------------ -- File: ipt2smalldot.lua -- -- Usage: require("ipt2smalldot")(ipt, iptable.AF_<fam>)->{lines, edges} -- -- Description: convert iptable radix tree to minimalistic graphviz code -- ------------------------------------------------------------------------------ local F = assert(string.format) local function node(x) -- ensures graphviz likes the node id's if type(x) == "table" then return "n"..x._MEM_ elseif type(x) == "string" then if x == "(nil)" then return nil end return "n"..x else return x end end local function t_flags(t) -- string radix node flags together if (type(t) ~= "table") then return nil end local tag = t._ROOT_ and "R" or "" tag = t._DELETE_ and tag.."D" or tag tag = t._NORMAL_ and tag.."N" or tag tag = t._ACTIVE_ and tag.."A" or tag return tag end local function t_type(t) -- type of node: leaf, internal or unknown? if (type(t) ~= "table") then return nil end if t._LEAF_ then return "L" end if t._INTERNAL_ then return "I" end return "?" end local function rn_dot(g, t) local RN = node(t) local fmt_leaf = "[shape=plaintext,label=\"%s/%s\n(%s) %s\"];" local fmt_internal = "[shape=plaintext,label=\"bit %d (%d %s)\"];" -- skip radix_masks for now -- g.edges[#g.edges+1] = {RN, node(t.rn_mklist)} if t._LEAF_ then g.nodes[RN] = F(fmt_leaf, t.rn_key, t._rn_mlen, t.rn_bit, t_flags(t)) g.edges[#g.edges+1] = {RN, node(t.rn_dupedkey), "d"} else local RN_left = node(t.rn_left) local RN_right = node(t.rn_right) -- g.nodes[RN] = F(fmt_internal, t.rn_bit, t_flags(t)) g.nodes[RN] = F(fmt_internal, t.rn_bit-8, t.rn_bit, t_flags(t)) g.edges[#g.edges+1] = {RN, RN_left, "L"} g.edges[#g.edges+1] = {RN, RN_right, "R"} -- left -> right, used in invis rank to keep left to the left of right g.edges[#g.edges+1] = {RN_left, RN_right, "I"} end end local function rnh_dot(g, t) local RN -- RADIX_NODES part -- LE marker rn_dot(g, t.rnh_nodes[1]) RN = node(t.rnh_nodes[1]) g.nodes[RN] = F("[label=\"LE (%s)\"];", t.rnh_nodes[1].rn_bit) -- TT marker rn_dot(g, t.rnh_nodes[2]) RN = node(t.rnh_nodes[2]) g.nodes[RN] = F("[label=\"TT (%s)\"];", t.rnh_nodes[2].rn_bit) -- RE marker RN = node(t.rnh_nodes[3]) rn_dot(g, t.rnh_nodes[3]) g.nodes[RN] = F("[label=\"RE (%s)\"]", t.rnh_nodes[3].rn_bit) end local hdlrs = { RADIX_NODE_HEAD = rnh_dot, RADIX_NODE = rn_dot, } local function tbl2dot(g, t) local hdlr = hdlrs[t._NAME_] if (hdlr) then hdlr(g, t) end end local M = {} -- the module function dotify(ipt, af_fam) local lines = {} local graph = { -- collector for graph info masks = masks, edges = {}, nodes = {}, } -- start the graph lines[#lines+1] = "digraph G {" -- lines[#lines+1] = F(" size=%q;", "7.5,7.5") lines[#lines+1] = F(" label=%q;", title or "") lines[#lines+1] = " splines=line;" lines[#lines+1] = F(" ranksep=%q;", "1.0 equally") -- collect all RADIX node types of AF_families given (...) for radix in ipt:radixes(af_fam) do -- skip the radix tree stuff -- if radix._NAME_ == "RADIX_MASK_HEAD" then break end tbl2dot(graph, radix) end -- nodes lines[#lines+1] = "\n /* nodes */\n" local fmt_node = " %s %s" for k, v in pairs(graph.nodes) do if (k) then lines[#lines+1] = F(fmt_node, k, v); end end -- edges lines[#lines+1] = "\n /* edges */\n" local fmt_edge = " %s -> %s [label=\" %s\",style=%s];" for k, v in ipairs(graph.edges) do local src, dst, lbl = table.unpack(v) if (src and dst) then if lbl ~= "I" then local line_style = lbl=="d" and "dotted" or "solid" lines[#lines+1] = F(fmt_edge, src, dst, lbl, line_style); end end end -- add invisible ranks to keep left to the left of right lines[#lines+1] = "\n /* keep left to the left of right */\n" local fmt_l2r = " { rank=same; rankdir=LR; %s -> %s [style=invis]; }" for k, v in ipairs(graph.edges) do local src, dst, lbl = table.unpack(v) if (src and dst) then if lbl == "I" then lines[#lines+1] = F(fmt_l2r, src, dst, lbl) end end end lines[#lines+1] = "\n}" return lines end return dotify --[[ example usage iptable = require("iptable") dotify = require("ipt2dot") local iptable = require("iptable") local ipt = iptable.new() ipt["1.1.1.0/24"] = 24 ipt["1.1.1.0/25"] = 25 ipt["1.1.1.128/25"] = 25 ipt["1.1.1.0/26"] = 25 ipt["1.1.1.64/26"] = 25 ipt["1.1.1.128/26"] = 25 ipt["1.1.1.192/26"] = 25 ipt["3.1.1.0/24"] = 24 ipt["3.1.1.0/25"] = 24 ipt["3.1.1.128/25"] = 24 local mylines = dotify(ipt, iptable.AF_INET) print(table.concat(mylines, "\n")) ]]
-- The Computer Language Benchmarks Game -- http://benchmarksgame.alioth.debian.org/ -- contributed by Mike Pall (with ideas from Rici Lake) -- modified by Sokolov Yura -- modified for Lua 5.2 by Robin local len, sub, concat = string.len, string.sub, table.concat local write, mod = io.write, math.fmod local function writerev(p, np, f, lo, hi) if lo <= hi then np = np + 1; p[np] = concat(f, "", lo, hi) end if np ~= 0 then local r = "" for i=np,1,-1 do local s = r..p[i] local sn = len(s) for i=1,sn-59,60 do write(sub(s, i, i+59), "\n") end r = sub(s, sn-mod(sn, 60)+1) end if r ~= "" then write(r, "\n") end end end local iubc = setmetatable({ A="T", C="G", B="V", D="H", K="M", R="Y", a="T", c="G", b="V", d="H", k="M", r="Y", T="A", G="C", V="B", H="D", M="K", Y="R", U="A", t="A", g="C", v="B", h="D", m="K", y="R", u="A", N="N", S="S", W="W", n="N", s="S", w="W", }, { __index = function(t, s) local r = t[sub(s, 2)]..t[sub(s, 1, 1)]; t[s] = r; return r end }) local p, f, np, nf = {}, {}, 0, 1631 for line in io.lines() do local c = sub(line, 1, 1) if c == ">" then writerev(p, np, f, nf, 1630); np = 0; nf = 1631 write(line, "\n") elseif c ~= ";" then for i=1,len(line),4 do nf = nf - 1; f[nf] = iubc[sub(line, i, i+3)] end if nf <= 30 then np = np + 1; p[np] = concat(f, "", nf, 1630); nf = 1631 end end end writerev(p, np, f, nf, 1630)
{% for _, material in ipairs( materials ) do local item = Items[ material.id ] printf( "%s <b>x%d</b><br>", itemNameURL( { item = item } ), material.count ) end %}
package = "blunty666.log" class = "ConsoleLogOutput" implements = "ILogOutput" variables = { terminal = NIL, } methods = { Append = function(self, message) local previousTerminal = term.redirect(self.terminal) print(message) term.redirect(previousTerminal) end, } constructor = function(self, terminal) -- check terminal self.terminal = terminal end
--[[ Perk Hooks.lua This script will get custom property perks set in editor and put them into a global table ]] _G["perk.StrikeCoin300"] = script:GetCustomProperty("StrikeCoin300") _G["perk.StrikeCoin750"] = script:GetCustomProperty("StrikeCoin750") _G["perk.StrikeCoin3000"]= script:GetCustomProperty("StrikeCoin3000")
local map = require("helpers").map map("n", "<C-U>", ":call smooth_scroll#up(&scroll, 0, 4)<CR>") map("n", "<C-D>", ":call smooth_scroll#down(&scroll, 0, 4)<CR>") map("n", "<C-B>", ":call smooth_scroll#up(&scroll*2, 0, 4)<CR>") map("n", "<C-F>", ":call smooth_scroll#down(&scroll*2, 0, 4)<CR>")
Base = require 'libraries.knife.knife.base' require 'src.utilities.tables' require 'src.utilities.shapes' require 'src.utilities.numbers' Path = Base:extend() function Path:constructor(cellSize, alpha) self.cellSize = cellSize or 16 self.offsetX = self.cellSize / 2 self.offsetY = self.cellSize / 2 self.alpha = alpha or 1 self.color = 7 self.dropColor = 0 -- list of cells self.cells = {} self.line = {} end function Path:add(cell) if cell == nil then return end local index = -1 -- detect if the same coord is in the waypoint for i, waypoint in pairs(self.cells) do if waypoint ~= nil then if waypoint.x == cell.x and waypoint.y == cell.y then index = i break end end end -- if it is delete the rest of the path to end at that point if index ~= -1 then for i = #self.cells, index, -1 do table.remove(self.cells, i) end end table.insert(self.cells, cell) self:updateLine() end function Path:length() return #self.cells end function Path:clear() self.cells = {} self.line = {} end function Path:pop() local waypoint = self.cells[1] table.remove(self.cells, 1) --self:updateLine() return waypoint end function Path:popLine() table.remove(self.line, 1) table.remove(self.line, 1) end function Path:reverse() local nw = {} for key, waypoint in pairs(self.cells) do table.insert(nw, waypoint) end self.cells = nw end function Path:getTargetCell() return self.cells[#self.cells] end function Path:updateLine() self.line = {} for _, wayPoint in pairs(self.cells) do local x = (wayPoint.wx) + self.offsetX local y = (wayPoint.wy) + self.offsetY table.insert(self.line, x) table.insert(self.line, y) end --PrintTable(self.line) end function Path:draw() love.graphics.setLineWidth(4) if #self.line > 2 then local prevwp = self.cells[#self.cells - 1] local lastwp = self.cells[#self.cells] local ax = lastwp.wx + self.offsetX local ay = lastwp.wy + self.offsetY local cardDir = cardinalDirection(prevwp.x, prevwp.y, lastwp.x, lastwp.y) local verts = triangleVerts(cardDir, ax, ay, 4, 3) if self.alpha == 1 then setColor(self.dropColor) -- drop shadow love.graphics.line(self.line) love.graphics.polygon("fill", verts) end setColor(self.color, self.alpha) -- normal love.graphics.push() love.graphics.translate(0, -1) love.graphics.line(self.line) love.graphics.polygon("fill", verts) love.graphics.pop() end love.graphics.setLineWidth(1) love.graphics.setColor(1,1,1,1) end return Path;
---------------------------------- -- Area: Fort Karugo Narugo [S] -- NPC: Indescript Markings -- Type: Quest -- !pos -63 -75 4 96 ----------------------------------- local ID = require("scripts/zones/Fort_Karugo-Narugo_[S]/IDs") require("scripts/globals/keyitems") require("scripts/globals/npc_util") ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) local loafersQuestProgress = player:getCharVar("AF_SCH_BOOTS") player:delStatusEffect(tpz.effect.SNEAK) -- SCH AF Quest - Boots if (loafersQuestProgress > 0 and loafersQuestProgress < 3 and player:hasKeyItem(tpz.ki.RAFFLESIA_DREAMSPIT) == false) then player:addKeyItem(tpz.ki.RAFFLESIA_DREAMSPIT) player:messageSpecial(ID.text.KEYITEM_OBTAINED, tpz.ki.RAFFLESIA_DREAMSPIT) player:setCharVar("AF_SCH_BOOTS", loafersQuestProgress + 1) -- Move the markings around local positions = { [1] = {-72.612, -28.5, 671.24}, -- G-5 NE [2] = {-158, -61, 268}, -- G-7 [3] = {-2, -52, 235}, -- H-8 [4] = {224, -28, -22}, -- I-10 [5] = {210, -42, -78}, -- I-9 [6] = {-176, -37, 617}, -- G-5 SW [7] = {29, -13, 710} -- H-5 } local newPosition = npcUtil.pickNewPosition(npc:getID(), positions) npc:setPos(newPosition.x, newPosition.y, newPosition.z) -- player:PrintToPlayer("Markings moved to position index " .. newPosition) else player:messageSpecial(ID.text.NOTHING_OUT_OF_ORDINARY) end end function onEventUpdate(player, csid, option) end function onEventFinish(player, csid, option) end
gamePassId = 72385 market = game:GetService("MarketplaceService") http = game:GetService("HttpService") info = market:GetProductInfo(gamePassId, Enum.InfoType.GamePass) game:GetService("RunService").Stepped:connect(function() pcall(market.PerformPurchase, market, Enum.InfoType.Asset, info["ProductId"], info["PriceInRobux"], http:GenerateGUID(false)) end)
return { ["dice"] = "Simulates a dice throw, prints the value of each die", ["cards"] = "Draw a specific amount of playing cards and display them", ["calculate"] = {embed={ title = "Calculate an expression", description = "Calculates maths using libqalculate. https://qalculate.github.io/ for more info", fields = { {name = "Usage",value = [[calculate "<expression>"]]}, {name = "Perms: ",value = "All"}, {name = "Options",value = [[ `-e` - exact mode (try to be as exact as possible) `-i` - interval mode (imprecise numbers will be calculated using variance formula) `-f` - factorize mode (factorize result, default behaviour is to expand result) `-o` - output only (don't show embed and messages) ]]} } }}, ["pfp"] = "Show the profile picture of a user, or if none is specified, of yourself", ["markov"] = { embed = { title = "Generate some text using markov chains", description = "Generates text using the markov chain rule applied to a predefined set of words", fields = { {name = "Usage: ", value = "markov <text to start with>"}, {name = "Options: ", value = [[ --preseteset> - Select a text preset. Currently available: ``defaul- Generated from a wikipedia page on markov chains ``freud`The largest one, generated from a page on Sigmund Freud ``reddit Generated from reddit comments ``travist`` - Generated from transcript of a video by PlasticPills on travis scott burger ]] }, {name = "Perms: ", value = "any"} } }}, ["embed"] = {embed={ title = "Convert JSON objects into embeds", description = "If you've worked with discord.js before, this might be simple. If you haven't, then check out https://github.com/512mb-org/512mb.org-bot/wiki/Embeds", fields = { {name = "Usage",value = [[embed {code}]]}, {name = "Perms: ",value = "All"}, } }}, }
-- Copyright (C) 2018 The Dota IMBA Development Team -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- first time a real hero spawn function GameMode:OnUnitFirstSpawn(unit) -- Track the time the unit spawned (for IMBAfications or other custom checks) unit.time_spawned = GameRules:GetGameTime() local unit_name = unit:GetUnitName() -- TERRIBLE FIX, LOOK AWAY if string.find(unit_name, "npc_imba_enigma_eidolon_") then unit_name = "npc_dota_eidolon" end if ENTITY_MODEL_OVERRIDE[unit_name] then unit:SetOriginalModel(ENTITY_MODEL_OVERRIDE[unit_name]) unit:SetModel(ENTITY_MODEL_OVERRIDE[unit_name]) end if string.find(unit:GetUnitName(), "npc_dota_lone_druid_bear") then -- Give the custom mechanics like damage block and lifesteal unit:AddNewModifier(unit, nil, "modifier_custom_mechanics", {}) if unit:GetOwner() and unit:GetOwner():HasModifier("modifier_frantic") then local main_hero = unit:GetOwner() local shared_buff_modifier = main_hero:FindModifierByName("modifier_frantic") local shared_buff_ability = shared_buff_modifier:GetAbility() local buff_time = shared_buff_modifier:GetRemainingTime() if buff_time <= 0 then buff_time = shared_buff_modifier:GetDuration() end local cloned_modifier = unit:AddNewModifier(main_hero, shared_buff_ability, shared_buff_modifier:GetName(), {duration = buff_time}) cloned_modifier:SetStackCount(shared_buff_modifier:GetStackCount()) end end -- Let's give jungle creeps some love too...I guess if string.find(unit:GetUnitName(), "_neutral_") then unit:AddAbility("custom_creep_scaling") end -- Gotta do it manually here because the ability/modifier doesn't work on server-side for some godforsaken reason if unit:GetClassname() == "npc_dota_creep_lane" or unit:GetClassname() == "npc_dota_creep_siege" or string.find(unit:GetUnitName(), "_neutral_") then if unit:HasAbility("custom_creep_scaling") then local creep_scaling_ability = unit:FindAbilityByName("custom_creep_scaling") creep_scaling_ability:SetLevel(1) local multiplier = creep_scaling_ability:GetSpecialValueFor("base_mult") if string.find(unit:GetUnitName(), "upgraded") then multiplier = creep_scaling_ability:GetSpecialValueFor("super_mult") elseif string.find(unit:GetUnitName(), "upgraded_mega") then multiplier = creep_scaling_ability:GetSpecialValueFor("mega_mult") end local game_time = math.floor(GameRules:GetDOTATime(false, false) / 60) unit:SetBaseDamageMin(unit:GetBaseDamageMin() + creep_scaling_ability:GetSpecialValueFor("melee_attack") * game_time * multiplier) -- Works unit:SetBaseDamageMax(unit:GetBaseDamageMax() + creep_scaling_ability:GetSpecialValueFor("melee_attack") * game_time * multiplier) -- Works -- unit:SetBaseAttackTime(unit:GetBaseAttackTime() - creep_scaling_ability:GetSpecialValueFor("melee_aspd") * game_time * multiplier) unit:SetBaseMoveSpeed(unit:GetBaseMoveSpeed() + creep_scaling_ability:GetSpecialValueFor("melee_ms") * game_time * multiplier) -- Works but doesn't show on client side (wtf...) unit:SetMaxHealth(unit:GetMaxHealth() + creep_scaling_ability:GetSpecialValueFor("melee_hp") * game_time * multiplier) -- Works unit:SetBaseMaxHealth(unit:GetBaseMaxHealth() + creep_scaling_ability:GetSpecialValueFor("melee_hp") * game_time * multiplier) -- Works unit:SetHealth(unit:GetMaxHealth() + creep_scaling_ability:GetSpecialValueFor("melee_hp") * game_time * multiplier) -- Works unit:SetBaseHealthRegen(unit:GetBaseHealthRegen() + creep_scaling_ability:GetSpecialValueFor("melee_regen") * game_time * multiplier) -- Works end if IMBA_GREEVILING == true then Greeviling(unit) return end end -- Burning Army override (skeletons invulnerable + fix not dying when duration ends) if unit:GetClassname() == "npc_dota_clinkz_skeleton_archer" then -- IMBA effect -- unit:AddNewModifier(unit, nil, "modifier_invulnerable_hidden", {}) -- These skeletons have no set owner or team like wtf... -- Need to do hacky inconsistent way to check for owner (breaks apart when you have multiple heroes all with Burning Army) for _, hero in pairs(FindUnitsInRadius(unit:GetTeamNumber(), unit:GetAbsOrigin(), nil, FIND_UNITS_EVERYWHERE, DOTA_UNIT_TARGET_TEAM_BOTH, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_INVULNERABLE + DOTA_UNIT_TARGET_FLAG_PLAYER_CONTROLLED + DOTA_UNIT_TARGET_FLAG_OUT_OF_WORLD + DOTA_UNIT_TARGET_FLAG_DEAD, FIND_CLOSEST, false)) do if hero:HasAbility("clinkz_burning_army") then unit:SetOwner(hero) unit:AddNewModifier(hero, nil, "modifier_imba_burning_army", {}) unit:AddNewModifier(hero, nil, "modifier_kill", {duration = GetAbilitySpecial("clinkz_burning_army", "duration")}) break end end if unit and unit.HasAbility and unit:HasAbility("imba_clinkz_searing_arrows") and unit.GetOwner and unit:GetOwner() and unit:GetOwner():HasAbility("imba_clinkz_searing_arrows") then unit:FindAbilityByName("imba_clinkz_searing_arrows"):SetLevel(unit:GetOwner():FindAbilityByName("imba_clinkz_searing_arrows"):GetLevel()) end end -- Replacing Cloak Aura with a version that stacks with itself if unit:HasAbility("mudgolem_cloak_aura") then local old_cloak_aura_ability = unit:FindAbilityByName("mudgolem_cloak_aura") local new_cloak_aura_ability = unit:AddAbility("imba_mudgolem_cloak_aura") new_cloak_aura_ability:SetLevel(old_cloak_aura_ability:GetLevel()) unit:SwapAbilities("mudgolem_cloak_aura", "imba_mudgolem_cloak_aura", false, true) unit:RemoveAbilityByHandle(old_cloak_aura_ability) end -- Cursed Fountain addendum if unit.GetOwner and unit:GetOwner() and unit:GetOwner().HasModifier and unit:GetOwner():HasModifier("modifier_imba_cursed_fountain") then local cursed_fountain_modifier = unit:AddNewModifier(unit:GetOwner():FindModifierByName("modifier_imba_cursed_fountain"):GetCaster(), unit:GetOwner():FindModifierByName("modifier_imba_cursed_fountain"):GetAbility(), "modifier_imba_cursed_fountain", {}) if cursed_fountain_modifier then cursed_fountain_modifier:SetStackCount(unit:GetOwner():FindModifierByName("modifier_imba_cursed_fountain"):GetStackCount()) end end --[[ -- Find hidden modifiers if unit:GetUnitName() == "npc_dota_techies_remote_mine" then unit:SetContextThink(DoUniqueString("ModifierChecker"), function() for i = 0, unit:GetModifierCount() -1 do print(unit:GetUnitName(), unit:GetModifierNameByIndex(i)) end return 1.0 end, 0) end --]] end -- everytime an unit respawn function GameMode:OnUnitSpawned(unit) -- Track the time the unit spawned (for IMBAfications or other custom checks) unit.time_spawned = GameRules:GetGameTime() -- levelup bear ability based on his level if string.find(unit:GetUnitName(), "npc_dota_lone_druid_bear") then for i = 0, 23 do local ability = unit:GetAbilityByIndex(i) if IsValidEntity(ability) then ability:SetLevel(unit:GetLevel()) end end return elseif unit:IsIllusion() and not unit:HasModifier("modifier_illusion_manager_out_of_world") and not unit:HasModifier("modifier_illusion_manager") then -- Valve Illusion bug to prevent respawning UTIL_Remove(unit) return end -- Prevent zombies from spawning inside of units? if unit:GetName() == "npc_dota_unit_undying_zombie" then ResolveNPCPositions(unit:GetAbsOrigin(), unit:GetHullRadius()) end -- Cursed Fountain addendum if unit.GetOwner and unit:GetOwner().HasModifier and unit:GetOwner():HasModifier("modifier_imba_cursed_fountain") then local cursed_fountain_modifier = unit:AddNewModifier(unit:GetOwner():FindModifierByName("modifier_imba_cursed_fountain"):GetCaster(), unit:GetOwner():FindModifierByName("modifier_imba_cursed_fountain"):GetAbility(), "modifier_imba_cursed_fountain", {}) if cursed_fountain_modifier then cursed_fountain_modifier:SetStackCount(unit:GetOwner():FindModifierByName("modifier_imba_cursed_fountain"):GetStackCount()) end end end
if love.filesystem then require 'rocks' () end function love.conf(t) t.identity = "plat2" t.version = "0.10.0" t.dependencies = { } end
ENGINE_NAME = "PurEngine" dofile ("premake/amd_premake_util.lua") dofile ("premake/utils.lua") -- Workspace (Solution) workspace (ENGINE_NAME) configurations { "Debug", "Release", "Final" } platforms { "x64" } location "build" filename (ENGINE_NAME .. _AMD_VS_SUFFIX) startproject ("Demo") cppdialect "C++17" filter "platforms:x64" system "Windows" architecture "x64" dofile("External/premake5.lua") dofile("Engine/premake5.lua") dofile("Cooker/premake5.lua") dofile("Shaders/premake5.lua") dofile("Content/premake5.lua") dofile("Demo/premake5.lua")
local function locals() local locals = {} local i = 1 while true do local k, v = debug.getlocal(3, i) if k then locals[k] = v else break end i = 1 + i end return locals end return function(file) if file:match('^./') then local current_directory = debug.getinfo(2, 'S').source:sub(2):match('(.*/)') file = current_directory .. file:match('^./(.+)') end setfenv(loadfile(file), setmetatable(locals(), { __index = getfenv(2) }))() end
local skynet = require "skynet" local runTime = {} table.insert(runTime, "a") skynet.start(function () skynet.error("test4 开始函数") if #runTime == 1 then skynet.error("第一次运行") else skynet.error("非第一次运行了啊") end end)
return { name = "BlahDNS", label = _("BlahDNS"), resolver_url = "https://doh-fi.blahdns.com/dns-query", bootstrap_dns = "95.216.212.177,2a01:4f9:c010:43ce::1", help_link = "https://blahdns.com/", help_link_text = "BlahDNS Support" }
return { name = "ga", path = "/usr/local/bin" }
local M = {} local utils = require "utils" local Log = require "core.log" M.config = function() lvim.builtin["terminal"] = { on_config_done = nil, -- size can be a number or function which is passed the current terminal size = 20, -- open_mapping = [[<c-\>]], open_mapping = [[<c-t>]], hide_numbers = true, -- hide the number column in toggleterm buffers shade_filetypes = {}, shade_terminals = true, shading_factor = 2, -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light start_in_insert = true, insert_mappings = true, -- whether or not the open mapping applies in insert mode persist_size = false, -- direction = 'vertical' | 'horizontal' | 'window' | 'float', direction = "float", close_on_exit = true, -- close the terminal window when the process exits shell = vim.o.shell, -- change the default shell -- This field is only relevant if direction is set to 'float' float_opts = { -- The border key is *almost* the same as 'nvim_win_open' -- see :h nvim_win_open for details on borders however -- the 'curved' border is a custom border type -- not natively supported but implemented in this plugin. -- border = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open border = "curved", -- width = <value>, -- height = <value>, winblend = 0, highlights = { border = "Normal", background = "Normal", }, }, -- Add executables on the config.lua -- { exec, keymap, name} -- lvim.builtin.terminal.execs = {{}} to overwrite -- lvim.builtin.terminal.execs[#lvim.builtin.terminal.execs+1] = {"gdb", "tg", "GNU Debugger"} execs = { { "lazygit", "gg", "LazyGit" }, }, } end M.setup = function() local terminal = require "toggleterm" for _, exec in pairs(lvim.builtin.terminal.execs) do require("core.terminal").add_exec(exec[1], exec[2], exec[3]) end terminal.setup(lvim.builtin.terminal) if lvim.builtin.terminal.on_config_done then lvim.builtin.terminal.on_config_done(terminal) end end M.add_exec = function(exec, keymap, name) vim.api.nvim_set_keymap( "n", "<leader>" .. keymap, "<cmd>lua require('core.terminal')._exec_toggle('" .. exec .. "')<CR>", { noremap = true, silent = true } ) lvim.builtin.which_key.mappings[keymap] = name end M._split = function(inputstr, sep) if sep == nil then sep = "%s" end local t = {} for str in string.gmatch(inputstr, "([^" .. sep .. "]+)") do table.insert(t, str) end return t end M._exec_toggle = function(exec) local binary = M._split(exec)[1] if vim.fn.executable(binary) ~= 1 then Log:error("Unable to run executable " .. binary .. ". Please make sure it is installed properly.") return end local Terminal = require("toggleterm.terminal").Terminal local exec_term = Terminal:new { cmd = exec, hidden = true } exec_term:toggle() end local function get_log_path(name) --handle custom paths not managed by Plenary.log local file if name == "nvim" then file = utils.join_paths(vim.fn.stdpath "cache", "log") elseif name == "packer.nvim" then file = utils.join_paths(vim.fn.stdpath "cache", "packer.nvim.log") else file = Log:get_path() end if utils.is_file(file) then return file end end ---Toggles a log viewer according to log.viewer.layout_config ---@param name can be the name of any of the managed logs, e,g. "lunarvim" or the default ones {"nvim", "lsp", "packer.nvim"} M.toggle_log_view = function(name) local logfile = get_log_path(name) if not logfile then return end local term_opts = vim.tbl_deep_extend("force", lvim.builtin.terminal, { cmd = lvim.log.viewer.cmd .. " " .. logfile, open_mapping = lvim.log.viewer.layout_config.open_mapping, direction = lvim.log.viewer.layout_config.direction, -- TODO: this might not be working as expected size = lvim.log.viewer.layout_config.size, float_opts = lvim.log.viewer.layout_config.float_opts, }) local Terminal = require("toggleterm.terminal").Terminal local log_view = Terminal:new(term_opts) -- require("core.log"):debug("term", vim.inspect(term_opts)) log_view:toggle() end return M
object_tangible_powerup_weapon_melee_eledamage = object_tangible_powerup_weapon_shared_melee_eledamage:new { } ObjectTemplates:addTemplate(object_tangible_powerup_weapon_melee_eledamage, "object/tangible/powerup/weapon/melee_eledamage.iff")
local function create_text_field(parent, view, prop) return parent:textbox(prop:name(), ClassClbk(prop, "on_commit", view), prop._value, {background_color = prop._bgcolor}) end local function create_int_field(parent, view, prop) return parent:numberbox(prop:name(), ClassClbk(prop, "on_commit", view), prop._value, {background_color = prop._bgcolor, floats = 0}) end local function create_float_field(parent, view, prop) return parent:numberbox(prop:name(), ClassClbk(prop, "on_commit", view), prop._value, {background_color = prop._bgcolor}) end local function create_color_selector(parent, view, prop) return parent:colorbox(prop:name(), function(item) local c = item:Value() * 255 prop._value = c.r .. " " .. c.g .. " " .. c.b view:update_view(false) end, math.string_to_vector(prop._value) * 0.00392156862745098, {background_color = prop._bgcolor}) end local function create_texture_selector(parent, view, prop) return parent:pathbox(prop:name(), ClassClbk(prop, "on_commit", view), prop._value, "texture", {background_color = prop._bgcolor}) end local function create_effect_selector(parent, view, prop) return parent:pathbox(prop:name(), ClassClbk(prop, "on_commit", view), prop._value, "effect", {background_color = prop._bgcolor}) end local function create_percentage_slider(parent, view, prop) return parent:slider(prop:name(), ClassClbk(prop, "on_commit", view), tonumber(prop._value), {min = 0, max = 1, background_color = prop._bgcolor}) end local function create_check(parent, view, prop) return parent:tickbox(prop:name(), function(item) prop._value = item:Value() and "true" or "false" view:update_view(false) end, prop._value == "true", {background_color = prop._bgcolor}) end function CoreEffectPropertyContainer:fill_property_container_sheet(window, view, no_border) local property_container = self local top_sizer = window:divgroup(property_container:name(), {text = property_container:ui_name(), align_method = "grid"}) if property_container:description() ~= "" then top_sizer:GetToolbar():tb_btn("?", nil, {position = "TopRight", h = top_sizer:TextHeight(), help = property_container:name() .. "\n" .. property_container:description()}) end local bgcolor = BLE.Options:GetValue("BackgroundColor") for i, p in ipairs(property_container:properties()) do if p._visible then if not no_border then p._bgcolor = bgcolor end p:create_widget(window, view, no_border) end end window:AlignItems() end function CoreEffectProperty:create_widget(parent, view, no_border) local widget = nil local name = self:name() if self._type == "value_list" then widget = parent:combobox(name, ClassClbk(self, "on_commit", view), self._values, nil, {background_color = self._bgcolor, highlight_color = nil}) widget:set_value(self._value) elseif self._type == "timeline" then --widget = EWS:TimelineEdit(parent, "") --view[self._timeline_init_callback](view, widget) elseif self._type == "vector3" or self._type == "vector2" then widget = parent:Vector3(name, ClassClbk(self, "on_commit", view), math.string_to_vector(self._value), { vector2 = self._type == "vector2", background_visible = self._bgcolor and true, background_color = self._bgcolor, unhighlight_color = Color.transparent }) elseif self._type == "box" then widget = parent:divgroup(name, {background_visible = self._bgcolor and true, background_color = self._bgcolor, unhighlight_color = Color.transparent}) local function on_box_commit() local minv = widget:GetItem("Min"):Value() local maxv = widget:GetItem("Max"):Value() if math.string_to_vector(self._min) ~= minv or math.string_to_vector(self._max) ~= maxv then self._min = minv.x .. " " .. minv.y .. " " .. minv.z self._max = maxv.x .. " " .. maxv.y .. " " .. maxv.z view:update_view(false) end end widget:Vector3("Min", on_box_commit, math.string_to_vector(self._min)) widget:Vector3("Max", on_box_commit, math.string_to_vector(self._max)) elseif self._type == "variant" then widget = parent:pan(name, {background_color = self._bgcolor}) local combo = widget:combobox(name, ClassClbk(self, "on_set_variant", { update = true, container = widget, view = view })) combo.help = self._help for vn, p in pairs(self._variants) do combo:Append(tostring(vn)) end combo:SetSelectedItem(self._value) local variant_panel = widget:pan("VariantPanel") self:on_set_variant({ update = false, container = widget, view = view, variant_panel = variant_panel, }, combo) elseif self._type == "compound" then widget = parent:pan(name, {background_color = self._bgcolor}) self._compound_container:fill_property_container_sheet(widget, view, true) elseif self._type == "list_objects" then local vars local prev local function on_add_object() table.insert(vars.property._list_members, deep_clone(self._list_objects[vars.combo:SelectedItem()])) vars:fill_list() vars.view:update_view() end local function on_remove_object(item) table.delete(vars.property._list_members, item.parent.property) vars:fill_list() vars:on_select_object() vars.view:update_view() end local function on_select_object(item) if vars.list_box.selected then vars.list_box.selected:SetBorder({left = false}) end vars.list_box.selected = item vars.sheet:ClearItems() if prev then prev:SetBorder({left = false}) end if item then item:SetBorder({left = true}) end prev = item item.property._bgcolor = self._bgcolor item.property:create_widget(vars.sheet, vars.view) vars.view:update_view() end local function fill_list() vars.list_box:ClearItems() for i, p in ipairs(vars.property._list_members) do local btn = vars.list_box:button(p:name(), on_select_object, {property = p}) btn:tb_imgbtn("Remove", on_remove_object, nil, BLE.Utils:GetIcon("minus")) end end widget = parent:pan(name, {align_method = "grid", background_color = self._bgcolor}) local list_box = widget:pan("", {h = 250}) local combo = widget:combobox(" ", nil, nil, nil, {control_slice = 1, shrink_width = 0.93}) for n, p in pairs(self._list_objects) do combo:Append(n) combo:SetValue(n) end local add_button = widget:tb_btn("Add", on_add_object) local sheet = widget:pan("Sheet") vars = { property = self, combo = combo, container = widget, list_box = list_box, fill_list = fill_list, sheet = sheet, view = view, on_select_object = on_select_object } fill_list(vars) elseif self._type == "null" then widget = parent:pan(name) elseif self._type == "color" then widget = create_color_selector(parent, view, self) elseif self._type == "texture" then widget = create_texture_selector(parent, view, self) elseif self._type == "effect" then widget = create_effect_selector(parent, view, self) elseif self._type == "percentage" then widget = create_percentage_slider(parent, view, self) elseif self._type == "keys" then widget = parent:pan(name, {background_color = self._bgcolor}) local keys_pan local function sort_keys() table.sort(keys_pan._my_items, function(a,b) return tonumber(a.key.t) < tonumber(b.key.t) end) table.sort(self._keys, function(a,b) return tonumber(a.t) < tonumber(b.t) end) end local function load_keys() keys_pan:ClearItems() local key = self._key_type for i, k in ipairs(self._keys) do local v = Vector3(0, 0, 0) local vs = k.v local pan = keys_pan:pan("Key"..i, {key = k, offset = 0, align_method = "grid"}) local t = pan:numberbox("Time", function(item) k.t = item:Value() sort_keys() keys_pan:AlignItems() end, k.t, {shrink_width = 0.3, control_slice = 0.65}) local function set_value(item) local val = item:Value() if type_name(val) == "Vector3" then if key == "vector2" then val = val.x .. " " .. val.y else val = val.x .. " " .. val.y .. " " .. val.z end end k.v = val end local vec = math.string_to_vector(vs) local control if key == "vector2" or key == "vector3" then pan:Vector3("Value", set_value, vec, {shrink_width = 0.6, vector2 = key == "vector2"}) elseif key == "color" then pan:colorbox("Value", set_value, vec, {ret_vec = true, shrink_width = 0.6}) elseif key == "float" or key == "opacity" or key == "time" then if key == "opacity" then pan:slider("Value", set_value, vs, {min = 0, max = 255, shrink_width = 0.6}) else pan:numberbox("Value", set_value, vs, {shrink_width = 0.6}) end end pan:tb_imgbtn("Remove", function() table.remove(self._keys, i) pan:Destroy() load_keys() view:update_view(false) end, nil, BLE.Utils:GetIcon("minus"), {index = 1, size = t:TextHeight()}) end end widget:button("AddKey", function() table.insert(self._keys, 1, {t = 0, v = key == "vector3" and "0 0 0" or key == "vector2" and "0 0" or "0"}) local keys = widget:GetItem("Keys") sort_keys() load_keys() view:update_view() end) if self._presets then local presets = {} for _, preset in pairs(self._presets) do table.insert(presets, preset[1]) end widget:combobox("Presets", function(item) self._keys = {} for _, preset in pairs(self._presets[item:Value()][2]) do local val = preset[2] if type_name(val) == "Vector3" then if key == "vector2" then val = val.x .. " " .. val.y else val = val.x .. " " .. val.y .. " " .. val.z end end table.insert(self._keys, {t = preset[1], v = val}) end load_keys() end, presets, nil) end widget:tickbox("Loop", function(item) self._looping = item:Value() end, self._looping == "true") keys_pan = widget:pan("Keys") load_keys() elseif self._type == "boolean" then widget = create_check(parent, view, self) elseif self._type == "int" then widget = create_int_field(parent, view, self) elseif self._type == "float" or self._type == "double" then widget = create_float_field(parent, view, self) else widget = create_text_field(parent, view, self) end if widget and not no_border then widget.offset[2] = 12 widget:SetBorder({bottom = true, size = 1, color = widget.foreground:with_alpha(0.2)}) end return widget end function CoreEffectProperty:on_set_variant(widget_view_variant, item) local view = widget_view_variant.view local variant_panel = item.parent:GetItem("VariantPanel") self._value = item:SelectedItem() local variant = self._variants[self._value] variant_panel:ClearItems() variant:create_widget(variant_panel, view) if widget_view_variant.update then view:update_view(false) end end function CoreEffectProperty:on_commit(view, item) if self._type == "null" then return end local value = item:get_value() if self._type == "vector2" then value = value.x.." "..value.y elseif self._type == "vector3" then value = value.x.." "..value.y.." "..value.z elseif self._type == "value_list" then value = item:SelectedItem() end if self._value ~= value then self._value = value view:update_view(false) end end
local Color = require("util/color") local Throw = { mode = "release", } function Throw:error(fmt, ...) if type(fmt) ~= "string" then error("arg fmt is not string type") end if #{...} ~= 0 then fmt = string.format(fmt, ...) end if self.mode == "release" then fmt = Color:red("ERROR ")..fmt.."\n" io.stderr:write(fmt) os.exit(1) elseif self.mode == "debug" then error(fmt, 2) else error("Unknown throw mode "..self.mode) end end function Throw:setReleaseMode() self.mode = "release" end function Throw:setDebugMode() self.mode = "debug" end return Throw
-- Alias various helper variables. local opt = vim.opt -- Options. local cmd = vim.cmd -- Vim commands. -- Enable relative line numbers. opt.number = true opt.relativenumber = true opt.scrolloff = 3 -- Highlight current line. opt.cursorline = true -- Ignore case in searches. opt.ignorecase = true -- Show the filename in the window titlebar. opt.title = true -- Tabs configuration. opt.tabstop = 2 opt.shiftwidth = 2 opt.expandtab = true -- Use smart indentation. opt.smartindent = true -- Load packages. require('packer').startup(function() use 'wbthomason/packer.nvim' -- package manager use 'connorholyday/vim-snazzy' -- theme use 'lukas-reineke/indent-blankline.nvim' -- indentation guides use 'tpope/vim-fugitive' -- git use 'airblade/vim-gitgutter' -- git gutter use 'bling/vim-airline' -- status line use 'vim-airline/vim-airline-themes' -- status line themes end) -- Configure theme. cmd 'colorscheme snazzy' -- Fix color scheme search highlight colors cmd 'autocmd ColorScheme * highlight Search guibg=#ff6ac1' cmd 'autocmd ColorScheme * highlight IncSearch guibg=#ff6ac1' -- Configure indentation guides. vim.g.indent_blankline_char = '│' -- Configure status line. opt.laststatus = 2 cmd([[ let g:airline_theme='base16_snazzy' let g:airline_left_sep = '' let g:airline_right_sep = '' let g:airline_section_z = airline#section#create(['%3p%%', 'linenr', 'maxlinenr']) if !exists('g:airline_symbols') let g:airline_symbols = {} endif let g:airline_symbols.branch = '' let g:airline_symbols.readonly = '' let g:airline_symbols.linenr = ' Ξ ' let g:airline_symbols.notexists = '!' let g:airline_symbols.maxlinenr = ' ¶' ]])
-- walkabout.lua -- A slider-based sequencer -- PolyPerc output - and MIDI -- -- enc2 = select sequence # -- enc3 = set step value -- key2 = decrement step # -- key3 = increment step # -- -- key1 = hold for ALT -- -- alt-enc1 = select setting -- enc1 = change setting -- -- parameters set MIDI engine.name = "PolyPerc" local ControlSpec = require 'controlspec' local Control = require 'params/control' local Option = require 'params/option' -- constants local NUMSTEPS = 8 local NUMSEQS = 8 -- table starters... local sq = { {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0} } local ed = {} local st = {} local md = { _startup = true, _available = false, _devlist = {"none"}, midi_on = false, midi_msg = nil, midi_name = "none", midi_device = nil, } -- ----------------------- -- initialization routine -- ----------------------- function init() -- environment setup encoders.set_sens(2, .01) -- sq (sequence) data setup walkabout_load() -- ed (editor) data setup ed.cseq = 1 ed.step = 1 ed.onedown = false ed.view = Option.new("view", {"view", "start/stop", "tempo", "direction"}) -- st (stepper) data setup st.curdir = 1 st.curloc = 0 st.dir = Option.new("dir", {"fwd","bwd","udn","rot","rnd"}) st.dirString = {"forward", "backward", "up-down", "rotate", "random"} st.running = Option.new("running", {"off", "on"}) st.running.action = function(r) if (r == 1) then counter:stop() else counter:start() end end st.tempo = Control.new("tempo", ControlSpec.new(40, 280, 'lin', 1, 120, 'bpm')) st.tempo.action = function(t) counter.time = (60 / t) / 4 end counter = metro.alloc(count, 0.125, -1) counter2 = metro.alloc(noteoff_count) -- comment out the next line if you don't want to start running st.running:set(2) end -- ------------------------ -- parameter setup routine. -- ------------------------ function setup_params() if (md._available) then params:clear() params:add_option("midi_on", {"off", "on"}) params:set_action("midi_on", function(x) md.midi_on = (x == 2) end) params:add_option("midi_device", md._devlist) params:set_action("midi_device", function(x) selectMidiDevice(md._devlist[x]) end) if (md._startup) then walkabout_loadmidi() md._startup = false end if md.midi_on then params:set("midi_on", 2) else params:set("midi_on", 1) end params:set("midi_device", getMidiIndex(md.midi_name)) else params:clear() end end -- ------------------------------------------------------ -- deal with a 'pulse', moving the sequencer by one step. -- ------------------------------------------------------ function count() local dir = st.dir:get() if (dir == 1) then st.curloc = (st.curloc + 1) % NUMSTEPS st.curdir = 1 elseif (dir == 2) then st.curloc = (st.curloc - 1) % NUMSTEPS st.curdir = -1 elseif (dir == 3) then st.curloc = (st.curloc + st.curdir) if (st.curloc > (NUMSTEPS - 1)) then st.curloc = NUMSTEPS - 2 st.curdir = -1 end if (st.curloc < 0) then st.curloc = 1 st.curdir = 1 end elseif (dir == 4) then st.curloc = (st.curloc + st.curdir) if (st.curloc < 0) then st.curloc = 0 st.curdir = 1 elseif (st.curloc > (NUMSTEPS - 1)) then st.curloc = NUMSTEPS - 1 st.curdir = -1 end elseif (dir == 5) then st.curloc = math.random(0, NUMSTEPS - 1) st.curdir = 1 end play() redraw() end -- ---------------------------------------------- -- play the current note in the current sequence. -- ---------------------------------------------- function play() local m = sq[ed.cseq][st.curloc + 1] if (m > 0) then engine.hz(midi_to_hz(m + 36)) midi_noteon(m + 36) end end -- ----------------------------------- -- convert a midi note to a frequency. -- ----------------------------------- function midi_to_hz(note) return (440/32) * (2 ^ ((note - 9) / 12)) end -- ------------------------ -- deal with encoder input. -- ------------------------ function enc(c, v) local move = 0 if (c == 1) then if (ed.onedown) then if (v > 0) then ed.view:delta(1) else ed.view:delta(-1) end redraw() else status_entry(v) redraw() end elseif (c == 2) then if (v > 0) then move = 1 end if (v < 0) then move = -1 end ed.cseq = util.clamp(ed.cseq + move, 1, NUMSEQS) redraw() elseif (c == 3) then sq[ed.cseq][ed.step] = util.clamp(sq[ed.cseq][ed.step] + v, 0, 36) redraw() end end -- --------------------------------- -- conditional entry of status info. -- --------------------------------- function status_entry(v) local ev = ed.view:get() if (ev == 1) then return elseif (ev == 2) then st.running:delta(v) elseif (ev == 3) then st.tempo:delta(v) elseif (ev == 4) then if (v > 0) then st.dir:delta(1) else st.dir:delta(-1) end end end -- -------------------- -- deal with key input. -- -------------------- function key(c, v) if (c == 1) then ed.onedown = (v == 1) redraw() end if (c == 2 and v == 1) then ed.step = util.clamp(ed.step - 1, 1, NUMSTEPS) redraw() end if (c == 3 and v == 1) then ed.step = util.clamp(ed.step + 1, 1, NUMSTEPS) redraw() end end -- ------------------------------ -- the standard drawing function. -- ------------------------------ function redraw() screen.clear() screen.font_face(4) screen.font_size(10) draw_status() for i = 1, NUMSTEPS do local l = (16 * (i - 1)) + 8 screen.rect(l, 15, 8, 36) screen.stroke() screen.rect(l, 15 + (36 - sq[ed.cseq][i]), 8, sq[ed.cseq][i]) screen.fill() end screen.move(16 * (ed.step - 1) + 8, 60) screen.text(" ^") screen.move(16 * (st.curloc) + 8, 63) screen.text("x") screen.update() end -- ------------------------------------- -- conditional drawing of status header. -- ------------------------------------- function draw_status() if (ed.onedown) then screen.move(5, 10) screen.text(ed.view:string()) else local v = ed.view:get() screen.move(5, 10) if (v == 1) then screen.text("sq:" .. ed.cseq .. " edit step:" .. ed.step .. "(" .. sq[ed.cseq][ed.step] .. ")" .. " dir: " .. st.dir:string()) elseif (v == 2) then screen.text("running: " .. st.running:string()) elseif (v == 3) then screen.text("tempo: " .. st.tempo:get("tempo")) elseif (v == 4) then screen.text("direction: " .. st.dirString[st.dir:get()]) end end end -- ------------------------------ -- save the data during shutdown. -- ------------------------------ function cleanup() -- make sure we hard-stop the metros counter:stop() counter2:stop() -- save all the data! walkabout_save() walkabout_savemidi() end -- ======================================================================= -- MIDI Handling Routines -- ======================================================================= -- --------------------------- -- select a named MIDI device. -- --------------------------- function selectMidiDevice(n) -- first, deal with clearing out the old... if (md.midi_device) then if (md.midi_device.name == n) then return else md.midi_device = nil end end -- next, check if it is valid local dev = getMidiDevice(n) if (not dev) then return end -- finally, set the dinner plates! md.midi_name = dev.name md.midi_device = dev end -- --------------------------- -- find a MIDI device by name. -- --------------------------- function getMidiDevice(n) for i,dev in pairs(midi.devices) do if (dev.name == n) then return dev end end return nil end -- -------------------------- -- find a MIDI index by name. -- -------------------------- function getMidiIndex(n) for i,v in ipairs(md._devlist) do if (v == n) then return i end end return 1 end -- ----------------------------------------------- -- deal with a new midi device add (incl startup). -- ----------------------------------------------- function midi.add(dev) md._available = false md._devlist = {"none"} if (midi.devices) then for i,v in pairs(midi.devices) do md._available = true table.insert(md._devlist, v.name) end end setup_params() end -- --------------------------- -- deal with a device removal. -- --------------------------- function midi.remove(dev) -- only do this at the class level... if (dev) then local testname = dev.name md._available = false md._devlist = {"none"} if (midi.devices) then for i,v in pairs(midi.devices) do if (v.name ~= testname) then md._available = true table.insert(md._devlist, v.name) end end end if (testname == md.midi_name) then md.midi_on = false md.midi_name = "none" md.midi_device = nil end setup_params() end end -- -------------------------------------- -- send a note, queue up a noteoff timer. -- -------------------------------------- function midi_noteon(note) if (not md.midi_on) then return end if (not md.midi_device) then return end -- print("note on to " .. md.midi_device.name .. ": " .. note) md.midi_msg = {144, note, 127} md.midi_device:send(md.midi_msg) counter2:start(0.01, 1) end -- --------------------------- -- deal with a note-off timer. -- --------------------------- function noteoff_count() if (md.midi_device and md.midi_msg) then -- print("note off: " .. md.midi_msg[2]) md.midi_msg[3] = 0 md.midi_device:send(md.midi_msg) md.midi_msg = nil end end -- ======================================================================= -- Data Storage Routines -- ======================================================================= -- ----------------------------- -- save the set data to storage. -- ----------------------------- function walkabout_save() if (not isdir(data_dir .. "ddg")) then os.execute("mkdir " .. data_dir .. "ddg") end local fd=io.open(data_dir .. "ddg/walkabout.data","w+") io.output(fd) for x=1,NUMSEQS do for y=1,NUMSTEPS do io.write(sq[x][y] .. "\n") end end io.close(fd) end -- ------------------------------- -- save the MIDI setup to storage. -- ------------------------------- function walkabout_savemidi() if (not isdir(data_dir .. "ddg")) then os.execute("mkdir " .. data_dir .. "ddg") end tab.print(md) local fd=io.open(data_dir .. "ddg/walkabout_midi.data","w+") io.output(fd) io.write("1\n") -- version number if (md.midi_on) then io.write("true\n") else io.write("false\n") end io.write(md.midi_name .. "\n") io.close(fd) end -- ------------------------------- -- load the set data from storage. -- ------------------------------- function walkabout_load() local fd=io.open(data_dir .. "ddg/walkabout.data","r") if fd then print("datafile found") io.input(fd) for x=1,NUMSEQS do for y=1,NUMSTEPS do sq[x][y] = tonumber(io.read()) or 0 end end io.close(fd) else print("datafile not found") end end -- --------------------------------- -- load the MIDI setup from storage. -- --------------------------------- function walkabout_loadmidi() local fd=io.open(data_dir .. "ddg/walkabout_midi.data","r") if fd then print("midi setup found") io.input(fd) local version = tonumber(io.read()) if (version > 0) then md.midi_on = (io.read() == "true") md.midi_name = io.read() end io.close(fd) else print("midi setup not found") end end -- ------------------------------------------------- -- check if a file or directory exists in this path. -- ------------------------------------------------- function exists(file) local ok, err, code = os.rename(file, file) if not ok then if code == 13 then -- Permission denied, but it exists return true end end return ok, err end -- ----------------------------------------- -- Check if a directory exists in this path. -- ----------------------------------------- function isdir(path) -- "/" works on both Unix and Windows return exists(path.."/") end
--暗绘王·疾走罪噬 local m=14000306 local cm=_G["c"..m] cm.named_with_NextDraw=1 function cm.initial_effect(c) --link summon c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_FIEND),2,2) --pos change local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,m) e1:SetTarget(cm.postg) e1:SetOperation(cm.posop) c:RegisterEffect(e1) --search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(m,2)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCost(cm.thcost) e2:SetCondition(cm.thcon) e2:SetTarget(cm.thtg) e2:SetOperation(cm.thop) c:RegisterEffect(e2) end function cm.ND(c) local m=_G["c"..c:GetCode()] return m and m.named_with_NextDraw end function cm.cfilter(c,lg) return c:IsFacedown() and lg:IsContains(c) end function cm.spfilter(c,e,tp) return cm.ND(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local lg=c:GetLinkedGroup() if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.cfilter(chkc,lg) end if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lg) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lg) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function cm.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFaceup() then return end if Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end end end function cm.costfilter(c) return cm.ND(c) and not c:IsPublic() end function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) local tc=g:GetFirst() Duel.ConfirmCards(1-tp,tc) e:SetLabelObject(tc) tc:CreateEffectRelation(e) Duel.ShuffleHand(tp) end function cm.thcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(function(c) return c:GetSequence()<5 and c:IsFaceup() end,tp,LOCATION_MZONE,0,1,nil) end function cm.filter(c) return c:IsLevelAbove(6) and c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) end function cm.thop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then local ct=Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end if ct~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then Duel.BreakEffect() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,tc) end end
-- comp_webserver.lua local Collections = require("Collections"); local Application = require("Application"); local SocketOps = require("SocketOps"); local IOCPSocket = require("IOCPSocket"); local IOCPSocketIo = require("IOCPSocketIo"); local NetStream = require ("NetStream"); local PreamblePending = Collections.Queue(); local HandleNewConnection = function(accepted) print("Accepted New Connection: ", accepted); local socket = IOCPSocket:init(accepted); local netstream = NetStream.new(socket, IOCPSocketIo) PreamblePending:Enqueue(netstream); --[[ local res, err = accepted:SetNonBlocking(true); res, err = accepted:SetNoDelay(true); res, err = accepted:SetKeepAlive(true, 10*1000, 500); --]] end -- Handle the case where the thread is idling -- check to see if there are any requests pending -- if there are, spawn a routine to deal with them. OnIdle = function(counter) local netstream = PreamblePending:Dequeue(); if netstream then if netstream:IsConnected() then print("IsConnected") if HandleSingleRequest then print("HandleSingleRequest Defined") HandleSingleRequest(netstream); netstream:CloseDown(); else print("HandleSingleRequest, NOT defined") end --self.Scheduler:Spawn(requestHandler, netstream, PreamblePending) else print("netstream disconnected") end end end -- Handle some inter computicle messages OnMessage = function(msg) if msg.Message == SocketOps.ACCEPT then HandleNewConnection(msg.Param1); end end
function start(keys) local caster = keys.caster local ability = keys.ability local modifier = "berserker_ignite_self" local level = (ability:GetLevel()-1) local target = keys.target local damage_base = ability:GetLevelSpecialValueFor("damage_base", level) local damage_hp = (target:GetMaxHealth() * ability:GetLevelSpecialValueFor("max_health_as_damage", level) / 100) local damage = damage_base + damage_hp if caster:HasModifier(modifier) then local duration_d = ability:GetLevelSpecialValueFor("duration", level) local damage_bonus = ability:GetLevelSpecialValueFor("damage_bonus", level) local damage_hp_bonus = (target:GetMaxHealth() * ability:GetLevelSpecialValueFor("max_health_as_damage_bonus", level) / 100) damage = damage + damage_bonus + damage_hp_bonus local modifier_target = "berserker_blood_root" ability:ApplyDataDrivenModifier(caster, target, modifier_target, {duration = duration_d}) end local damageTable = { victim = target, attacker = caster, damage = damage, damage_type = DAMAGE_TYPE_MAGICAL, ability = ability, } ApplyDamage(damageTable) end
--[[ Credit screen ]]-- local credits = {} function credits_init() for i=1,20 do credits[i] = {} credits[i][1] = "Test"..i credits[i][2] = love.graphics:getHeight() + i * font_def:getHeight() end end function credits_update(dt) for i,entry in pairs(credits) do entry[2] = entry[2] - dt * 40 if entry[2] < 0 then entry[2] = love.graphics:getWidth() * 1 end end -- music:play() end function credits_draw() love.graphics.setFont(font_def) for i,entry in pairs(credits) do love.graphics.print(entry[1], 50, entry[2]) end love.graphics.setColor(0, 0, 0) love.graphics.rectangle("fill", 0, 0, 400, 200) love.graphics.setColor(255, 255, 255) love.graphics.draw(img_logo, 450, 100) love.graphics.setFont(font_title) love.graphics.print("Norimage", 50, 50) end
-- By Lauren. -- Coded for Lauren Development discord server. local QBCore = nil Citizen.CreateThread(function() while true do Citizen.Wait(10) if QBCore == nil then TriggerEvent('QBCore:GetObject', function(obj) QBCore = obj end) Citizen.Wait(200) end end end) RegisterNetEvent('aracsatma:client') AddEventHandler('aracsatma:client', function(kisi,karsi,plaka) local ped = PlayerPedId() local veh = GetVehiclePedIsIn(ped) local sofor = GetPedInVehicleSeat(veh, -1) local plate = GetVehicleNumberPlateText(veh) local model = veh local Player, Distance = QBCore.Functions.GetClosestPlayer() if veh then if plaka == plate then if sofor == ped then if Player ~= -1 and Distance < 5 and GetPlayerServerId(Player) == karsi.PlayerData.source then TriggerServerEvent("aracsatma:server",kisi,karsi,plate,model) else QBCore.Functions.Notify('Kişi yakınında olmalı!', 'error') end else QBCore.Functions.Notify('Şöför koltuğunda olman gerekir!', 'error') end else QBCore.Functions.Notify('Plaka bulunamadı!', 'error') end else QBCore.Functions.Notify('Araçta olman gerekiyor!', 'error') end end)
local function DLS_replace(replace_name, replace_icons) local down_arrow = { icon = "__DeadlockStacking__/graphics/arrow-d-32.png", scale = 0.5, icon_size = 32 } local up_arrow = { icon = "__DeadlockStacking__/graphics/arrow-u-32.png", scale = 0.5, icon_size = 32 } data.raw["item"]["deadlock-stack-"..replace_name].icons = { { icon = replace_icons } } data.raw["recipe"]["deadlock-stacks-stack-"..replace_name].icons = { { icon = replace_icons }, down_arrow } data.raw["recipe"]["deadlock-stacks-unstack-"..replace_name].icons = { { icon = replace_icons }, up_arrow } end -- stacking if mods["DeadlockStacking"] then -- Circuits Redux if mods["ShinyBobGFX"] then if settings.startup["replace-circuits"] and settings.startup["replace-circuits"].value == true then if settings.startup["moreshinybobs-gfx-circuit"] and settings.startup["moreshinybobs-gfx-circuit"].value == true then if data.raw["item"]["advanced-processing-unit"] then deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-advanced-processing-unit.png", "deadlock-stacking-4", 32) end DLS_replace("electronic-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-basic-electronic-circuit-board.png") DLS_replace("advanced-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-electronic-circuit-board.png") DLS_replace("processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-electronic-logic-board.png") else if data.raw["item"]["advanced-processing-unit"] then deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/shinybobs/stacked-electronic-processing-board.png", "deadlock-stacking-4", 32) end DLS_replace("electronic-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/shinybobs/stacked-basic-electronic-circuit-board.png") DLS_replace("advanced-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/shinybobs/stacked-electronic-circuit-board.png") DLS_replace("processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/shinybobs/stacked-electronic-logic-board.png") end else if settings.startup["moreshinybobs-gfx-circuit"] and settings.startup["moreshinybobs-gfx-circuit"].value == true then if data.raw["item"]["advanced-processing-unit"] then deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-advanced-processing-unit.png", "deadlock-stacking-4", 32) end DLS_replace("electronic-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-basic-electronic-circuit-board.png") DLS_replace("advanced-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-electronic-circuit-board.png") DLS_replace("processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-electronic-logic-board.png") else if data.raw["item"]["advanced-processing-unit"] then if mods["bobelectronics"] then deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-electronic-processing-board.png", "deadlock-stacking-4", 32) else deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-advanced-processing-unit.png", "deadlock-stacking-4", 32) end end if mods["bobelectronics"] then DLS_replace("electronic-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-basic-electronic-circuit-board.png") DLS_replace("advanced-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-electronic-circuit-board.png") DLS_replace("processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-electronic-logic-board.png") end end end else if settings.startup["moreshinybobs-gfx-circuit"] and settings.startup["moreshinybobs-gfx-circuit"].value == true then if data.raw["item"]["advanced-processing-unit"] then deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-advanced-processing-unit.png", "deadlock-stacking-4", 32) end DLS_replace("electronic-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-basic-electronic-circuit-board.png") DLS_replace("advanced-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-electronic-circuit-board.png") DLS_replace("processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/morebobs/stacked-electronic-logic-board.png") else if data.raw["item"]["advanced-processing-unit"] then if mods["bobelectronics"] then deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-electronic-processing-board.png", "deadlock-stacking-4", 32) else deadlock_stacking.create("advanced-processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-advanced-processing-unit.png", "deadlock-stacking-4", 32) end end if mods["bobelectronics"] then DLS_replace("electronic-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-basic-electronic-circuit-board.png") DLS_replace("advanced-circuit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-electronic-circuit-board.png") DLS_replace("processing-unit", "__morebobs_bobsStackCrate__/graphics/icons/stacking/circuits_redux/bobs_origins/stacked-electronic-logic-board.png") end end end -- Realistic Ores if settings.startup["moreshinybobs-gfx-ores"] and settings.startup["moreshinybobs-gfx-ores"].value == true then if mods["RealisticOres"] then DLS_replace("copper-ore", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/real/copper-ore.png") DLS_replace("iron-ore", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/real/iron-ore.png") DLS_replace("uranium-ore", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/real/uranium-ore.png") else DLS_replace("copper-ore", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/orginal/copper-ore.png") DLS_replace("iron-ore", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/orginal/iron-ore.png") DLS_replace("uranium-ore", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/orginal/uranium-ore.png") end DLS_replace("coal", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/orginal/coal.png") DLS_replace("stone", "__morebobs_bobsStackCrate__/graphics/icons/stacking/ores/orginal/stone.png") end -- Battery Redux if settings.startup["moreshinybobs-gfx-intermediates"] and settings.startup["moreshinybobs-gfx-intermediates"].value == true then if mods["bobplates"] then DLS_replace("battery", "__morebobs_bobsStackCrate__/graphics/icons/stacking/battery/battery-1S.png") end end end -- crating if mods["DeadlockCrating"] then -- Assembly Redux if mods["bobassembly"] then if settings.startup["add-powerbars"] and settings.startup["add-powerbars"].value == true then for i=1,3 do data.raw["item"]["deadlock-machine-packer-item-"..i].icons = { { icon = "__morebobs_bobsStackCrate__/graphics/icons/stacking/crate-machine/crate-machine-"..i..".png" }, { icon = "__ShinyBobGFX__/graphics/icons/num-"..(i-1)..".png" } } data.raw["assembling-machine"]["deadlock-machine-packer-entity-"..i].icons = { { icon = "__morebobs_bobsStackCrate__/graphics/icons/stacking/crate-machine/crate-machine-"..i..".png" }, { icon = "__ShinyBobGFX__/graphics/icons/num-"..(i-1)..".png" } } end else for i=1,3 do data.raw["item"]["deadlock-machine-packer-item-"..i].icons = { { icon = "__morebobs_bobsStackCrate__/graphics/icons/stacking/crate-machine/crate-machine-"..i..".png" } } data.raw["assembling-machine"]["deadlock-machine-packer-entity-"..i].icons = { { icon = "__morebobs_bobsStackCrate__/graphics/icons/stacking/crate-machine/crate-machine-"..i..".png" } } end end end end -- load mod parts require('other_mods') require('kao_bob') require('bobs_addon') require('angels_addon')
local http_ng = require 'http_ng' local fake_backend = require 'spec.util.fake_backend' spy.on(fake_backend, 'send') describe('http_ng', function() local http before_each(function() http = http_ng.new{backend = fake_backend} end) for _,method in ipairs{ 'get', 'head', 'options', 'delete' } do it('makes ' .. method .. ' call to backend', function() local response = http[method]('http://example.com') local last_request = assert(fake_backend.last_request) assert.spy(http.backend.send).was_called_with(last_request) assert.truthy(response) assert.equal(method:upper(), last_request.method) assert.equal('http://example.com', last_request.url) end) end for _,method in ipairs{ 'put', 'post', 'patch' } do it('makes ' .. method .. ' call to backend with body', function() local response = http[method]('http://example.com', 'body') local last_request = assert(fake_backend.last_request) assert.spy(http.backend.send).was_called_with(last_request) assert.truthy(response) assert.equal(method:upper(), last_request.method) assert.equal('http://example.com', last_request.url) assert.equal('body', last_request.body) end) end describe('json', function() it('has serializer', function() assert.equal(http_ng.serializers.json, http.json.serializer) end) it('doesnt have serializer', function() assert.falsy(http.unknown) end) it('serializes body as json', function() http.json.post('http://example.com', {table = 'value'}) assert.spy(http.backend.send).was_called() assert.equal('{"table":"value"}', fake_backend.last_request.body) assert.equal(#'{"table":"value"}', fake_backend.last_request.headers['Content-Length']) end) end) describe('when there is no error', function() local response before_each(function() http = http_ng.new{} response = http.get('http://127.0.0.1:8081') end) it('is ok', function() assert.equal(true, response.ok) end) it('has no error', function() assert.equal(nil, response.error) end) end) describe('when there is error', function() local response before_each(function() http = http_ng.new{} response = http.get('http://127.0.0.1:1000') end) it('is not ok', function() assert.equal(false, response.ok) end) it('has error', function() assert.equal('connection refused', response.error) end) end) end)
local BasePlugin = require "kong.plugins.base_plugin" local basic_serializer = require "kong.plugins.log-serializers.basic" local statsd_logger = require "kong.plugins.datadog.statsd_logger" local DatadogHandler = BasePlugin:extend() DatadogHandler.PRIORITY = 1 local ngx_timer_at = ngx.timer.at local string_gsub = string.gsub local ipairs = ipairs local gauges = { request_size = function (api_name, message, logger, tags) local stat = api_name .. ".request.size" logger:gauge(stat, message.request.size, 1, tags) end, response_size = function (api_name, message, logger, tags) local stat = api_name .. ".response.size" logger:gauge(stat, message.response.size, 1, tags) end, status_count = function (api_name, message, logger, tags) local stat = api_name .. ".request.status." .. message.response.status logger:counter(stat, 1, 1, tags) end, latency = function (api_name, message, logger, tags) local stat = api_name .. ".latency" logger:gauge(stat, message.latencies.request, 1, tags) end, request_count = function (api_name, message, logger, tags) local stat = api_name .. ".request.count" logger:counter(stat, 1, 1, tags) end, unique_users = function (api_name, message, logger, tags) if message.authenticated_entity ~= nil and message.authenticated_entity.consumer_id ~= nil then local stat = api_name .. ".user.uniques" logger:set(stat, message.authenticated_entity.consumer_id, tags) end end, request_per_user = function (api_name, message, logger, tags) if message.authenticated_entity ~= nil and message.authenticated_entity.consumer_id ~= nil then local stat = api_name .. "." .. string_gsub(message.authenticated_entity.consumer_id, "-", "_") .. ".request.count" logger:counter(stat, 1, 1, tags) end end, upstream_latency = function (api_name, message, logger, tags) local stat = api_name .. ".upstream_latency" logger:gauge(stat, message.latencies.proxy, 1, tags) end } local function log(premature, conf, message) if premature then return end local logger, err = statsd_logger:new(conf) if err then ngx.log(ngx.ERR, "failed to create Statsd logger: ", err) return end local api_name = string_gsub(message.api.name, "%.", "_") for _, metric in ipairs(conf.metrics) do local gauge = gauges[metric] if gauge then gauge(api_name, message, logger, conf.tags[metric]) end end logger:close_socket() end function DatadogHandler:new() DatadogHandler.super.new(self, "datadog") end function DatadogHandler:log(conf) DatadogHandler.super.log(self) -- unmatched apis are nil if not ngx.ctx.api then return end local message = basic_serializer.serialize(ngx) local ok, err = ngx_timer_at(0, log, conf, message) if not ok then ngx.log(ngx.ERR, "failed to create timer: ", err) end end return DatadogHandler
-- 物品系统 --[[ 每个英雄最大支持使用6件物品 支持满背包合成 物品存在重量,背包有负重,超过负重即使存在合成关系,也会被暂时禁止合成 ]] hitem = { DEFAULT_SKILL_ITEM_SLOT = string.char2id("AInv"), -- 默认物品栏技能(英雄6格那个)默认全部认定这个技能为物品栏,如有需要自行更改 FLEETING_IDS = { GOLD = hslk.item_fleeting[1], -- 默认金币(模型) LUMBER = hslk.item_fleeting[2], -- 默认木头 BOOK_YELLOW = hslk.item_fleeting[3], -- 技能书系列 BOOK_GREEN = hslk.item_fleeting[4], BOOK_PURPLE = hslk.item_fleeting[5], BOOK_BLUE = hslk.item_fleeting[6], BOOK_RED = hslk.item_fleeting[7], RUNE = hslk.item_fleeting[8], -- 神符(紫色符文) RELIEF = hslk.item_fleeting[9], -- 浮雕(橙色像块炭) EGG = hslk.item_fleeting[10], -- 蛋 FRAGMENT = hslk.item_fleeting[11], -- 碎片(蓝色石头) QUESTION = hslk.item_fleeting[12], -- 问号 GRASS = hslk.item_fleeting[13], -- 荧光草 DOTA2_GOLD = hslk.item_fleeting[14], -- Dota2赏金符 DOTA2_DAMAGE = hslk.item_fleeting[15], -- Dota2伤害符 DOTA2_CURE = hslk.item_fleeting[16], -- Dota2恢复符 DOTA2_SPEED = hslk.item_fleeting[17], -- Dota2极速符 DOTA2_VISION = hslk.item_fleeting[18], -- Dota2幻象符 DOTA2_INVISIBLE = hslk.item_fleeting[19], -- Dota2隐身符 }, } -- 单位嵌入到物品到框架系统 ---@protected hitem.embed = function(u) if (false == hcache.exist(u)) then -- 没有注册的单位直接跳过 return end -- 如果单位的玩家是真人 if (his.computer(hunit.getOwner(u)) == false) then -- 拾取 hevent.pool(u, hevent_default_actions.item.pickup, function(tgr) cj.TriggerRegisterUnitEvent(tgr, u, EVENT_UNIT_PICKUP_ITEM) end) -- 丢弃 hevent.pool(u, hevent_default_actions.item.drop, function(tgr) cj.TriggerRegisterUnitEvent(tgr, u, EVENT_UNIT_DROP_ITEM) end) -- 抵押 hevent.pool(u, hevent_default_actions.item.pawn, function(tgr) cj.TriggerRegisterUnitEvent(tgr, u, EVENT_UNIT_PAWN_ITEM) end) -- 使用 hevent.pool(u, hevent_default_actions.item.use, function(tgr) cj.TriggerRegisterUnitEvent(tgr, u, EVENT_UNIT_USE_ITEM) end) hevent.pool(u, hevent_default_actions.item.use_s, function(tgr) cj.TriggerRegisterUnitEvent(tgr, u, EVENT_UNIT_SPELL_EFFECT) end) end end -- 清理物品缓存数据 ---@protected hitem.free = function(whichItem) hitemPool.free(whichItem) hevent.free(whichItem) local holder = hitem.getHolder(whichItem) if (holder ~= nil) then hitem.subProperty(holder, hitem.getId(whichItem), hitem.getCharges(whichItem)) end hcache.free(whichItem) end --- 设置物品的持有单位 ---@protected ---@param whichItem userdata ---@param holder userdata hitem.setHolder = function(whichItem, holder) hcache.set(whichItem, CONST_CACHE.ITEM_HOLDER, holder) hitem.setLastHolder(whichItem, holder) end --- 获取物品的当前持有单位 ---@param whichItem userdata ---@return userdata|nil hitem.getHolder = function(whichItem) return hcache.get(whichItem, CONST_CACHE.ITEM_HOLDER) end --- 设置物品的最后持有单位 ---@protected ---@param whichItem userdata ---@param holder userdata hitem.setLastHolder = function(whichItem, holder) if (holder ~= nil and hitem.getLastHolder(whichItem) == nil) then hcache.set(whichItem, CONST_CACHE.ITEM_HOLDER_LAST, holder) end end --- 获取物品的最后持有单位 ---@param whichItem userdata ---@return userdata|nil hitem.getLastHolder = function(whichItem) return hcache.get(whichItem, CONST_CACHE.ITEM_HOLDER_LAST) end --- 把物品给回的最后持有单位 ---@param whichItem userdata ---@return userdata|nil hitem.backToLastHolder = function(whichItem) local lastHolder = hitem.getLastHolder(whichItem) cj.UnitAddItem(lastHolder, whichItem) htextTag.style(htextTag.create2Unit(lastHolder, "物品回来了", 8.00, "ffffff", 1, 1.1, 50.00), "scale", 0, 0.05) end --- 判断单位对于某件物品来说是否强取豪夺 ---@param whichItem userdata ---@param robber userdata ---@return boolean hitem.isRobber = function(whichItem, robber) if (whichItem == nil or robber == nil) then return false end local lastHolder = hitem.getLastHolder(whichItem) if (lastHolder == nil) then return false end local owner = hunit.getOwner(robber) if (hplayer.isIsolated(owner) == false) then return false end local lastOwner = hunit.getOwner(lastHolder) if (lastOwner == owner) then return false end return true end --- match done ---@param whichUnit userdata ---@param whichItem userdata ---@param triggerData table hitem.used = function(whichUnit, whichItem, triggerData) local isTrigger = false triggerData = triggerData or {} triggerData.triggerUnit = whichUnit triggerData.triggerItem = whichItem if (triggerData.targetLoc ~= nil) then triggerData.targetX = cj.GetLocationX(triggerData.targetLoc) triggerData.targetY = cj.GetLocationY(triggerData.targetLoc) triggerData.targetZ = cj.GetLocationZ(triggerData.targetLoc) cj.RemoveLocation(triggerData.targetLoc) triggerData.targetLoc = nil end if (#hmatcher.ITEM_MATCHER > 0) then local itemName = cj.GetItemName(whichItem) for _, m in ipairs(hmatcher.ITEM_MATCHER) do local s, e = string.find(itemName, m[1]) if (s ~= nil and e ~= nil) then local isPowerUp = hitem.getIsPowerUp(whichItem) local isPerishable = hitem.getIsPerishable(whichItem) local useCharged = 1 if (isPowerUp == true and isPerishable == true) then useCharged = hitem.getCharges(whichItem) end for _ = 1, useCharged, 1 do m[2](triggerData) hevent.triggerEvent( whichUnit, CONST_EVENT.itemUsed, triggerData ) isTrigger = true end end end end if (isTrigger == false) then hevent.triggerEvent( whichUnit, CONST_EVENT.itemUsed, triggerData ) end end --- 删除物品,可延时 ---@param it userdata ---@param delay number hitem.del = function(it, delay) if (his.destroy(it)) then return end delay = delay or 0 if (delay <= 0 and it ~= nil) then hitem.free(it) cj.SetWidgetLife(it, 1.00) cj.RemoveItem(it) else htime.setTimeout(delay, function(t) htime.delTimer(t) if (his.destroy(it)) then return end hitem.free(it) cj.SetWidgetLife(it, 1.00) cj.RemoveItem(it) end) end end ---@protected hitem.delFromUnit = function(whichUnit) if (whichUnit ~= nil) then hitem.forEach(whichUnit, function(enumItem) if (enumItem ~= nil) then hitem.del(enumItem) end end) end end --- 根据物品名称获取物品ID字符串 ---@param name string ---@return string hitem.n2i = function(name) if (hslk.n2v.item[name]) then return hslk.n2v.item[name]._id end return nil end --- 获取物品ID字符串 ---@param itOrId userdata|number|string ---@return string|nil hitem.getId = function(itOrId) local id if (type(itOrId) == "userdata") then id = string.id2char(cj.GetItemTypeId(itOrId)) elseif (type(itOrId) == "number") then id = string.id2char(itOrId) elseif (type(itOrId) == "string") then id = itOrId end return id end --- 获取物品名称 ---@param itOrId userdata|string|number ---@return string hitem.getName = function(itOrId) if (type(itOrId) == "userdata") then return cj.GetItemName(itOrId) elseif (type(itOrId) == "string" or type(itOrId) == "number") then local slk = hitem.getSlk(itOrId) if (slk ~= nil) then return slk.Name; end end return "" end --- 数值键值是根据地图编辑器作为标准的,所以大小写也是与之一致 ---@param itOrId userdata|string|number ---@return table|nil hitem.getSlk = function(itOrId) local id = hitem.getId(itOrId) return slk.item[id] end --- 获取单位的 _hslk 自定义数据 ---@param itOrIdOrName userdata|string|number ---@return table|nil hitem.getHSlk = function(itOrIdOrName) local id = hitem.getId(itOrIdOrName) if (hslk.i2v.item[id]) then return hslk.i2v.item[id] elseif (hslk.n2v.item[id]) then return hslk.n2v.item[id] end return nil end --- 判断一个物品是否影子物品的明面物品 ---@param itOrIdOrName userdata|string|number ---@return boolean hitem.isShadowFront = function(itOrIdOrName) local hs = hitem.getHSlk(itOrIdOrName) if (hs == nil) then return false end return (hs._shadow_id ~= nil and hs._type == "normal") end --- 判断一个物品是否影子物品的暗面物品 ---@param itOrIdOrName userdata|string|number ---@return boolean hitem.isShadowBack = function(itOrIdOrName) local hs = hitem.getHSlk(itOrIdOrName) if (hs == nil) then return false end return (hs._shadow_id ~= nil and hs._type == "shadow") end --- 获取一个物品的影子ID ---@param itOrIdOrName userdata|string|number ---@return string hitem.shadowID = function(itOrIdOrName) local hs = hitem.getHSlk(itOrIdOrName) if (hs == nil) then print_err("hitem.shadowID") end if (hs._shadow_id == nil) then print_err("hitem.shadowID not shadow item") end return hs._shadow_id end -- 获取物品的图标路径 ---@param itOrId userdata|string|number ---@return string hitem.getArt = function(itOrId) local s = hitem.getSlk(itOrId) return s.Art end --- 获取物品的模型路径 ---@param itOrId userdata|string|number ---@return string hitem.getFile = function(itOrId) local s = hitem.getSlk(itOrId) return s.file end --- 获取物品的分类 ---@param itOrId userdata|string|number ---@return string hitem.getClass = function(itOrId) local s = hitem.getSlk(itOrId) return s.class end --- 获取物品所需的金币 ---@param itOrId userdata|string|number ---@return number hitem.getGoldCost = function(itOrId) local s = hitem.getSlk(itOrId) return math.floor(s.goldcost) end --- 获取物品所需的木头 ---@param itOrId userdata|string|number ---@return number hitem.getLumberCost = function(itOrId) local s = hitem.getSlk(itOrId) return math.floor(s.lumbercost) end --- 获取物品是否可以使用 ---@param itOrId userdata|string|number ---@return boolean hitem.getIsUsable = function(itOrId) local s = hitem.getSlk(itOrId) return s.usable == "1" end --- 获取物品是否自动使用 ---@param itOrId userdata|string|number ---@return boolean hitem.getIsPowerUp = function(itOrId) local s = hitem.getSlk(itOrId) return s.powerup == "1" end --- 获取物品是否使用后自动消失 ---@param itOrId userdata|string|number ---@return boolean hitem.getIsPerishable = function(itOrId) local s = hitem.getSlk(itOrId) return s.perishable == "1" end --- 获取物品是否可卖 ---@param itOrId userdata|string|number ---@return boolean hitem.getIsSellAble = function(itOrId) local s = hitem.getSlk(itOrId) return s.sellable == "1" end --- 获取物品的最大叠加数(默认是1个,本框架以使用次数作为数量使用) ---@param itOrId userdata|string|number ---@return number hitem.getOverlie = function(itOrId) local s = hitem.getHSlk(itOrId) if (s ~= nil) then return s._overlie or 1 end return 1 end --- 获取物品的重量(默认为0) ---@param itOrId userdata|string|number ---@return number hitem.getWeight = function(itOrId, charges) local s = hitem.getHSlk(itOrId) if (s ~= nil) then if (charges == nil and type(itOrId) == "userdata") then -- 如果没有传次数,并且传入的是物品对象,会直接获取物品的次数,请注意 charges = hitem.getCharges(itOrId) else charges = 1 end return (s._weight or 0) * charges else return 0 end end --- 获取物品的属性加成 ---@param itOrId userdata|string|number ---@return table hitem.getAttribute = function(itOrId) local s = hitem.getHSlk(itOrId) if (s ~= nil) then return s._attr or {} else return {} end end --- 获取物品的等级 ---@param it userdata ---@return number hitem.getLevel = function(it) if (it ~= nil) then return cj.GetItemLevel(it) end return 0 end --- 获取物品的件数(以物品右下标的使用次数作为“件”) --- 框架会自动强制最低件数为1 ---@param it userdata ---@return number hitem.getCharges = function(it) if (it == nil) then return 0 end local c = cj.GetItemCharges(it) if (c < 1 and false == hitem.getIsPerishable(it)) then c = 1 cj.SetItemCharges(it, 1) end return c end --- 设置物品的使用次数 ---@param it userdata ---@param charges number hitem.setCharges = function(it, charges) if (it ~= nil and charges >= 0) then cj.SetItemCharges(it, charges) end end --- 获取某单位身上某种物品的使用总次数 ---@param itemId string|number ---@param whichUnit userdata ---@return number hitem.getTotalCharges = function(itemId, whichUnit) local charges = 0 local it if (type(itemId) == "string") then itemId = string.char2id(itemId) end for i = 0, 5, 1 do it = cj.UnitItemInSlot(whichUnit, i) if (it ~= nil and cj.GetItemTypeId(it) == itemId) then charges = charges + hitem.getCharges(it) end end return charges end --- 获取某单位身上空格物品栏数量 ---@param whichUnit userdata ---@return number hitem.getEmptySlot = function(whichUnit) local qty = cj.UnitInventorySize(whichUnit) local it for i = 0, 5, 1 do it = cj.UnitItemInSlot(whichUnit, i) if (it ~= nil) then qty = qty - 1 end end return qty end --- 循环获取某单位6格物品 ---@alias SlotForEach fun(enumItem: userdata,slotIndex: number):void ---@param whichUnit userdata ---@param action SlotForEach | "function(enumItem, slotIndex) end" ---@return number hitem.forEach = function(whichUnit, action) local it for i = 0, 5, 1 do it = cj.UnitItemInSlot(whichUnit, i) local res = action(it, i) if (type(res) == "boolean" and res == false) then break end end end --- 附加单位获得物品后的属性 ---@protected hitem.addProperty = function(whichUnit, itId, charges) if (whichUnit == nil or itId == nil or charges < 1) then return end local attr = hitem.getAttribute(itId) attr.weight_current = "+" .. hitem.getWeight(itId, 1) hattribute.caleAttribute(CONST_DAMAGE_SRC.item, true, whichUnit, attr, charges) for _ = 1, charges, 1 do hring.insert(whichUnit, itId) end end --- 削减单位获得物品后的属性 ---@protected hitem.subProperty = function(whichUnit, itId, charges) if (whichUnit == nil or itId == nil or charges < 1) then return end local attr = hitem.getAttribute(itId) attr.weight_current = "+" .. hitem.getWeight(itId, 1) hattribute.caleAttribute(CONST_DAMAGE_SRC.item, false, whichUnit, attr, charges) for _ = 1, charges, 1 do hring.remove(whichUnit, itId) end end --- 临时处理虚假物品信息 ---@private hitem.overlyingSlot = function(itemSlot) for i = 1, (#itemSlot - 1), 1 do local id1 = itemSlot[i].id if (id1 ~= nil) then local charges1 = itemSlot[i].charges local overlie = hitem.getOverlie(id1) if (charges1 < overlie) then for j = i + 1, #itemSlot, 1 do local id2 = itemSlot[j].id if (id2 == nil) then break end local charges2 = itemSlot[j].charges if (id1 == id2 and charges2 < overlie) then local allow = overlie - charges1 local addCharges = 0 if (charges2 <= allow) then charges1 = charges1 + charges2 addCharges = charges2 charges2 = 0 else charges1 = overlie addCharges = allow charges2 = charges2 - allow end itemSlot[i].charges = charges1 if (charges2 > 0) then itemSlot[j].charges = charges2 else itemSlot[j].id = nil itemSlot[j].charges = 0 end if (charges1 >= overlie) then break end end end end end end end --- 单位合成物品 ---@public ---@param whichUnit userdata 目标单位 ---@param items nil|userdata|table<userdata> 空|物品|物品数组 hitem.synthesis = function(whichUnit, items) if (whichUnit == nil) then return end items = items or {} if (type(items) == "userdata") then items = { items } end -- 合成流程 local itemKind = {} local itemSlot = {} local itemStat = { qty = {}, sub = { kv = {}, id = {} }, add = { kv = {}, id = {} }, profit = {} } hitem.forEach(whichUnit, function(slotItem) if (slotItem ~= nil) then local itId = hitem.getId(slotItem) local charges = hitem.getCharges(slotItem) if (false == table.includes(itemKind, itId)) then table.insert(itemKind, itId) end table.insert(itemSlot, { id = itId, charges = charges }) if (itemStat.qty[itId] == nil) then itemStat.qty[itId] = 0 end itemStat.qty[itId] = itemStat.qty[itId] + charges else table.insert(itemSlot, { id = nil, charges = 0 }) end end) if (#items > 0) then for _, it in ipairs(items) do if (hitem.isRobber(it, whichUnit) == false) then local itId = hitem.getId(it) local charges = hitem.getCharges(it) if (hitem.isShadowBack(itId)) then itId = hitem.shadowID(itId) end if (false == table.includes(itemKind, itId)) then table.insert(itemKind, itId) end table.insert(itemSlot, { id = itId, charges = charges }) if (itemStat.qty[itId] == nil) then itemStat.qty[itId] = 0 end itemStat.qty[itId] = itemStat.qty[itId] + (hitem.getCharges(it)) hitem.del(it) else hitem.backToLastHolder(it) end end end local matchStack = 1 while (matchStack > 0) do matchStack = 0 for _, itId in ipairs(itemKind) do if (hslk.synthesis.fragment[itId] ~= nil) then for _, need in ipairs(hslk.synthesis.fragmentNeeds) do if ((itemStat.qty[itId] or 0) >= need) then local maybeProfits = hslk.synthesis.fragment[itId][need] for _, mp in ipairs(maybeProfits) do local profitId = mp.profit local profitIndex = mp.index local whichProfit = hslk.synthesis.profit[profitId][profitIndex] local needFragments = whichProfit.fragment local match = true for _, frag in ipairs(needFragments) do if ((itemStat.qty[frag[1]] or 0) < frag[2]) then match = false break end end if (match == true) then matchStack = matchStack + 1 for _, frag in ipairs(needFragments) do itemStat.qty[frag[1]] = itemStat.qty[frag[1]] - frag[2] if (itemStat.qty[frag[1]] == 0) then itemStat.qty[frag[1]] = nil table.delete(itemKind, frag[1]) end if (itemStat.sub.kv[frag[1]] == nil) then itemStat.sub.kv[frag[1]] = frag[2] table.insert(itemStat.sub.id, frag[1]) else itemStat.sub.kv[frag[1]] = itemStat.sub.kv[frag[1]] + frag[2] end end if (itemStat.add.kv[profitId] == nil) then itemStat.add.kv[profitId] = whichProfit.qty table.insert(itemStat.add.id, profitId) else itemStat.add.kv[profitId] = itemStat.add.kv[profitId] + whichProfit.qty end table.insert(itemStat.profit, profitId) end end end end end end end hitem.overlyingSlot(itemSlot) if (#itemStat.sub.id > 0) then for _, subId in ipairs(itemStat.sub.id) do for _, sIt in ipairs(itemSlot) do if (itemStat.sub.kv[subId] <= 0) then break end if (sIt.id ~= nil and sIt.id == subId) then if (sIt.charges > itemStat.sub.kv[subId]) then sIt.charges = sIt.charges - itemStat.sub.kv[subId] itemStat.sub.kv[subId] = 0 if (sIt.charges == 0) then sIt.id = nil end elseif (sIt.charges == itemStat.sub.kv[subId]) then itemStat.sub.kv[subId] = 0 sIt.id = nil sIt.charges = 0 elseif (sIt.charges < itemStat.sub.kv[subId]) then itemStat.sub.kv[subId] = itemStat.sub.kv[subId] - sIt.charges sIt.id = nil sIt.charges = 0 end end end end end if (#itemStat.add.id > 0) then for _, addId in ipairs(itemStat.add.id) do for _, sIt in ipairs(itemSlot) do if (itemStat.add.kv[addId] <= 0) then break end if (sIt.id == nil) then local overlie = hitem.getOverlie(addId) sIt.id = addId if (overlie >= itemStat.add.kv[addId]) then sIt.charges = itemStat.add.kv[addId] itemStat.add.kv[addId] = 0 else sIt.charges = overlie itemStat.add.kv[addId] = itemStat.add.kv[addId] - overlie end elseif (addId == sIt.id) then local overlie = hitem.getOverlie(addId) if (sIt.charges < overlie) then local allow = (overlie - sIt.charges) if (allow >= itemStat.add.kv[addId]) then sIt.charges = sIt.charges + itemStat.add.kv[addId] itemStat.add.kv[addId] = 0 else sIt.charges = overlie itemStat.add.kv[addId] = itemStat.add.kv[addId] - allow end end end end end end -- 处理结果,先删后加 for i = 1, 6, 1 do local sIt = itemSlot[i] local it = cj.UnitItemInSlot(whichUnit, i - 1) if (it ~= nil) then local itId = hitem.getId(it) local charges = hitem.getCharges(it) if (sIt.id == nil) then hitem.del(it, 0) elseif (itId == sIt.id) then local diff = sIt.charges - charges if (diff > 0) then cj.SetItemCharges(it, charges + diff) hitem.addProperty(whichUnit, itId, diff) elseif (diff < 0) then cj.SetItemCharges(it, charges + diff) hitem.subProperty(whichUnit, itId, math.abs(diff)) end end end end hitem.overlyingSlot(itemSlot) for i = 1, 6, 1 do local sIt = itemSlot[i] local isProfit = table.includes(itemStat.profit, sIt.id) local it = cj.UnitItemInSlot(whichUnit, i - 1) if (it ~= nil) then local itId = hitem.getId(it) if (sIt.id ~= nil and itId ~= sIt.id) then hitem.del(it, 0) local newIt = cj.CreateItem(string.char2id(sIt.id), hunit.x(whichUnit), hunit.y(whichUnit)) if (isProfit) then hevent.triggerEvent(whichUnit, CONST_EVENT.itemSynthesis, { triggerUnit = whichUnit, triggerItem = newIt }) -- 触发合成事件 end cj.SetItemCharges(newIt, sIt.charges) cj.UnitAddItem(whichUnit, newIt) end elseif (sIt.id ~= nil) then local newIt = cj.CreateItem(string.char2id(sIt.id), hunit.x(whichUnit), hunit.y(whichUnit)) if (isProfit) then hevent.triggerEvent(whichUnit, CONST_EVENT.itemSynthesis, { triggerUnit = whichUnit, triggerItem = newIt }) -- 触发合成事件 end cj.SetItemCharges(newIt, sIt.charges) cj.UnitAddItem(whichUnit, newIt) end end if (#itemSlot > 6) then hitem.overlyingSlot(itemSlot) for i = 7, #itemSlot, 1 do local sIt = itemSlot[i] if (sIt.id ~= nil) then if (hitem.getEmptySlot(whichUnit) > 0) then local newIt = cj.CreateItem(string.char2id(sIt.id), hunit.x(whichUnit), hunit.y(whichUnit)) cj.SetItemCharges(newIt, sIt.charges) if (isProfit) then hevent.triggerEvent(whichUnit, CONST_EVENT.itemSynthesis, { triggerUnit = whichUnit, triggerItem = newIt }) -- 触发合成事件 end cj.UnitAddItem(whichUnit, newIt) else -- 判断如果是真实物品并且有影子,转为影子物品 if (hitem.isShadowFront(sIt.id)) then sIt.id = hitem.shadowID(sIt.id) end local newIt = cj.CreateItem(string.char2id(sIt.id), hunit.x(whichUnit), hunit.y(whichUnit)) cj.SetItemCharges(newIt, sIt.charges) hitemPool.insert(CONST_CACHE.ITEM_POOL_PICK, newIt) end end end end end --- 拆分物品 --- 物品的xy指的是物品创建时的坐标 --- 当物品在单位身上时,物品的位置并不跟随单位移动,而是创建时候的位置,需要注意 ---@public ---@param whichItem userdata 目标物品 ---@param separateType string | "'single'" | "'formula'" ---@param whichUnit userdata 触发单位(可选)当拥有持有单位时,拆分的物品会在单位坐标处 ---@return nil|string 错误时会返回一个字符串,反馈错误 hitem.separate = function(whichItem, separateType, formulaIndex, whichUnit) if (whichItem == nil) then return "物品不存在" end whichUnit = whichUnit or nil local x = 0 local y = 0 if (whichUnit ~= nil and cj.IsItemOwned(whichItem)) then x = cj.GetUnitX(whichUnit) y = cj.GetUnitY(whichUnit) else x = cj.GetItemX(whichItem) y = cj.GetItemY(whichItem) end local id = hitem.getId(whichItem) local charges = hitem.getCharges(whichItem) separateType = separateType or "single" formulaIndex = formulaIndex or 1 -- 默认获取第一条公式拆分 if (charges <= 1) then -- 如果数目小于2,自动切换成公式模式 separateType = "formula" end if (separateType == "single") then for _ = 1, charges, 1 do hitem.create({ itemId = id, charges = 1, x = x, y = y }) end elseif (separateType == "formula") then if (hitem.isShadowBack(id)) then id = hitem.shadowID(id) end if (hslk.synthesis.profit[id] == nil) then return "物品不存在公式,无法拆分" end local profit = hslk.synthesis.profit[id][formulaIndex] or nil if (profit == nil) then return "物品找不到公式,无法拆分" end for _ = 1, charges, 1 do for _, frag in ipairs(profit.fragment) do local flagId = frag[1] if (#profit.fragment == 1) then for _ = 1, frag[2], 1 do hitem.create({ itemId = flagId, charges = 1, x = x, y = y }) end else local qty = frag[2] local hs = hitem.getHSlk(flagId) if (hs ~= nil) then local overlie = hs._overlie or 1 while (qty > 0) do if (overlie >= qty) then hitem.create({ itemId = flagId, charges = qty, x = x, y = y }) qty = 0 else qty = qty - overlie hitem.create({ itemId = flagId, charges = overlie, x = x, y = y }) end end else hitem.create({ itemId = flagId, charges = qty, x = x, y = y }) end end end end end hevent.triggerEvent(whichItem, CONST_EVENT.itemSeparate, { triggerItem = whichItem, type = separateType, targetUnit = whichUnit, }) hitem.del(whichItem, 0) end --[[ 创建物品 options = { itemId = "I001", --物品ID charges = 1, --物品可使用次数(可选,默认为1) whichUnit = nil, --哪个单位(可选) x = nil, --哪个坐标X(可选) y = nil, --哪个坐标Y(可选) during = -1, --持续时间(可选,小于0无限制,如果有whichUnit,此项无效) } ]] hitem.create = function(options) if (options.itemId == nil) then print_err("hitem create -it-id") return end if (options.charges == nil) then options.charges = 1 end if (options.charges < 1) then return end local charges = options.charges local during = options.during or -1 -- 优先级 坐标 > 单位 local x, y local itemId = options.itemId if (options.x ~= nil and options.y ~= nil) then x = options.x y = options.y elseif (options.whichUnit ~= nil) then x = hunit.x(options.whichUnit) y = hunit.y(options.whichUnit) else print_err("hitem create -position") return end if (type(itemId) == "string") then itemId = string.char2id(itemId) end local it -- 如果不是创建给单位,又或者单位已经不存在了,直接返回 if (options.whichUnit == nil or his.deleted(options.whichUnit) or his.dead(options.whichUnit)) then -- 如果是shadow物品的明面物品,转成暗面物品再创建 if (hitem.isShadowFront(itemId)) then itemId = string.char2id(hitem.shadowID(itemId)) end -- 掉在地上 it = cj.CreateItem(itemId, x, y) cj.SetItemCharges(it, charges) hitemPool.insert(CONST_CACHE.ITEM_POOL_PICK, it) if (options.whichUnit ~= nil and during > 0) then htime.setTimeout(during, function(t) htime.delTimer(t) hitem.del(it, 0) end) end else -- 单位流程 it = cj.CreateItem(itemId, x, y) if (hitem.getIsPowerUp(itemId)) then -- 如果是powerUp类型,直接给予单位,后续流程交予[hevent_default_actions.item.pickup]事件 -- 因为shadow物品的暗面物品一定是powerup,所以无需额外处理 cj.SetItemCharges(it, charges) cj.UnitAddItem(options.whichUnit, it) elseif (hitem.getEmptySlot(options.whichUnit) > 0) then -- 没有满格,单位直接获得,后续流程交予[hevent_default_actions.item.pickup]事件 cj.SetItemCharges(it, charges) cj.UnitAddItem(options.whichUnit, it) elseif (hitem.isShadowFront(itemId)) then -- 满格了,如果是shadow的明面物品;转shadow再给与单位,后续流程交予[hevent_default_actions.item.pickup]事件 itemId = string.char2id(hitem.shadowID(itemId)) hitem.del(it) -- 掉在地上 it = cj.CreateItem(itemId, x, y) cj.SetItemCharges(it, charges) hitemPool.insert(CONST_CACHE.ITEM_POOL_PICK, it) else -- 满格了,如果是一般物品;掉在地上 cj.SetItemCharges(it, charges) hitemPool.insert(CONST_CACHE.ITEM_POOL_PICK, it) end end return it end --- 创建[瞬逝物]物品 --- 是以单位模拟的物品,进入范围瞬间消失并生效 --- 可以增加玩家的反馈刺激感 --- [type]金币,木材,黄色书,绿色书,紫色书,蓝色书,红色书,神符,浮雕,蛋",碎片,问号,荧光草Dota2赏金符,Dota2伤害符,Dota2恢复符,Dota2极速符,Dota2幻象符,Dota2隐身符 ---@param fleetingType number hitem.FLEETING_IDS[n] ---@param x number 坐标X ---@param y number 坐标Y ---@param during number 持续时间(可选,默认30秒) ---@param yourFunc onEnterUnitRange | "function(evtData) end" ---@return userdata item-unit hitem.fleeting = function(fleetingType, x, y, during, yourFunc) if (fleetingType == nil) then print_err("hitem fleeting -type") return end if (x == nil or y == nil) then return end during = during or 30 if (during < 0) then return end local it = hunit.create({ register = false, whichPlayer = hplayer.player_passive, unitId = fleetingType, x = x, y = y, during = during, }) hcache.alloc(it) if (type(yourFunc) == "function") then hevent.onEnterUnitRange(it, 127, yourFunc) end return it end --- 使一个单位的所有物品给另一个单位 ---@param origin userdata ---@param target userdata hitem.give = function(origin, target) if (origin == nil or target == nil) then return end for i = 0, 5, 1 do local it = cj.UnitItemInSlot(origin, i) if (it ~= nil) then hitem.create({ itemId = hitem.getId(it), charges = hitem.getCharges(it), whichUnit = target }) end hitem.del(it, 0) end end --- 操作物品给一个单位 ---@param it userdata ---@param targetUnit userdata hitem.pick = function(it, targetUnit) if (it == nil or targetUnit == nil) then return end cj.UnitAddItem(targetUnit, it) end --- 复制一个单位的所有物品给另一个单位 ---@param origin userdata ---@param target userdata hitem.copy = function(origin, target) if (origin == nil or target == nil) then return end for i = 0, 5, 1 do local it = cj.UnitItemInSlot(origin, i) if (it ~= nil) then hitem.create({ itemId = hitem.getId(it), charges = hitem.getCharges(it), whichUnit = target, }) end end end --- 令一个单位把物品扔在地上 ---@param origin userdata ---@param slot nil|number 物品位置 hitem.drop = function(origin, slot) if (origin == nil or his.deleted(origin) or his.dead(origin)) then return end if (slot == nil) then for i = 0, 5, 1 do local it = cj.UnitItemInSlot(origin, i) if (it ~= nil) then cj.UnitDropItemPoint(origin, it, hunit.x(origin), hunit.y(origin)) end end else local it = cj.UnitItemInSlot(origin, slot) if (it ~= nil) then cj.UnitDropItemPoint(origin, it, hunit.x(origin), hunit.y(origin)) end end end --- 一键拾取区域(x,y)长宽(w,h) ---@param u userdata ---@param x number ---@param y number ---@param w number ---@param h number hitem.pickRect = function(u, x, y, w, h) if (u == nil or his.deleted(u) or his.dead(u)) then return end local items = {} hitemPool.forEach(CONST_CACHE.ITEM_POOL_PICK, function(enumItem) if (hitem.isRobber(enumItem, u) == false) then local xi = cj.GetItemX(enumItem) local yi = cj.GetItemY(enumItem) local d = math.getDistanceBetweenXY(x, y, xi, yi) local deg = math.getDegBetweenXY(x, y, xi, yi) local distance = math.getMaxDistanceInRect(w, h, deg) if (d <= distance) then table.insert(items, enumItem) end end end) if (#items > 0) then hitem.synthesis(u, items) end end -- 一键拾取圆(x,y)半径(r) ---@param u userdata ---@param x number ---@param y number ---@param r number hitem.pickRound = function(u, x, y, r) if (u == nil or his.deleted(u) or his.dead(u)) then return end local items = {} hitemPool.forEach(CONST_CACHE.ITEM_POOL_PICK, function(enumItem) if (hitem.isRobber(enumItem, u) == false) then local xi = cj.GetItemX(enumItem) local yi = cj.GetItemY(enumItem) local d = math.getDistanceBetweenXY(x, y, xi, yi) if (d <= r) then table.insert(items, enumItem) end end end) if (#items > 0) then hitem.synthesis(u, items) end end
return {base_dirs = {{path = '~/Dotfiles/vile'}}, hidden_files = true} -- '~/dev/src', {'~/dev/src2'}, {'~/dev/src3', max_depth = 4}, {path = '~/Dotfiles/vile', max_depth = 2}
local args = ...; local EventManager = args.PiroGame.class("EventManager") function EventManager:initialize() self.eventListeners = {} end -- Adding an eventlistener to a specific event function EventManager:addListener(eventName, listener, listenerFunction) -- If there's no list for this event, we create a new one if not self.eventListeners[eventName] then self.eventListeners[eventName] = {} end if not listener.class or (listener.class and not listener.class.name) then print('Eventmanager: The listener has to implement a listener.class.name field.') end --[[ for _, registeredListener in pairs(self.eventListeners[eventName]) do if registeredListener[1].class == listener.class then print( string.format("Eventmanager: EventListener for {%s} already exists.", eventName)) return end end]] if type(listenerFunction) == 'function' then self.eventListeners[eventName][listener] = listenerFunction; else print('Eventmanager: Third parameter has to be a function! Please check listener for ' .. eventName) if listener.class and listener.class.name then print('Eventmanager: Listener class name: ' .. listener.class.name) end end end -- Removing an eventlistener from an event function EventManager:removeListener(eventName, listener) if self.eventListeners[eventName] then if self.eventListeners[eventName][listener] then self.eventListeners[eventName][listener] = nil; else print(string.format("Eventmanager: Listener %s to be deleted on Event %s is not existing.", listener.class.name, eventName)) end else print(string.format("Eventmanager: Event %s listener should be removed from is not existing ", eventName)); end end -- Firing an event. All registered listener will react to this event function EventManager:fireEvent(event) local name = event.class.name if self.eventListeners[name] then for listener, method in pairs(self.eventListeners[name]) do method(listener, event); end end end return EventManager
natives["java.lang.Object"] = natives["java.lang.Object"] or {} natives["java.lang.Object"]["toString()Ljava/lang/String;"] = function(this) return toJString(tostring(this):sub(8)) end natives["java.lang.Object"]["getClass()Ljava/lang/Class;"] = function(this) return getJClass(this[1].name) end natives["java.lang.Object"]["hashCode()I"] = function(this) return tonumber(tostring(this):sub(8), 16) end
local L = Grid2Options.L Grid2Options:RegisterIndicatorOptions("border", false, function(self, indicator) local statuses, options = {}, {} self:MakeIndicatorBorderCustomOptions(indicator, options) self:MakeIndicatorStatusOptions(indicator, statuses) self:AddIndicatorOptions(indicator, statuses, options ) end) function Grid2Options:MakeIndicatorBorderCustomOptions(indicator,options) options.borderColor = { type = "color", order = 10, name = L["Border Color"], desc = L["Sets the color for the border when no status is active."], hasAlpha = true, get = function() return self:UnpackColor( Grid2Frame.db.profile.frameBorderColor, 'TRANSPARENT' ) end, set = function( info, r,g,b,a ) self:PackColor( r,g,b,a, Grid2Frame.db.profile, "frameBorderColor" ) self:RefreshIndicator(indicator, "Update") end, } options.borderSize = { type = "range", order = 20, name = L["Border Size"], desc = L["Adjust the border of each unit's frame."], min = 1, max = 20, step = 1, get = function () return Grid2Frame.db.profile.frameBorder end, set = function (_, frameBorder) Grid2Frame.db.profile.frameBorder = frameBorder Grid2Frame:LayoutFrames(true) end, disabled = InCombatLockdown, } options.borderTexture = { type = "select", dialogControl = "LSM30_Border", order = 50, name = L["Border Texture"], desc = L["Adjust the border texture."], get = function (info) return Grid2Frame.db.profile.frameBorderTexture or "Grid2 Flat" end, set = function (info, v) Grid2Frame.db.profile.frameBorderTexture = v Grid2Frame:LayoutFrames(true) end, values = AceGUIWidgetLSMlists.border, } options.innerBordercolor = { type = "color", order = 40, name = L["Inner Border Color"], desc = L["Sets the color of the inner border of each unit frame"], get = function() return self:UnpackColor( Grid2Frame.db.profile.frameColor ) end, set = function( info, r,g,b,a ) self:PackColor( r,g,b,a, Grid2Frame.db.profile, "frameColor" ) Grid2Frame:LayoutFrames(true) end, hasAlpha = true, } options.innerBorderDistance= { type = "range", order = 45, name = L["Inner Border Size"], desc = L["Sets the size of the inner border of each unit frame"], min = -16, max = 16, step = 1, get = function () return Grid2Frame.db.profile.frameBorderDistance end, set = function (_, v) Grid2Frame.db.profile.frameBorderDistance = v Grid2Frame:LayoutFrames(true) end, } options.message = { type = "description", order = 100, name = L['|cFFe0e000\nThese options are applied to the active theme, if you want to change the settings for another theme go to the Appearance tab inside the Themes section.'], hidden = self.ThemesAreDisabled, } end
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local node1 = keywordHandler:addKeyword({'first bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first blessing for 10000 gold?'}) node1:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 1, premium = true, cost = 10000}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node2 = keywordHandler:addKeyword({'second bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the second blessing for 10000 gold?'}) node2:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 2, premium = true, cost = 10000}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node3 = keywordHandler:addKeyword({'third bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the third blessing for 10000 gold?'}) node3:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 3, premium = true, cost = 10000}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node4 = keywordHandler:addKeyword({'fourth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fourth blessing for 10000 gold?'}) node4:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 4, premium = true, cost = 10000}) node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node5 = keywordHandler:addKeyword({'fifth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fifth blessing for 10000 gold?'}) node5:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 5, premium = true, cost = 10000}) node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) npcHandler:addModule(FocusModule:new())
local U = require "togo.utility" local P = require "Pickle" local Core = require "src/Core" local Layout = require "core/Layout" local Page = require "core/Page" local NavItem = require "core/NavItem" local M = U.module("Composition") local page_vf = P.ValueFilter("AllopoeiaPage") :filter("article_class", "string") :filter("article_styles", "string") :filter("article_font", "string") -- :filter("custom_post_header", "boolean") :filter("nav_active", NavItem) M.page = Page.compose(page_vf, nil, { article_class = "generic", article_styles = nil, article_font = "sans", -- custom_post_header = nil, nav_active = nil, }) local function sp_elem_check(post, value) if #value >= 1 and #value <= 3 then local e1 = value[1] local e2 = #value >= 2 and value[2] or "" local e3 = #value == 3 and value[3] or false if U.is_type(e1, "string") and U.is_type(e2, "string") and U.is_type(e3, "boolean") then return value end end return nil, "malformed: expected table of {file} or {file, title} or {url, title, true}" end local post_vf = P.ValueFilter("AllopoeiaPost") :filter("url", "string", function(post, value) if post.url then return value end local path = U.path_dir(value) local file = U.path_file(value) local y, m, title = string.match(file, "^(%d%d%d%d)%-(%d%d)%-%d%d%-(.*)%.html$") if y then if not post.legacy_url then post.legacy_url = U.trim_leading_slashes(string.format("%s/%s/%s/%s.html", path, y, m, title)) end file = string.format("%s", title) end if string.sub(file, -5) ~= ".html" then file = string.format("%s/index.html", file) end return P.path(path, file) end) :filter("article_class", "string") :filter("article_styles", "string") :filter("article_font", "string") -- :filter("custom_post_header", "boolean") :filter("nav_active", NavItem) :filter("disable_header", "boolean") :filter("enable_comments", "boolean") :filter("disqus_legacy_identifier", "boolean") :filter("legacy_url", "string", function(post, value) return U.trim_leading_slashes(value) end) :filter("published", "string", Core.parse_time_vf_iso) :filter("updated", "string", Core.parse_time_vf_iso) :filter("author", "table") :filter("categories", "table") :filter("tags", "table") :filter("h_title", "string") :filter("subtitle", "string") :filter("h_subtitle", "string") :filter("lp_url", "string") :filter("lp_url_title", "string") :filter("lp_url_author", "string") :filter("sp_prev", "table", sp_elem_check) :filter("sp_next", "table", sp_elem_check) M.post = Page.compose(post_vf, Site.posts, { article_class = "post", article_styles = nil, article_font = "sans", -- custom_post_header = nil, nav_active = nil, disable_header = false, enable_comments = false, disqus_legacy_identifier = false, legacy_url = nil, published = nil, updated = nil, author = nil, categories = {}, tags = {}, h_title = nil, subtitle = nil, h_subtitle = nil, lp_url = nil, lp_url_title = nil, lp_url_author = nil, sp_prev = nil, sp_next = nil, }) local layout_vf = P.ValueFilter("AllopoeiaLayout") M.layout = Layout.compose(layout_vf, { }) return M
-- Write luatrace traces to a file. Each line is one of -- [S>] <filename> <linedefined> <lastlinedefined> -- Start or call into a trace at filename somewhere in the function defined at linedefined -- < -- Return from a function -- R <thread_id> -- Resume the thread thread_id -- Y -- Yield -- P -- pcall - the current line is protected for the duration of the following call -- E -- Error - unwind the stack until you find a p. -- <linenumber> <microseconds> -- Accumulate microseconds against linenumber -- Usually, a line will have time accumulated to it before and after it calls a function, so -- function b() return 1 end -- function c() return 2 end -- a = b() + c() -- will be traced as -- 3 (time) -- > (file) 1 1 -- 1 (time) -- < -- 3 (time) -- > (file) 2 2 -- 2 (time) -- < -- 3 (time) local DEFAULT_TRACE_LIMIT = 10000 -- How many traces to store before writing them out local DEFAULT_TRACE_FILE_NAME = "trace-out.txt" -- What to call the trace file -- Maybe these should be fields of a trace-file table. local traces -- Array of traces local count -- Number of traces local limit -- How many traces we'll hold before we write them to... local file -- The file to write traces to -- Write traces to a file ------------------------------------------------------ local function write_trace(a, b, c, d) if type(a) == "number" then file:write(tonumber(a), " ", ("%g"):format(tonumber(b)), "\n") elseif a:match("[>ST]") then file:write(a, " ", tostring(b), " ", tostring(c), " ", tostring(d), "\n") elseif a == "R" then file:write("R ", tostring(b), "\n") else -- It's one of <, Y, P or E file:write(a, "\n") end end local function write_traces() for i = 1, count do local t = traces[i] write_trace(t[1], t[2], t[3], t[4]) end count = 0 end -- API ------------------------------------------------------------------------- local trace_file = {} local defaults = { trace_file_name = DEFAULT_TRACE_FILE_NAME, trace_limit = DEFAULT_TRACE_LIMIT } local function get_settings(s) s = s or {} for k, v in pairs(defaults) do if not s[k] then s[k] = v end end return s end function trace_file.record(a, b, c, d) if limit < 2 then write_trace(a, b, c, d) else count = count + 1 traces[count] = { a, b, c, d } if count > limit then write_traces() end end end function trace_file.open(settings) settings = get_settings(settings) if settings.trace_file then file = settings.trace_file else file = assert(io.open(settings.trace_file_name, "w"), "Couldn't open trace file") end limit = settings.trace_limit count, traces = 0, {} end function trace_file.close() if file then write_traces() file:close() file = nil end end function trace_file.read(settings) local do_not_close_file settings = get_settings(settings) if settings.trace_file then file = settings.trace_file do_not_close_file = true else file = assert(io.open(settings.trace_file_name, "r"), "Couldn't open trace file") end local recorder = settings.recorder recorder.open(settings) for l in file:lines() do local l1 = l:sub(1, 1) if l1:match("[>ST]") then local filename, linedefined, lastlinedefined = l:match(". (%S+) (%d+) (%d+)") recorder.record(l1, filename, tonumber(linedefined), tonumber(lastlinedefined)) elseif l1 == "R" then local thread_id = l:match(". (%d+)") recorder.record(l1, tonumber(thread_id)) elseif l1:match("[<YPE]") then recorder.record(l1) else local line, time = l:match("(%d+) (%d+%.*%d*)") if line then recorder.record(tonumber(line), tonumber(time)) end end end recorder.close() if not do_not_close_file then file:close() end end return trace_file -- EOF -------------------------------------------------------------------------
TidyPlatesHubCache = { ["SavedTemplate"] = { ["TextShowOnlyOnActive"] = false, ["TextShowOnlyOnTargets"] = false, ["ColorFriendlyBarMode"] = 1, ["FrameBarWidth"] = 1, ["UnitSpotlightLookup"] = { }, ["WidgetsDebuff"] = true, ["OpacityFilterNonElite"] = false, ["SpellCastEnableFriendly"] = false, ["OpacityFilterPlayers"] = false, ["StyleEnemyBarsInstanceMode"] = false, ["FriendlyNameColorMode"] = "Default", ["ColorEnemyStatusTextMode"] = 1, ["OpacityNonTarget"] = 0.5, ["FilterScaleLock"] = false, ["StyleEnemyBarsOnElite"] = true, ["WidgetsRangeIndicator"] = false, ["OpacityFilterFriendlyNPC"] = false, ["UnitSpotlightColor"] = { ["r"] = 0.8, ["g"] = 0, ["b"] = 0, }, ["ColorPartyAggroBar"] = false, ["StatusTextRight"] = 7, ["StyleFriendlyBarsOnPlayers"] = true, ["FrameVerticalPosition"] = 0.7, ["WidgetsDebuffTrackList"] = "My Rake\nMy Rip\nMy Moonfire\nAll 339\nMy Regrowth\nMy Rejuvenation\nNot Facepalm Bolt", ["StatusTextCenterColor"] = true, ["ColorFriendlyNameMode"] = 1, ["TextColorGuildMember"] = { ["r"] = 0.235294117647059, ["g"] = 0.658823529411765, ["b"] = 1, }, ["StyleEnemyMode"] = 1, ["HeadlineFriendlySubtext"] = "RoleGuildLevel", ["HeadlineEnemyColor"] = 4, ["TextColorNeutral"] = { ["r"] = 0.988235294117647, ["g"] = 0.705882352941177, ["b"] = 0.105882352941176, }, ["ColorEnemyNameMode"] = 1, ["ClassPartyIcon"] = false, ["ColorFriendlyNPC"] = { ["r"] = 0, ["g"] = 1, ["b"] = 0, }, ["WidgetAuraTrackMagic"] = true, ["ScaleMouseoverSpotlight"] = false, ["TextColorFriendlyPlayer"] = { ["r"] = 0.235294117647059, ["g"] = 0.658823529411765, ["b"] = 1, }, ["EnemyBarColorMode"] = "ByThreat", ["OpacityFullNoTarget"] = true, ["StatusTextLeftColor"] = true, ["WidgetsComboPoints"] = true, ["ColorHighHealth"] = { ["r"] = 0, ["g"] = 1, ["b"] = 0.2, }, ["StyleHeadlineMiniMobs"] = false, ["FriendlyStatusTextMode"] = "HealthFunctionNone", ["WidgetsDebuffPriority"] = { }, ["UnitSpotlightOpacity"] = 1, ["StyleFriendlyBarsOnElite"] = false, ["ColorHealthBarMode"] = 3, ["StyleFriendlyBarsOnActive"] = true, ["FriendlyBarColorMode"] = "ByReaction", ["StyleHeadlineOutOfCombat"] = false, ["HeadlineEnemySubtext"] = "RoleGuildLevel", ["ColorHostileNPC"] = { ["r"] = 1, ["g"] = 0, ["b"] = 0, }, ["UnitSpotlightGlowEnable"] = true, ["WidgetAuraTrackDisease"] = true, ["StyleForceBarsOnTargets"] = false, ["StyleEnemyBarsOnActive"] = true, ["ColorGuildMember"] = { ["r"] = 0.235294117647059, ["g"] = 0.658823529411765, ["b"] = 1, }, ["ClassColorPartyMembers"] = false, ["UnitSpotlightScaleEnable"] = true, ["ThreatWarningMode"] = "Auto", ["ColorPartyAggroText"] = false, ["ScaleFiltered"] = 0.8, ["OpacityFilterUntitledFriendlyNPC"] = false, ["ScaleIgnoreNonEliteUnits"] = false, ["ScaleTargetSpotlight"] = false, ["OpacitySpotlightMouseover"] = false, ["UnitSpotlightList"] = "", ["ColorShowPartyAggro"] = false, ["ColorDangerGlowMode"] = 2, ["EnemyAlphaSpotlightMode"] = "ByThreat", ["OpacitySpotlightRaidMarked"] = false, ["FocusAsTarget"] = false, ["WidgetsDebuffStyle"] = 1, ["StyleFriendlyMode"] = 2, ["AdvancedEnableUnitCache"] = true, ["EnemyStatusTextMode"] = "HealthFunctionNone", ["ColorUnIntpellCast"] = { ["r"] = 0.513724386692047, ["g"] = 0.752939522266388, ["b"] = 0.76470422744751, }, ["StyleHeadlineNeutral"] = false, ["OpacityFilterNeutralUnits"] = false, ["TextColorFriendlyNPC"] = { ["r"] = 0.376470588235294, ["g"] = 0.87843137254902, ["b"] = 0.145098039215686, }, ["OpacityFilterEnemyNPC"] = false, ["TextNameColorMode"] = 1, ["StatusTextLeft"] = 8, ["WidgetsDebuffLookup"] = { }, ["EnemyNameColorMode"] = "Default", ["ColorMediumHealth"] = { ["r"] = 1, ["g"] = 1, ["b"] = 0, }, ["WidgetsMyBuff"] = false, ["ClassEnemyIcon"] = false, ["HeadlineFriendlyColor"] = 4, ["OpacityFiltered"] = 0, ["OpacityTarget"] = 1, ["OpacityFilterMini"] = false, ["TextUseBlizzardFont"] = false, ["OpacityFilterList"] = "Fanged Pit Viper\nLiberated Karabor Prisoner", ["TextColorHostileNPC"] = { ["r"] = 1, ["g"] = 0.2, ["b"] = 0.125490196078431, }, ["ColorPartyAggro"] = { ["r"] = 1, ["g"] = 0, ["b"] = 0.4, }, ["UnitSpotlightOpacityEnable"] = true, ["UnitSpotlightScale"] = 1.4, ["TextColorHostilePlayer"] = { ["r"] = 1, ["g"] = 0.2, ["b"] = 0.125490196078431, }, ["WidgetAuraTrackPoison"] = true, ["WidgetsEnableExternal"] = true, ["WidgetAuraTrackCurse"] = true, ["WidgetsRangeMode"] = 1, ["StyleEnemyBarsOnPlayers"] = true, ["WidgetsTotemIcon"] = false, ["ColorAttackingOtherTank"] = { ["r"] = 0.0588235294117647, ["g"] = 0.666666666666667, ["b"] = 0.784313725490196, }, ["ScaleFunctionMode"] = "ByThreat", ["ColorTapped"] = { ["r"] = 0.431372549019608, ["g"] = 0.431372549019608, ["b"] = 0.431372549019608, }, ["WidgetTargetHighlight"] = true, ["ColorFriendlyStatusTextMode"] = 1, ["OpacitySpotlightSpell"] = false, ["WidgetsThreatIndicator"] = true, ["TextHealthTextMode"] = 1, ["ColorEnemyBarMode"] = 1, ["ColorLowHealth"] = { ["r"] = 1, ["g"] = 0, ["b"] = 0, }, ["StatusTextCenter"] = 5, ["ScaleStandard"] = 1, ["WidgetAuraTrackDispelFriendly"] = false, ["StyleEnemyBarsOnNPC"] = true, ["FriendlyAlphaSpotlightMode"] = "None", ["ScaleIgnoreInactive"] = false, ["HighHealthThreshold"] = 0.7, ["ColorPartyAggroGlow"] = true, ["EnableOffTankHighlight"] = false, ["StatusTextRightColor"] = true, ["ScaleIgnoreNeutralUnits"] = true, ["ThreatGlowEnable"] = true, ["ColorNormalSpellCast"] = { ["r"] = 0.988235294117647, ["g"] = 0.549019607843137, ["b"] = 0, }, ["LowHealthThreshold"] = 0.3, ["ScaleSpotlightMode"] = 2, ["ColorHostilePlayer"] = { ["r"] = 1, ["g"] = 0, ["b"] = 0, }, ["ColorNeutral"] = { ["r"] = 1, ["g"] = 1, ["b"] = 0, }, ["ColorFriendlyPlayer"] = { ["r"] = 0, ["g"] = 0, ["b"] = 1, }, ["WidgetEliteIndicator"] = true, ["ColorThreatSafe"] = { ["r"] = 0.0588235294117647, ["g"] = 0.588235294117647, ["b"] = 0.901960784313726, }, ["ColorThreatWarning"] = { ["r"] = 0.8, ["g"] = 0, ["b"] = 0, }, ["UseGlobalSet"] = false, ["ColorThreatTransition"] = { ["r"] = 1, ["g"] = 0.627450980392157, ["b"] = 0, }, ["FriendlyHeadlineColor"] = "ByReaction", ["OpacityFilterLookup"] = { }, ["EnemyHeadlineColor"] = "ByReaction", ["ScaleSpotlight"] = 1.2, ["WidgetsMyDebuff"] = true, ["TextShowLevel"] = false, ["OpacityFilterInactive"] = false, ["ThreatMode"] = 1, ["UnitSpotlightBarEnable"] = true, ["WidgetAuraTrackStealable"] = false, ["ScaleCastingSpotlight"] = false, ["StyleFriendlyBarsOnNPC"] = false, ["StyleFriendlyBarsInstanceMode"] = false, ["OpacitySpotlight"] = 0.85, }, } TidyPlatesHubGlobal = { ["TextShowOnlyOnActive"] = false, ["TextShowOnlyOnTargets"] = false, ["ColorFriendlyBarMode"] = 1, ["ScaleIgnoreNeutralUnits"] = true, ["UnitSpotlightLookup"] = { }, ["WidgetsDebuff"] = true, ["OpacityFilterNonElite"] = false, ["SpellCastEnableFriendly"] = false, ["OpacityFilterPlayers"] = false, ["StyleEnemyBarsInstanceMode"] = false, ["WidgetsTotemIcon"] = false, ["ColorEnemyStatusTextMode"] = 1, ["OpacityNonTarget"] = 0.5, ["FilterScaleLock"] = false, ["StyleEnemyBarsOnElite"] = true, ["WidgetsRangeIndicator"] = false, ["OpacityFilterFriendlyNPC"] = false, ["UnitSpotlightColor"] = { ["b"] = 0, ["g"] = 0, ["r"] = 0.8, }, ["ColorPartyAggroBar"] = false, ["StatusTextRight"] = 7, ["StyleFriendlyBarsOnPlayers"] = true, ["WidgetAuraTrackCurse"] = true, ["WidgetsDebuffTrackList"] = "My Rake\nMy Rip\nMy Moonfire\nAll 339\nMy Regrowth\nMy Rejuvenation\nNot Facepalm Bolt", ["StatusTextCenterColor"] = true, ["ColorFriendlyNameMode"] = 1, ["TextColorGuildMember"] = { ["b"] = 1, ["g"] = 0.658823529411765, ["r"] = 0.235294117647059, }, ["StyleEnemyMode"] = 1, ["ColorPartyAggro"] = { ["b"] = 0.4, ["g"] = 0, ["r"] = 1, }, ["HeadlineEnemyColor"] = 4, ["TextColorNeutral"] = { ["b"] = 0.105882352941176, ["g"] = 0.705882352941177, ["r"] = 0.988235294117647, }, ["ColorEnemyNameMode"] = 1, ["ClassPartyIcon"] = false, ["ColorFriendlyNPC"] = { ["b"] = 0, ["g"] = 1, ["r"] = 0, }, ["WidgetAuraTrackMagic"] = true, ["ScaleMouseoverSpotlight"] = false, ["TextColorFriendlyPlayer"] = { ["b"] = 1, ["g"] = 0.658823529411765, ["r"] = 0.235294117647059, }, ["OpacityFilterMini"] = false, ["OpacityFullNoTarget"] = true, ["StatusTextLeftColor"] = true, ["WidgetsComboPoints"] = true, ["ColorHighHealth"] = { ["b"] = 0.2, ["g"] = 1, ["r"] = 0, }, ["StyleHeadlineMiniMobs"] = false, ["WidgetAuraTrackStealable"] = false, ["WidgetsDebuffPriority"] = { }, ["UnitSpotlightOpacity"] = 1, ["StyleFriendlyBarsOnElite"] = false, ["ColorHealthBarMode"] = 3, ["StyleFriendlyBarsOnActive"] = true, ["StyleHeadlineOutOfCombat"] = false, ["HeadlineEnemySubtext"] = 3, ["ColorHostileNPC"] = { ["b"] = 0, ["g"] = 0, ["r"] = 1, }, ["UnitSpotlightGlowEnable"] = true, ["WidgetAuraTrackDisease"] = true, ["StyleForceBarsOnTargets"] = false, ["StyleEnemyBarsOnActive"] = true, ["ColorGuildMember"] = { ["b"] = 1, ["g"] = 0.658823529411765, ["r"] = 0.235294117647059, }, ["ClassColorPartyMembers"] = false, ["UnitSpotlightScaleEnable"] = true, ["ColorPartyAggroText"] = false, ["ScaleFiltered"] = 0.8, ["OpacityFilterUntitledFriendlyNPC"] = false, ["HighHealthThreshold"] = 0.7, ["ScaleTargetSpotlight"] = false, ["OpacitySpotlightMouseover"] = false, ["UnitSpotlightList"] = "", ["ColorShowPartyAggro"] = false, ["StyleEnemyBarsOnNPC"] = true, ["EnemyAlphaSpotlightMode"] = 2, ["OpacitySpotlightRaidMarked"] = false, ["FocusAsTarget"] = false, ["WidgetsDebuffStyle"] = 1, ["StyleFriendlyMode"] = 2, ["AdvancedEnableUnitCache"] = true, ["ColorUnIntpellCast"] = { ["b"] = 0.76470422744751, ["g"] = 0.752939522266388, ["r"] = 0.513724386692047, }, ["StyleHeadlineNeutral"] = false, ["OpacityFilterNeutralUnits"] = false, ["TextColorFriendlyNPC"] = { ["b"] = 0.145098039215686, ["g"] = 0.87843137254902, ["r"] = 0.376470588235294, }, ["OpacityFilterEnemyNPC"] = false, ["TextNameColorMode"] = 1, ["StatusTextLeft"] = 8, ["WidgetsDebuffLookup"] = { }, ["ColorMediumHealth"] = { ["b"] = 0, ["g"] = 1, ["r"] = 1, }, ["WidgetsMyBuff"] = false, ["ClassEnemyIcon"] = false, ["OpacitySpotlight"] = 0.85, ["OpacityTarget"] = 1, ["TextColorHostileNPC"] = { ["b"] = 0.125490196078431, ["g"] = 0.2, ["r"] = 1, }, ["UnitSpotlightScale"] = 1.4, ["TextColorHostilePlayer"] = { ["b"] = 0.125490196078431, ["g"] = 0.2, ["r"] = 1, }, ["WidgetAuraTrackPoison"] = true, ["FrameBarWidth"] = 1, ["TextUseBlizzardFont"] = false, ["StyleEnemyBarsOnPlayers"] = true, ["WidgetsRangeMode"] = 1, ["OpacityFilterList"] = "Fanged Pit Viper\nLiberated Karabor Prisoner", ["StyleFriendlyBarsInstanceMode"] = false, ["ColorTapped"] = { ["b"] = 0.431372549019608, ["g"] = 0.431372549019608, ["r"] = 0.431372549019608, }, ["UnitSpotlightOpacityEnable"] = true, ["WidgetsEnableExternal"] = true, ["OpacitySpotlightSpell"] = false, ["WidgetTargetHighlight"] = true, ["TextHealthTextMode"] = 1, ["ColorEnemyBarMode"] = 1, ["ColorLowHealth"] = { ["b"] = 0, ["g"] = 0, ["r"] = 1, }, ["StatusTextCenter"] = 5, ["ScaleStandard"] = 1, ["WidgetAuraTrackDispelFriendly"] = false, ["StatusTextRightColor"] = true, ["FriendlyAlphaSpotlightMode"] = 1, ["ScaleIgnoreInactive"] = false, ["FrameVerticalPosition"] = 0.7, ["ColorPartyAggroGlow"] = true, ["ColorHostilePlayer"] = { ["b"] = 0, ["g"] = 0, ["r"] = 1, }, ["ColorNeutral"] = { ["b"] = 0, ["g"] = 1, ["r"] = 1, }, ["ScaleIgnoreNonEliteUnits"] = false, ["ColorFriendlyPlayer"] = { ["b"] = 1, ["g"] = 0, ["r"] = 0, }, ["ColorNormalSpellCast"] = { ["b"] = 0, ["g"] = 0.549019607843137, ["r"] = 0.988235294117647, }, ["LowHealthThreshold"] = 0.3, ["ScaleSpotlightMode"] = 2, ["ColorFriendlyStatusTextMode"] = 1, ["WidgetsThreatIndicator"] = true, ["ColorThreatSafe"] = { ["b"] = 0.901960784313726, ["g"] = 0.588235294117647, ["r"] = 0.0588235294117647, }, ["WidgetEliteIndicator"] = true, ["ColorThreatWarning"] = { ["b"] = 0, ["g"] = 0, ["r"] = 0.8, }, ["EnableOffTankHighlight"] = false, ["UseGlobalSet"] = false, ["ColorThreatTransition"] = { ["b"] = 0, ["g"] = 0.627450980392157, ["r"] = 1, }, ["ThreatGlowEnable"] = true, ["OpacityFilterLookup"] = { }, ["ColorDangerGlowMode"] = 2, ["ScaleSpotlight"] = 1.2, ["WidgetsMyDebuff"] = true, ["TextShowLevel"] = false, ["OpacityFilterInactive"] = false, ["ThreatMode"] = 1, ["UnitSpotlightBarEnable"] = true, ["ColorAttackingOtherTank"] = { ["b"] = 0.784313725490196, ["g"] = 0.666666666666667, ["r"] = 0.0588235294117647, }, ["ScaleCastingSpotlight"] = false, ["StyleFriendlyBarsOnNPC"] = false, ["HeadlineFriendlyColor"] = 4, ["OpacityFiltered"] = 0, }
local M = {} local function utable(table, no, s) for p, c in utf8.codes(s) do table[c] = no end end local match_wait_table = {} utable(match_wait_table, 800, [=[。.]=]) utable(match_wait_table, 600, [=[?!]=]) utable(match_wait_table, 400, [=[、,)]}」』]=]) utable(match_wait_table, -200, [=[・‥…]=]) utable(match_wait_table, 800, [=[。]=]) utable(match_wait_table, 400, [=[、」]=]) utable(match_wait_table, -200, [=[・]=]) utable(match_wait_table, -1, "\r\n") local function WAIT(ms) if ms > 0 then local rc = [=[\_w[]=] .. ms .. [=[]]=] return rc end return "" end function M.insert_wait(text) local rc = "" local remain = 0 for p, c in utf8.codes(text) do local pre = 0 local suf = 0 local wait = match_wait_table[c] if wait == nil then pre = remain remain = 0 elseif wait == -1 then goto CTRL_SKIP elseif wait > 0 then if remain < wait then remain = wait end elseif wait < 0 then pre = remain remain = 0 suf = 0 - wait end local u = utf8.char(c) rc = rc .. WAIT(pre) rc = rc .. u rc = rc .. WAIT(suf) ::CTRL_SKIP:: end rc = rc .. WAIT(remain) return rc end return M
local rules = require "scripts.rules" local animations = require "character.animations" local Character = require "character.character" local Imp = Character:new() function Imp:new(o, control) o = o or Character:new(o, control) setmetatable(o, self) self.__index = self return o end function Imp:create() Character.create(self) self:set_skin("imp") self.data.enemy = false local stats = self.data.stats stats.name = "Imp" stats.hit_die = "d6", rules.set_ability_scores_map(stats, { str = 15, dex = 10, con = 13, int = 15, wis = 18, cha = 8, }) rules.level_up(self.data.stats) stats.weakness.silver_vulnerable = true -- stats.inventory[3] = {code = self.name .. "_dagger", name = "dagger", type = "weapon"} stats.inventory[3] = {code = self.name .. "_cutlery", name = "steel_cutlery", type = "weapon"} stats.weapon = stats.inventory[3] stats.armor = { code = self.name .. "_armor", name = "imp_scales", type = "armor" } end function Imp:on_enter() Character.on_enter(self) self.fear_uses = 2 end function Imp:enemy_procedure() local target = self.control:closest_ally_on_sight(self.name) if target then if self.fear_uses > 0 then if rules.roll_dice('d6') == 1 then local pos = sfml_get_character_position(target) self:cast_magic('fear', pos.x, pos.y, rules.spell.fear.range_radius, rules.spell.fear.effect_radius) self.fear_uses = self.fear_uses - 1 else self:attack(target) end else self:attack(target) end else -- local dst = sfml_get_character_position('player') local dst = self.control.map.data.objects.player_elf_spawn_point.coords[1] local src = sfml_get_character_position(self.name) local distance = math.sqrt((dst.x - src.x) * (dst.x - src.x) + (dst.y - src.y) * (dst.y - src.y)) if distance > 1 then sfml_clear_schedule(self.name) sfml_move(self.name, dst.x, dst.y) end end end function Imp:ally_procedure() local target = self.control:closest_enemy_on_sight(self.name) if target then if self.fear_uses > 0 then if rules.roll_dice('d6') == 1 then local pos = sfml_get_character_position(target) self:cast_magic('fear', pos.x, pos.y, rules.spell.fear.range_radius, rules.spell.fear.effect_radius) self.fear_uses = self.fear_uses - 1 else self:attack(target) end else self:attack(target) end else local dst = sfml_get_character_position('player') local src = sfml_get_character_position(self.name) local distance = math.sqrt((dst.x - src.x) * (dst.x - src.x) + (dst.y - src.y) * (dst.y - src.y)) if distance > 1 then sfml_clear_schedule(self.name) sfml_move(self.name, dst.x, dst.y) end end end return Imp
local ffi = require( "ffi" ) local libs = ffi_luajit_libs or { OSX = { x86 = "bin/luajit.dylib", x64 = "bin/luajit.dylib" }, Windows = { x86 = "bin/luajit32.dll", x64 = "bin/luajit64.dll" }, Linux = { x86 = "bin/luajit32.so", x64 = "bin/luajit64.so" }, BSD = { x86 = "bin/luajit32.so", x64 = "bin/luajit64.so" }, POSIX = { x86 = "bin/luajit32.so", x64 = "bin/luajit64.so" }, Other = { x86 = "bin/luajit32.so", x64 = "bin/luajit64.so" }, } local lib = ffi_luajit_lib or libs[ ffi.os ][ ffi.arch ] local lj = ffi.load( lib ) ffi.cdef[[ enum { LUAJIT_MODE_ENGINE, LUAJIT_MODE_DEBUG, LUAJIT_MODE_FUNC, LUAJIT_MODE_ALLFUNC, LUAJIT_MODE_ALLSUBFUNC, LUAJIT_MODE_TRACE, LUAJIT_MODE_WRAPCFUNC = 0x10, LUAJIT_MODE_MAX }; typedef struct lua_State lua_State; typedef double lua_Number; typedef ptrdiff_t lua_Integer; typedef int (* lua_CFunction)( lua_State *L ); typedef const char* (* lua_Reader)( lua_State *L, void *ud, size_t *sz ); typedef int (* lua_Writer)( lua_State *L, const void* p, size_t sz, void* ud ); typedef void* (* lua_Alloc)( void *ud, void *ptr, size_t osize, size_t nsize ); lua_State* lua_newstate( lua_Alloc f, void *ud ); void lua_close( lua_State* L ); lua_State* lua_newthread( lua_State* L ); lua_CFunction lua_atpanic( lua_State* L, lua_CFunction panicf ); int lua_gettop( lua_State *L ); void lua_settop( lua_State *L, int idx ); void lua_pushvalue( lua_State *L, int idx ); void lua_remove( lua_State *L, int idx ); void lua_insert( lua_State *L, int idx ); void lua_replace( lua_State *L, int idx ); int lua_checkstack( lua_State *L, int sz ); void lua_xmove( lua_State *from, lua_State *to, int n ); int lua_isnumber( lua_State *L, int idx ); int lua_isstring( lua_State *L, int idx ); int lua_iscfunction( lua_State *L, int idx ); int lua_isuserdata( lua_State *L, int idx ); int lua_type( lua_State *L, int idx ); const char* lua_typename( lua_State *L, int tp ); int lua_equal( lua_State *L, int idx1, int idx2 ); int lua_rawequal( lua_State *L, int idx1, int idx2 ); int lua_lessthan( lua_State *L, int idx1, int idx2 ); lua_Number lua_tonumber( lua_State *L, int idx ); lua_Integer lua_tointeger( lua_State *L, int idx ); int lua_toboolean( lua_State *L, int idx ); const char* lua_tolstring( lua_State *L, int idx, size_t *len ); size_t lua_objlen( lua_State *L, int idx ); lua_CFunction lua_tocfunction( lua_State *L, int idx ); void* lua_touserdata( lua_State *L, int idx ); lua_State* lua_tothread( lua_State *L, int idx ); const void* lua_topointer( lua_State *L, int idx ); void lua_pushnil( lua_State *L ); void lua_pushnumber( lua_State *L, lua_Number n ); void lua_pushinteger( lua_State *L, lua_Integer n ); void lua_pushlstring( lua_State *L, const char *s, size_t l ); void lua_pushstring( lua_State *L, const char *s ); const char* lua_pushvfstring( lua_State *L, const char *fmt, va_list argp ); const char* lua_pushfstring( lua_State *L, const char *fmt, ...); void lua_pushcclosure( lua_State *L, lua_CFunction fn, int n); void lua_pushboolean( lua_State *L, int b); void lua_pushlightuserdata( lua_State *L, void *p); int lua_pushthread( lua_State *L); void lua_gettable( lua_State *L, int idx); void lua_getfield( lua_State *L, int idx, const char *k); void lua_rawget( lua_State *L, int idx); void lua_rawgeti( lua_State *L, int idx, int n); void lua_createtable( lua_State *L, int narr, int nrec); void* lua_newuserdata( lua_State *L, size_t sz); int lua_getmetatable( lua_State *L, int objindex); void lua_getfenv( lua_State *L, int idx); void lua_settable( lua_State *L, int idx); void lua_setfield( lua_State *L, int idx, const char *k); void lua_rawset( lua_State *L, int idx); void lua_rawseti( lua_State *L, int idx, int n); int lua_setmetatable( lua_State *L, int objindex); int lua_setfenv( lua_State *L, int idx); void lua_call( lua_State *L, int nargs, int nresults); int lua_pcall( lua_State *L, int nargs, int nresults, int errfunc); int lua_cpcall( lua_State *L, lua_CFunction func, void *ud); int lua_load( lua_State *L, lua_Reader r, void *dt, const char* chunkname); int lua_dump( lua_State *L, lua_Writer w, void *data ); int lua_yield( lua_State *L, int nresults ); int lua_resume( lua_State *L, int narg ); int lua_status( lua_State *L ); int lua_gc( lua_State *L, int what, int data ); int lua_error( lua_State *L ); int lua_next( lua_State *L, int idx ); void lua_concat( lua_State *L, int n ); lua_Alloc lua_getallocf( lua_State *L, void **ud ); void lua_setallocf( lua_State *L, lua_Alloc f, void *ud ); void lua_setlevel( lua_State *from, lua_State *to ); typedef struct lua_Debug lua_Debug; typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); int lua_getstack (lua_State *L, int level, lua_Debug *ar); int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); const char *lua_getupvalue (lua_State *L, int funcindex, int n); const char *lua_setupvalue (lua_State *L, int funcindex, int n); int lua_sethook (lua_State *L, lua_Hook func, int mask, int count); lua_Hook lua_gethook (lua_State *L); int lua_gethookmask (lua_State *L); int lua_gethookcount (lua_State *L); typedef struct _lua_Debug { int event; const char *name; const char *namewhat; const char *what; const char *source; int currentline; int nups; int linedefined; int lastlinedefined; char short_src[60]; int i_ci; } lua_Debug; //int luaJIT_setmode(lua_State *L, int idx, int mode); //void luaJIT_version_2_0_0_beta6(void); ]] --[[ lua_atpanic lua_call lua_checkstack lua_close lua_concat lua_cpcall lua_createtable lua_dump lua_equal lua_error lua_gc lua_getallocf lua_getfenv lua_getfield lua_gethook lua_gethookcount lua_gethookmask lua_getinfo lua_getlocal lua_getmetatable lua_getstack lua_gettable lua_gettop lua_getupvalue lua_insert lua_iscfunction lua_isnumber lua_isstring lua_isuserdata lua_lessthan lua_load lua_newstate lua_newthread lua_newuserdata lua_next lua_objlen lua_pcall lua_pushboolean lua_pushcclosure lua_pushfstring lua_pushinteger lua_pushlightuserdata lua_pushlstring lua_pushnil lua_pushnumber lua_pushstring lua_pushthread lua_pushvalue lua_pushvfstring lua_rawequal lua_rawget lua_rawgeti lua_rawset lua_rawseti lua_remove lua_replace lua_resume lua_setallocf lua_setfenv lua_setfield lua_sethook lua_setlocal lua_setmetatable lua_settable lua_settop lua_setupvalue lua_status lua_toboolean lua_tocfunction lua_tointeger lua_tolstring lua_tonumber lua_topointer lua_tothread lua_touserdata lua_type lua_typename lua_xmove lua_yield luajit_main luaJIT_setmode luaJIT_version_2_0_0_beta6 luaL_addlstring luaL_addstring luaL_addvalue luaL_argerror luaL_buffinit luaL_callmeta luaL_checkany luaL_checkinteger luaL_checklstring luaL_checknumber luaL_checkoption luaL_checkstack luaL_checktype luaL_checkudata luaL_error luaL_findtable luaL_getmetafield luaL_gsub luaL_loadbuffer luaL_loadfile luaL_loadstring luaL_newmetatable luaL_newstate luaL_openlib luaL_openlibs luaL_optinteger luaL_optlstring luaL_optnumber luaL_prepbuffer luaL_pushresult luaL_ref luaL_register luaL_typerror luaL_unref luaL_where luaopen_base luaopen_bit luaopen_debug luaopen_ffi luaopen_io luaopen_jit luaopen_math luaopen_os luaopen_package luaopen_string luaopen_table --]] return lj
local v = Instance.new("BoolValue") T.Pass(function() v[sym.Reference] = "foobar" end, "can be newindexed with symbols") T.Pass(function() return v[sym.Reference] end , "can be indexed with symbols") T.Fail(function() return v[T.DummySymbol] end , "can be indexed only with certain symbols")
local g = vim.g local o = vim.o -- Most filetypes -- vim-polyglot -- A solid language pack for Vim -- https://github.com/sheerun/vim-polyglot vim.cmd 'packadd vim-polyglot' -- Haskell -- haskell-vim (comes in vim-polyglot) -- https://github.com/neovimhaskell/haskell-vim.git -- indenting options g.haskell_indent_if = 3 g.haskell_indent_case = 2 g.haskell_indent_let = 4 g.haskell_indent_where = 6 g.haskell_indent_before_where = 2 g.haskell_indent_after_bare_where = 2 g.haskell_indent_do = 3 g.haskell_indent_in = 1 g.haskell_indent_guard = 2 -- turn on extra highlighting g.haskell_backpack = 1 g.haskell_enable_arrowsyntax = 1 g.haskell_enable_quantification = 1 g.haskell_enable_recursivedo = 1 g.haskell_enable_pattern_synonyms = 1 g.haskell_enable_static_pointers = 1 g.haskell_enable_typeroles = 1 -- Javascript -- vim-javascript (comes in vim-polyglot) -- https://github.com/pangloss/vim-javascript g.javascript_plugin_jsdoc = 1 -- Markdown -- vim-markdown (comes in vim-polyglot) -- https://github.com/plasticboy/vim-markdown g.vim_markdown_folding_disabled = 1 g.vim_markdown_new_list_item_indent = 2 o.conceallevel = 2
vim.notify("This is the trace message not too long", "info", { title = " Hello Notify" })
local _lastId = 0 local _timeouts = {} local _timeoutsN = 0 local _tremove = table.remove ---Runs callback after certain time. Returns cancellation ID. ---Note: all callbacks will be ran before `update()` call, ---and they would only ran when script runs. So if your script is executed each frame and AC runs at 60 FPS, smallest interval ---would be 0.016 s, and anything lower that you’d set would still act like 0.016 s. Also, intervals would only be called once ---per frame. ---@param callback fun() ---@param delay number @Delay time in seconds. ---@param uniqueKey any? @Unique key: if set, timer wouldn’t be added unless there is no more active timers with such ID. ---@return integer function setTimeout(callback, delay, uniqueKey) if uniqueKey ~= nil then for i = 1, _timeoutsN do if _timeouts[i].key == uniqueKey then return end end end if delay == nil then delay = 0 end local id = _lastId _lastId = _lastId + 1 local n = _timeoutsN + 1 _timeoutsN = n _timeouts[n] = { id = id, callback = callback, delay = delay, period = -1, key = uniqueKey } return id end ---Repeteadly runs callback after certain time. Returns cancellation ID. ---Note: all callbacks will be ran before `update()` call, ---and they would only ran when script runs. So if your script is executed each frame and AC runs at 60 FPS, smallest interval ---would be 0.016 s, and anything lower that you’d set would still act like 0.016 s. Also, intervals would only be called once ---per frame. ---@param callback fun() ---@param period number @Period time in seconds. ---@param uniqueKey any? @Unique key: if set, timer wouldn’t be added unless there is no more active timers with such ID. ---@return integer function setInterval(callback, period, uniqueKey) if uniqueKey ~= nil then for i = 1, _timeoutsN do if _timeouts[i].key == uniqueKey then return end end end if period == nil then period = 0 end local id = _lastId _lastId = _lastId + 1 local n = _timeoutsN + 1 _timeoutsN = n _timeouts[n] = { id = id, callback = callback, delay = period, period = period, key = uniqueKey } return id end ---Stops timeout. ---@param cancellationID integer @Value earlier retuned by `setTimeout()`. ---@return boolean @True if timeout with such ID has been found and stopped. function clearTimeout(cancellationID) local n = _timeoutsN for i = 1, n do if _timeouts[i].id == cancellationID then _tremove(_timeouts, i) _timeoutsN = n - 1 return true end end return false end ---Stops interval. ---@param cancellationID integer @Value earlier retuned by `setInterval()`. ---@return boolean @True if interval with such ID has been found and stopped. function clearInterval(cancellationID) return clearTimeout(cancellationID) end function __script.updateInner(dt) __util.updateInner(dt) for i = _timeoutsN, 1, -1 do local t = _timeouts[i] t.delay = t.delay - dt if t.delay < 0 then if t.period >= 0 then t.delay = t.period else _tremove(_timeouts, i) _timeoutsN = _timeoutsN - 1 end local s, err = pcall(t.callback) if not s then ac.error('Error in timer callback: '..tostring(err)) end end end end
local _, CLM = ... local MODELS = CLM.MODELS -- local UTILS = CLM.UTILS local CONSTANTS = CLM.CONSTANTS local BiddingCommSubmitBid = {} function BiddingCommSubmitBid:New(valueOrObject) local isCopyConstructor = (type(valueOrObject) == "table") local o = isCopyConstructor and valueOrObject or {} setmetatable(o, self) self.__index = self if isCopyConstructor then return o end o.d = valueOrObject return o end function BiddingCommSubmitBid:Bid() return self.d or 0 end local BiddingCommStructure = {} function BiddingCommStructure:New(typeOrObject, data) local isCopyConstructor = (type(typeOrObject) == "table") local o = isCopyConstructor and typeOrObject or {} setmetatable(o, self) self.__index = self if isCopyConstructor then if o.t == CONSTANTS.BIDDING_COMM.TYPE.SUBMIT_BID then o.d = BiddingCommSubmitBid:New(o.d) end return o end o.t = tonumber(typeOrObject) or 0 o.d = data return o end function BiddingCommStructure:Type() return self.t or 0 end function BiddingCommStructure:Data() return self.d end MODELS.BiddingCommStructure = BiddingCommStructure MODELS.BiddingCommSubmitBid = BiddingCommSubmitBid
function onCreate() makeLuaSprite('theSky','sky',-100,-200) addLuaSprite('theSky',false) setLuaSpriteScrollFactor('theSky', 0.2, 0.2); makeLuaSprite('theCity','mountains',-100,-400) addLuaSprite('theCity',false) setLuaSpriteScrollFactor('theCity', 0.3, 0.6); makeLuaSprite('theGround','grass',-150,-400) addLuaSprite('theGround',false) setLuaSpriteScrollFactor('theGround', 1.0, 1.0); makeLuaSprite('theHalfPipe','trees',-600,-400) addLuaSprite('theHalfPipe',false) setLuaSpriteScrollFactor('theHalfPipe', 1.0, 1.0); makeLuaSprite('thePillars','pillars',-600,-400) addLuaSprite('thePillars',false) setLuaSpriteScrollFactor('thePillars', 1.0, 1.0); makeLuaSprite('thePipe','plants',-500,-400) addLuaSprite('thePipe',false) setLuaSpriteScrollFactor('thePipe', 1.0, 1.0); end function onBeatHit( ... )--for every beat -- body end function onStepHit( ... )-- for every step -- body end function onUpdate( ... ) -- body end
function Auctionator.ReagentSearch.DoTradeSkillReagentsSearch() local recipeIndex = TradeSkillFrame.RecipeList:GetSelectedRecipeID() local recipeLevel = TradeSkillFrame.DetailsFrame:GetSelectedRecipeLevel() local recipeInfo = C_TradeSkillUI.GetRecipeInfo(recipeIndex, recipeLevel) local items = {recipeInfo.name} for reagentIndex = 1, C_TradeSkillUI.GetRecipeNumReagents(recipeIndex, recipeLevel) do local reagentName = C_TradeSkillUI.GetRecipeReagentInfo(recipeIndex, reagentIndex, recipeLevel) table.insert(items, reagentName) end if recipeInfo.alternateVerb == ENSCRIBE then -- Enchanting names are pretty unique, and we want to be able to find the -- enchantment (which has a name that isn't exactly recipeInfo.name) -- Hence we do a non-exact search. Auctionator.API.v1.MultiSearch(AUCTIONATOR_L_REAGENT_SEARCH, items) else -- Exact search to avoid spurious results, say with "Shrouded Cloth" Auctionator.API.v1.MultiSearchExact(AUCTIONATOR_L_REAGENT_SEARCH, items) end end function Auctionator.ReagentSearch.GetSkillReagentsTotal() local recipeIndex = TradeSkillFrame.RecipeList:GetSelectedRecipeID() local recipeLevel = TradeSkillFrame.DetailsFrame:GetSelectedRecipeLevel() local total = 0 for reagentIndex = 1, C_TradeSkillUI.GetRecipeNumReagents(recipeIndex, recipeLevel) do local multiplier = select(3, C_TradeSkillUI.GetRecipeReagentInfo(recipeIndex, reagentIndex, recipeLevel)) local link = C_TradeSkillUI.GetRecipeReagentItemLink(recipeIndex, reagentIndex) if link ~= nil then local unitPrice local dbKey = Auctionator.Utilities.BasicDBKeyFromLink(link) if AUCTIONATOR_VENDOR_PRICE_CACHE[dbKey] ~= nil then unitPrice = AUCTIONATOR_VENDOR_PRICE_CACHE[dbKey] else unitPrice = Auctionator.API.v1.GetAuctionPriceByItemLink(AUCTIONATOR_L_REAGENT_SEARCH, link) end if unitPrice ~= nil then total = total + multiplier * unitPrice end end end return total end function Auctionator.ReagentSearch.GetAHProfit() local recipeIndex = TradeSkillFrame.RecipeList:GetSelectedRecipeID() local recipeLink = C_TradeSkillUI.GetRecipeItemLink(recipeIndex) local count = C_TradeSkillUI.GetRecipeNumItemsProduced(recipeIndex) local currentAH = Auctionator.API.v1.GetAuctionPriceByItemLink(AUCTIONATOR_L_REAGENT_SEARCH, recipeLink) if currentAH == nil then currentAH = 0 end local toCraft = Auctionator.ReagentSearch.GetSkillReagentsTotal() return math.floor(math.floor(currentAH * count * 0.95 - toCraft) / 100) * 100 end
local EVENT = {} EVENT.Title = "... That's Lame." EVENT.Description = "Nothing happens." EVENT.id = "lame" function EVENT:GetConVars() local sliders = {} for _, v in pairs({}) do local name = "randomat_" .. self.id .. "_" .. v if ConVarExists(name) then local convar = GetConVar(name) table.insert(sliders, { cmd = v, -- The command extension (e.g. everything after "randomat_example_") dsc = convar:GetHelpText(), -- The description of the ConVar min = convar:GetMin(), -- The minimum value for this slider-based ConVar max = convar:GetMax(), -- The maximum value for this slider-based ConVar dcm = 0 -- The number of decimal points to support in this slider-based ConVar }) end end local checks = {} for _, v in pairs({}) do local name = "randomat_" .. self.id .. "_" .. v if ConVarExists(name) then local convar = GetConVar(name) table.insert(checks, { cmd = v, -- The command extension (e.g. everything after "randomat_example_") dsc = convar:GetHelpText() -- The description of the ConVar }) end end local textboxes = {} for _, v in pairs({}) do local name = "randomat_" .. self.id .. "_" .. v if ConVarExists(name) then local convar = GetConVar(name) table.insert(textboxes, { cmd = v, -- The command extension (e.g. everything after "randomat_example_") dsc = convar:GetHelpText() -- The description of the ConVar }) end end return sliders, checks, textboxes end function EVENT:Begin() end function EVENT:End() end Randomat:register(EVENT)
local M = {} -- M.config = function() O.plugin.nvimtree = { side = "left", show_icons = { git = 1, folders = 1, files = 1, folder_arrows = 1, tree_width = 30, }, ignore = { ".git", "node_modules", ".cache" }, auto_open = 1, auto_close = 1, quit_on_open = 0, follow = 1, hide_dotfiles = 1, git_hl = 1, root_folder_modifier = ":t", tab_open = 0, allow_resize = 1, lsp_diagnostics = 1, auto_ignore_ft = { "startify", "dashboard" }, icons = { default = "", symlink = "", git = { unstaged = "", staged = "S", unmerged = "", renamed = "➜", deleted = "", untracked = "U", ignored = "◌", }, folder = { default = "", open = "", empty = "", empty_open = "", symlink = "", }, }, } end -- M.setup = function() local status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") if not status_ok then return end local g = vim.g for opt, val in pairs(O.plugin.nvimtree) do g["nvim_tree_" .. opt] = val end local tree_cb = nvim_tree_config.nvim_tree_callback g.nvim_tree_bindings = { { key = { "l", "<CR>", "o" }, cb = tree_cb "edit" }, { key = "h", cb = tree_cb "close_node" }, { key = "v", cb = tree_cb "vsplit" }, } end -- -- M.toggle_tree = function() local view_status_ok, view = pcall(require, "nvim-tree.view") if not view_status_ok then return end if view.win_open() then require("nvim-tree").close() if package.loaded["bufferline.state"] then require("bufferline.state").set_offset(0) end else if package.loaded["bufferline.state"] then -- require'bufferline.state'.set_offset(31, 'File Explorer') require("bufferline.state").set_offset(31, "") end require("nvim-tree").toggle() end end -- return M
return function() local ActionType = require(script.Parent.ActionType) local createSpy = require(script.Parent.Parent.Tests.createSpy) describe("WHEN required", function() local replicatePastChanges = require(script.Parent.replicatePastChanges) it("SHOULD have the following interface", function() expect(replicatePastChanges).to.have.interface(function(t) return t.callback end) end) describe("GIVEN a remoteEvent", function() local fireClientSpy = createSpy() local remoteEvent = { FireClient = fireClientSpy.callback, } describe("WHEN invoked", function() local replicatePastChangesInstance = replicatePastChanges(remoteEvent) it("SHOULD have the following interface", function() expect(replicatePastChangesInstance).to.have.interface(function(t) return t.callback end) end) describe("GIVEN a player", function() local player = "player" describe("WHEN invoked", function() it("SHOULD invoked remoteEvent's FireClient with the expected action", function() replicatePastChangesInstance(player) expect(fireClientSpy.getNumberOfCalls()).to.equal(1) fireClientSpy.expectToBeCalledWith(remoteEvent, "player") local lastCall = fireClientSpy.getLastCall() local action = lastCall[3] expect(action).to.be.ok() expect(action.type).to.equal(ActionType.Setup) end) end) end) end) end) end) end
unpack = unpack or table.unpack function rawpairs(t) return next, t, nil end function pairs(t) local mt = getmetatable(t) return (mt and mt.__pairs or rawpairs)(t) end function default_object_pairs(self) return coroutine.wrap(function() for k, v in rawpairs(self) do if type(k) == 'string' then if k:startswith('__') then k = nil elseif k:startswith('_') then k = k:sub(2) end end if k then coroutine.yield(k, v) end end end) end nested = require 'nested' nested_function = require 'nested.function' nested_ordered = require 'nested.ordered' nested_match = require 'nested.match' wildcard_pattern = require 'wildcard_pattern' do local gitignore = io.open(".gitignore") ignore_patterns = gitignore and wildcard_pattern.aggregate.from(gitignore) or wildcard_pattern.aggregate.new() ignore_patterns:extend(".*") if gitignore then gitignore:close() end end function assertf(cond, fmt, ...) return assert(cond, string.format(fmt, ...)) end function errorf(fmt, ...) return error(string.format(fmt, ...)) end Expression = require 'expression' Object = require 'object' Recipe = require 'recipe' _ENV = _ENV or getfenv() TIME = 0 get = nested.get get_or_create = nested.get_or_create set = nested.set set_or_create = nested.set_or_create function index_first_of(index, ...) for i = 1, select('#', ...) do local t = select(i, ...) if t then local value = t[index] if value ~= nil then return value end end end return nil end function rawindex_first_of(index, ...) for i = 1, select('#', ...) do local t = select(i, ...) if t then local value = rawget(t, index) if value ~= nil then return value end end end return nil end function create_index_first_of(index_chain) return index_chain and function(t, index) return index_first_of(index, unpack(index_chain)) end end function safeunpack(v, i, j) if type(v) == 'table' then return unpack(v, i, j) elseif v ~= nil then return v end -- if v == nil, don't return any values end function safepack(...) if select('#', ...) > 1 then return {...} else return ... end end function string.startswith(s, prefix) return s:sub(1, #prefix) == prefix end function string.endswith(s, suffix) return s:sub(- #suffix) == suffix end table.clear = table.clear or function(t) for k, v in rawpairs(t) do t[k] = nil end end function table_iextend(t, other) if other then local n = #t for i, v in ipairs(other) do t[n + i] = v end end return t end function index_or_create(t, index) local value = t[index] if value == nil then value = {} t[index] = value end return value end function addtoscene(obj) Scene:add(obj) end function clamp(x, min, max) if x < min then return min elseif x > max then return max else return x end end function deg2rad(angle) return angle * math.pi / 180 end function rad2deg(angle) return angle * 180 / math.pi end function shallowcopy(value) if type(value) == 'table' then local newvalue = {} for k, v in pairs(value) do newvalue[k] = v end return newvalue else return value end end function deepcopy(value) if type(value) == 'table' then local newvalue = {} for k, v in pairs(value) do newvalue[k] = deepcopy(v) end return newvalue else return value end end function iter_chain(...) local n = select('#', ...) local chain = {...} return coroutine.wrap(function() for i = 1, n do local t = chain[i] if t then for k, v in pairs(t) do coroutine.yield(k, v) end end end end) end local function iter_dir(dir, info, ignore) local prefix = dir ~= '' and dir .. '/' or dir for i, item in ipairs(love.filesystem.getDirectoryItems(dir)) do local path = prefix .. item if not (ignore and ignore(path)) then love.filesystem.getInfo(path, info) if info.type == 'directory' then iter_dir(path, info, ignore) elseif info.type == 'file' then coroutine.yield(item, path) end end end end function iter_file_tree(dir, ignore) return coroutine.wrap(function() return iter_dir(dir, {}, ignore) end) end function print_nested(...) local t = {} for i = 1, select('#', ...) do local v = select(i, ...) t[i] = nested.encode(v) end DEBUG.LOG(unpack(t)) DEBUG.LOG() end function iscallable(v) if type(v) == 'function' then return true else local mt = getmetatable(v) return mt and mt.__call end end function merge_axis(...) local value = 0 for i = 1, select('#', ...) do value = value + (select(i, ...) or 0) end return clamp(value, -1, 1) end do local table_stack = require 'table_stack' ColorStack = table_stack.new() function ColorStack:push(color) if color then table_stack.push(self, love.graphics.getColor()) love.graphics.setColor(color) return true else return false end end function ColorStack:pop() love.graphics.setColor(table_stack.pop(self)) end end Input = require 'input' Scene = require 'scene'.new() InvokeQueue = require 'invoke_queue'.new() Director = require 'director' Resources = require 'resources'.new() R = Resources DEBUG.ONLY(function() function dump_state() local s = nested.encode(Scene) .. '\n\n' .. nested.encode(DEBUG.scene) DEBUG.LOG(s, '\n') love.system.setClipboardText(s) end end) function set_after_frames(n, ...) InvokeQueue:queue_after(n, set, ...) end function set_next_frame(...) set_after_frames(1, ...) end
//DAKloader SV Commands //****************************************************************************************************************** //Extra Server Admin commands //****************************************************************************************************************** local function OnCommandRCON(client, ...) local rconcommand = StringConcatArgs(...) if rconcommand ~= nil and client ~= nil then //Shared.Message(string.format("%s executed command %s.", client:GetUserId(), rconcommand)) Shared.ConsoleCommand(rconcommand) ServerAdminPrint(client, string.format("Command %s executed.", rconcommand)) DAK:PrintToAllAdmins("sv_rcon", client, " " .. rconcommand) end end DAK:CreateServerAdminCommand("Console_sv_rcon", OnCommandRCON, "<command> Will execute specified command on server.") local function OnCommandAllTalk(client) if DAK.settings then DAK.settings.AllTalk = not DAK.settings.AllTalk else DAK.settings = { } DAK.settings.AllTalk = true end ServerAdminPrint(client, string.format("AllTalk has been %s.", ConditionalValue(DAK.settings.AllTalk,"enabled", "disabled"))) DAK:PrintToAllAdmins("sv_alltalk", client) end DAK:CreateServerAdminCommand("Console_sv_alltalk", OnCommandAllTalk, "Will toggle the alltalk setting on server.") local function OnCommandFriendlyFire(client) if DAK.settings then DAK.settings.FriendlyFire = not DAK.settings.FriendlyFire else DAK.settings = { } DAK.settings.FriendlyFire = true end ServerAdminPrint(client, string.format("FriendlyFire has been %s.", ConditionalValue(DAK.settings.FriendlyFire,"enabled", "disabled"))) DAK:PrintToAllAdmins("sv_friendlyfire", client) end DAK:CreateServerAdminCommand("Console_sv_friendlyfire", OnCommandFriendlyFire, "Will toggle friendlyfire setting on server.") local function OnCommandListMap(client) local matchingFiles = { } Shared.GetMatchingFileNames("maps/*.level", false, matchingFiles) for _, mapFile in pairs(matchingFiles) do local _, _, filename = string.find(mapFile, "maps/(.*).level") if client ~= nil then ServerAdminPrint(client, string.format(filename)) end end end DAK:CreateServerAdminCommand("Console_sv_maps", OnCommandListMap, "Will list all the maps currently on the server.") local function OnCommandKillServer(client) ServerAdminPrint(client, string.format("Command sv_killserver executed.")) DAK:PrintToAllAdmins("sv_killserver", client) //They finally fixed seek crash bug :< Server.GetClientAddress(nil) //Alriiight found a new crash bug end DAK:CreateServerAdminCommand("Console_sv_killserver", OnCommandKillServer, "Will crash the server (lol).") local function OnCommandListAdmins(client) if DAK.adminsettings ~= nil then if DAK.adminsettings.groups ~= nil then for group, commands in pairs(DAK.adminsettings.groups) do ServerAdminPrint(client, string.format(group .. " - " .. ToString(commands))) end end if DAK.adminsettings.users ~= nil then for name, user in pairs(DAK.adminsettings.users) do local online = DAK:GetClientMatchingNS2Id(user.id) ~= nil ServerAdminPrint(client, string.format(name .. " - " .. ToString(user) .. ConditionalValue(online, " - Online", " - Offline"))) end end end end DAK:CreateServerAdminCommand("Console_sv_listadmins", OnCommandListAdmins, "Will list all groups and admins.") local function ListBans(client) ServerAdminPrint(client, "Current Bans Listing:") for id, entry in pairs(DAK.bannedplayers) do local timeLeft = entry.time == 0 and "Forever" or (((entry.time - Shared.GetSystemTime()) / 60) .. " minutes") ServerAdminPrint(client, "Name: " .. entry.name .. " Id: " .. id .. " Time Remaining: " .. timeLeft .. " Reason: " .. (entry.reason or "Not provided")) end if DAK.bannedplayersweb ~= nil then for id, entry in pairs(DAK.bannedplayersweb) do local timeLeft = entry.time == 0 and "Forever" or (((entry.time - Shared.GetSystemTime()) / 60) .. " minutes") ServerAdminPrint(client, "Name: " .. entry.name .. " Id: " .. id .. " Time Remaining: " .. timeLeft .. " Reason: " .. (entry.reason or "Not provided")) end end end DAK:CreateServerAdminCommand("Console_sv_listbans", ListBans, "Lists the banned players") local function OnCommandWho(client) local onlineusers = false if DAK.adminsettings ~= nil then if DAK.adminsettings.users ~= nil then for name, user in pairs(DAK.adminsettings.users) do local uclient = DAK:GetClientMatchingNS2Id(user.id) local online = (uclient ~= nil) if online then local player = uclient:GetControllingPlayer() if player ~= nil then local pname = player:GetName() ServerAdminPrint(client, string.format(pname .. " - " .. name .. " - " .. ToString(user))) onlineusers = true end end end end end if not onlineusers then ServerAdminPrint(client, string.format("No admins online.")) end end DAK:CreateServerAdminCommand("Console_sv_who", OnCommandWho, "Will list all online admins.", true) local function PrintHelpForCommand(client, optionalCommand) for c = 1, #DAK.serveradmincommands do local command = DAK.serveradmincommands[c] if optionalCommand == command.name or optionalCommand == nil then if not client or DAK:GetClientCanRunCommand(client, command.name, false) or command.alwaysallowed then ServerAdminPrint(client, command.name .. ": " .. command.help) elseif optionalCommand then ServerAdminPrint(client, "You do not have access to " .. optionalCommand) end end end end DAK:CreateServerAdminCommand("Console_sv_help", PrintHelpForCommand, "Prints help for all commands or the specified command.", true)
------------------------------------- -- XAF Module - Utility:HTTPStream -- ------------------------------------- -- [>] This class represents the HTTP stream, which is used for connecting with HTTP servers and doing some actions with them. -- [>] It was designed as each stream object may connect with only one server - its URL is set in constructor. -- [>] The user is able to perform few types of actions on HTTP stream objects like body data retrieving, getting date and time or sending POST data. -- [>] Currently that module supports only sending GET and POST requests. -- [>] Connection with HTTP Secure targets (HTTPS) are also fully supported. local unicode = require("unicode") local xafcore = require("xaf/core/xafcore") local xafcoreMath = xafcore:getMathInstance() local xafcoreText = xafcore:getTextInstance() local HttpStream = { C_NAME = "Generic HTTP Stream", C_INSTANCE = true, C_INHERIT = true, static = { TIMEOUT_DEFAULT = 1, -- Predefined default values for HTTPStream object connection timeout and maximum tries (repetitions). TRIES_DEFAULT = 3 } } function HttpStream:initialize() local parent = nil local private = (parent) and parent.private or {} local public = (parent) and parent.public or {} private.componentInternet = nil private.connectionHandle = nil private.isConnected = false private.isSecure = false private.maxTimeout = HttpStream.static.TIMEOUT_DEFAULT private.maxTries = HttpStream.static.TRIES_DEFAULT private.postData = nil private.requestHeaders = {} private.responseCode = 0 private.responseHeaders = {} private.responseMessage = '' private.targetUrl = '' public.clearPostData = function(self) -- [!] Function: clearPostData() - Clears previously set HTTP POST data string and restores it to 'nil' value. private.postData = nil -- [!] Return: 'true' - If the POST string has been cleared without errors. return true end public.connect = function(self) -- [!] Function: connect() - Tries to connect with previously set HTTP server with its URL. local connectionHandle = nil -- [!] Return: status - Connection status, if 'true' then the connection is established, 'false' otherwise. local internet = private.componentInternet local postData = private.postData local requestHeaders = private.requestHeaders local responseTable = {} local status = false local targetUrl = private.targetUrl local timeout = private.maxTimeout local tries = private.maxTries if (postData) then connectionHandle = internet.request(targetUrl, postData, requestHeaders) else connectionHandle = internet.request(targetUrl, nil, requestHeaders) end if (private.isConnected == false) then for i = 1, tries do responseTable = {connectionHandle.response()} if (responseTable[1] and responseTable[2] and responseTable[3]) then private.connectionHandle = connectionHandle private.isConnected = true private.responseCode = responseTable[1] private.responseMessage = responseTable[2] private.responseHeaders = responseTable[3] status = true return status else os.sleep(timeout) end end return status else error("[XAF Error] Already connected") end end public.disconnect = function(self) -- [!] Function: disconnect() - Disconnects from target server and closes its stream. if (private.isConnected == true) then -- [!] Return: 'true' - If the stream has been closed correctly. private.connectionHandle.close() private.connectionHandle = nil private.isConnected = false return true else error("[XAF Error] Already disconnected") end end public.isConnected = function(self) -- [!] Function: isConnected() - Returns boolean flag is the stream currently connected to its target. return private.isConnected -- [!] Return: isConnected - Stream connection flag. end public.isSecure = function(self) -- [!] Function: isSecure() - Returns boolean flag is the stream secure (whether is HTTPS protocol used). return private.isSecure -- [!] Return: isSecure - Secure stream boolean flag. end public.getCard = function(self) -- [!] Function: getCard() - Returns internet card component attached to HTTP stream object. return private.componentInternet -- [!] Return: componentInternet - Stream object's internet card component. end public.getData = function(self) -- [!] Function: getData() - Returns an iterator for getting HTTP received body data. if (private.isConnected == true) then -- [!] Return: dataChunk - Next data chunks from received body. local connectionHandle = private.connectionHandle local dataChunk = '' return function() while(dataChunk) do dataChunk = connectionHandle.read(math.huge) return dataChunk end end else error("[XAF Error] Not connected") end end public.getDateObject = function(self) -- [!] Function: getDateObject() - Returns a table with an actual date and time elements returned from HTTP server. if (private.isConnected == true) then -- [!] Return: dateObject - Date and time elements table. local dateStringRaw = private.responseHeaders["Date"][1] local dateString = dateStringRaw:gsub(' ', '|'):gsub(',', '|'):gsub(':', '|') local dateObject = {} local dateObjectRaw = xafcoreText:split(dateString, '|', true) local dayNames = {["Mon"] = 1, ["Tue"] = 2, ["Wed"] = 3, ["Thu"] = 4, ["Fri"] = 5, ["Sat"] = 6, ["Sun"] = 7} local monthNames = {["Jan"] = 1, ["Feb"] = 2, ["Mar"] = 3, ["Apr"] = 4, ["May"] = 5, ["Jun"] = 6, ["Jul"] = 7, ["Aug"] = 8, ["Sep"] = 9, ["Oct"] = 10, ["Nov"] = 11, ["Dec"] = 12} dateObject["WEEK_DAY"] = dayNames[dateObjectRaw[1]] dateObject["MONTH_DAY"] = tonumber(dateObjectRaw[2]) dateObject["MONTH"] = monthNames[dateObjectRaw[3]] dateObject["YEAR"] = tonumber(dateObjectRaw[4]) dateObject["TIME_HOUR"] = tonumber(dateObjectRaw[5]) dateObject["TIME_MINUTE"] = tonumber(dateObjectRaw[6]) dateObject["TIME_SECOND"] = tonumber(dateObjectRaw[7]) dateObject["TIMEZONE"] = dateObjectRaw[8] return dateObject else error("[XAF Error] Not connected") end end public.getMaxTimeout = function(self) -- [!] Function: getMaxTimeout() - Returns current maximum waiting time for HTTP response. return private.maxTimeout -- [!] Return: maxTimeout - Maximum timeout value in seconds. end public.getMaxTries = function(self) -- [!] Function: getMaxTries() - Returns current maximum attempts number for connecting. return private.maxTries -- [!] Return: maxTries - Maximum attempts number. end public.getResponseCode = function(self) -- [!] Function: getResponseCode() - Returns code of the HTTP response. if (private.isConnected == true) then -- [!] Return: responseCode - HTTP response code. return private.responseCode else error("[XAF Error] Not connected") end end public.getResponseHeader = function(self, headerName) -- [!] Function: getResponseHeader(headerName) - Returns specified header value from responded table. assert(type(headerName) == "string", "[XAF Utility] Expected STRING as argument #1") -- [!] Parameter: headerName - Specified name of choosen HTTP header from table. -- [!] Return: headerValue - Value of specified responded HTTP header. if (private.isConnected == true) then if (private.responseHeaders[headerName]) then return private.responseHeaders[headerName][1] else return nil end else error("[XAF Error] Not connected") end end public.getResponseHeaders = function(self) -- [!] Function: getResponseHeaders() - Returns headers table of the HTTP response. if (private.isConnected == true) then -- [!] Return: responseHeaders - HTTP response headers as table. return private.responseHeaders else error("[XAF Error] Not connected") end end public.getResponseMessage = function(self) -- [!] Function: getResponseMessage() - Returns message of the HTTP response. if (private.isConnected == true) then -- [!] Return: responseMessage - HTTP response message. return private.responseMessage else error("[XAF Error] Not connected") end end public.setCard = function(self, internet) -- [!] Function: setCard(internet) - Sets the internet card component and attaches it to stream. assert(type(internet) == "table", "[XAF Utility] Expected TABLE as argument #1") -- [!] Parameter: internet - New internet card component. -- [!] Return: 'true' - If new internet component has been set correctly. if (internet.type == "internet") then private.componentInternet = internet else error("[XAF Error] Invalid internet card component") end return true end public.setMaxTimeout = function(self, newTimeout) -- [!] Function: setMaxTimeout(newTimeout) - Changes maximum time for single connection attempt in seconds. assert(type(newTimeout) == "number", "[XAF Utility] Expected NUMBER as argument #1") -- [!] Parameter: newTimeout - New timeout value in seconds. -- [!] Return: 'true' - If new timeout value has been set correctly. private.maxTimeout = newTimeout return true end public.setMaxTries = function(self, newTries) -- [!] Function: setMaxTries(newTries) - Sets maximum connection tries number. assert(type(newTries) == "number", "[XAF Utility] Expected NUMBER as argument #1") -- [!] Parameter: newTries - New attempts number value. -- [!] Return: 'true' - If attempts number has been changed properly. if (xafcoreMath:checkNatural(newTries, true) == true) then private.maxTries = newTries else error("[XAF Error] Invalid connection tries number - must be a positive integer") end return true end public.setPostData = function(self, postData) -- [!] Function: setPostData(postData) - Sets data string for HTTP POST method. assert(type(postData) == "table", "[XAF Utility] Expected TABLE as argument #1") -- [!] Parameter: postData - New POST data as key-value pairs. -- [!] Return: 'true' - If new POST data has been changed properly. local postTable = postData local postString = '' for key, value in pairs(postTable) do postString = postString .. tostring(key) .. '=' postString = postString .. tostring(value) .. '&' end postString = unicode.sub(postString, 1, unicode.wlen(postString) - 1) private.postData = postString return true end public.setRequestHeader = function(self, name, value) -- [!] Function: setRequestHeader(name, value) - Sets new header in request headers table. To use before 'connect()' function. assert(type(name) == "string", "[XAF Utility] Expected STRING as argument #1") -- [!] Parameter: name - Header name as string. -- [!] Parameter: value - New header value - if 'nil' then the header will be removed from table. local headerName = name -- [!] Return: 'true' - If new header has been set properly. local headerValue = value private.requestHeaders[headerName] = headerValue return true end return { private = private, public = public } end function HttpStream:extend() local class = self:initialize() local private = class.private local public = class.public if (self.C_INHERIT == true) then return { private = private, public = public } else error("[XAF Error] Class '" .. tostring(self.C_NAME) .. "' cannot be inherited") end end function HttpStream:new(card, url) local class = self:initialize() local private = class.private local public = class.public public:setCard(card) assert(type(url) == "string", "[XAF Utility] Expected STRING as argument #2") if (string.sub(string.lower(url), 1, 7) == "http://") then private.targetUrl = url private.isSecure = false elseif (string.sub(string.lower(url), 1, 8) == "https://") then private.targetUrl = url private.isSecure = true else error("[XAF Error] Invalid URL pattern - should start with 'http(s)://...'") end if (self.C_INSTANCE == true) then return public else error("[XAF Error] Class '" .. tostring(self.C_NAME) .. "' cannot be instanced") end end return HttpStream
local ngx = ngx local setmetatable = setmetatable local _M = { _VERSION = '0.01' } local mt = { __index = _M } function _M.new(self, threshold_sec, ...) return setmetatable({ _threshold_sec = threshold_sec, _callbacks = {...}, }, mt) end function _M.collect(self) local request_time = tonumber(ngx.var.request_time) if request_time > self._threshold_sec then for i, cb in ipairs(self._callbacks) do cb:run(request_time) end end end return _M
local osmose = require 'osmose' local et = osmose.Model 'FuelInput' ---------- -- User parameters ---------- et.inputs = { -- Energy prices FUEL_PRICE_BUY = {default=0.6, unit='CHF/kg'}, -- Network capacity MAX_INTAKE = {default=100000, unit='kW'}, FUEL_LHV = {default=40700, unit='kJ/kg'} } ----------- -- Calculated parameters ----------- et.outputs = { FUEL_IMP_COST2 = {unit='CHF/s',job='FUEL_PRICE_BUY*MAX_INTAKE/FUEL_LHV'}, } ----------- -- Layers ----------- et:addLayers {Fuel = {type= 'ResourceBalance', unit = 'kW'} } ----------- -- Units ----------- -- Gas et:addUnit('Fuel_Supply',{type='Utility', Fmin = 0, Fmax = 1, Cost1=0, Cost2='FUEL_IMP_COST2', Cinv1=0, Cinv2=0, Power1=0, Power2=0, Impact1=0,Impact2=0}) et['Fuel_Supply']:addStreams{ fuel_out = rs({'Fuel', 'out', 'MAX_INTAKE'}) } return et
local AceEvent = LibStub:GetLibrary("AceEvent-3.0"); local QLH = LibStub("QuestLogHelper-1.0"); local helper = LibStub:NewLibrary("QuestWatchHelper-1.0", 1); local isWoWClassic = select(4, GetBuildInfo()) < 20000; local BlizzardTrackerFrame = isWoWClassic and QuestWatchFrame or ObjectiveTrackerFrame; local timers = {}; local function debounce(name, func) if timers[name] then timers[name]:Cancel(); end timers[name] = C_Timer.NewTimer(0.1, func); end local listeners = {}; local updatedQuestIndexes = {}; local function updateListeners(updatedQuest) updatedQuest.byUser = IsShiftKeyDown() and QLH:IsShown(); updatedQuestIndexes[updatedQuest.index] = updatedQuest; debounce("listeners", function() for _, listener in ipairs(listeners) do listener(updatedQuestIndexes); end updatedQuestIndexes = {}; end); end local function count(t) local _count = 0; for _, _ in pairs(t) do _count = _count + 1 end return _count; end local function findIndex(t, element) for index, value in pairs(t) do if value == element then return index; end end end function helper:GetFrame() return BlizzardTrackerFrame; end function helper:IsAutomaticQuestWatchEnabled() return GetCVar('autoQuestWatch') == '1'; end function helper:SetAutomaticQuestWatch(autoQuestWatch) SetCVar('autoQuestWatch', autoQuestWatch and '1' or '0'); end function helper:BypassWatchLimit(initialTrackedQuests) local trackedQuests = {}; if isWoWClassic then local function _addWatch(index, isQuestie) -- This is a hack to ignore watch requests from Questie's Tracker... if isQuestie then return end local questID = QLH:GetQuestIDFromIndex(index); -- Ignore duplicates if questID and not trackedQuests[questID] then trackedQuests[questID] = true; updateListeners({ index = index, questID = questID, watched = true }); end end hooksecurefunc("AutoQuestWatch_Insert", _addWatch); hooksecurefunc("AddQuestWatch", _addWatch); hooksecurefunc("RemoveQuestWatch", function(index, isQuestie) -- This is a hack to ignore watch requests from Questie's Tracker... if isQuestie then return end local questID = QLH:GetQuestIDFromIndex(index); -- Ignore duplicates if questID and trackedQuests[questID] then trackedQuests[questID] = nil; updateListeners({ index = index, questID = questID, watched = false }); end end); IsQuestWatched = function(index) return trackedQuests[QLH:GetQuestIDFromIndex(index)] or false; end GetNumQuestWatches = function() return 0; end -- This bypasses a limitation that would prevent users from tracking quests without objectives GetNumQuestLeaderBoards = function(index) index = index or GetQuestLogSelection(); local questID = QLH:GetQuestIDFromIndex(index); if not questID then return 0 end local quest = QLH:GetQuest(questID); if not quest then return 0 end local objectiveCount = count(quest.objectives); if objectiveCount == 0 then return 1 end return objectiveCount; end MAX_WATCHABLE_QUESTS = C_QuestLog.GetMaxNumQuests(); QLH:OnQuestUpdated(function(quests) for questID, quest in pairs(quests) do if quest.abandoned and trackedQuests[questID] then trackedQuests[questID] = nil; updateListeners({ index = quest.index, questID = quest.questID, watched = false }); end end end); end for _, quest in pairs(QLH:GetQuests()) do if initialTrackedQuests[quest.questID] then AddQuestWatch(quest.index); else RemoveQuestWatch(quest.index); end end end function helper:OnQuestWatchUpdated(listener) tinsert(listeners, listener); end function helper:OffQuestWatchUpdated(listener) local index = findIndex(listeners, listener); if not index then return end table.remove(listeners, index); end function helper:KeepHidden() BlizzardTrackerFrame:HookScript("OnShow", function(frame) return frame:Hide() end); BlizzardTrackerFrame:Hide(); end if not isWoWClassic then AceEvent.RegisterEvent(helper, "QUEST_WATCH_LIST_CHANGED", function(event, questID, added) if questID then if added then C_Timer.After(0.1, function() local index = QLH:GetIndexFromQuestID(questID); updateListeners({ index = index, questID = questID, watched = added == true }); end); else local index = QLH:GetIndexFromQuestID(questID); updateListeners({ index = index, questID = questID, watched = added == true }); end end end); end
-- Farewell infortality -- Revamp by ImFrostic, Version 2.8 -- Objects local ScreenGui = Instance.new("ScreenGui") local main = Instance.new("Frame") local bar1 = Instance.new("Frame") local brack = Instance.new("TextButton") local xuhro = Instance.new("TextButton") local bypass = Instance.new("TextButton") local bfg = Instance.new("TextButton") local open = Instance.new("TextButton") local close = Instance.new("TextButton") -- Properties ScreenGui.Parent = game.CoreGui main.Name = "main" main.Parent = ScreenGui main.Active = true main.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863) main.BorderSizePixel = 0 main.Draggable = true main.Position = UDim2.new(0.37885803, 0, 0.0909090862, 0) main.Selectable = true main.Size = UDim2.new(0, 492, 0, 479) main.Visible = false bar1.Name = "bar1" bar1.Parent = main bar1.BackgroundColor3 = Color3.new(0, 0.333333, 1) bar1.BorderSizePixel = 0 bar1.Size = UDim2.new(0, 492, 0, 52) brack.Name = "brack" brack.Parent = main brack.BackgroundColor3 = Color3.new(0, 0.333333, 1) brack.BorderSizePixel = 0 brack.Position = UDim2.new(0.0934959352, 0, 0.1511143, 0) brack.Size = UDim2.new(0, 376, 0, 50) brack.Font = Enum.Font.SourceSans brack.Text = "Brack's GUI Press +" brack.TextColor3 = Color3.new(0.207843, 0.0156863, 0.180392) brack.TextSize = 40 brack.MouseButton1Down:connect(function() loadstring(game:HttpGet(('https://pastebin.com/raw/H4t2tZZE'),true))() end) xuhro.Name = "xuhro" xuhro.Parent = main xuhro.BackgroundColor3 = Color3.new(0, 0.333333, 1) xuhro.BorderSizePixel = 0 xuhro.Position = UDim2.new(0.0934959352, 0, 0.358514696, 0) xuhro.Size = UDim2.new(0, 376, 0, 50) xuhro.Font = Enum.Font.SourceSans xuhro.Text = "Xuhro's GUI Press H" xuhro.TextColor3 = Color3.new(0.207843, 0.0156863, 0.180392) xuhro.TextSize = 40 xuhro.MouseButton1Down:connect(function() loadstring(game:HttpGet(('https://pastebin.com/raw/54C4aN8i'),true))() end) bypass.Name = "bypass" bypass.Parent = main bypass.BackgroundColor3 = Color3.new(0, 0.333333, 1) bypass.BorderSizePixel = 0 bypass.Position = UDim2.new(0.0934959352, 0, 0.573121607, 0) bypass.Size = UDim2.new(0, 376, 0, 50) bypass.Font = Enum.Font.SourceSans bypass.Text = "Bypass" bypass.TextColor3 = Color3.new(0.207843, 0.0156863, 0.180392) bypass.TextSize = 40 bypass.MouseButton1Down:connect(function() loadstring(game:HttpGet(('https://pastebin.com/raw/zs9iq6PC'),true))() end) bfg.Name = "bfg" bfg.Parent = main bfg.BackgroundColor3 = Color3.new(0, 0.333333, 1) bfg.BorderSizePixel = 0 bfg.Position = UDim2.new(0.0934959352, 0, 0.793319404, 0) bfg.Size = UDim2.new(0, 376, 0, 54) bfg.Font = Enum.Font.SourceSans bfg.Text = ".bfg" bfg.TextColor3 = Color3.new(0.207843, 0.0156863, 0.180392) bfg.TextSize = 40 bfg.MouseButton1Down:connect(function() loadstring(game:HttpGet(('https://pastebin.com/raw/TDXW4KVJ'),true))() end) open.Name = "open" open.Parent = ScreenGui open.BackgroundColor3 = Color3.new(0, 0.333333, 1) open.BorderSizePixel = 0 open.Position = UDim2.new(0, 0, 0.478056431, 0) open.Size = UDim2.new(0, 200, 0, 50) open.Font = Enum.Font.SourceSans open.Text = "Open" open.TextColor3 = Color3.new(0.207843, 0.0156863, 0.180392) open.TextSize = 40 open.MouseButton1Down:connect(function() main.Visible = true close.Visible = true open.Visible = false end) close.Name = "close" close.Parent = ScreenGui close.BackgroundColor3 = Color3.new(0, 0.333333, 1) close.BorderSizePixel = 0 close.Position = UDim2.new(0, 0, 0.478056431, 0) close.Size = UDim2.new(0, 200, 0, 50) close.Visible = false close.Font = Enum.Font.SourceSans close.Text = "Close" close.TextColor3 = Color3.new(0.207843, 0.0156863, 0.180392) close.TextSize = 40 close.MouseButton1Down:connect(function() main.Visible = false close.Visible = false open.Visible = true end) -- Scripts
local LibClientBuild = Wheel("LibClientBuild") assert(LibClientBuild, "UnitName requires LibClientBuild to be loaded.") -- Lua API local string_len = string.len local string_split = string.split -- WoW API local GetQuestGreenRange = GetQuestGreenRange local GetScalingQuestGreenRange = GetScalingQuestGreenRange local UnitClassification = UnitClassification local UnitEffectiveLevel = UnitEffectiveLevel or UnitLevel -- cheap fix local UnitLevel = UnitLevel local UnitName = UnitName local UnitQuestTrivialLevelRange = UnitQuestTrivialLevelRange or GetQuestGreenRange local UnitQuestTrivialLevelRangeScaling = UnitQuestTrivialLevelRangeScaling or GetScalingQuestGreenRange -- Constants for client version local IsClassic = LibClientBuild:IsClassic() local IsTBC = LibClientBuild:IsTBC() local IsRetail = LibClientBuild:IsRetail() local utf8sub = function(str, i, dots) if not str then return end local bytes = str:len() if bytes <= i then return str else local len, pos = 0, 1 while pos <= bytes do len = len + 1 local c = str:byte(pos) if c > 0 and c <= 127 then pos = pos + 1 elseif c >= 192 and c <= 223 then pos = pos + 2 elseif c >= 224 and c <= 239 then pos = pos + 3 elseif c >= 240 and c <= 247 then pos = pos + 4 end if len == i then break end end if len == i and pos <= bytes then return str:sub(1, pos - 1)..(dots and "..." or "") else return str end end end -- Returns the correct difficulty color compared to the player. -- Using this as a tooltip method to access our custom colors. -- *Sourced from /back-end/tooltip.lua local GetDifficultyColorByLevel if (IsClassic or IsTBC) then GetDifficultyColorByLevel = function(self, level, isScaling) local colors = self.colors.quest local levelDiff = level - UnitLevel("player") if (isScaling) then if (levelDiff > 5) then return colors.red[1], colors.red[2], colors.red[3], colors.red.colorCode elseif (levelDiff > 3) then return colors.orange[1], colors.orange[2], colors.orange[3], colors.orange.colorCode elseif (levelDiff >= 0) then return colors.yellow[1], colors.yellow[2], colors.yellow[3], colors.yellow.colorCode elseif (-levelDiff <= GetScalingQuestGreenRange()) then return colors.green[1], colors.green[2], colors.green[3], colors.green.colorCode else return colors.gray[1], colors.gray[2], colors.gray[3], colors.gray.colorCode end else if (levelDiff > 5) then return colors.red[1], colors.red[2], colors.red[3], colors.red.colorCode elseif (levelDiff > 3) then return colors.orange[1], colors.orange[2], colors.orange[3], colors.orange.colorCode elseif (levelDiff >= -2) then return colors.yellow[1], colors.yellow[2], colors.yellow[3], colors.yellow.colorCode elseif (-levelDiff <= GetQuestGreenRange()) then return colors.green[1], colors.green[2], colors.green[3], colors.green.colorCode else return colors.gray[1], colors.gray[2], colors.gray[3], colors.gray.colorCode end end end elseif (IsRetail) then GetDifficultyColorByLevel = function(self, level, isScaling) local colors = self.colors.quest if (isScaling) then local levelDiff = level - UnitEffectiveLevel("player") if (levelDiff > 5) then return colors.red[1], colors.red[2], colors.red[3], colors.red.colorCode elseif (levelDiff > 3) then return colors.orange[1], colors.orange[2], colors.orange[3], colors.orange.colorCode elseif (levelDiff >= 0) then return colors.yellow[1], colors.yellow[2], colors.yellow[3], colors.yellow.colorCode elseif (-levelDiff <= -UnitQuestTrivialLevelRangeScaling("player")) then return colors.green[1], colors.green[2], colors.green[3], colors.green.colorCode else return colors.gray[1], colors.gray[2], colors.gray[3], colors.gray.colorCode end else local levelDiff = level - UnitLevel("player") if (levelDiff > 5) then return colors.red[1], colors.red[2], colors.red[3], colors.red.colorCode elseif (levelDiff > 3) then return colors.orange[1], colors.orange[2], colors.orange[3], colors.orange.colorCode elseif (levelDiff >= -4) then return colors.yellow[1], colors.yellow[2], colors.yellow[3], colors.yellow.colorCode elseif (-levelDiff <= -UnitQuestTrivialLevelRange("player")) then return colors.green[1], colors.green[2], colors.green[3], colors.green.colorCode else return colors.gray[1], colors.gray[2], colors.gray[3], colors.gray.colorCode end end end end local Update = function(self, event, unit) if (not unit) or (unit ~= self.unit) then return end local element = self.Name if (element.PreUpdate) then element:PreUpdate(unit) end -- Retrieve data local name = UnitName(unit) if (not name) then element:SetText("") return end local nameLength = string_len(name) local levelText, levelTextLength, showLevel if (element.showLevel) then local level = UnitEffectiveLevel(unit) if (level and level > 0) then local r, g, b, colorCode = GetDifficultyColorByLevel(self, level) levelText = colorCode .. level .. "|r" levelTextLength = level >= 100 and 5 or level >= 10 and 4 or 3 showLevel = true end end local fullLength = (showLevel) and (nameLength + levelTextLength) or (nameLength) if (element.maxChars) and (fullLength > element.maxChars) then local maxChars = (showLevel) and (element.maxChars - levelTextLength) or (element.maxChars) if (element.useSmartName) then local nameTable = { string_split(" ", name) } if (#nameTable > 1) then if string_len(nameTable[#nameTable]) < maxChars then name = nameTable[#nameTable] else name = utf8sub(name, maxChars, element.useDots) end end else name = utf8sub(name, maxChars, element.useDots) end end if (showLevel) then if (element.showLevelLast) then name = name .. " |cff888888:|r" .. levelText else name = levelText .. "|cff888888:|r " .. name end end element:SetText(name) if (element.PostUpdate) then return element:PostUpdate(unit) end end local Proxy = function(self, ...) return (self.Name.Override or Update)(self, ...) end local ForceUpdate = function(element) return Proxy(element._owner, "Forced", element._owner.unit) end local Enable = function(self) local element = self.Name if element then element._owner = self element.ForceUpdate = ForceUpdate if (self.unit == "player") or (self.unit == "pet") then self:RegisterEvent("PLAYER_LEVEL_UP", Proxy, true) end self:RegisterEvent("UNIT_NAME_UPDATE", Proxy) self:RegisterEvent("UNIT_CLASSIFICATION_CHANGED", Proxy) self:RegisterEvent("UNIT_FACTION", Proxy) self:RegisterEvent("UNIT_LEVEL", Proxy) self:RegisterEvent("ZONE_CHANGED_NEW_AREA", Proxy, true) return true end end local Disable = function(self) local element = self.Name if element then element:Hide() self:UnregisterEvent("PLAYER_LEVEL_UP", Proxy) self:UnregisterEvent("UNIT_NAME_UPDATE", Proxy) self:UnregisterEvent("UNIT_CLASSIFICATION_CHANGED", Proxy) self:UnregisterEvent("UNIT_FACTION", Proxy) self:UnregisterEvent("UNIT_LEVEL", Proxy) self:UnregisterEvent("ZONE_CHANGED_NEW_AREA", Proxy) end end -- Register it with compatible libraries for _,Lib in ipairs({ (Wheel("LibUnitFrame", true)), (Wheel("LibNamePlate", true)) }) do Lib:RegisterElement("Name", Enable, Disable, Proxy, 14) end
-- list of adjectives you could use to describe a person local result = { ['ə'] = { 'abandoned', 'adorable', 'accomplished', 'adored', 'afraid', 'aggressive', 'agreeable', 'alarming', 'amazing', 'amused', 'amusing', 'another', 'ashamed', 'astonishing', 'attentive', 'attractive', 'elaborate', 'elastic', 'electric', 'embarrassed', 'emotional', 'essential', 'esteemed' }, ['ā'] = { 'able', 'aged', 'ancient' }, ['ad'] = { 'adventurous', 'admirable', 'admired' }, ['ak'] = { 'accurate', 'acrobatic', 'active' }, ['ag'] = { 'aggravating' }, ['a'] = { 'agile', 'agitated', 'amazing', 'anchored', -- technically aNG 'angelic', -- techinically an 'angry', -- techinically aNG 'animated', -- anə 'anxious', -- aNG 'apprehensive', 'athletic', 'average' }, ['är'] = { 'artistic' }, ['ô'] = { 'awesome', 'awful', 'awkward' }, ['ē'] = { 'eager', 'easy', 'evil' }, ['ər'] = { 'earnest', 'early' }, ['ek'] = { 'ecstatic' }, ['e'] = { 'educated', 'elderly', 'elegant', 'eminent', 'empty', 'energetic', 'envious', 'ethical', 'excellent', 'extroverted', 'extra' }, ['i'] = { -- in / ig / i 'enchanted', 'enchanting', 'enlightened', 'enormous', 'enraged', 'exalted', 'exemplary', 'exhausted', 'excitable', 'excited', 'exciting', 'exotic', 'experienced', 'immaculate', 'icky', 'idiotic', 'ignorant', 'ill-fated', 'ill-informed', 'illiterate', 'illustrious', 'imaginary', 'imaginative', 'immaculate', 'immaterial', 'impassioned', 'impeccable', 'impartial', 'imperturbable', 'impolite', 'important', 'impossible', 'impractical', 'impressionable', 'impressive', 'improbable', 'impure', 'incomparable', 'incomplete', 'inconsequential', 'incredible', 'inexperienced', 'infamous', 'infantile', 'inferior', 'informal', 'innocent', 'insecure', 'insidious', 'insignificant', 'insistent', 'instructive', 'insubstantial', 'intelligent', 'interesting', 'itchy' } } local keys = {} for k, _ in pairs(result) do table.insert(keys, k) end return { keys, result }
local minetest = minetest local modn = minetest.get_current_modname() local modp = minetest.get_modpath(modn) local register_node = minetest.register_node local register_alias = minetest.register_alias littoral.biota = {} local biota = littoral.biota biota.names_all = {} biota.seagrass = {} biota.bryozoan = {} biota.ascidian = {} biota.poriferan = {} dofile(modp.."/biota.lua") register_node(modn .. ':fishie', { description = 'Essential node for mapgen alias “mapgen_stone”', tiles = { 'molten.png' }, drawtype = "mesh", mesh = "threespinetail.obj", groups = { oddly_breakable_by_hand = 3 }, is_ground_content = true })
local t = My.Translator.translate My = My or {} My.SideMissions = My.SideMissions or {} local updateHint = function(mission) local hint = t("side_mission_destroy_graveyard_hint", mission:countValidEnemies()) mission:setHint(hint) mission:getPlayer():addToShipLog(hint, "255,127,0") end local randomDropContent = function() local rnd = math.random(1,4) if rnd == 1 then return { energy = Util.round(50 + 30 * math.random(), 10), reputation = 10 + math.random() * 30, } elseif rnd == 2 then -- weapon drop return { [products.homing] = math.random(1, 3), [products.hvli] = math.random(1, 3), } elseif rnd == 3 then -- machinery drop return { [products.miningMachinery] = math.random(1, 3), energy = Util.round(50 + 30 * math.random(), 10), } else -- ore drop return { [products.ore] = math.random(4, 10), [products.plutoniumOre] = math.random(1, 4), } end end local startRaid = function(destroyedShip) local x, y = destroyedShip.originalX, destroyedShip.originalY local drop = My.SupplyDrop(x, y, randomDropContent()) local fleet = My.pirateRaid(drop, 2) local leader = fleet:getLeader() Tools:ensureComms(leader, My.World.player, t("side_mission_destroy_graveyard_raid_comms", leader:getCaptain())) fleet:orderDefendLocation(x, y) Cron.regular(function(self) if not fleet:isValid() then Cron.abort(self) else local isEscaped = true for _, ship in pairs(fleet:getShips()) do if distance(ship, My.World.player) <= My.World.player:getLongRangeRadarRange() * 1.1 then isEscaped = false end end if isEscaped then for _, ship in pairs(fleet:getShips()) do if ship:isValid() then ship:destroy() end end if drop:isValid() then drop:destroy() end Cron.abort(self) elseif drop:isValid() then fleet:orderDefendLocation(x, y) else fleet:orderAttack(My.World.player) end end end) end My.SideMissions.DestroyGraveyard = function(from, graveyard, player) local number = math.random(3, 5) local raidOnNumber if math.random(0, 1) == 0 then raidOnNumber = math.random(1, number - 1) end local payment = My.SideMissions.paymentPerDistance(distance(from, graveyard)) * 2 * (math.random() * 0.4 + 0.8) local x, y = graveyard:getPosition() local sectorName = Util.sectorName(x, y) local mission mission = Missions:destroy(function() local ships = {} for i = 1, number do local ship = graveyard:spawnShip() ship:setFaction("Outlaw") ship:setCanBeDestroyed(true) ship:setHullMax(ship:getHullMax() * 2) ship:setHull(ship:getHullMax()) ship.originalX, ship.originalY = ship:getPosition() table.insert(ships, ship) end return ships end, { acceptCondition = function(self, error) if distance(player, x, y) < 7500 then return t("side_mission_destroy_graveyard_too_close") end return true end, onStart = function(self) updateHint(self) end, onDestruction = function(self, enemy) updateHint(self) if raidOnNumber ~= nil and self:countInvalidEnemies() == raidOnNumber then startRaid(enemy) end end, onSuccess = function(self) from:sendCommsMessage(self:getPlayer(), t("side_mission_destroy_graveyard_success_comms", payment)) self:getPlayer():addReputationPoints(payment) end, onEnd = function(self) for _, enemy in pairs(self:getEnemies() or {}) do if isEeObject(enemy) and enemy:isValid() then enemy:destroy() end end end, }) Mission:withBroker(mission, t("side_mission_destroy_graveyard", sectorName), { description = t("side_mission_destroy_graveyard_description", sectorName, number, payment), acceptMessage = nil, }) return mission end local startRaid
-- gen_dir_user_xml.lua -- example script for generating user directory XML -- comment the following line for production: --freeswitch.consoleLog("notice", "Debug from gen_dir_user_xml.lua, provided params:\n" .. params:serialize() .. "\n") local req_domain = params:getHeader("domain") local req_key = params:getHeader("key") local req_user = params:getHeader("user") local password = "1234" --assert (req_domain and req_key and req_user, --"This example script only supports generating directory xml for a single user !\n") if req_domain ~= nil and req_key~=nil and req_user~=nil then XML_STRING = [[<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="directory"> <domain name="]]..req_domain..[["> <params> <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/> </params> <groups> <group name="default"> <users> <user id="]] ..req_user..[["> <params> <param name="password" value="]]..password..[["/> <param name="vm-password" value="]]..password..[["/> </params> <variables> <variable name="toll_allow" value=""/> <variable name="accountcode" value="]] ..req_user..[["/> <variable name="user_context" value="default"/> <variable name="directory-visible" value="true"/> <variable name="directory-exten-visible" value="true"/> <variable name="limit_max" value="15"/> </variables> </user> </users> </group> </groups> </domain> </section> </document>]] else XML_STRING = [[<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="directory"> </section> </document>]] end -- comment the following line for production: --freeswitch.consoleLog("notice", "Debug from gen_dir_user_xml.lua, generated XML:\n" .. XML_STRING .. "\n")
return {'azuren','azuur','azuurblauw','azuursteen','azuki','azuurblauwe','azuurstenen','azukis'}
local class = require 'middleclass' local Tile = class('littletanks.Tile') function Tile:initialize( options ) assert(options.atlasX and options.atlasY) self.atlasX = options.atlasX self.atlasY = options.atlasY self.collisionCategories = {} end function Tile:getCollisionCategories() return self.collisionCategories end function Tile:getAtlasCoords() return self.atlasX, self.atlasY end return Tile
require("moonsc").import_tags() -- Test that any error raised by an element of executable content -- causes all subsequent elements to be skipped. -- The send tag will raise an error so var1 should not be incremented. -- If it is fail, otherwise succeed local function L(what) return _log{expr=what} end local function T(n) return _log{expr="'@@"..n.."'"} end return _scxml{ initial="s0", _datamodel{ _data{ id="var1", expr="0" }, }, _state{ id="s0", _onentry{ _send{ event="thisWillFail", target="" }, -- illegal target _assign{ location="var1", expr="var1+1" }, T(2) }, _transition{ cond="var1==1", target="fail" , T(1)}, _transition{ target="pass" }, }, _final{id='pass'}, _final{id='fail'}, }
--━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- --─────────────────────────────────────────────────-- -- Plugin: neoscroll.nvim -- Github: github.com/karb94/neoscroll.nvim --─────────────────────────────────────────────────-- --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━❰ configs ❱━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- require('neoscroll').setup({ easing_function = "quadratic" -- Default easing function -- Set any other options as needed }) --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━❰ end configs ❱━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━❰ Mappings ❱━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- local t = {} -- Syntax: t[keys] = {function, {function arguments}} t['<C-u>'] = {'scroll', {'-vim.wo.scroll', 'true', '250'}} t['<C-d>'] = {'scroll', { 'vim.wo.scroll', 'true', '250'}} t['<C-b>'] = {'scroll', {'-vim.api.nvim_win_get_height(0)', 'true', '450'}} t['<C-f>'] = {'scroll', { 'vim.api.nvim_win_get_height(0)', 'true', '450'}} t['<C-y>'] = {'scroll', {'-0.10', 'false', '100'}} t['<C-e>'] = {'scroll', { '0.10', 'false', '100'}} t['zt'] = {'zt', {'250'}} t['zz'] = {'zz', {'250'}} t['zb'] = {'zb', {'250'}} require('neoscroll.config').set_mappings(t) --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━❰ end Mappings ❱━━━━━━━━━━━━━━━━-- --━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━--
--[[ Constructs a new computed state object, which follows the value of another state object using a spring simulation. ]] local Package = script.Parent.Parent local Types = require(Package.Types) local logError = require(Package.Logging.logError) local unpackType = require(Package.Animation.unpackType) local SpringScheduler = require(Package.Animation.SpringScheduler) local useDependency = require(Package.Dependencies.useDependency) local initDependency = require(Package.Dependencies.initDependency) local updateAll = require(Package.Dependencies.updateAll) local class = {} local CLASS_METATABLE = {__index = class} local WEAK_KEYS_METATABLE = {__mode = "k"} local ENABLE_PARAM_SETTERS = false --[[ Returns the current value of this Spring object. The object will be registered as a dependency unless `asDependency` is false. ]] function class:get(asDependency: boolean?) if asDependency ~= false then useDependency(self) end return self._currentValue end --[[ Called when the goal state changes value, or when the speed or damping has changed. For speed/damping changes: The spring will be updated in the spring scheduler to match the new speed and damping values. Returns false, as this has no immediate impact on the current value of the Spring object. For goal changes: If the new goal can be animated to, the equilibrium point of the internal springs will be moved, but the springs themselves stay in place. Returns false, as this has no immediate impact on the current value of the Spring object. If the new goal can't be animated to (different types/non-animatable type), then the springs will be instantly moved to the goal value. Returns true, as the current value of the Spring object will jump directly to the goal. ]] function class:update() local goalValue = self._goalState:get(false) -- figure out if this was a goal change or a speed/damping change if goalValue == self._goalValue then -- speed/damping change - re-add to spring scheduler to assign to a new -- bucket SpringScheduler.remove(self) SpringScheduler.add(self) return false else -- goal change - reconfigure spring to target new goal local oldType = self._currentType local newType = typeof(goalValue) self._goalValue = goalValue self._currentType = newType local springGoals = unpackType(goalValue, newType) local numSprings = #springGoals self._springGoals = springGoals if newType ~= oldType then -- if the type changed, we need to set the position and velocity local springPositions = table.create(numSprings, 0) local springVelocities = table.create(numSprings, 0) for index, springGoal in ipairs(springGoals) do springPositions[index] = springGoal end self._springPositions = springPositions self._springVelocities = springVelocities self._currentValue = self._goalValue SpringScheduler.remove(self) return true elseif numSprings == 0 then -- if the type hasn't changed, but isn't animatable, just change the -- current value self._currentValue = self._goalValue SpringScheduler.remove(self) return true else -- types match, and is animatable, so just add to the spring -- scheduler and let it animate to the goal! SpringScheduler.add(self) return false end end end if ENABLE_PARAM_SETTERS then --[[ Sets the position of the internal springs, meaning the value of this Spring will jump to the given value. This doesn't affect velocity. If the type doesn't match the current type of the spring, an error will be thrown. ]] function class:setPosition(newValue: Types.Animatable) local newType = typeof(newValue) if newType ~= self._currentType then logError("springTypeMismatch", nil, newType, self._currentType) end self._springPositions = unpackType(newValue, newType) self._currentValue = newValue updateAll(self) SpringScheduler.add(self) end --[[ Sets the velocity of the internal springs, overwriting the existing velocity of this Spring. This doesn't affect position. If the type doesn't match the current type of the spring, an error will be thrown. ]] function class:setVelocity(newValue: Types.Animatable) local newType = typeof(newValue) if newType ~= self._currentType then logError("springTypeMismatch", nil, newType, self._currentType) end self._springVelocities = unpackType(newValue, newType) SpringScheduler.add(self) end --[[ Adds to the velocity of the internal springs, on top of the existing velocity of this Spring. This doesn't affect position. If the type doesn't match the current type of the spring, an error will be thrown. ]] function class:addVelocity(deltaValue: Types.Animatable) local deltaType = typeof(deltaValue) if deltaType ~= self._currentType then logError("springTypeMismatch", nil, deltaType, self._currentType) end local springDeltas = unpackType(deltaValue, deltaType) for index, delta in ipairs(springDeltas) do self._springVelocities[index] += delta end SpringScheduler.add(self) end end local function Spring( goalState: Types.State<Types.Animatable>, speed: Types.StateOrValue<number>?, damping: Types.StateOrValue<number>? ) -- apply defaults for speed and damping if speed == nil then speed = 10 end if damping == nil then damping = 1 end local dependencySet = {[goalState] = true} local speedIsState = typeof(speed) == "table" and speed.type == "State" local dampingIsState = typeof(damping) == "table" and damping.type == "State" if speedIsState then dependencySet[speed] = true end if dampingIsState then dependencySet[damping] = true end local self = setmetatable({ type = "State", kind = "Spring", dependencySet = dependencySet, -- if we held strong references to the dependents, then they wouldn't be -- able to get garbage collected when they fall out of scope dependentSet = setmetatable({}, WEAK_KEYS_METATABLE), _speed = speed, _speedIsState = speedIsState, _lastSpeed = nil, _damping = damping, _dampingIsState = dampingIsState, _lastDamping = nil, _goalState = goalState, _goalValue = nil, _currentType = nil, _currentValue = nil, _springPositions = nil, _springGoals = nil, _springVelocities = nil }, CLASS_METATABLE) initDependency(self) -- add this object to the goal state's dependent set goalState.dependentSet[self] = true self:update() return self end return Spring
function replaceModel() local col = engineLoadCOL ( "colfixes/1.col" ) engineReplaceCOL ( col, 11391 ) local col = engineLoadCOL ( "colfixes/2.col") engineReplaceCOL ( col, 11393 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), function() replaceModel() setTimer (replaceModel, 1000, 1) end ) local objects = { -- Forrest createObject(11387,530.7675781,59.4912109,1046.8183594,0.0000000,0.0000000,0.0000000,24), createObject(11389,521.4000244,75.5000000,1046.5999756,0.0000000,0.0000000,0.0000000,24), createObject(11391,513.3593750,67.4000015,1044.7099609,0.0000000,0.0000000,0.0000000,24), createObject(13027,538.0399780,87.5849991,1046.6550293,0.0000000,0.0000000,90.0000000,24), createObject(8653,545.0000000,83.1591797,1043.8000488,0.0000000,0.0000000,90.0000000,24), createObject(8653,545.0000000,83.1591797,1048.4000244,0.0000000,0.0000000,90.0000000,24), createObject(8653,545.0000000,83.1591797,1046.0000000,0.0000000,0.0000000,90.0000000,24), createObject(8653,545.6799927,92.1500015,1043.8000488,0.0000000,0.0000000,0.0000000,24), createObject(8653,545.0000000,92.1494141,1043.8000488,0.0000000,0.0000000,90.0000000,24), createObject(8653,545.0000000,92.1494141,1046.0000000,0.0000000,0.0000000,90.0000000,24), createObject(8653,545.0000000,92.1494141,1048.4000244,0.0000000,0.0000000,90.0000000,24), createObject(8653,545.6796875,92.1494141,1048.4000244,0.0000000,0.0000000,0.0000000,24), createObject(8653,545.6796875,92.1494141,1046.0000000,0.0000000,0.0000000,0.0000000,24), createObject(11416,530.3099976,79.1200027,1045.5600586,0.0000000,0.0000000,0.0000000,24), createObject(11359,516.8917000,59.2000000,1045.5999756,0.0000000,0.0000000,0.0000000,24), createObject(11359,516.8917000,59.2000000,1041.4500000,0.0000000,0.0000000,0.0000000,24), createObject(8653,545.6796875,92.1494141,1048.4000244,0.0000000,0.0000000,0.0000000,24), createObject(8653,531.0000000,68.0000000,1048.4000244,0.0000000,0.0000000,0.0000000,24), createObject(8653,531.0000000,68.0000000,1048.4000244,0.0000000,0.0000000,0.0000000,24), createObject(8653,531.0000000,76.0000000,1048.4000244,90.0000000,180.0000000,180.0000000,24), createObject(8653,531.0000000,82.0000000,1048.4000244,90.0000000,179.9945068,179.9945068,24), createObject(8653,520.0999756,58.9000015,1044.5000000,90.0000000,180.0054932,90.0000000,24), createObject(8653,514.5999756,59.0000000,1044.5000000,90.0000000,180.0054932,90.0000000,24), createObject(8653,512.0000000,59.0999985,1048.0000000,0.0000000,0.0000000,90.0000000,24), createObject(11390,521.3300000,75.4500000,1047.9500000,0.0000000,0.0000000,0.0000000,24), createObject(11388,521.3350000,75.5000000,1050.2500000,0.0000000,0.0000000,0.0000000,24), createObject(2893,518.6290283,78.1549988,1044.7349854,7.9376221,0.0000000,89.4506836,24), createObject(2893,518.6289062,79.9850006,1044.7349854,7.9321289,0.0000000,89.4506836,24), createObject(11393,526.0000000,70.0999985,1045.0000000,0.0000000,0.0000000,0.0000000,24), } local col = createColSphere(526.0000000,70.0999985,1045.0000000, 120) local function watchChanges( ) if getElementDimension( getLocalPlayer( ) ) > 0 and getElementDimension( getLocalPlayer( ) ) ~= getElementDimension( objects[1] ) and getElementInterior( getLocalPlayer( ) ) == getElementInterior( objects[1] ) then for key, value in pairs( objects ) do setElementDimension( value, getElementDimension( getLocalPlayer( ) ) ) end elseif getElementDimension( getLocalPlayer( ) ) == 0 and getElementDimension( objects[1] ) ~= 65535 then for key, value in pairs( objects ) do setElementDimension( value, 65535 ) end end end addEventHandler( "onClientColShapeHit", col, function( element ) if element == getLocalPlayer( ) then addEventHandler( "onClientRender", root, watchChanges ) end end ) addEventHandler( "onClientColShapeLeave", col, function( element ) if element == getLocalPlayer( ) then removeEventHandler( "onClientRender", root, watchChanges ) end end ) -- Put them standby for now. for key, value in pairs( objects ) do setElementDimension( value, 65535 ) end
-- We write save data to the general purpose buffer, until a save platform -- is triggered. -- DEBUG_BEGIN g_debug = false -- DEBUG_END g_card_fade = 8 poke(0x5f5c, 15) -- set the initial delay before repeating. poke(0x5f5d, 15) -- set the repeating delay. function _init() music(0, 3000) g_tl = ztable([[ x=64, y=64, i=@2, u=nf, d=@1, tl_max_time=2.5; -- logo i=@3, u=@4, d=@5; -- game ]], logo_draw, function() sfx'63' end, game_init, game_update, game_draw ) end function game_init(a) _g.fader_in(.5, nf, nf) end function game_update(a) batch_call_new(acts_loop, [[act, clean]]) end function game_draw(a) fade(g_card_fade) end function logo_draw(a) local logo_opacity = 8+cos(a.tl_tim/a.tl_max_time)*4-4 fade(logo_opacity) camera(logo_opacity > 1 and rnd_one()) zspr(108, a.x, a.y, 4, 2) fade'0' camera() end function _update60() -- DEBUG_BEGIN if g_debug then poke(0x5f42,15) -- glitch sound else poke(0x5f42,0) -- no glitch sound end -- DEBUG_END -- DEBUG_BEGIN if btnp'5' and btn'4' then g_debug = not g_debug end -- DEBUG_END tl_node(g_tl) end function _draw() cls() -- DEBUG_BEGIN if g_debug then rect(0,0,127,127,8) end -- DEBUG_END call_not_nil(g_tl, 'd', g_tl) end -- CAMERA STUFF function shiftx(view) return (view.x-view.off_x-8)*8 end function shifty(view) return (view.y-view.off_y-8)*8 end function camera_to_view(view) camera(shiftx(view), shifty(view)) end function map_draw(view, x, y) if view then local rx = x - view.w/2 local ry = y - view.h/2 view.off_x = -(16-view.w)/2+rx view.off_y = -(16-view.h)/2+ry local x1, x2 = rx*8+4, (rx+view.w)*8-5 local y1, y2 = ry*8+4, (ry+view.h)*8-5 camera_to_view(view) zclip(x1, y1, x2, y2) zcls(g_cur_room.c) batch_call_new(acts_loop, [[ pre_drawable, d; pre_drawable_1, d; pre_drawable_2, d; ]]) isorty(g_act_arrs.drawable) batch_call_new(acts_loop, [[ drawable, d; drawable_1, d; drawable_2, d; post_drawable, d; post_drawable_1, d; post_drawable_2, d; ]]) -- DEBUG_BEGIN if g_debug then acts_loop('dim', 'debug_rect') end -- DEBUG_END clip() camera() -- zrect(x1, y1, x2, y2) end end
function print(text) print(text) end
local mod = DBM:NewMod(2347, "DBM-EternalPalace", nil, 1179) local L = mod:GetLocalizedStrings() mod:SetRevision("2019071740256") mod:SetCreatureID(150653) mod:SetEncounterID(2289) mod:SetZone() mod:SetHotfixNoticeRev(20190716000000)--2019, 7, 16 --mod:SetMinSyncRevision(16950) --mod.respawnTime = 29 mod:RegisterCombat("combat") mod:RegisterEventsInCombat( "SPELL_CAST_START 292270 292083", "SPELL_CAST_SUCCESS 292205 302135 292159 301494", "SPELL_AURA_APPLIED 292307 292133 292138 289699 292167 301494 298595", "SPELL_AURA_APPLIED_DOSE 289699", "SPELL_AURA_REMOVED 292133 292138 298595 301494", "SPELL_INTERRUPT", -- "SPELL_PERIODIC_DAMAGE", -- "SPELL_PERIODIC_MISSED", "UNIT_SPELLCAST_SUCCEEDED boss1" ) --[[ (ability.id = 292270 or ability.id = 292083) and type = "begincast" or (ability.id = 292205 or ability.id = 302135 or ability.id = 292159 or ability.id = 301494) and type = "cast" or type = "interrupt" --]] local warnBioluminescentCloud = mod:NewSpellAnnounce(292205, 2) local warnToxicSpine = mod:NewTargetNoFilterAnnounce(292167, 2, nil, "Healer") local warnPiercingBarb = mod:NewTargetNoFilterAnnounce(301494, 2) local specWarnGazefromBelow = mod:NewSpecialWarningYou(292307, nil, nil, nil, 3, 2) local specWarnFeedingFrenzy = mod:NewSpecialWarningCount(298424, nil, DBM_CORE_AUTO_SPEC_WARN_OPTIONS.stack:format(18, 298424), nil, 1, 2) local specWarnFeedingFrenzyOther = mod:NewSpecialWarningTaunt(298424, nil, nil, nil, 1, 2) local specWarnShockPulse = mod:NewSpecialWarningCount(292270, nil, nil, nil, 2, 2) local specWarnCavitation = mod:NewSpecialWarningSpell(292083, nil, nil, nil, 2, 2) local specWarnPiercingBarb = mod:NewSpecialWarningYou(301494, nil, nil, nil, 1, 2) local yellPiercingBarb = mod:NewYell(301494) local yellPiercingBarbFades = mod:NewShortFadesYell(301494) --local specWarnGTFO = mod:NewSpecialWarningGTFO(270290, nil, nil, nil, 1, 8) local timerBioluminescentCloud = mod:NewCastCountTimer(30.4, 292205, nil, nil, nil, 5) local timerToxicSpineCD = mod:NewNextTimer(20, 292167, nil, "Healer", nil, 5, nil, DBM_CORE_HEALER_ICON) local timerShockPulseCD = mod:NewNextCountTimer(30, 292270, nil, nil, nil, 2, nil, nil, nil, 1, 4) local timerPiercingBarbCD = mod:NewNextTimer(29.9, 301494, nil, nil, nil, 3, nil, DBM_CORE_MYTHIC_ICON, nil, 3, 4)--Mythic local timerNextPhase = mod:NewPhaseTimer(100) local timerCavitation = mod:NewCastTimer(32, 292083, nil, nil, nil, 4, nil, DBM_CORE_INTERRUPT_ICON, nil, 1, 4) --local berserkTimer = mod:NewBerserkTimer(600) mod:AddRangeFrameOption(5, 292247) mod:AddInfoFrameOption(292133, true) --mod:AddSetIconOption("SetIconOnEyeBeam", 264382, true) mod.vb.phase = 1 mod.vb.cloudCount = 0 mod.vb.shockPulse = 0 local playerBio, playerBioTwo, playerBioThree = false, false, false local updateInfoFrame do local lines = {} local sortedLines = {} local function addLine(key, value) -- sort by insertion order lines[key] = value sortedLines[#sortedLines + 1] = key end updateInfoFrame = function() table.wipe(lines) table.wipe(sortedLines) --Player personal checks (Always Tracked) if playerBio then local spellName, _, _, _, _, expireTime = DBM:UnitDebuff("player", 292133) if spellName and expireTime then--Personal Tailwinds count local remaining = expireTime-GetTime() addLine(spellName, math.floor(remaining)) end end if playerBioTwo then local spellName2, _, _, _, _, expireTime2 = DBM:UnitDebuff("player", 292138) if spellName2 and expireTime2 then--Personal Tailwinds count local remaining2 = expireTime2-GetTime() addLine(spellName2, math.floor(remaining2)) end end if playerBioThree then local spellName3, _, _, _, _, expireTime3 = DBM:UnitDebuff("player", 298595) if spellName3 and expireTime3 then--Personal Tailwinds count local remaining3 = expireTime3-GetTime() addLine(spellName3, math.floor(remaining3)) end end return lines, sortedLines end end function mod:OnCombatStart(delay) self.vb.phase = 1 self.vb.cloudCount = 0 self.vb.shockPulse = 0 playerBio, playerBioTwo, playerBioThree = false, false, false timerToxicSpineCD:Start(11-delay) timerShockPulseCD:Start(21.9-delay, 1) if self:IsMythic() then timerPiercingBarbCD:Start(13-delay) end timerNextPhase:Start(100)--Power Drain (when it leaves) not 10 seconds after when it casts cav if self.Options.InfoFrame then DBM.InfoFrame:SetHeader(OVERVIEW) DBM.InfoFrame:Show(8, "function", updateInfoFrame, false, false) end if self.Options.RangeFrame then DBM.RangeCheck:Show(5) end end function mod:OnCombatEnd() if self.Options.InfoFrame then DBM.InfoFrame:Hide() end if self.Options.RangeFrame then DBM.RangeCheck:Hide() end end function mod:OnTimerRecovery() if DBM:UnitDebuff("player", 292133) then playerBio = true end if DBM:UnitDebuff("player", 292138) then playerBioTwo = true end if DBM:UnitDebuff("player", 298595) then playerBioThree = true end end function mod:SPELL_CAST_START(args) local spellId = args.spellId if spellId == 292270 then self.vb.shockPulse = self.vb.shockPulse + 1 specWarnShockPulse:Show(self.vb.shockPulse) specWarnShockPulse:Play("aesoon") timerShockPulseCD:Start(30, self.vb.shockPulse+1) elseif spellId == 292083 then specWarnCavitation:Show() specWarnCavitation:Play("phasechange") local _, _, _, startTime, endTime = UnitCastingInfo("boss1") local time = ((endTime or 0) - (startTime or 0)) / 1000 timerCavitation:Start(time) end end function mod:SPELL_CAST_SUCCESS(args) local spellId = args.spellId if spellId == 292205 or spellId == 302135 then self.vb.cloudCount = self.vb.cloudCount + 1 timerBioluminescentCloud:Start(20, self.vb.cloudCount) if self:AntiSpam(5, 1) then warnBioluminescentCloud:Show() end elseif spellId == 292159 then timerToxicSpineCD:Start(20) elseif spellId == 301494 then timerPiercingBarbCD:Start() end end function mod:SPELL_AURA_APPLIED(args) local spellId = args.spellId if spellId == 292307 and args:IsPlayer() and self:AntiSpam(3, 4) then specWarnGazefromBelow:Show() specWarnGazefromBelow:Play("targetyou") elseif spellId == 292133 then if args:IsPlayer() then playerBio = true end elseif spellId == 292138 then if args:IsPlayer() then playerBioTwo = true end elseif spellId == 298595 then if args:IsPlayer() then playerBioThree = true end elseif spellId == 289699 then local amount = args.amount or 1 if amount >= 18 and self:AntiSpam(5, 2) then if self:IsTanking("player", "boss1", nil, true) then specWarnFeedingFrenzy:Show(amount) specWarnFeedingFrenzy:Play("changemt") else specWarnFeedingFrenzyOther:Show(args.destName) specWarnFeedingFrenzyOther:Play("tauntboss") end end elseif spellId == 292167 then warnToxicSpine:CombinedShow(0.3, args.destName) elseif spellId == 301494 then if args:IsPlayer() then specWarnPiercingBarb:Show() specWarnPiercingBarb:Play("targetyou") yellPiercingBarb:Yell() yellPiercingBarbFades:Countdown(spellId) else warnPiercingBarb:Show(args.destName) end end end mod.SPELL_AURA_APPLIED_DOSE = mod.SPELL_AURA_APPLIED function mod:SPELL_AURA_REMOVED(args) local spellId = args.spellId if spellId == 292133 then if args:IsPlayer() then playerBio = false end elseif spellId == 292138 then if args:IsPlayer() then playerBioTwo = false end elseif spellId == 298595 then if args:IsPlayer() then playerBioThree = false end elseif spellId == 301494 and args:IsPlayer() then yellPiercingBarbFades:Cancel() end end function mod:SPELL_INTERRUPT(args) if type(args.extraSpellId) == "number" and args.extraSpellId == 292083 then self.vb.phase = self.vb.phase + 1 timerCavitation:Stop() if self:IsMythic() then timerToxicSpineCD:Start(11) timerPiercingBarbCD:Start(13) timerShockPulseCD:Start(23, self.vb.shockPulse+1) else timerToxicSpineCD:Start(5.4) timerShockPulseCD:Start(19.4, self.vb.shockPulse+1) end if self.vb.phase == 2 then timerNextPhase:Start(100)--Power Drain (when it leaves) not 10 seconds after when it casts cav end end end --[[ function mod:SPELL_PERIODIC_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId, spellName) if spellId == 270290 and destGUID == UnitGUID("player") and self:AntiSpam(2, 2) then specWarnGTFO:Show(spellName) specWarnGTFO:Play("watchfeet") end end mod.SPELL_PERIODIC_MISSED = mod.SPELL_PERIODIC_DAMAGE function mod:UNIT_DIED(args) local cid = self:GetCIDFromGUID(args.destGUID) if cid == 150773 then--Shimmerskin Pufferfish elseif cid == 153779 then--Darkwater Jellyfish end end --]] function mod:UNIT_SPELLCAST_SUCCEEDED(uId, _, spellId) if spellId == 292252 and self:AntiSpam(5, 3) then--Power Drain [DNT] timerToxicSpineCD:Stop() timerShockPulseCD:Stop() timerPiercingBarbCD:Stop() end end
-- luacheck: ignore messenger stream freeswitch argv -- usage if not argv[1] then stream:write(' message resend <message uuid>\n') return end local action = argv[2] if action == 'resend' then local message_uuid = argv[3] if not message_uuid then stream:write('-ERR no message uuid') else local response = messenger:resendSync(30, message_uuid) if response then stream:write(response) else stream:write('-ERR no response') end end return end return stream:write('-ERR invalid action for message command')