content
stringlengths 5
1.05M
|
|---|
local drawableSprite = require("structs.drawable_sprite")
local drawableLine = require("structs.drawable_line")
local drawableNinePatch = require("structs.drawable_nine_patch")
local drawableRectangle = require("structs.drawable_rectangle")
local utils = require("utils")
local zipMover = {}
local themeTextures = {
normal = {
nodeCog = "objects/zipmover/cog",
lights = "objects/zipmover/light01",
block = "objects/zipmover/block",
innerCogs = "objects/zipmover/innercog"
},
moon = {
nodeCog = "objects/zipmover/moon/cog",
lights = "objects/zipmover/moon/light01",
block = "objects/zipmover/moon/block",
innerCogs = "objects/zipmover/moon/innercog"
}
}
local blockNinePatchOptions = {
mode = "border",
borderMode = "repeat"
}
local centerColor = {0, 0, 0}
local ropeColor = {102 / 255, 57 / 255, 49 / 255}
local themes = {
"Normal", "Moon"
}
zipMover.name = "zipMover"
zipMover.depth = -9999
zipMover.nodeVisibility = "never"
zipMover.nodeLimits = {1, 1}
zipMover.placements = {}
for i, theme in ipairs(themes) do
zipMover.placements[i] = {
name = string.lower(theme),
data = {
width = 16,
height = 16,
theme = theme
}
}
end
local function addNodeSprites(sprites, entity, cogTexture, centerX, centerY, centerNodeX, centerNodeY)
local nodeCogSprite = drawableSprite.fromTexture(cogTexture, entity)
nodeCogSprite:setPosition(centerNodeX, centerNodeY)
nodeCogSprite:setJustification(0.5, 0.5)
local points = {centerX, centerY, centerNodeX, centerNodeY}
local leftLine = drawableLine.fromPoints(points, ropeColor, 1)
local rightLine = drawableLine.fromPoints(points, ropeColor, 1)
leftLine:setOffset(0, 4.5)
rightLine:setOffset(0, -4.5)
leftLine.depth = 5000
rightLine.depth = 5000
for _, sprite in ipairs(leftLine:getDrawableSprite()) do
table.insert(sprites, sprite)
end
for _, sprite in ipairs(rightLine:getDrawableSprite()) do
table.insert(sprites, sprite)
end
table.insert(sprites, nodeCogSprite)
end
local function addBlockSprites(sprites, entity, blockTexture, lightsTexture, x, y, width, height)
local rectangle = drawableRectangle.fromRectangle("fill", x + 2, y + 2, width - 4, height - 4, centerColor)
local frameNinePatch = drawableNinePatch.fromTexture(blockTexture, blockNinePatchOptions, x, y, width, height)
local frameSprites = frameNinePatch:getDrawableSprite()
local lightsSprite = drawableSprite.fromTexture(lightsTexture, entity)
lightsSprite:addPosition(math.floor(width / 2), 0)
lightsSprite:setJustification(0.5, 0.0)
table.insert(sprites, rectangle:getDrawableSprite())
for _, sprite in ipairs(frameSprites) do
table.insert(sprites, sprite)
end
table.insert(sprites, lightsSprite)
end
function zipMover.sprite(room, entity)
local sprites = {}
local x, y = entity.x or 0, entity.y or 0
local width, height = entity.width or 8, entity.height or 8
local halfWidth, halfHeight = math.floor(entity.width / 2), math.floor(entity.height / 2)
local nodes = entity.nodes or {{x = 0, y = 0}}
local nodeX, nodeY = nodes[1].x, nodes[1].y
local centerX, centerY = x + halfWidth, y + halfHeight
local centerNodeX, centerNodeY = nodeX + halfWidth, nodeY + halfHeight
local theme = string.lower(entity.theme or "normal")
local themeData = themeTextures[theme] or themeTextures["normal"]
addNodeSprites(sprites, entity, themeData.nodeCog, centerX, centerY, centerNodeX, centerNodeY)
addBlockSprites(sprites, entity, themeData.block, themeData.lights, x, y, width, height)
return sprites
end
function zipMover.selection(room, entity)
local x, y = entity.x or 0, entity.y or 0
local width, height = entity.width or 8, entity.height or 8
local halfWidth, halfHeight = math.floor(entity.width / 2), math.floor(entity.height / 2)
local nodes = entity.nodes or {{x = 0, y = 0}}
local nodeX, nodeY = nodes[1].x, nodes[1].y
local centerNodeX, centerNodeY = nodeX + halfWidth, nodeY + halfHeight
local theme = string.lower(entity.theme or "normal")
local themeData = themeTextures[theme] or themeTextures["normal"]
local cogSprite = drawableSprite.fromTexture(themeData.nodeCog, entity)
local cogWidth, cogHeight = cogSprite.meta.width, cogSprite.meta.height
local mainRectangle = utils.rectangle(x, y, width, height)
local nodeRectangle = utils.rectangle(centerNodeX - math.floor(cogWidth / 2), centerNodeY - math.floor(cogHeight / 2), cogWidth, cogHeight)
return mainRectangle, {nodeRectangle}
end
return zipMover
|
function Welder:PerformWeld(player)
local attackDirection = player:GetViewCoords().zAxis
local success = false
-- prioritize friendlies
local didHit, target, endPoint, direction, surface = CheckMeleeCapsule(self, player, 0, self:GetRange(), nil, true, 1, PrioritizeDamagedFriends, nil, PhysicsMask.Flame)
if didHit and target and HasMixin(target, "Live") then
if GetAreEnemies(player, target) then
self:DoDamage(kWelderDamagePerSecond * kWelderFireDelay, target, endPoint, attackDirection)
success = true
elseif player:GetTeamNumber() == target:GetTeamNumber() and HasMixin(target, "Weldable") then
if target:GetHealthScalar() < 1 then
local prevHealthScalar = target:GetHealthScalar()
local prevHealth = target:GetHealth()
local prevArmor = target:GetArmor()
target:OnWeld(self, kWelderFireDelay, player)
success = prevHealthScalar ~= target:GetHealthScalar()
if success then
local addAmount = (target:GetHealth() - prevHealth) + (target:GetArmor() - prevArmor)
player:AddContinuousScore("WeldHealth", addAmount, Welder.kAmountHealedForPoints, Welder.kHealScoreAdded)
-- weld owner as well
player:SetArmor(player:GetArmor() + kWelderFireDelay * kSelfWeldAmount)
end
end
if HasMixin(target, "Construct") and target:GetCanConstruct(player) then
target:Construct(kWelderFireDelay, player)
end
end
else
local dot = Math.DotProduct(attackDirection, Vector(0,-1,0))
if dot > 0.9 then
-- weld owner
player:SetArmor(player:GetArmor() + kWelderFireDelay * kSelfWeldAmount)
end
end
if success then
return endPoint
end
end
|
local DB = require("app.libs.db")
local db = DB:new()
local comment_model = {}
function comment_model:delete(user_id, comment_id)
local res, err = db:query("delete from comment where id=? and user_id=?",
{tonumber(comment_id), tonumber(user_id)})
if res and not err then
return true
else
return false
end
end
function comment_model:new(topic_id, user_id, content)
return db:query("insert into comment(topic_id,user_id, content) values(?,?,?)",
{tonumber(topic_id), tonumber(user_id), content})
end
function comment_model:query(comment_id)
comment_id = tonumber(comment_id)
if not comment_id or comment_id == 0 then
return {}
end
local res, err = db:query("select c.*, u.avatar as avatar, u.username as user_name from comment c " ..
" left join user u on c.user_id=u.id " ..
" where c.id=?",
{comment_id})
if not res or err or type(res) ~= "table" or #res <= 0 then
return {}
else
return res[1]
end
end
function comment_model:get_last_reply_of_topic(topic_id)
topic_id = tonumber(topic_id)
if not topic_id or topic_id == 0 then
return {}
end
local res, err = db:query("select c.*, u.username as user_name, u.id as user_id from comment c " ..
" left join user u on c.user_id=u.id " ..
" where c.topic_id=? order by c.id desc limit 1",
{topic_id})
if not res or err or type(res) ~= "table" or #res <= 0 then
return {}
else
return res[1]
end
end
function comment_model:get_all_of_user(user_id, page_no, page_size)
page_no = tonumber(page_no)
page_size = tonumber(page_size)
if page_no < 1 then
page_no = 1
end
local res, err = db:query("select t.id as topic_id, t.title as topic_title, c.content as comment_content,c.id as comment_id, c.create_time as comment_time from comment c" ..
" right join topic t on c.topic_id=t.id" ..
" where c.user_id=? order by c.id desc limit ?,?",
{tonumber(user_id), (page_no - 1) * page_size, page_size})
if not res or err or type(res) ~= "table" or #res <= 0 then
return {}
else
return res
end
end
function comment_model:get_total_count_of_user(user_id)
local res, err = db:query("select count(c.id) as comment_count from comment c " ..
" right join topic t on c.topic_id=t.id" ..
" where c.user_id=?", {tonumber(user_id)})
if err or not res or #res~=1 or not res[1].comment_count then
return 0
else
return res[1].comment_count
end
end
function comment_model:get_total_count()
local res, err = db:query("select count(c.id) as comment_count from comment c ")
if err or not res or #res~=1 or not res[1].comment_count then
return 0
else
return res[1].comment_count
end
end
function comment_model:get_total_count_of_topic(topic_id)
topic_id = tonumber(topic_id)
if not topic_id or topic_id == 0 then
return 0
end
local res, err = db:query("select count(id) as c from comment where topic_id=?", {topic_id})
if err or not res or #res~=1 or not res[1].c then
return 0
else
return res[1].c
end
end
function comment_model:get_all_of_topic(topic_id, page_no, page_size)
topic_id = tonumber(topic_id)
if not topic_id or topic_id == 0 then
return 0
end
page_no = tonumber(page_no)
page_size = tonumber(page_size)
if page_no < 1 then
page_no = 1
end
local res, err = db:query("select c.*, u.avatar as avatar, u.username as user_name from comment c " ..
" left join user u on c.user_id=u.id " ..
" where c.topic_id=? order by c.id asc limit ?,?",
{topic_id, (page_no - 1) * page_size, page_size})
if not res or err or type(res) ~= "table" or #res <= 0 then
return {}
else
return res
end
end
function comment_model:reset_topic_comment_num(topic_id)
db:query("update topic set reply_num=(select count(id) from comment where topic_id=?) where id=?",
{tonumber(topic_id), tonumber(topic_id)})
end
return comment_model
|
local node_garden = {
description = "Garden Fence",
drawtype = "nodebox",
tiles = {
"myfences_wood.png",
"myfences_wood.png",
"myfences_wood.png^[transformR90",
"myfences_wood.png^[transformR90",
"myfences_wood.png",
"myfences_wood.png",
},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propogates = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.1875, -0.375, 0.5, 0.4375},
{0.375, -0.5, 0.1875, 0.5, 0.5, 0.4375},
{-0.5, -0.4375, 0.4375, 0.5, -0.25, 0.5},
{-0.5, -0.1875, 0.4375, 0.5, 0, 0.5},
{-0.5, 0.0625, 0.4375, 0.5, 0.25, 0.5},
{-0.5, 0.3125, 0.4375, 0.5, 0.5, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,0.25,0.5,0.5,0.5},
}
},
groups = {choppy = 2, flammable = 1},
sounds = default.node_sound_stone_defaults(),
}
minetest.register_node("myfences:garden", node_garden)
local node_garden_corner = {
description = "Garden Fence Corner",
drawtype = "nodebox",
tiles = {
"myfences_wood.png",
"myfences_wood.png",
"myfences_wood.png^[transformR90",
"myfences_wood.png^[transformR90",
"myfences_wood.png",
"myfences_wood.png",
},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propogates = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.1875, -0.375, 0.5, 0.4375},
{0.1875, -0.4375, 0.1875, 0.4375, 0.5, 0.4375},
{-0.5, -0.4375, 0.4375, 0.5, -0.25, 0.5},
{-0.5, -0.1875, 0.4375, 0.5, 0, 0.5},
{-0.5, 0.0625, 0.4375, 0.5, 0.25, 0.5},
{-0.5, 0.3125, 0.4375, 0.5, 0.5, 0.5},
{0.1875, -0.5, -0.5, 0.4375, 0.5, -0.375},
{0.4375, -0.4375, -0.5, 0.5, -0.25, 0.5},
{0.4375, -0.1875, -0.5, 0.5, 0, 0.5},
{0.4375, 0.0625, -0.5, 0.5, 0.25, 0.5},
{0.4375, 0.3125, -0.5, 0.5, 0.5, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,0.25,0.5,0.5,0.5},
{0.25,-0.5,-0.5,0.5,0.5,0.5},
}
},
groups = {choppy = 2, flammable = 1},
sounds = default.node_sound_stone_defaults(),
}
minetest.register_node("myfences:garden_corner", node_garden_corner)
for _, entry in ipairs(myfences.colors) do
local color = entry[1]
local desc = entry[2]
local stain = "^(myfences_color.png^[colorize:#"..entry[3]..":255)"
local tiles = {
"myfences_wood.png"..stain,
"myfences_wood.png"..stain,
"myfences_wood.png^[transformR90"..stain,
"myfences_wood.png^[transformR90"..stain,
"myfences_wood.png"..stain,
"myfences_wood.png"..stain,
}
local node = table.copy(node_garden)
node.description = desc.." Garden Fence"
node.tiles = tiles
node.drop = "myfences:garden"
node.groups.not_in_creative_inventory = 1
minetest.register_node("myfences:garden_"..color, node)
node = table.copy(node_garden_corner)
node.description = desc.." Garden Fence Corner"
node.tiles = tiles
node.drop = "myfences:garden_corner"
node.groups.not_in_creative_inventory = 1
minetest.register_node("myfences:garden_corner_"..color, node)
end
minetest.register_craft({
output = "myfences:garden",
recipe = {
{"","",""},
{"myfences:board","myfences:board","myfences:board"},
{"default:wood","myfences:board","default:wood"},
}
})
minetest.register_craft({
type = "shapeless",
output = "myfences:fence_garden_corner",
recipe = {"myfences:garden","myfences:garden"},
})
|
--[[
@author Sebastian "CrosRoad95" Jura <sebajura1234@gmail.com>
@copyright 2011-2021 Sebastian Jura <sebajura1234@gmail.com>
@license MIT
]]--
vehicles=0
root=getRootElement()
resourceRoot=getResourceRootElement(getThisResource())
local nlOffsets={
[411]={-1,0,-0.6}, -- infernus
[470]={-1,0,-0.4}, -- patriot
[541]={-0.9,0,-0.4}, -- bulelt
[549]={-0.9,0,-0.4}, -- tampa
[587]={-1,0,-0.5}, -- euros
}
local nlIDX={
3962,2113,1784,2054,2428,2352
}
function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]
if value then
return value
end
end
return false
end
function getAdmin2(plr,level)
if level then
local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=? AND level=?", getPlayerSerial(plr), level)
if result and #result > 0 then
return true
else
return false
end
else
local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
return true
else
return false
end
end
end
--///////////////////////////////////// WCZYTYWANIE POJAZDÓW /////////////////////////////////
function onRespawnVehicles(_,id,poss)
-- Settings (QUERY)
if id then
result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE parking=1 AND id=?", id)
query=exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=0 WHERE id=?", id)
else
result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE parking=0")
end
-- Pairs
for ile,vehicle in pairs(result) do
vehicles=ile
if id then pos={poss[1], poss[2], poss[3], poss[4], poss[5], poss[6]}
else pos=split(vehicle["pos"], ",") end
local color=split(vehicle["color"], ",")
local lights=split(vehicle["headlights"], ",")
local veh=createVehicle(vehicle["model"], pos[1], pos[2], pos[3], pos[4], pos[5], pos[6])
setVehicleColor(veh, color[1], color[2], color[3], color[4],color[5], color[6], color[7], color[8],color[9], color[10], color[11], color[12])
setVehicleHeadLightColor(veh, lights[1], lights[2], lights[3])
if vehicle["plateText"] ~= "" then
setVehiclePlateText(veh, vehicle["plateText"])
else
setVehiclePlateText(veh, tostring("SA "..vehicle["id"]))
end
setElementFrozen(veh, (vehicle["frozen"]) > 0)
if vehicle["paintjob"] ~= 3 then
setVehiclePaintjob(veh, vehicle["paintjob"])
end
setElementHealth(veh, vehicle["health"])
setElementData(veh,"vehicle:spawn",true)
setElementData(veh,"vehicle:id", vehicle["id"])
setElementData(veh,"vehicle:fuel", vehicle["fuel"])
setElementData(veh,"vehicle:desc", vehicle["text"] or false)
setElementData(veh,"vehicle:mileage", vehicle["mileage"])
setElementData(veh,"vehicle:driver", vehicle["driver"])
setElementData(veh,"vehicle:ownedGroup", vehicle["ownedGroup"])
setElementData(veh,"vehicle:ownedPlayer", vehicle["ownedPlayer"])
local mk1 = vehicle['mk1']
local mk1 = vehicle['mk2']
local xfour = vehicle['awd']
if (type(vehicle['rent']) == "string") then
local tabelka = {}
local rente = split(vehicle['rent'], ',')
for k,v in ipairs(rente) do
table.insert(tabelka,v)
end
setElementData(veh,"vehicle:rent", tabelka or false)
else
setElementData(veh,"vehicle:rent",0)
end
if tonumber(xfour) == 1 then
setVehicleHandling(veh,"driveType","awd")
end
if tonumber(mk1) ~= 0 then
local fast = getVehicleHandlingProperty(veh,"engineAcceleration")
local maxfast = getVehicleHandlingProperty(veh,"maxVelocity")
local masa = getVehicleHandlingProperty(veh,"mass")
local masa2 = getVehicleHandlingProperty(veh,"turnMass")
local xd = getVehicleHandlingProperty(veh,"tractionMultiplier")
local coef = getVehicleHandlingProperty(veh,"dragCoeff")
setVehicleHandling(veh,"engineAcceleration",fast+0.5)
setVehicleHandling(veh,"maxVelocity",maxfast+6)
setVehicleHandling(veh,"mass",masa+100)
setVehicleHandling(veh,"tractionMultiplier",xd+0.1)
setVehicleHandling(veh,"steeringLock",40)
setVehicleHandling(veh,"dragCoeff",coef-0.15)
end
if tonumber(mk2) ~= 0 then
local fast = getVehicleHandlingProperty(veh,"engineAcceleration")
local maxfast = getVehicleHandlingProperty(veh,"maxVelocity")
local masa = getVehicleHandlingProperty(veh,"mass")
local masa2 = getVehicleHandlingProperty(veh,"turnMass")
local xd = getVehicleHandlingProperty(veh,"tractionMultiplier")
local coef = getVehicleHandlingProperty(veh,"dragCoeff")
setVehicleHandling(veh,"engineAcceleration",fast+1.3)
setVehicleHandling(veh,"maxVelocity",maxfast+14)
setVehicleHandling(veh,"tractionMultiplier",xd+0.2)
setVehicleHandling(veh,"mass",masa+150)
setVehicleHandling(veh,"steeringLock",42)
setVehicleHandling(veh,"dragCoeff",coef-0.21)
end
--[[ if vehicle["rearlights"] ~= "" then
setElementData(veh,"vehicle:light", vehicle["rearlights"])
else
setElementData(veh,"vehicle:light", "High Quality")
end]]--
setElementData(veh,"neony", vehicle["neon"])
if vehicle["blokada"] == "true" then
setElementData(veh,"vehicle:block", true)
setVehicleWheelStates(veh, 2, 2, 2, 2)
else
setElementData(veh,"vehicle:block", false)
end
local rodzajneonu=tonumber(getElementData(veh,"neony"))
if getElementData(veh,"neony") ~= 0 then
local m = getElementModel(veh)
local of
if not nlOffsets[m] then
of={-1,0,-0.5}
else
of=nlOffsets[m]
end
neon1=createObject(nlIDX[rodzajneonu],0,0,0)
neon2=createObject(nlIDX[rodzajneonu],0,0,0)
setElementData(veh,"zneony", {neon1, neon2})
attachElements(neon1,veh,of[1],of[2],of[3])
attachElements(neon2,veh,-of[1],of[2],of[3])
end
for i,v in ipairs(split(vehicle["tuning"], ",")) do addVehicleUpgrade(veh, v) end
for i,v in ipairs(split(vehicle["panelstates"], ",")) do setVehiclePanelState(veh, i, tonumber(v)) end
setVehicleDamageProof(veh, true)
end
outputDebugString("[pystories_vehicles] Loaded "..vehicles.." vehicles.")
end
--///////////////////////////////////// ZAPISYWANIE POJAZDÓW /////////////////////////////////
function onSaveVehicle(vehicle)
if getElementData(vehicle,"vehicle:spawn") then
-- Setting
local panelstates={}
local model=getElementModel(vehicle)
local health=getElementHealth(vehicle)
local x,y,z=getElementPosition(vehicle)
local rx,ry,rz=getElementRotation(vehicle)
local desc=getElementData(vehicle,"vehicle:desc") or ""
local id=getElementData(vehicle,"vehicle:id")
local fuel=getElementData(vehicle,"vehicle:fuel")
local mileage=getElementData(vehicle,"vehicle:mileage")
local c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12=getVehicleColor(vehicle, true)
local driver=getElementData(vehicle,"vehicle:driver") or ""
local rent=getElementData(vehicle,"vehicle:rent")
local player=getElementData(vehicle,"vehicle:ownedPlayer")
-- local group=getElementData(vehicle,"vehicle:ownedGroup")
local blokada=getElementData(vehicle,"vehicle:block")
local neon=getElementData(vehicle,"neony")
local h1,h2,h3=getVehicleHeadLightColor(vehicle)
local paintjob=getVehiclePaintjob(vehicle)
local rear="Brak"
local frozen= isElementFrozen(vehicle) and 1 or 0
for i=0,6 do table.insert(panelstates, getVehiclePanelState(vehicle,i)) end
panelstates=table.concat(panelstates,",")
upgrades=getVehicleUpgrades(vehicle)
if not upgrades then upgrades={} end
upgrades=table.concat(upgrades, ",")
-- Query
local query = exports["pystories-db"]:dbSet(string.format("UPDATE pystories_vehicles SET model='%d', pos='%.2f,%.2f,%.2f,%.2f,%.2f,%.2f', rent='%d',text='%s', health='%d', fuel='%d', mileage='%d', frozen='%d', driver='%s', color='%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d', panelstates='%s', paintjob='%d', tuning='%s', headlights='%d,%d,%d', ownedPlayer='%d', neon='%d', blokada='%s' WHERE id=%d",
model, x,y,z, rx,ry,rz, "0",desc, health, fuel, mileage, frozen, driver, c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12, panelstates, paintjob, upgrades, h1,h2,h3, player, neon, tostring(blokada), id))
if (type(rent) == "table") then
local rr = string.format("%s", table.concat(rent, ',') )
-- outputDebugString(rr)
local query2= exports['pystories-db']:dbSet("UPDATE pystories_vehicles SET rent=? WHERE id=?",rr,id)
end
end
end
function onParkVehicle(vehicle)
local query=exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1 WHERE id=?", getElementData(vehicle,"vehicle:id"))
if query then
local zneony=getElementData(vehicle,"zneony")
if (zneony and type(zneony)=="table") then
destroyElement(zneony[1])
destroyElement(zneony[2])
removeElementData(vehicle,"zneony")
end
destroyElement(vehicle)
end
end
--///////////////////////////////////// SPRAWDZANIE USTAWIEŃ /////////////////////////////////
function getSettings(plr,code,value)
local sid=getElementData(plr,"player:sid")
if not sid then return end
if value == "faction" then
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_factions WHERE code=? AND sid=?", code, sid)
if result and #result > 0 then
return result[1].code
else
return false
end
end
if value == "organization" then
local result=exports["pystories-db"]:dbGet("SELECT * FROM ms_organizacje WHERE sid=?", sid)
if result and #result > 0 then
return result[1].code
else
return false
end
end
if value == "owner" then
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?", sid)
if result and #result > 0 then
return result[1].id
else
return false
end
end
end
--///////////////////////////////////// INNE USTAWIENIA /////////////////////////////////
addEventHandler("onVehicleExit", root, function(plr,seat)
if seat ~= 0 then return end
onSaveVehicle(source)
setVehicleEngineState(source, false)
setVehicleDamageProof(source, true)
unbindKey(plr, 'n', 'down', bindHoron4)
end)
addEventHandler("onPlayerQuit", root, function()
local veh=getPedOccupiedVehicle(source)
if veh then
setVehicleDamageProof(source, true)
onSaveVehicle(veh)
end
end)
addEventHandler("onResourceStop", resourceRoot, function()
for i,v in ipairs(getElementsByType("vehicle")) do
onSaveVehicle(v)
local zneony=getElementData(v,"zneony")
if (zneony and type(zneony)=="table") then
destroyElement(zneony[1])
destroyElement(zneony[2])
removeElementData(v,"zneony")
end
end
outputDebugString("[pystories_vehicles] Saved all vehicles!")
end)
addEventHandler("onVehicleEnter", root, function(plr,seat)
if seat ~= 0 then return end
setVehicleEngineState(source, false)
setElementData(source,"vehicle:driver",getPlayerName(plr))
if getElementData(source,"neony") and getElementData(source,"neony") ~= 0 then
--triggerClientEvent(plr,"addNotification",root,"* Posiadasz neony w pojezdzie, możesz wlączyć i wylaczyc je za pomocą przycisku H.","info")
outputChatBox("* Posiadasz neony w pojezdzie, możesz wlączyć i wylaczyc je za pomocą przycisku N.",plr)
bindKey(plr, 'n', 'down', bindHoron4, plr)
end
end)
--///////////////////////////////////// SPRAWDZENIE WŁAŚCICIELA /////////////////////////////////
addEventHandler("onVehicleStartEnter", resourceRoot, function(plr,seat,jacked)
if seat == 0 then
local rent=getElementData(source, "vehicle:rent")
local group=getElementData(source, "vehicle:ownedGroup")
if group == "0" then group = "Brak" end
local player=getElementData(source, "vehicle:ownedPlayer")
if getAdmin2(plr, 4) then
return
end
if rent and (type(rent) == "table") then
for i,s in pairs(rent) do
if tonumber(s) == getElementData(plr,"player:sid") then
return end
end
end
local plrgroup = getElementData(plr,"player:organization")
if plrgroup then
-- outputDebugString(group)
if getSettings(plr,false,"organization") == group then return end
end
if player and player ~= getSettings(plr,false,"owner") then
--triggerClientEvent(plr,"addNotification",root,"* Nie masz kluczyków do tego pojazdu.","error")
outputChatBox("* Nie posiadasz kluczyków do tego pojazdu.", plr)
cancelEvent()
end
end
end)
addEventHandler("onVehicleStartEnter", root, function(plr,seat,jacked)
if jacked then
if getElementData(source,"vehicle:ownedPlayer") == getElementData(plr,"player:sid") then return end
cancelEvent()
end
end)
addEventHandler("onVehicleStartEnter", root, function(plr,seat,jacked)
if seat == 0 then
if getElementData(source,"spawnowany")== true then
if getElementData(plr,"player:admin")== false then
cancelEvent()
end
end
end
end)
function bindHoron4(plr)
veh=getPedOccupiedVehicle(plr)
if not veh then return end
local rodzajneonu=tonumber(getElementData(veh,"neony"))
if not rodzajneonu then return end
if rodzajneonu==0 then
outputChatBox('* Brak Neonow.', plr, 255, 0 ,0)
return end
local zneony=getElementData(veh,"zneony")
if (zneony and type(zneony)=="table") then
destroyElement(zneony[1])
destroyElement(zneony[2])
removeElementData(veh,"zneony")
--triggerClientEvent(plr,"addNotification",root,'* Wyłączyłeś Neony.',"warning")
outputChatBox("* Odłączyłeś(aś) neony od pojazdu.",plr)
else
local m = getElementModel(veh)
local of
if not nlOffsets[m] then
of={-1,0,-0.5}
else
of=nlOffsets[m]
end
neon1=createObject(nlIDX[rodzajneonu],0,0,0)
neon2=createObject(nlIDX[rodzajneonu],0,0,0)
setElementData(veh,"zneony", {neon1, neon2})
attachElements(neon1,veh,of[1],of[2],of[3])
attachElements(neon2,veh,-of[1],of[2],of[3])
--triggerClientEvent(plr,"addNotification",root,'* Włączyłeś Neony. Pojawią się one jak poruszysz pojazdem!',"info")
outputChatBox("* Załączyłeś(aś) neony w pojeździe.",plr)
end
end
addEventHandler("onElementDestroy", getRootElement(), function ()
if getElementType(source) == "vehicle" then
local zneony=getElementData(source,"zneony")
if (zneony and type(zneony)=="table") then
destroyElement(zneony[1])
destroyElement(zneony[2])
removeElementData(source,"zneony")
end
end
end)
addEventHandler("onResourceStart", resourceRoot, function() onRespawnVehicles(_,false) end)
--[[function shuffle(t)
local n = #t
while n >= 2 do
-- n is now the last pertinent index
local k = math.random(n) -- 1 <= k <= n
-- Quick swap
t[n], t[k] = t[k], t[n]
n = n - 1
end
return t
end
local function vr()
local pojazdy=getElementsByType("vehicle")
if (#pojazdy<1) then return end
local pojazdwoda={}
for _,pojazd in ipairs(pojazdy) do
if isElementInWater(pojazd) and not getVehicleController(pojazd) then
local x,y,z=getElementPosition(pojazd)
if (z<-1) then
table.insert(pojazdwoda,pojazd)
end
end
end
if (#pojazdwoda<1) then return end
outputDebugString("system_wylawiania_aut> Pojazdow w wodzie/pod mapa: " .. #pojazdwoda)
shuffle(pojazdwoda)
local pojazd=pojazdwoda[1]
if getElementData(pojazd, "vehicle:spawn") then
onParkVehicle(pojazd)
else
respawnVehicle(pojazd)
end
end
setTimer(vr, 35000, 0)--]]
--//////////////////////////////////////////////////////// Licencje
local categoryA={[463] = true,[462] = true,[461] = true,[581] = true,[448] = true,[468] = true,[471] = true,[521] = true,[522] = true,[523] = true}
local categoryB={[602] = true,[545] = true,[496] = true,[517] = true,[401] = true,[410] = true,[518] = true,[600] = true,[527] = true,[436] = true,[589] = true,[580] = true,[419] = true,[439] = true,[533] = true,[549] = true,[526] = true,[491] = true,[474] = true,[445] = true,[467] = true,[604] = true,[426] = true,[507] = true,[547] = true,[585] = true,[405] = true,[587] = true,[409] = true,[466] = true,[550] = true,[492] = true,[566] = true,[546] = true,[540] = true,[551] = true,[421] = true,[516] = true,[529] = true,[488] = true,[460] = true,
[469] = true,[487] = true,[510] = true,[509] = true,[481] = true,[586] = true,[472] = true,[473] = true,[493] = true,[595] = true,[484] = true,[430] = true,[453] = true,[452] = true,[446] = true,[454] = true,[485] = true,[552] = true,
[438] = true,[574] = true,[420] = true,[525] = true,[408] = true,[596] = true,[597] = true,[427] = true,[599] = true,[490] = true,[432] = true,[528] = true,[601] = true,[407] = true,[544] = true,[470] = true,[598] = true,[588] = true,
[532] = true,[443] = true,[486] = true,[531] = true,[543] = true,[422] = true,[583] = true,[478] = true,[605] = true,[554] = true,[530] = true,[418] = true,[572] = true,[582] = true,[536] = true,[575] = true,[534] = true,
[567] = true,[535] = true,[576] = true,[412] = true,[402] = true,[542] = true,[603] = true,[475] = true,[449] = true,[537] = true,[570] = true,[441] = true,[464] = true,[501] = true,[465] = true,[564] = true,[568] = true,[557] = true,[424] = true,[504] = true,[495] = true,[457] = true,[539] = true,[483] = true,[571] = true,[500] = true,
[444] = true,[556] = true,[429] = true,[411] = true,[541] = true,[559] = true,[415] = true,[561] = true,[480] = true,[560] = true,[562] = true,[506] = true,[565] = true,[451] = true,[434] = true,[558] = true,[494] = true,[555] = true,[502] = true,[477] = true,[503] = true,[579] = true,[400] = true,[404] = true,[489] = true,[505] = true,[479] = true,[442] = true,[458] = true,
[606] = true,[607] = true,[610] = true,[590] = true,[569] = true,[611] = true,[584] = true,[608] = true,[435] = true,[450] = true,[591] = true,[594] = true}
local categoryC={[403] = true,[406] = true,[413] = true,[414] = true,[416] = true,[423] = true,[428] = true,[431] = true,[433] = true,[437] = true,[440] = true,[455] = true,[456] = true,[459] = true,[482] = true,[498] = true,[499] = true,[508] = true,[514] = true,[515] = true,[524] = true,[538] = true,[573] = true}
addEventHandler("onVehicleStartEnter", resourceRoot, function(plr,seat,jacked)
if seat == 0 then
if categoryA[getElementModel(source)] then
if exports["pystories-ustawienia-prac"]:getVehicleLicense(plr,"A") then
cancelEvent()
end
elseif categoryB[getElementModel(source)] then
if exports["pystories-ustawienia-prac"]:getVehicleLicense(plr,"B") then
cancelEvent()
end
elseif categoryC[getElementModel(source)] then
if exports["pystories-ustawienia-prac"]:getVehicleLicense(plr,"C") then
cancelEvent()
end
end
end
end)
addEventHandler("onVehicleEnter", getRootElement(), function(plr,seat,jacked)
if seat ~= 0 then return end
if getElementData(source, "vehicle:id") and getElementData(source, "vehicle:spawn") then
local mk2 = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk2=?",getElementData(source, "vehicle:id"), "1")
local mk1 = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk1=?",getElementData(source, "vehicle:id"), "1")
local rh = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND rh=?",getElementData(source, "vehicle:id"), "1")
local np = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND naped=?",getElementData(source, "vehicle:id"), "1")
if #mk1 > 0 then outputChatBox("[!] Pomyślnie zaprogramowano MK1",plr,255,255,255) end
if #mk2 > 0 then outputChatBox("[!] Pomyślnie zaprogramowano MK2",plr,255,255,255) end
if #rh > 0 then outputChatBox("[!] Pomyślnie zaprogramowano RH1",plr,255,255,255) end
if #np > 0 then outputChatBox("[!] Pomyślnie zaprogramowano Napęd 4x4",plr,255,255,255) end
end
end)
local strefa = { }
local strefy = {
{1336.23840, 656.78876, 9.85624, 60.50634765625, 146.80010986328, 16.164074325562 },
{924.07690, 1661.90576, 9.25354, 194.91711425781, 138.31750488281, 23.899999046326},
{2197.99780, 2405.43872, -31.81085, 178.1982421875, 112.3896484375, 57.499998474121},
}
local ogranicznik = createElement ("ogranicznik");
for i,v in ipairs ( strefy ) do
strefa[i] = createColCuboid ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [7] )
setElementParent (strefa [i], ogranicznik);
end
addEventHandler("onColShapeHit", ogranicznik, function(el,md)
if getElementType(el)=="vehicle" then
setElementData(el,"vehicle:tempspeed", 50)
end
end)
addEventHandler("onColShapeLeave", ogranicznik, function(el,md)
if getElementType(el)=="vehicle" then
removeElementData(el,"vehicle:tempspeed")
end
end)
function wariant(plr, cmd, var1, var2)
local veh = getPedOccupiedVehicle(plr)
if not veh then return end
local var1, var2 = getVehicleVariant(veh)
if (veh and getVehicleController(veh) ~= plr) then return end
local speedx, speedy, speedz = getElementVelocity(veh)
if not speedx then speedx=0 end
if not speedy then speedy=0 end
if not speedz then speedz=0 end
speedx = tonumber(speedx);speedy=tonumber(speedy);speedz=tonumber(speedz)
local speed = (speedx^2 + speedy^2 + speedz^2)^(0.5) * 180
if speed > 2 then outputChatBox("* Stój w miejscu !",plr) return end
local panel = {}
for i=0,6 do
panel[i] = getVehiclePanelState ( veh, i )
end
setVehicleVariant(veh, tonumber(not var1), tonumber(not var1))
for i=0, 6 do
setVehiclePanelState ( veh, i ,panel[i])
end
end
addCommandHandler("wariant", wariant)
|
local RunService = game:GetService("RunService")
local Promise = require(script.Parent.Parent.Promise)
local REQUIRED_ACTUATION = 0.2
--[=[
A Rebind is used for getting an input the user actuates.
You can create a query with specific devices and inputs and then call [`Rebind:start`](/api/Rebind/start) to get a promise that
resolves with the first input matching the query that the user actuates.
```lua
local input = Rebind.new(ValueKind.Boolean)
:withDevices({ Devices.Keyboard })
:withoutInputs({ Devices.Keyboard.Space })
:start()
:expect()
```
@class Rebind
]=]
local Rebind = {}
Rebind.__index = Rebind
--[=[
Creates a new Rebind.
@param valueKind ValueKind -- Rebind returns inputs that are `valueKind`.
@return Rebind
]=]
function Rebind.new(valueKind)
return setmetatable({
_valueKind = valueKind,
_excludedInputs = {},
_devices = {},
}, Rebind)
end
--[=[
Excludes all `inputs`.
@param inputs { Input }
@return Rebind
]=]
function Rebind:withoutInputs(inputs)
for _, input in ipairs(inputs) do
self._excludedInputs[input] = true
end
return self
end
--[=[
Uses inputs from the `devices`.
@param devices { Device }
@return Rebind
]=]
function Rebind:withDevices(devices)
for _, device in ipairs(devices) do
self._devices[device] = true
end
return self
end
--[=[
Returns a promise that resolves with an [`Input`](/api/Input) that matches the query.
The promise will reject if there are no inputs that match the query.
@return Promise
]=]
function Rebind:start()
local validInputs = {}
for device in pairs(self._devices) do
for _, input in pairs(device) do
if self._excludedInputs[input] == nil and input._valueKind == self._valueKind then
table.insert(validInputs, input)
end
end
end
if #validInputs == 0 then
return Promise.reject("There are no valid inputs.")
end
return Promise.new(function(resolve, _, onCancel)
local connection
connection = RunService.Heartbeat:Connect(function()
for _, input in ipairs(validInputs) do
if input:_getActuation() >= REQUIRED_ACTUATION then
connection:Disconnect()
resolve(input)
end
end
end)
onCancel(function()
connection:Disconnect()
end)
end)
end
return Rebind
|
--TESTGAME = function() -- For testing
local GAME = {}
GAME.Name = "Test Game"
GAME.Author = "ukgamer"
GAME.Description = "Here's a test game. WASD to move the box!"
local thePlayer = nil
local x, y = 0, 0
local now = RealTime()
local gameOverAt = 0
local gameState = 0 -- 0 = Attract mode 1 = Playing 2 = Waiting for coins update
function GAME:Init()
end
function GAME:Destroy()
end
function GAME:Start()
x, y = SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2
gameOverAt = now + 10
gameState = 1
end
function GAME:Stop()
gameState = 0
end
-- Called every frame while the local player is nearby
-- WALK key is "reserved" for coin insert
function GAME:Update()
now = RealTime()
if gameState == 0 then return end
if not IsValid(thePlayer) then
self:Stop()
return
end
if now >= gameOverAt and gameState ~= 2 then
-- Taking coins takes time to be processed by the server and for
-- OnCoinsLost to be called, so wait until the coin amount has changed
-- to know whether to end the game/lose a life/etc.
COINS:TakeCoins(1)
gameState = 2
return
end
if thePlayer:KeyDown(IN_MOVELEFT) then
x = x > 10 and x - (100 * FrameTime()) or x
end
if thePlayer:KeyDown(IN_MOVERIGHT) then
x = x < SCREEN_WIDTH - 10 and x + (100 * FrameTime()) or x
end
if thePlayer:KeyDown(IN_BACK) then
y = y < SCREEN_HEIGHT - 10 and y + (100 * FrameTime()) or y
end
if thePlayer:KeyDown(IN_FORWARD) then
y = y > 10 and y - (100 * FrameTime()) or y
end
end
-- Called once on init
function GAME:DrawMarquee()
surface.SetDrawColor(0, 0, 255, 255)
surface.DrawRect(0, 0, MARQUEE_WIDTH, MARQUEE_HEIGHT)
surface.SetFont("DermaLarge")
local tw, th = surface.GetTextSize("Test Game!")
surface.SetTextColor(255, 255, 255, 255)
surface.SetTextPos((MARQUEE_WIDTH / 2) - (tw / 2), (MARQUEE_HEIGHT / 2) - (th / 2))
surface.DrawText("Test Game!")
end
-- Called every frame while the local player is nearby
-- The screen is cleared to black for you
function GAME:Draw()
if gameState == 0 then
surface.SetDrawColor(HSVToColor(now * 50 % 360, 1, 0.5))
surface.DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
surface.SetFont("DermaLarge")
local tw, th = surface.GetTextSize("INSERT COIN")
surface.SetTextColor(255, 255, 255, math.sin(now * 5) * 255)
surface.SetTextPos((SCREEN_WIDTH / 2) - (tw / 2), SCREEN_HEIGHT - (th * 2))
surface.DrawText("INSERT COIN")
return
end
surface.SetDrawColor(255, 0, 0, 255)
surface.DrawRect(x - 10, y - 10, 20, 20)
local txt = "GAME OVER IN " .. math.max(0, math.floor(gameOverAt - now))
surface.SetFont("DermaLarge")
local tw, th = surface.GetTextSize(txt)
surface.SetTextColor(255, 255, 255, 255)
surface.SetTextPos((SCREEN_WIDTH / 2) - tw / 2, th * 2)
surface.DrawText(txt)
surface.SetFont("DermaDefault")
tw, th = surface.GetTextSize(COINS:GetCoins() .. " COIN(S)")
surface.SetTextColor(255, 255, 255, 255)
surface.SetTextPos(10, SCREEN_HEIGHT - (th * 2))
surface.DrawText(COINS:GetCoins() .. " COIN(S)")
end
-- Called when someone sits in the seat
function GAME:OnStartPlaying(ply)
if ply == LocalPlayer() then
thePlayer = ply
end
end
-- Called when someone leaves the seat
function GAME:OnStopPlaying(ply)
if ply == thePlayer then
thePlayer = nil
end
end
function GAME:OnCoinsInserted(ply, old, new)
if ply ~= LocalPlayer() then return end
-- If a fullupdate occurs then the game will be reset, so when the player inserts a coin again
-- old will not be 0 so we can't use that - instead check your if game state has reset to attract mode
if new > 0 and gameState == 0 then
self:Start()
end
end
function GAME:OnCoinsLost(ply, old, new)
if ply ~= LocalPlayer() then return end
if new == 0 then
self:Stop()
end
if new > 0 then
self:Start()
end
end
return GAME
--end -- For testing
|
local ffi = require("ffi")
local function cstr(s)
local c_str = ffi.new("char[?]", #s)
ffi.copy(c_str, s)
return c_str
end
local M = {}
M.cstr = cstr
return M
|
invoker_cold_snap_lua = class({})
LinkLuaModifier( "modifier_invoker_cold_snap_lua", "lua_abilities/invoker_cold_snap_lua/modifier_invoker_cold_snap_lua", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_generic_stunned_lua", "lua_abilities/generic/modifier_generic_stunned_lua", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
-- Ability Start
function invoker_cold_snap_lua:OnSpellStart()
-- unit identifier
local caster = self:GetCaster()
local target = self:GetCursorTarget()
-- load data
local duration = self:GetOrbSpecialValueFor("duration", "q")
-- logic
target:AddNewModifier(
caster, -- player source
self, -- ability source
"modifier_invoker_cold_snap_lua", -- modifier name
{ duration = duration } -- kv
)
self:PlayEffects( target )
end
--------------------------------------------------------------------------------
function invoker_cold_snap_lua:PlayEffects( target )
-- Get Resources
local particle_cast = "particles/units/heroes/hero_invoker/invoker_cold_snap.vpcf"
local sound_cast = "Hero_Invoker.ColdSnap.Cast"
local sound_target = "Hero_Invoker.ColdSnap"
-- Get Data
local direction = target:GetOrigin()-self:GetCaster():GetOrigin()
-- Create Particle
local effect_cast = ParticleManager:CreateParticle( particle_cast, PATTACH_POINT_FOLLOW, target )
ParticleManager:SetParticleControlEnt(
effect_cast,
0,
target,
PATTACH_POINT_FOLLOW,
"attach_hitloc",
Vector(0,0,0), -- unknown
true -- unknown, true
)
ParticleManager:SetParticleControl( effect_cast, 1, self:GetCaster():GetOrigin() + direction )
ParticleManager:ReleaseParticleIndex( effect_cast )
-- Create Sound
EmitSoundOn( sound_cast, self:GetCaster() )
EmitSoundOn( sound_target, target )
end
|
local skynet = require "skynet"
require "skynet.manager" -- import skynet.register
local db = {}
local command = {}
function command.GET(key) return db[key] end
function command.SET(key, value)
local last = db[key]
db[key] = value
return last
end
skynet.start(function()
-- 注册该服务的lua消息回调函数
skynet.dispatch("lua", function(session, address, cmd, ...)
skynet.error("lua dispatch ", coroutine.running()) -- 这个协程接收消息的
-- 先把发送服务地址以及session打包到闭包中,可以在任意地方调用
local response = skynet.response(skynet.pack) -- 指定打包函数,必须根据接收到的消息打包函数一致
skynet.fork(
function(cmd, ...) -- 开启一个新的协程来处理响应
local cc = cmd:upper()
skynet.error("fork ", coroutine.running(), ", cc:", cc)
local f = command[cc] -- 查询cmd命令的具体处理方法
if f then
-- 执行查询到的方法,并且通过skynet.ret将执行结果返回
-- skynet.ret(skynet.pack(f(...)))
-- 使用sresponse替代ret 解决不同线程中回复消息
response(true, f(...)) -- 第一个参数true表示应答成功,false则应答个错误消息
else
skynet.error(string.format("Unknown command %s",
tostring(cc)))
end
end, cmd, ...)
end)
skynet.register ".mydb" -- 给当前服务注册一个名字,便于其他服务给当前服务发送消息
end)
|
bark_mite_burrower_drone = Creature:new {
objectName = "@mob/creature_names:bark_mite_burrower_drone",
socialGroup = "mite",
faction = "",
level = 29,
chanceHit = 0.36,
damageMin = 290,
damageMax = 300,
baseXp = 2914,
baseHAM = 7200,
baseHAMmax = 8800,
armor = 0,
resists = {135,120,-1,170,-1,160,170,15,-1},
meatType = "meat_insect",
meatAmount = 50,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0.25,
ferocity = 0,
pvpBitmask = ATTACKABLE,
creatureBitmask = PACK,
optionsBitmask = AIENABLED,
diet = CARNIVORE,
templates = {"object/mobile/bark_mite_hue.iff"},
hues = { 24, 25, 26, 27, 28, 29, 30, 31 },
scale = 0.9,
lootGroups = {},
weapons = {},
conversationTemplate = "",
attacks = {
}
}
CreatureTemplates:addCreatureTemplate(bark_mite_burrower_drone, "bark_mite_burrower_drone")
|
lfs = require "lfs"
json = require "BuildTools/json"
-- arg[1] prefix
-- arg[2] script-path
-- arg[3] root-path
JsonFileModify = nil
for file in lfs.dir(arg[2]) do
local ff = arg[2].."/"..file
if file == arg[1]..".json" or file == "main"..arg[1]..".json"then
local attr = lfs.attributes(ff)
JsonFile = ff
JsonFileModify = attr.modification
end
if file == arg[1]..".h" then
local attr = lfs.attributes(ff)
MetaHeader = ff
MetaHeaderModify = attr.modification
end
end
if JsonFileModify == nil then
print("No meta.json in the dir "..arg[2].." of Plugin.")
elseif MetaHeaderModify == nil or MetaHeaderModify <= JsonFileModify then
print(arg[2].." Refreshing meta header.")
JsF = io.open(JsonFile, "r")
jsonContent = JsF:read("*a")
ModuleMeta = json.decode(jsonContent)
HdrF = io.open(arg[2].."/"..arg[1]..".h", "w")
io.output(HdrF)
io.write("//A header file genereate by Sakura J2H tool\n")
io.write("//Contains the infomation of a module of Sakura Engine\n")
io.write("//With the MIT License Copyright!\n")
io.write("#pragma once\n")
io.write("#include <string>\n")
io.write("#include <cstddef>\n\n")
io.write("const std::string sp_meta = \nR\"(")
io.write(jsonContent..")\";\n")
io.write("inline const char* __GetMetaData(void)\n{\n return sp_meta.c_str();\n}\n")
io.write("public:\nvirtual const char* GetMetaData(void) override\n")
io.write("{return __GetMetaData();}\n")
io.close(JsF)
io.close(HdrF)
-- include static module files
GenHeader = io.open(arg[3].."/".."Modules.generated.h"..".h", "a")
io.output(GenHeader)
io.write("//A header file genereate by Sakura J2H tool\n")
end
|
--
-- from src/luhn.c
--
-- a part of main to isLuhn
--
local M = require 'checkdigit'
local isLuhn = M.isLuhn
function p(s)
print(("%s is %s."):format(s, isLuhn(s) and "valid" or "invalid"))
end
do
p("5555555555554444")
-- samples from https://en.wikipedia.org/wiki/Luhn_algorithm
p("79927398713")
p("8961019501234400001")
p("9501234400008")
end
|
local main = require(game:WaitForChild("Nanoblox"))
|
-- LS2OVR beatmap parsing
-- Part of Live Simulator: 2
-- See copyright notice in main.lua
local love = require("love")
local Luaoop = require("libs.Luaoop")
local nbt = require("libs.nbt")
local log = require("logging")
local Util = require("util")
local md5 = require("game.md5")
local beatmapData = require("game.ls2ovr.beatmap_data")
local TARGET_VERSION = 0
local function readDword(f)
local a, b, c, d
if type(f) == "string" then
a, b, c, d = f:byte(1, 4)
else
a, b, c, d = (f:read(4) or ""):byte(1, 4)
end
assert(a and b and c and d, "unexpected eof")
if a >= 128 then
a, b, c, d = a - 255, b - 255, c - 255, d - 256
end
return a * 16777216 + b * 65536 + c * 256 + d
end
local function readByte(f)
local a = (type(f) == "string" and f or (f:read(1) or "")):byte()
if not(a) then
error("unexpected eof")
elseif a >= 128 then
return a - 255
else
return a
end
end
local function seek(f, pos)
if f.typeOf or Util.isFileWrapped(f) then
f:seek(pos)
else
f:seek("set", pos)
end
end
local beatmap = Luaoop.class("LS2OVR.Beatmap")
function beatmap.load(file)
-- Read signature
assert(file:read(8) == "livesim3", "invalid LS2OVR beatmap file")
-- Read format version
local format = readDword(file)
local version = format % 2147483648
assert(version ~= format, "file must be transfered with 8-bit transmission")
assert(version >= TARGET_VERSION, "file format is too new")
-- Detect EOL conversion
assert(file:read(4) == "\26\10\13\10", "unexpected EOL translation detected")
-- Read metadata
local metadataNBTLen = readDword(file)
assert(metadataNBTLen > 0, "invalid metadata length")
local metadataNBT = file:read(metadataNBTLen)
local metadataMD5 = file:read(16)
assert(md5(metadataNBT) == metadataMD5, "MD5 metadata mismatch")
local metadata = nbt.decode(metadataNBT, "plain")
-- Read beatmap data
local compressionType = readByte(file)
local compressedSize = readDword(file)
local uncompressedSize = readDword(file)
local beatmapDataString
if compressionType == 0 then
assert(compressedSize == uncompressedSize, "beatmap data size mismatch")
beatmapDataString = file:read(uncompressedSize)
elseif compressionType == 1 then
beatmapDataString = Util.decompressToString(file:read(compressedSize), "gzip")
elseif compressionType == 2 then
beatmapDataString = Util.decompressToString(file:read(compressedSize), "zlib")
else
error("unsupported compression mode")
end
-- Read beatmap list
local beatmapList = {}
local beatmapStr = beatmapDataString
local beatmapAmount = readByte(beatmapStr) beatmapStr = beatmapStr:sub(2)
assert(beatmapAmount > 0, "no beatmaps inside file")
-- Parse beatmaps
for i = 1, beatmapAmount do
local currentBeatmapSize = readDword(beatmapStr) beatmapStr = beatmapStr:sub(5)
local bmData = beatmapStr:sub(1, currentBeatmapSize)
beatmapStr = beatmapStr:sub(currentBeatmapSize + 1)
local hash = beatmapStr:sub(1, 16)
beatmapStr = beatmapStr:sub(17)
if md5(bmData) == hash then
-- insert to beatmap list
beatmapList[#beatmapList + 1] = {
data = beatmapData(nbt.decode(bmData, "tag")),
hash = hash
}
else
log.errorf("LS2OVR", "beatmap index #%d has invalid MD5 hash", i)
end
end
-- Additional data
local additionalDataSize = readDword(file)
local additionalDataInfo = nbt.decode(file:read(additionalDataSize), "plain")
-- Check EOF
assert(file:read(8) == "overrnbw", "EOF marker not found")
-- New beatmap object
local bm = beatmap()
bm.beatmapFormatVersion = version
bm.beatmapMetadata = metadata
-- Initializ beatmapList and beatmapHash
for i, v in ipairs(beatmapList) do
bm.beatmapList[i] = v.data
bm.beatmapHash[i] = v.hash
end
-- Load files
local files = {}
for _, v in ipairs(additionalDataInfo) do
seek(file, v.offset)
files[v.filename] = love.filesystem.newFileData(file:read(v.size), v.filename)
end
bm.fileDatabase = files
return bm
end
function beatmap:__construct()
self.beatmapFormatVersion = TARGET_VERSION
self.beatmapMetadata = nil
self.beatmapList = {}
self.beatmapHash = {}
self.fileDatabase = nil
end
function beatmap:getBeatmap(i)
return self.beatmapList[i]
end
function beatmap:getBeatmapHash(i)
local bm = self.beatmapList[i]
if bm then
if self.beatmapHash[i] then
return self.beatmapHash[i]
else
local nbtData = bm:encode():encode()
local hash = md5(nbtData)
self.beatmapHash[i] = hash
return hash
end
end
return nil
end
function beatmap:getBeatmapCount()
return #self.beatmapList
end
function beatmap:getMetadata()
return self.beatmapMetadata
end
function beatmap:getFile(filename)
return self.fileDatabase[filename]
end
function beatmap:getFileTable()
return self.fileDatabase
end
return beatmap
|
-- resty-gitweb@init.lua
-- Preloads scripts and config for OpenResty workers. MUST be called by init_by_lua_file.
-- Copyright (c) 2020 Joshua 'joshuas3' Stockin
-- <https://git.joshstock.in/resty-gitweb>
-- This software is licensed under the MIT License.
-- Check for RESTY_GITWEB_ENABLE in environment variables
if os.getenv("RESTY_GITWEB_ENABLE") == nil then
ngx.log(ngx.ERR, "RESTY_GITWEB_ENABLE not found in environment variables; are you missing an `env` directive?")
os.exit(1)
end
-- In production mode?
PRODUCTION = os.getenv("RESTY_GITWEB_ENV") == "PROD"
-- Get config path
local resty_gitweb_config = os.getenv("RESTY_GITWEB_CONFIG")
if resty_gitweb_config == nil then
ngx.log(ngx.ERR, "RESTY_GITWEB_CONFIG not found in environment variables; are you missing an `env` directive?")
os.exit(1)
elseif resty_gitweb_config == "" then
ngx.log(ngx.ERR, "RESTY_GITWEB_CONFIG is empty")
os.exit(1)
end
-- Require external modules
local ffi = require "ffi"
local lyaml = require "lyaml"
local puremagic = require "puremagic"
-- Load YAML configuration
local yaml_config_file = io.open(resty_gitweb_config)
CONFIG = lyaml.load(yaml_config_file:read("*a"))
yaml_config_file:close()
-- Load libgit2 into FFI and initialize
ffi.include = function(header)
local p = io.popen("echo '#include <"..header..">' | gcc -E -")
local c = {}
while true do
local line = p:read()
if line then
if not line:match("^#") then
table.insert(c, line)
end
else
break
end
end
p:close()
ffi.cdef(table.concat(c, "\n"))
end
ffi.include("git2.h")
git2 = ffi.load("git2")
git2.git_libgit2_init()
-- Require internal modules
local git = require "git/git"
local git_git2_error = require "git/git2_error"
local git_find_rev = require "git/find_rev"
local git_read_blob = require "git/read_blob"
local git_repo = require "git/repo"
--local pages = require "pages/pages"
local pages_blob = require "pages/blob"
local pages_commit = require "pages/commit"
local pages_download = require "pages/download"
local pages_index = require "pages/index"
local pages_log = require "pages/log"
local pages_row = require "pages/raw"
local pages_refs = require "pages/refs"
local pages_tree = require "pages/tree"
--local utils = require "utils/utils"
local builder = require "utils/builder"
local nav = require "utils/nav"
local parse_uri = require "utils/parse_uri"
local tabulate = require "utils/tabulate"
local utils = require "utils/utils"
|
local BasePlugin = require "kong.plugins.base_plugin"
local responses = require "kong.tools.responses"
local cjson = require "cjson"
local changebody = require "kong.plugins.bodytoken.changebody"
local req_get_headers = ngx.req.get_headers
local pl_path = require "pl.path"
local BodyTokenHandler = BasePlugin:extend()
function BodyTokenHandler:new()
BodyTokenHandler.super.new(self, "bodytoken")
end
local function checktoken(conf)
if not conf.tokenname then
ngx.log(ngx.ERR, "[bodytoken] no conf.tokenname set, aborting plugin execution")
return false, {status = 500, message= "Invalid plugin configuration"}
end
local tokenname = conf.tokenname
local args =nil
local request_method = ngx.var.request_method
if "GET" == request_method then
args = ngx.req.get_uri_args()
elseif "POST" == request_method then
ngx.req.read_body()
args = ngx.req.get_post_args()
end
local token
local body
if type(args)=="table" then
for key,value in pairs(args) do
if key == "body" then
body=value
end
end
end
if req_get_headers()[tokenname] then
token=req_get_headers()[tokenname]
end
if not token then
return false, {status = 401, message = "No token found in headers or querystring"}
end
if not body then
return false, {status = 401, message = "No body found in headers or querystring"}
end
local curpath= pl_path.package_path("kong")
curpath =string.gsub(curpath,"kong.lua","kong").."/plugins/"
local cmd= io.popen("sh "..curpath.."tool/bin/run.sh bodytoken -b "..body.." -t "..token)
local result=cmd:read("*all")
cmd:close()
local data,err = cjson.decode(result)
if err then
return false, {status = 401, message = "unknown token ,cann't decode it !"}
end
if data.code==0 then
return false, {status = 401, message = data.message}
end
changebody.execute("body",data.data)
return true
end
function BodyTokenHandler:access(conf)
BodyTokenHandler.super.access(self)
local ok, err = checktoken(conf)
if not ok then
return responses.send(err.status, err.message)
end
end
BodyTokenHandler.PRIORITY = 900
return BodyTokenHandler
|
local chipWidth = 26
local chipHeight = 26
local function checkChipCollision(x1,y1,w1,h1, x2,y2,w2,h2)
return x1 < x2+w2 and
x2 < x1+w1 and
y1 < y2+h2 and
y2 < y1+h1
end
local chip {
chipColor= "white"
value = "1",
x = 0,
y = 0,
w = CardWidth,
h = CardHeight,
visible = true,
dragx = 0,
dragy = 0,
dragged = false,
inhand = false,
tweento = false,
firstTouchID = -1,
lastTouchID = 1,
currentTouchID = -1,
selected = false,
touched = false,
held = false,
type = "chip",
tapTimer = timer.new(0.5),
getPosition = function( self )
return self.x, self.y
end,
--sigh
onHold = function( self )
local chipsToStack = {}
for i, v in pairs( Game.Objects ) do
if v ~= self then
if checkCollision(self.x, self.y, self.w, self.h, v.x, v.y, v.w, v.h) then
table.insert( chipsToStack, v )
end
end
end
if #chipsToStack > 0 then
local chips = {}
for i, v in pairs( chipsToStack ) do
if v.type == "chip" then
table.insert( chips, {
chipColor = v.chipcolor,
value = v.value,
})
elseif v.type == "stack" then
for k, z in pairs( v.chips ) do
table.insert( chips, {
chipColor = z.chipcolor,
value = z.value,
})
end
end
end
table.insert( cards, {
value = self.value,
suit = self.suit,
flipped = self.flipped
})
stack:new({x = self.x, y = self.y, cards=cards})
local sound = love.math.random(1,4)
Game.Sounds.CardPlace[sound]:stop()
Game.Sounds.CardPlace[sound]:play()
for i, v in pairs( chipsToStack ) do
v:remove()
end
self:remove()
return
end
end,
remove = function( self, noskip )
for i, v in pairs( Game.Objects ) do
if v == self then
table.remove( Game.Objects, i )
if not noskip then
break
end
end
end
return
end,
drag = function( self, x, y )
if not self.dragged then
local sound = love.math.random(1,4)
Game.Sounds.CardSlide[sound]:stop()
Game.Sounds.CardSlide[sound]:play()
end
self.dragged = true
self.x = x-self.dragx
self.y = y-self.dragy
if self.x < love.graphics.getWidth()/4 then
if not SHOWCHARMS then
SHOWCHARMS = true
SHOWDECKCHARMS = false
SHOWCHARMSX:to(0)
end
else
SHOWDECKCHARMS = false
SHOWCHARMSX:to(-75)
end
if self.selected then
for i, v in pairs( Game.Objects ) do
if v ~= self and v.selected then
if not v.dragged then
v.dragged = true
else
v.x = x-v.dragx
v.y = y-v.dragy
end
end
end
end
end,
update = function( self, dt )
if self.visible then
if self.touched and not self.dragged then
if self.tapTimer:update( dt ) then
self.held = true
if self.onHold then self:onHold() end
self.tapTimer:stop()
end
end
if self.tweento then
if self.tweentotween:update( dt ) then
self.tweento = false
end
end
end
return
end,
startTouch = function( self, id, x, y, skipUpdate )
self.dragx = x-self.x
self.dragy = y-self.y
self.touched = true
self.currentTouchID = id
self.tapTimer:restart()
self.tapTimer:start()
if self.selected then
for i, v in ipairs( Game.Objects ) do
if v.type ~= "stackgroup" and v.selected then
v.dragx = x-v.x
v.dragy = y-v.y
else
--v:bottomDrawOrder()
end
end
end
if not skipUpdate then
self:topDrawOrder()
end
end,
endTouch = function( self, id )
if self.touched then
self.tapTimer:stop()
if not self.held and not self.dragged then
self:onSingleTap()
end
local w = 75
SHOWCHARMSX:to(-75)
if self.dragged then
if self.x + self.w >= 0 and self.x <= w and self.y + self.h >= 0 and self.y <= w then
if self.selected then
--[[for i = 1, #Game.Objects do
if Game.Objects[i].type ~= "deckgroup" and Game.Objects[i] ~= self then
if Game.Objects[i].selected then
table.remove(Game.Objects, i)
end
end
end
for i, v in pairs( Game.Objects ) do
if v.type ~= "deckgroup" and v ~= self and v.selected then
table.remove(Game.Objects, i)
end
end--]]
end
self:remove()
SHOWCHARMS = false
end
end
self.dragged = false
self.held = false
self.touched = false
for i, v in pairs( Game.Objects ) do
v.dragged = false
v.selected = false
v.touched = false
v.held = false
end
end
end,
cancelTouchManager = function( self, id )
if self.touched then
self.tapTimer:stop()
end
end,
topDrawOrder = function( self )
for i, v in pairs( Game.Objects ) do
if v == self then
table.remove( Game.Objects, i )
table.insert( Game.Objects, self )
break
end
end
end,
bottomDrawOrder = function( self )
for i, v in ipairs( Game.Objects ) do
if v == self then
table.remove( Game.Objects, i )
table.insert( Game.Objects, 1, self )
end
end
end,
draw = function( self )
if self.visible then
love.graphics.draw( Chip.chipColor, self.x, self.y, 0, 2, 2 )
if self.selected then
love.graphics.setLineWidth(3)
love.graphics.setColor( 0, 255, 0 )
love.graphics.rectangle()
love.graphics.setColor( 255, 255, 255 )
love.graphics.setLineWidth(1)
end
end
return
end,
}
chip.__index = chip
function chip:new( data )
local data = data or { }
local self = setmetatable(data, chip)
self.__index = self
if self.tweentox or self.tweentoy then
self.tweentox = self.tweentox or self.x
self.tweentoy = self.tweentoy or self.y
self.tweento = true
self.tweentotween = tween.new(0.2, self, {x = self.tweentox, y = self.tweentoy}, "inOutExpo")
end
table.insert( Game.Objects, self )
self:topDrawOrder()
return self
end
return chip
|
AbstractPackageHandler = class("AbstractPackageHandler")
AbstractPackageHandler.ctor = function (slot0, ...)
slot0._buffer = ByteArray.new()
slot0._packageSize = 0
slot0._packageLenByteNum = 2
end
AbstractPackageHandler.handlePackage = function (slot0, slot1)
assert(false, "this method is supposed to be oveerride")
end
AbstractPackageHandler.readPackageLen = function (slot0)
assert(false, "this method is supposed to be oveerride")
return slot0._buffer:readInt() - 4
end
AbstractPackageHandler.cookOject2Bytes = function (slot0, slot1, slot2, ...)
assert(false, "this method is supposed to be oveerride")
return ByteArray.new()
end
AbstractPackageHandler.cookBytes2Object = function (slot0, slot1, slot2)
slot3 = slot0._buffer:getPosition()
slot0._buffer:setPosition(slot0._buffer:getSize() + 1)
if StringUtil.isStringValid(slot1) then
slot0._buffer:writeBytesViaString(slot1)
end
if StringUtil.isStringValid(slot2) then
slot0._buffer:writeBytesViaString(slot2)
end
slot0._buffer:setPosition(slot3)
slot0:cutPackages()
end
AbstractPackageHandler.resetBuffer = function (slot0)
slot0._buffer = ByteArray.new()
slot0._packageSize = 0
end
AbstractPackageHandler.cutPackages = function (slot0)
if not slot0._buffer then
return
end
if slot0._packageSize == 0 then
if slot0._packageLenByteNum <= slot0._buffer:getBytesAvailable() then
slot0._packageSize = slot0:readPackageLen()
else
return
end
end
slot1 = slot0._buffer:getBytesAvailable()
if slot0._packageSize ~= 0 and slot0._packageSize <= slot1 then
slot0._buffer:removeAlreadyReadBytes()
slot0:handlePackage(slot0._buffer:readBytes(slot0._packageSize))
slot0._packageSize = 0
slot0:cutPackages()
end
end
AbstractPackageHandler.destroy = function (slot0)
slot0._buffer = nil
slot0._packageSize = nil
slot0._packageLenByteNum = nil
end
return
|
SleepTrapNpc = {
click = function(block, npc)
local animation = 2
if (block.blType == BL_PC) then
if block.state == 1 then
return
end
if not block:canPK(block) then
return
end
if (block.state == 1) then
return
end
block:sendMinitext("You stepped on a trap!")
end
block.attacker = npc.owner
SleepTrapNpc.cast(block)
removeTrapItem(npc)
npc:delete()
end,
endAction = function(npc, owner)
removeTrap(npc)
end,
cast = function(block)
local duration = 38000
if block:hasDuration("sleep_trap") then
block:setDuration("sleep_trap", 0)
block:setDuration("sleep_trap", duration)
else
block:setDuration("sleep_trap", duration)
end
block.sleep = 1.3
block:playSound(739)
end,
while_cast = function(block)
block.sleep = 1.3
block:playSound(739)
block:sendAnimation(2)
end,
on_takedamage_while_cast = function(block)
block:setDuration("sleep_trap", 0)
end,
uncast = function(block)
block.sleep = 1
end
}
|
object_tangible_furniture_flooring_tile_frn_flooring_tile_s53 = object_tangible_furniture_flooring_tile_shared_frn_flooring_tile_s53:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_flooring_tile_frn_flooring_tile_s53, "object/tangible/furniture/flooring/tile/frn_flooring_tile_s53.iff")
|
local winreg = require"winreg"
rkey = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"
hkey = winreg.openkey(rkey)
for name, kind in hkey:enumvalue() do
print("\nname: " .. name
.. "\ntype: " .. hkey:getvaltype(name))
assert(kind == hkey:getvaltype(name))
end
|
--Year: 2009 Month:10 Day: 22 Hour: 16 Minute: 45 Second: 55
local userbot={}
local recordIndex=0
local GameAgentFactory=require("samples.GameAgent")
--recordIndex: 1
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(0)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(1.000000)
userbot[recordIndex]:setTargetRelativeLife(1)
userbot[recordIndex]:getGun():setBulletCount(20)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(0.000000)
userbot[recordIndex]:setCurrentAction(2)
--recordIndex: 2
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(1)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(0.606732)
userbot[recordIndex]:setTargetRelativeLife(0)
userbot[recordIndex]:getGun():setBulletCount(16)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(59.999908)
userbot[recordIndex]:setCurrentAction(0)
--recordIndex: 3
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(1)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(0.978025)
userbot[recordIndex]:setTargetRelativeLife(0)
userbot[recordIndex]:getGun():setBulletCount(11)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(159.999908)
userbot[recordIndex]:setCurrentAction(4)
--recordIndex: 4
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(0)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(1.000000)
userbot[recordIndex]:setTargetRelativeLife(0)
userbot[recordIndex]:getGun():setBulletCount(12)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(159.999908)
userbot[recordIndex]:setCurrentAction(3)
--recordIndex: 5
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(0)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(1.000000)
userbot[recordIndex]:setTargetRelativeLife(0)
userbot[recordIndex]:getGun():setBulletCount(12)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(159.999908)
userbot[recordIndex]:setCurrentAction(0)
--recordIndex: 6
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(0)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(1.000000)
userbot[recordIndex]:setTargetRelativeLife(0)
userbot[recordIndex]:getGun():setBulletCount(12)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(159.999908)
userbot[recordIndex]:setCurrentAction(2)
--recordIndex: 7
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(0)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(1.000000)
userbot[recordIndex]:setTargetRelativeLife(0)
userbot[recordIndex]:getGun():setBulletCount(12)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(159.999908)
userbot[recordIndex]:setCurrentAction(4)
--recordIndex: 8
recordIndex=recordIndex+1
userbot[recordIndex]=GameAgentFactory.create("UserBot")
userbot[recordIndex]:setTargetAttackable(0)
userbot[recordIndex]:setSightedAttackerCount(0)
userbot[recordIndex]:setTargetRelativeDistance(1.000000)
userbot[recordIndex]:setTargetRelativeLife(0)
userbot[recordIndex]:getGun():setBulletCount(12)
userbot[recordIndex]:setLife(1000)
userbot[recordIndex]:setScore(159.999908)
userbot[recordIndex]:setCurrentAction(1)
return userbot
|
local c = require("composer")
local d = display.newText("opa", 10, 10)
|
-- import
local UIWidgetModule = require 'candy.ui.light.UIWidget'
local UIWidget = UIWidgetModule.UIWidget
local EntityModule = require 'candy.Entity'
---@class UIWidgetGroup : UIWidget
local UIWidgetGroup = CLASS: UIWidgetGroup ( UIWidget )
:MODEL {}
EntityModule.registerEntity ( "UIWidgetGroup", UIWidgetGroup )
function UIWidgetGroup:__init ()
self.clippingChildren = false
self.trackingPointer = false
end
return UIWidgetGroup
|
-- There was a bug in the netbox module related to access
-- to previously released memory. To understand the essence
-- of error, you need to understand how GC works in Lua:
-- - GC checks the reachability of objects in Lua in one cycle
-- and cleans out those that were unreachable
-- - Lua GC object is an entity whose memory is managed by the GC,
-- for example: table, function, userdata, cdata.
-- In our case it's cdata object, with struct error payload
-- - ffi.gc allows us to clean up Lua GC object payload at the time
-- of deleting the GC object.
-- - Finalizer in ffi.gc is hung on the Lua GC object
-- So after ffi.cast in our case first err object becomes unreachable.
-- It will be cleaned after some time and if finalizer hangs on it,
-- payload will also be cleaned. So payload in new err object
-- (struct error in our case) becomes invalid.
env = require('test_run')
netbox = require('net.box')
test_run = env.new()
box.schema.user.grant('guest', 'super')
c = netbox.connect(box.cfg.listen)
collectgarbage()
ok, res = pcall(c.call, c, 'box.error', {123})
box.error.clear()
collectgarbage()
res.type
box.schema.user.revoke('guest', 'super')
|
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
DEFINE_BASECLASS("base_rd3_entity")
function ENT:Initialize()
BaseClass.Initialize(self)
self.energy = 0
self.damaged = 0
self.vent = false
if WireAddon ~= nil then
self.WireDebugName = self.PrintName
self.Inputs = Wire_CreateInputs(self, {"Vent"})
self.Outputs = Wire_CreateOutputs(self, {"Energy", "Max Energy"})
else
self.Inputs = {
{
Name = "Vent"
}
}
end
end
function ENT:TriggerInput(iname, value)
if iname == "Vent" then
if value ~= 1 then
self.vent = false
else
self.vent = true
end
end
end
function ENT:Damage()
if self.damaged == 0 then
self.damaged = 1
end
end
function ENT:Repair()
BaseClass.Repair(self)
self:SetColor(Color(255, 255, 255, 255))
self.damaged = 0
end
function ENT:Destruct()
if CAF and CAF.GetAddon("Life Support") then
CAF.GetAddon("Life Support").Destruct(self, true)
end
end
function ENT:Leak()
local energy = self:GetResourceAmount("energy")
local zapme
if CAF.GetAddon("Life Support") then
zapme = CAF.GetAddon("Life Support").ZapMe
end
if energy == 0 then
return
end
local waterlevel = 0
if CAF then
waterlevel = self:WaterLevel2()
else
waterlevel = self:WaterLevel()
end
if waterlevel > 0 then
if zapme then
zapme(self:GetPos(), 1)
end
local tmp = ents.FindInSphere(self:GetPos(), 600) --Better check in next version
for _, ply in ipairs(tmp) do
if ply:IsPlayer() and ply:WaterLevel() > 0 then
if zapme then
zapme(ply:GetPos(), 1)
end
ply:TakeDamage(energy / 100, 0)
end
end
self:ConsumeResource("energy", energy)
else
if math.random(1, 10) < 2 then
if zapme then
zapme(self:GetPos(), 1)
end
local dec = math.random(200, 2000)
self:ConsumeResource("energy", dec)
end
end
end
function ENT:Think()
if self.damaged == 1 or self.vent then
self:Leak()
end
BaseClass.Think(self)
return true
end
function ENT:UpdateWireOutput()
self:DoUpdateWireOutput("Energy", "energy")
end
|
return {
name = "lumit",
version = "0.1",
description = "luvit module installer",
author = "pancake <pancake@nopcode.org>",
dependencies = {
"json",
"template",
"irc"
, "sdb"
, "crypto"
},
}
|
DRONES_REWRITE.Weapons["Grenade Launcher"] = {
Initialize = function(self, pos, ang)
local ent = DRONES_REWRITE.Weapons["Template"].Initialize(self, "models/dronesrewrite/autogrenadelauncher/autogrenadelauncher.mdl", pos, ang, "models/dronesrewrite/attachment4/attachment4.mdl", pos)
ent.Grenade = {
["Explosive"] = {
Material = "models/dronesrewrite/grenade/grenade_x_mat",
AmmoType = "item_drr_grenades",
AmmoCount = 30,
Explosion = function(driver, ammo)
ammo:EmitSound("ambient/explosions/explode_1.wav", 80, 100)
util.BlastDamage(ammo, IsValid(driver) and driver or ammo, ammo:GetPos(), 230, math.random(60, 100) * DRONES_REWRITE.ServerCVars.DmgCoef:GetFloat())
--[[local ef = EffectData()
ef:SetOrigin(ammo:GetPos())
util.Effect("Explosion", ef)]]--
ParticleEffect("splode_fire", ammo:GetPos(), Angle(0, 0, 0))
end
},
["EMP"] = {
Material = "models/dronesrewrite/grenade/grenade_e_mat",
AmmoType = "item_drr_grenadeselec",
AmmoCount = 30,
Explosion = function(driver, ammo)
ammo:EmitSound("drones/nio_dissolve.wav", 80, 100)
for k, v in pairs(ents.FindInSphere(ammo:GetPos(), 200)) do
if v.IS_DRR then v:TakeDamage(math.random(40, 90), driver, driver) end
end
util.BlastDamage(ammo, IsValid(driver) and driver or ammo, ammo:GetPos(), 200, math.random(5, 20) * DRONES_REWRITE.ServerCVars.DmgCoef:GetFloat())
ParticleEffect("stinger_explode_drr", ammo:GetPos(), Angle(0, 0, 0))
end
},
["Napalm"] = {
Material = "models/dronesrewrite/grenade/grenade_f_mat",
AmmoType = "item_drr_grenadesfire",
AmmoCount = 30,
Explosion = function(driver, ammo)
local pos = ammo:GetPos()
timer.Create("igniteshit" .. ammo:EntIndex(), 0.1, 8, function()
for k, v in pairs(ents.FindInSphere(pos, 200)) do
v:Ignite(3, 4)
end
end)
ammo:EmitSound("ambient/fire/ignite.wav", 90, 100)
util.BlastDamage(ammo, IsValid(driver) and driver or ammo, ammo:GetPos(), 150, math.random(60, 80))
ParticleEffect("napalmgren_shockwave_drr", ammo:GetPos(), Angle(0, 0, 0))
end
}
}
ent.GetCurrentGrenade = function(ent)
return ent.Grenade[ent.GrenadeType]
end
ent.HasPrimaryAmmo = function(ent)
if DRONES_REWRITE.ServerCVars.NoAmmo:GetBool() then return true end
return ent:GetCurrentGrenade().AmmoCount > 0
end
ent.HasSecondaryAmmo = function(ent)
if DRONES_REWRITE.ServerCVars.NoAmmo:GetBool() then return true end
return ent:GetCurrentGrenade().AmmoCount > 0
end
ent.SetPrimaryAmmo = function(ent, num, ammotype)
if ent.PrimaryAsSecondary then
ent:SetSecondaryAmmo(num, ammotype)
return
end
if not self.ShouldConsumeAmmo or DRONES_REWRITE.ServerCVars.NoAmmo:GetBool() then return end
for k, v in pairs(ent.Grenade) do
if ammotype == v.AmmoType then
num = v.AmmoCount + num
if num > v.AmmoCount and ent.Tab.OnPrimaryAdded then
ent.Tab.OnPrimaryAdded(self, ent, num - v.AmmoCount)
end
self:SetNWInt("Ammo1", num)
self:SetNWInt("MaxAmmo1", ent:GetPrimaryMax())
v.AmmoCount = num
end
end
end
ent.SetSecondaryAmmo = function(ent, num, ammotype)
if not self.ShouldConsumeAmmo or DRONES_REWRITE.ServerCVars.NoAmmo:GetBool() then return end
for k, v in pairs(ent.Grenade) do
if ammotype == v.AmmoType then
num = v.AmmoCount + num
if num > v.AmmoCount and ent.Tab.OnPrimaryAdded then
ent.Tab.OnPrimaryAdded(self, ent, num - v.AmmoCount)
end
self:SetNWInt("Ammo2", num)
self:SetNWInt("MaxAmmo2", ent:GetPrimaryMax())
v.AmmoCount = num
end
end
end
ent.GrenadeType = table.GetFirstKey(ent.Grenade)
self:SetNWString("gr_launch_type", ent.GrenadeType)
ent.PrimaryAmmoMax = 30
ent.PrimaryAmmoType = {
DRONES_REWRITE.AmmoTypes.FireGrenades,
DRONES_REWRITE.AmmoTypes.ElectroGrenades,
DRONES_REWRITE.AmmoTypes.Grenades
}
return ent
end,
Think = function(self, gun)
DRONES_REWRITE.Weapons["Template"].Think(self, gun)
end,
Attack = function(self, gun)
if CurTime() > gun.NextShoot and gun:HasPrimaryAmmo() then
local src = gun:GetPos() + gun:GetForward() * 60 - gun:GetUp() * 2
local grn = gun:GetCurrentGrenade()
local ammo = ents.Create("prop_physics")
ammo.Grenade = grn
ammo:SetModel("models/dronesrewrite/grenade_fired/grenade_fired.mdl")
ammo:SetMaterial(grn.Material)
ammo:SetPos(src)
ammo:SetAngles(gun:GetAngles())
ammo:Spawn()
constraint.NoCollide(ammo, self, 0, 0)
local physamm = ammo:GetPhysicsObject()
if physamm:IsValid() then
physamm:SetMass(1)
physamm:ApplyForceCenter(gun:GetForward() * 3200)
physamm:AddAngleVelocity(VectorRand() * 50)
end
local ef = EffectData()
ef:SetOrigin(src)
ef:SetNormal(gun:GetForward())
util.Effect("dronesrewrite_muzzleflashgrn", ef)
timer.Simple(1.5, function()
if IsValid(ammo) then
ammo.Grenade.Explosion((IsValid(self) and IsValid(self:GetDriver())) and self:GetDriver() or ammo, ammo)
end
SafeRemoveEntity(ammo)
end)
gun:EmitSound("weapons/mortar/mortar_fire1.wav", 75, 110, 1, CHAN_WEAPON)
gun:SetPrimaryAmmo(-1, grn.AmmoType)
gun.NextShoot = CurTime() + 0.2
end
end,
Attack2 = function(self, gun)
if CurTime() > gun.NextShoot2 then
local k, v = next(gun.Grenade, gun.GrenadeType)
gun.GrenadeType = k or table.GetFirstKey(gun.Grenade)
self:SetNWString("gr_launch_type", gun.GrenadeType)
gun.NextShoot2 = CurTime() + 0.2
end
end,
OnRemove = function(self, gun)
self:RemoveHookClient("HUD", "gr_launcher_hud")
end,
Deploy = function(self, gun)
self:AddHookClient("HUD", "gr_launcher_hud", [[
local drone = LocalPlayer():GetNWEntity("DronesRewriteDrone")
if drone:IsValid() then
local x = 32
local y = ScrH() / 2
draw.SimpleText("Grenade type: " .. drone:GetNWString("gr_launch_type"), "DronesRewrite_font3", x, y, Color(0, 255, 255, 150))
end
]])
end,
Holster = function(self, gun)
self:RemoveHookClient("HUD", "gr_launcher_hud")
end
}
|
local Tunnel = module("_core", "lib/Tunnel")
local Proxy = module("_core", "lib/Proxy")
cAPI = Proxy.getInterface("API")
API = Tunnel.getInterface("API")
adding = true
vpcreator = false
inCustomization = false
groundCam = nil
hided = false
spawnedCamera = nil
choosePed = {}
pedSelected = nil
sex = nil
InterP = false
InterP2 = false
zoom = 1.0
offset = 0.5
fixedCam = nil
tempCam2 = nil
tempCam = nil
groundCam = nil
--
--[[ Male {}
A_M_M_CHELONIAN_01
A_M_M_FOREMAN
]] local light = {
{x = -559.59, y = -3780.757, z = 238.59, r = 50.0, f = 50.0}
}
local peds = {
{genrer = "mp_male", x = -558.9098, y = -3775.616, z = 238.59, h = 137.98},
{genrer = "mp_female", x = -558.9098, y = -3776.978, z = 238.59, h = 47.11}
}
local cams = {
{
type = "customization",
x = -561.8157,
y = -3780.966,
z = 239.0805,
rx = -4.2146,
ry = -0.0007,
rz = -87.8802,
fov = 30.0
},
{
type = "selection",
x = -562.8157,
y = -3776.266,
z = 239.0805,
rx = -4.2146,
ry = -0.0007,
rz = -87.8802,
fov = 30.0
}
}
cameraUsing = {
{
name = "Selection",
x=-1.0,
y=0.0,
z=0.5,
},
{
name = "Rosto",
x=-0.5,
y=0.0,
z=0.6,
},
{
name = "Corpo",
x=-1.3,
y=0.0,
z=0.4,
},
}
Citizen.CreateThread(
function()
RequestImap(-1699673416)
RequestImap(1679934574)
RequestImap(183712523)
while true do
Citizen.Wait(0)
if vpcreator then
for k, v in pairs(light) do
DrawLightWithRange(light[k].x, light[k].y, light[k].z, 255, 255, 255, light[k].r, light[k].f)
end
end
if vpcreator and not inCustomization then
if groundCam == nil then
DisplayHud(false)
-- createCam("selection")
createPeds()
DestroyAllCams(true)
createCamera()
TriggerEvent('FRP:NOTIFY:Simple', 'A nyilak segítségével válassz nemet, és nyomj entert hogy testreszabhasd karaktered.', 15000)
else
for k, v in pairs(choosePed) do
if IsControlJustReleased(0, 0xA65EBAB4) and GetEntityModel(choosePed[k]) == GetHashKey("mp_male") then -- male
-- AttachCamToEntity(cam, choosePed[k], -3.5, 0.0, 0.5, false)
InterP = true
interpCamera("Selection", choosePed[k])
PlaySoundFrontend("gender_left", "RDRO_Character_Creator_Sounds", true, 0)
pedSelected = choosePed[k]
sex = "mp_male"
elseif IsControlJustReleased(0, 0xDEB34313) and GetEntityModel(choosePed[k]) == GetHashKey("mp_female") then --female
-- AttachCamToEntity(cam, choosePed[k], -3.5, 0.0, 0.5, false)
InterP = true
interpCamera("Selection", choosePed[k])
PlaySoundFrontend("gender_right", "RDRO_Character_Creator_Sounds", true, 0)
pedSelected = choosePed[k]
sex = "mp_female"
end
end
if IsControlJustReleased(0, 0xC7B5340A) and pedSelected ~= nil then
DoScreenFadeOut(1800)
Wait(2000)
interpCamera2("Corpo", pedSelected)
InterP2 = true
SetEntityCoords(pedSelected, -558.56, -3781.16, 237.59)
SetEntityHeading(pedSelected, 87.21)
inCustomization = true
DoScreenFadeIn(3000)
vpcreator = true
DeletePed = true
end
end
end
if inCustomization and not hided then
SetNuiFocus(true, true)
SendNUIMessage(
{
action = "show",
gender = sex
}
)
end
end
end
)
RegisterNetEvent("FRP:CHARCREATION:starting")
AddEventHandler(
"FRP:CHARCREATION:starting",
function()
vpcreator = true
inCustomization = false
cAPI.EndFade(500)
NetworkSetEntityInvisibleToNetwork(PlayerPedId(), true)
SetEntityVisible(PlayerPedId(), false)
SetEntityCoords(PlayerPedId(), -561.8157, -3780.966, 239.0805)
DeletePed = false
end
)
RegisterNUICallback(
"rotate",
function(data, cb)
if (data["key"] == "left") then
rotation(20)
else
rotation(-20)
end
cb("ok")
end
)
AddEventHandler(
"onResourceStop",
function(resourceName)
if (GetCurrentResourceName() ~= resourceName) then
return
end
SetNuiFocus(false, false)
SendNUIMessage(
{
action = "hide"
}
)
end
)
CharacterName = nil
CharacterAge = 18
HeadUsing = nil
HairUsing = nil
TorsoUsing = nil
LegsUsing = nil
EyesUsing = nil
PorteUsing = nil
TeethUsing = nil
MustacheUsing = nil
PedScaleUsing = 1.0
pedWeight = 1
RegisterNUICallback(
"CheckButtons",
function(data)
TriggerEvent('FRP:NOTIFY:Simple', data, 5000)
end
)
RegisterNUICallback(
"HeadType",
function(data)
interpCamera2("Rosto", pedSelected)
if sex == "mp_male" then
for k, v in pairs(MaleHeads) do
if MaleHeads[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, MaleHeads[k].hash, true, true, true) -- FACE
HeadUsing = MaleHeads[k].hash
end
end
else
for k, v in pairs(FemaleHeads) do
if FemaleHeads[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, FemaleHeads[k].hash, true, true, true) -- FACE
HeadUsing = FemaleHeads[k].hash
end
end
end
end
)
RegisterNUICallback(
"TomPele",
function(data)
interpCamera2("Corpo", pedSelected)
if sex == "mp_male" then
for k, v in pairs(MaleTorsos) do
if MaleTorsos[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, MaleTorsos[k].hash, true, true, true)
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, MaleLegs[k].hash, true, true, true)
TorsoUsing = MaleTorsos[k].hash
LegsUsing = MaleLegs[k].hash
end
end
else
for k, v in pairs(FemaleTorsos) do
if FemaleTorsos[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, FemaleTorsos[k].hash, true, true, true)
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, FemaleLegs[k].hash, true, true, true)
TorsoUsing = FemaleTorsos[k].hash
LegsUsing = FemaleLegs[k].hash
end
end
end
end
)
RegisterNUICallback(
"Idade",
function(data)
CharacterAge = tonumber(data.change)
end
)
RegisterNUICallback(
"Olhos",
function(data)
interpCamera2("Rosto", pedSelected)
if sex == "mp_male" then
for k, v in pairs(MaleEyes) do
if MaleEyes[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, MaleEyes[k].hash, true, true, true)
EyesUsing = MaleEyes[k].hash
end
end
else
for k, v in pairs(FemaleEyes) do
if FemaleEyes[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, FemaleEyes[k].hash, true, true, true)
EyesUsing = FemaleEyes[k].hash
end
end
end
end
)
RegisterNUICallback(
"Porte",
function(data)
interpCamera2("Corpo", pedSelected)
local offset = 132
if sex == "mp_female" then
offset = 114
end
local finalIndex = offset + data.id
PorteUsing = finalIndex
Citizen.InvokeNative(0xA5BAE410B03E7371, pedSelected, finalIndex, false, true)
Citizen.InvokeNative(0xCC8CA3E88256E58F, pedSelected, 0, 1, 1, 1, 0)
end
)
RegisterNUICallback(
"Gordura",
function(data)
interpCamera2("Corpo", pedSelected)
local WAIST_TYPES = {
-2045421226, -- smallest
-1745814259,
-325933489,
-1065791927,
-844699484,
-1273449080,
927185840,
149872391,
399015098,
-644349862,
1745919061, -- default
1004225511,
1278600348,
502499352,
-2093198664,
-1837436619,
1736416063,
2040610690,
-1173634986,
-867801909,
1960266524, -- biggest
}
local waistIndex = data.id
pedWeight = waistIndex
Citizen.InvokeNative(0x1902C4CFCC5BE57C,pedSelected, WAIST_TYPES[waistIndex])
Citizen.InvokeNative(0xCC8CA3E88256E58F,pedSelected, 0, 1, 1, 1, false)
end
)
RegisterNUICallback(
"Dentes",
function(data)
interpCamera2("Rosto", pedSelected)
if sex == "mp_male" then
for k, v in pairs(MaleTeeth) do
if MaleTeeth[k].id == tonumber(data.id) then
RequestAnimDict("FACE_HUMAN@GEN_MALE@BASE")
while not HasAnimDictLoaded("FACE_HUMAN@GEN_MALE@BASE") do
Citizen.Wait(100)
end
TaskPlayAnim(pedSelected, "FACE_HUMAN@GEN_MALE@BASE", "Face_Dentistry_Loop", 1090519040, -4, -1, 17, 0, 0, 0, 0, 0, 0)
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, MaleTeeth[k].hash, true, true, true)
TeethUsing = MaleTeeth[k].hash
end
end
else
for k, v in pairs(FemaleTeeth) do
if FemaleTeeth[k].id == tonumber(data.id) then
RequestAnimDict("FACE_HUMAN@GEN_MALE@BASE")
while not HasAnimDictLoaded("FACE_HUMAN@GEN_MALE@BASE") do
Citizen.Wait(100)
end
TaskPlayAnim(pedSelected, "FACE_HUMAN@GEN_MALE@BASE", "Face_Dentistry_Loop", 1090519040, -4, -1, 17, 0, 0, 0, 0, 0, 0)
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, FemaleTeeth[k].hash, true, true, true)
TeethUsing = FemaleTeeth[k].hash
end
end
end
end
)
RegisterNUICallback(
"Cabelos",
function(data)
interpCamera2("Rosto", pedSelected)
if data.id == 0 then
HairUsing = 0
Citizen.InvokeNative(0xD710A5007C2AC539, pedSelected, 0x864B03AE, 0) -- Set target category, here the hash is for hats
Citizen.InvokeNative(0xCC8CA3E88256E58F, pedSelected, 0, 1, 1, 1, 0) -- Actually remove the component
else
if sex == "mp_male" then
for k, v in pairs(MaleHairs) do
if MaleHairs[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, MaleHairs[k].hash, true, true, true)
HairUsing = MaleHairs[k].hash
end
end
else
for k, v in pairs(FemaleHairs) do
if FemaleHairs[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, FemaleHairs[k].hash, true, true, true)
HairUsing = FemaleHairs[k].hash
end
end
end
end
end
)
-- RegisterNUICallback(
-- "Sobrancelha",
-- function(value)
-- interpCamera2("Rosto", pedSelected)
-- if sex == "mp_male" then
-- -- print(N_0xfd1ba1eef7985bb8(pedSelected, 0xD266))
-- N_0x5653ab26c82938cf(pedSelected, 0xD266, value)
-- HairBrownHairUsing = value
-- else
-- --print(value)
-- N_0x5653ab26c82938cf(pedSelected, 0x03F5, value)
-- HairUsing = value
-- end
-- end
-- )
-- RegisterCommand(
-- "deleteped",
-- function()
-- DeleteEntity(pedSelected)
-- end
-- )
RegisterNUICallback(
"BarbaMenu",
function(data)
interpCamera("Rosto", pedSelected)
if data.id == 0 then
MustacheUsing = 0
Citizen.InvokeNative(0xD710A5007C2AC539, pedSelected, 0xF8016BCA, 0) -- Set target category, here the hash is for hats
Citizen.InvokeNative(0xCC8CA3E88256E58F, pedSelected, 0, 1, 1, 1, 0) -- Actually remove the component
else
if sex == "mp_male" then
for k, v in pairs(MaleMustache) do
if MaleMustache[k].id == tonumber(data.id) then
Citizen.InvokeNative(0xD3A7B003ED343FD9, pedSelected, MaleMustache[k].hash, true, true, true)
MustacheUsing = MaleMustache[k].hash
end
end
end
end
end
)
local index = nil
RegisterNUICallback(
"FaceFeatured",
function(data)
if sex == "mp_male" then
interpCamera2("Rosto", pedSelected)
else
interpCamera2("Rosto", pedSelected)
end
local ped = pedSelected
local index = tonumber(data.facefeature)
local value = tonumber(data.id)
Citizen.InvokeNative(0x5653AB26C82938CF, ped, index, value)
Citizen.InvokeNative(0xCC8CA3E88256E58F, ped, false, true, true, true, false)
end
)
RegisterNUICallback(
"PedSize",
function(data)
if sex == "mp_male" then
interpCamera2("Rosto", pedSelected)
else
interpCamera2("Rosto", pedSelected)
end
local ped = pedSelected
local value = tonumber(data.id)
local isPositive = value > 185
local variation = (math.abs(185 - value) * 0.005333)
if not isPositive then
variation = -(variation)
end
SetPedScale(ped, 1.0 + variation)
PedScaleUsing = 1.0 + variation
end
)
RegisterNUICallback(
"NomePlayer",
function(dados)
CharacterName = dados.change
end
)
local faceFeatures = {
0x84D6,
0x3303,
0x2FF9,
0x4AD1,
0xC04F,
0xB6CE,
0x2844,
0xED30,
0x6A0B,
0xABCF,
0x358D,
0x8D0A,
0xEBAE,
0x1DF6,
0x3C0F,
0xC3B2,
0xE323,
0x8B2B,
0x1B6B,
0xEE44,
0xD266,
0xA54E,
0xDDFB,
0x6E7F,
0x3471,
0x03F5,
0x34B1,
0xF156,
0x561E,
0xF065,
0xAA69,
0x7AC3,
0x410D,
0x1A00,
0x91C1,
0xC375,
0xBB4D,
0xB0B0,
0x5D16
}
-- RegisterCommand('setmod', function(source,args)
-- local ped = pedSelected
-- for _, index in pairs(faceFeatures) do
-- local value = 1.0
-- print(ped, index, value)
-- Citizen.InvokeNative(0x5653AB26C82938CF, ped, index, value)
-- Citizen.InvokeNative(0xCC8CA3E88256E58F, ped, false, true, true, true, false)
-- end
-- end)
local floatIndex = nil
RegisterNUICallback(
"CloseCreator",
function()
SendNUIMessage(
{
action = "hide"
}
)
SetEntityVisible(PlayerPedId(), true)
local ffDados = {}
for _, value in pairs(faceFeatures) do
local facemod = Citizen.InvokeNative(0xFD1BA1EEF7985BB8, pedSelected, tonumber(value), Citizen.ResultAsFloat())
if facemod then
ffDados[value] = facemod
end
end
local pedAppearance = {
["heads"] = HeadUsing,
["BODIES_UPPER"] = TorsoUsing,
["BODIES_LOWER"] = LegsUsing,
["hair"] = HairUsing,
["eyes"] = EyesUsing,
["teeth"] = TeethUsing,
["Mustache"] = MustacheUsing,
["bodySize"] = PorteUsing
}
local SkinModf = {
["model"] = sex,
["modSkin"] = json.encode(pedAppearance),
["pedSize"] = tonumber(PedScaleUsing),
['pedWeight'] = tonumber(pedWeight),
["features"] = json.encode(ffDados)
}
TriggerServerEvent("FRP:CREATOR:saveCreation", CharacterName, CharacterAge, SkinModf, IsPedMale(pedSelected))
closeAll()
SetNuiFocus(false, false)
cAPI.StartFade(500)
Wait(12000)
cAPI.EndFade(500)
end
)
function closeAll()
DestroyAllCams(true)
SetNuiFocus(false, false)
DisplayHud(true)
vpcreator = false
inCustomization = false
SetEntityVisible(PlayerPedId(), true)
SetEntityInvincible(PlayerPedId(), false)
NetworkSetEntityInvisibleToNetwork(PlayerPedId(), false)
choosePed = {}
local ped = pedSelected
-- SetEntityVisible(ped, true)
-- NetworkSetEntityInvisibleToNetwork(ped, false)
end
function rotation(dir)
local playerPed = pedSelected
if playerPed ~= nil then
local pedRot = GetEntityHeading(playerPed) + dir
SetEntityHeading(playerPed, pedRot % 360)
end
end
function interpCamera(cameraName, entity)
SetCamActiveWithInterp(fixedCam, tempCam, 1200, true, true)
for k,v in pairs(cameraUsing) do
if cameraUsing[k].name == cameraName then
tempCam = CreateCam("DEFAULT_SCRIPTED_CAMERA")
AttachCamToEntity(tempCam, entity, cameraUsing[k].x, cameraUsing[k].y, cameraUsing[k].z)
--AttachCamToEntity(tempCam, entity, cameraUsing[k].x, cameraUsing[k].y, cameraUsing[k].z)
SetCamActive(tempCam, true)
SetCamRot(tempCam, -4.0, 0, 270.0)
if InterP then
SetCamActiveWithInterp(tempCam, fixedCam, 1200, true, true)
InterP = false
end
end
end
end
function interpCamera2(cameraName, entity)
DestroyAllCams(true)
SetCamActiveWithInterp(tempCam, tempCam2, 1200, true, true)
for k,v in pairs(cameraUsing) do
if cameraUsing[k].name == cameraName then
tempCam2 = CreateCam("DEFAULT_SCRIPTED_CAMERA")
AttachCamToEntity(tempCam2, entity, cameraUsing[k].x, cameraUsing[k].y, cameraUsing[k].z)
--AttachCamToEntity(tempCam, entity, cameraUsing[k].x, cameraUsing[k].y, cameraUsing[k].z)
SetCamActive(tempCam2, true)
SetCamRot(tempCam2, 0.0, 0, 270.0)
if InterP2 then
SetCamActiveWithInterp(tempCam2, tempCam, 1200, true, true)
InterP2 = false
end
end
end
end
function createCamera()
groundCam = CreateCam("DEFAULT_SCRIPTED_CAMERA")
SetCamCoord(groundCam, -555.925,-3778.709,238.597)
SetCamRot(groundCam, -20.0, 0.0, 83)
SetCamActive(groundCam, true)
RenderScriptCams(true, false, 1, true, true)
--Wait(3000)
-- last camera, create interpolate
fixedCam = CreateCam("DEFAULT_SCRIPTED_CAMERA")
SetCamCoord(fixedCam, -561.206,-3776.224,239.597)
SetCamRot(fixedCam, -20.0, 0, 270.0)
SetCamActive(fixedCam, true)
SetCamActiveWithInterp(fixedCam, groundCam, 3900, true, true)
Wait(3900)
DestroyCam(groundCam)
InterP = true
end
DeletePed = false
function createPeds()
for k, v in pairs(peds) do
if choosePed[k] == nil then
local waiting = 0
local hash = GetHashKey(peds[k].genrer)
RequestModel(hash)
while not HasModelLoaded(hash) do
Citizen.Wait(10)
end
choosePed[k] = CreatePed(hash, peds[k].x, peds[k].y, peds[k].z - 0.5, peds[k].h, false, 0)
Citizen.InvokeNative(0x283978A15512B2FE, choosePed[k], true)
Citizen.InvokeNative(0x58A850EAEE20FAA3, choosePed[k])
NetworkSetEntityInvisibleToNetwork(choosePed[k], true)
SetVehicleHasBeenOwnedByPlayer(choosePed[k], true)
-- SetModelAsNoLongerNeeded(hash)
if peds[k].genrer == "mp_female" then
SetPedOutfitPreset(choosePed[k], 17)
Citizen.InvokeNative(0xD710A5007C2AC539, choosePed[k], 0x9925C067, 0)
Citizen.InvokeNative(0xCC8CA3E88256E58F, choosePed[k], 0, 1, 1, 1, 0)
else
SetPedOutfitPreset(choosePed[k], 43)
end
end
end
end
AddEventHandler(
"onResourceStop",
function(resourceName)
if GetCurrentResourceName() == resourceName then
for index, _ in pairs(choosePed) do
DeleteEntity(choosePed[index])
end
end
end
)
|
LoadModelCommand = Command:extends{}
LoadModelCommand.className = "LoadModelCommand"
function LoadModelCommand:init(modelString)
-- Since the introduction of the data packing/unpacking, is much more
-- efficient passing tables than strings
if modelString then
self.mission = loadstring(modelString)()
end
end
function LoadModelCommand:execute()
SB.model:Clear()
GG.Delay.DelayCall(function()
self:Load()
end, {}, 8)
end
function LoadModelCommand:Load()
Log.Notice("Loading model...")
SB.model:Load(self.mission)
Log.Notice("Loading model finished")
end
|
function eventChatCommand(name, message)
local i, j
local cmd, arg
for k, v in ipairs({{'<', '<'}, {'&', '&'}}) do
message = string.gsub(message, v[1], v[2])
end
while true do
i, j = string.find(message, '%s+')
if i == nil then
cmd = message
arg = ''
break
elseif i == 1 then
message = string.sub(message, j + 1)
if message == '' then
cmd = ''
arg = ''
break
end
else
cmd = string.sub(message, 1, i - 1)
arg = string.sub(message, j + 1)
break
end
end
local cmdl = string.lower(cmd)
local func = MODULE_CHAT_COMMAND[cmdl]
if func ~= nil then
func(name, cmdl, arg)
else
MODULE_CHAT_COMMAND_1(name, cmd, arg)
end
end
MODULE_CHAT_COMMAND_1 = function(name, cmd, arg)
alert('Invalid command: ' .. cmd, name)
end
|
-- BASED ON https://github.com/JustAPotota/Unfold
local M = {}
-- Modules
local protoc = require("pb.protoc")
-- Set up protoc -----------------
protoc.unknown_module = ""
protoc.unknown_type = ""
protoc.include_imports = true
protoc:load(sys.load_resource("/proto/liveupdate_ddf.proto"))
----------------------------------
function M.read_manifest(data)
return pb.decode(".dmLiveUpdateDDF.ManifestFile", data)
end
return M
|
local onTab = false
local song
local steps
local curInput = ""
local frameX = 10
local frameY = 45
local frameWidth = capWideScale(360,400)
local frameHeight = 350
local fontScale = 0.4
local tagsperpage = 14
local offsetX = 10
local offsetY = 20
local tagFunction = 1
local buttondiffuse = 0
local buttonheight = 10
local currenttagpage = 1
local numtagpages = 1
local tagYSpacing = 33
local whee
local filterChanged = false
local ptags = tags:get_data().playerTags
local playertags = {}
local displayindex = {}
local function newTagInput(event)
changed = false
if event.type ~= "InputEventType_Release" and onTab and hasFocus then
if event.button == "Start" then
hasFocus = false
if curInput ~= "" and ptags[curInput] == nil then
tags:get_data().playerTags[curInput] = {}
tags:set_dirty()
tags:save()
end
curInput = ""
SCREENMAN:set_input_redirected(PLAYER_1, false)
MESSAGEMAN:Broadcast("RefreshTags")
MESSAGEMAN:Broadcast("NumericInputEnded")
return true
elseif event.button == "Back" then
curInput = ""
hasFocus = false
SCREENMAN:set_input_redirected(PLAYER_1, false)
MESSAGEMAN:Broadcast("RefreshTags")
MESSAGEMAN:Broadcast("NumericInputEnded")
return true
elseif event.DeviceInput.button == "DeviceButton_backspace" then
changed = true
curInput = curInput:sub(1, -2)
elseif event.DeviceInput.button == "DeviceButton_delete" then
changed = true
curInput = ""
elseif event.char and curInput:len() < 20 and event.char:match("[% %%%+%-%!%@%#%$%^%&%*%(%)%=%_%.%,%:%;%'%\"%>%<%?%/%~%|%w]") and event.char ~= "" then
changed = true
curInput = curInput..event.char
end
if changed then
MESSAGEMAN:Broadcast("RefreshTags")
end
end
end
local t = Def.ActorFrame{
BeginCommand=function(self)
SCREENMAN:GetTopScreen():AddInputCallback(newTagInput)
self:queuecommand("Set"):visible(false)
end,
OffCommand=function(self)
self:bouncebegin(0.2):xy(-500,0):diffusealpha(0)
end,
OnCommand=function(self)
self:bouncebegin(0.2):xy(0,0):diffusealpha(1)
end,
MouseRightClickMessageCommand=function(self)
if onTab then
hasFocus = false
curInput = ""
SCREENMAN:set_input_redirected(PLAYER_1, false)
MESSAGEMAN:Broadcast("NumericInputEnded")
MESSAGEMAN:Broadcast("RefreshTags")
end
end,
SetCommand=function(self)
self:finishtweening()
if getTabIndex() == 9 then
self:queuecommand("On")
self:visible(true)
song = GAMESTATE:GetCurrentSong()
steps = GAMESTATE:GetCurrentSteps(PLAYER_1)
onTab = true
MESSAGEMAN:Broadcast("RefreshTags")
else
self:queuecommand("Off")
onTab = false
end
end,
TabChangedMessageCommand=function(self)
self:queuecommand("Set")
end,
CurrentStepsP1ChangedMessageCommand=function(self)
self:queuecommand("Set")
end,
CurrentSongChangedMessageCommand=function(self)
self:queuecommand("Set")
end,
}
t[#t+1] = Def.Quad{InitCommand=function(self)
self:xy(frameX,frameY):zoomto(frameWidth,frameHeight):halign(0):valign(0):diffuse(color("#333333CC"))
end}
t[#t+1] = Def.Quad{InitCommand=function(self)
self:xy(frameX,frameY):zoomto(frameWidth,offsetY):halign(0):valign(0):diffuse(getMainColor('frames')):diffusealpha(0.5)
end}
t[#t+1] = LoadFont("Common Normal")..{InitCommand=function(self)
self:xy(frameX+5,frameY+offsetY-9):zoom(0.6):halign(0):diffuse(getMainColor('positive')):settext("Player Tags")
end}
local function filterDisplay(playertags)
local index = {}
for i=1,#playertags do
index[#index+1] = i
end
return index
end
local r = Def.ActorFrame{
BeginCommand=function(self)
whee = SCREENMAN:GetTopScreen():GetMusicWheel()
if filterTags == nil then
filterTags = {}
end
-- apparently i cant just do if charts and next(charts) to check nil charts
if charts ~= nil and next(charts) then
-- not sure why the other song doesnt work i hate this
local ssong = GAMESTATE:GetCurrentSong()
whee:FilterByStepKeys(charts)
whee:SelectSong(ssong)
end
end,
RefreshTagsMessageCommand=function(self)
if filterMode == nil then
filterMode = true
end
ptags = tags:get_data().playerTags
-- filtering
if filterChanged then
charts = {}
if next(filterTags) then
toFilterTags = {}
for k,v in pairs(filterTags) do
toFilterTags[#toFilterTags+1] = k
end
if filterMode then --and
inCharts = {}
for k, v in pairs(ptags[toFilterTags[1]]) do
inCharts[k] = 1
end
toFilterTags[1] = nil
for k, v in pairs(toFilterTags) do
for ki, vi in pairs(inCharts) do
if ptags[v][ki] == nil then
inCharts[ki] = nil
end
end
end
-- gotta repack those
for k, v in pairs(inCharts) do
charts[#charts+1] = k
end
else -- or
for k, v in pairs(toFilterTags) do
for ki, vi in pairs(ptags[v]) do
if charts[ki] == nil then
charts[#charts+1] = ki
end
end
end
end
end
whee:FilterByStepKeys(charts)
filterChanged = false
end
playertags = {}
for k,v in pairs(ptags) do
playertags[#playertags+1] = k
end
table.sort(playertags)
displayindex = filterDisplay(playertags)
numtagpages = notShit.ceil(#displayindex/tagsperpage)
MESSAGEMAN:Broadcast("UpdateTags")
end
}
local function makeTag(i)
local t = Def.ActorFrame{
InitCommand=function(self)
local colPos = i/8 >= 1 and 20 + (frameWidth/2) or offsetX + 10
local row = i > 7 and i - 8 or i - 1
self:xy(colPos, offsetY + 95 + row*tagYSpacing)
self:visible(true)
end,
UpdateTagsMessageCommand=function(self)
if playertags[i + ((currenttagpage - 1) * tagsperpage)] then
self:visible(true)
else
self:visible(false)
end
end,
Def.ActorFrame{
InitCommand=function(self)
self:x(5)
end,
Def.Quad{
InitCommand=function(self)
self:xy(-6,20):zoomto(frameWidth/2-20,tagYSpacing-2):halign(0):valign(1)
end,
UpdateTagsMessageCommand=function(self)
curTag = playertags[i + ((currenttagpage - 1) * tagsperpage)]
if tagFunction == 1 then
if song and curTag and ptags[curTag][steps:GetChartKey()] then
self:diffuse(getMainColor('positive'))
else
self:diffuse(getMainColor('frames')):diffusealpha(0.35)
end
elseif tagFunction == 2 then
if filterTags[curTag] then
self:diffuse(getMainColor('positive'))
else
self:diffuse(getMainColor('frames')):diffusealpha(0.35)
end
else
self:diffuse(getMainColor('frames')):diffusealpha(0.35)
end
end,
MouseLeftClickMessageCommand=function(self)
if isOver(self) then
curTag = playertags[i + ((currenttagpage - 1) * tagsperpage)]
if tagFunction == 1 then
ck = steps:GetChartKey()
if ptags[curTag][ck] then
tags:get_data().playerTags[curTag][ck] = nil
else
tags:get_data().playerTags[curTag][ck] = 1
end
tags:set_dirty()
tags:save()
elseif tagFunction == 2 then
if filterTags[curTag] then
filterTags[curTag] = nil
else
filterTags[curTag] = 1
end
filterChanged = true
else
if filterTags[curTag] then
filterTags[curTag] = nil
filterChanged = true
end
tags:get_data().playerTags[curTag] = nil
tags:set_dirty()
tags:save()
end
MESSAGEMAN:Broadcast("RefreshTags")
end
end,
},
LoadFont("Common Large") .. {
Name="Text",
InitCommand=function(self)
self:y(5):halign(0):maxwidth(frameWidth + 25)
end,
UpdateTagsMessageCommand=function(self)
self:zoom(fontScale)
if playertags[i + ((currenttagpage - 1) * tagsperpage)] then
self:settext(playertags[i + ((currenttagpage - 1) * tagsperpage)])
end
end
},
}
}
return t
end
local fawa = {"Chart Tags", "Filter By", "Remove"}
local function funcButton(i)
local t = Def.ActorFrame{
InitCommand=function(self)
local colPos = (i-1)*(frameWidth/3-5) + 80
self:xy(colPos, frameY+capWideScale(80,80)-55)
self:visible(true)
end,
Def.Quad{
InitCommand=function(self)
self:zoomto((frameWidth/3-10),30):halign(0.5):valign(0):diffuse(getMainColor('frames')):diffusealpha(0.35)
end,
SetCommand=function(self)
if tagFunction == i then
self:diffusealpha(1)
else
self:diffusealpha(0.35)
end
end,
MouseLeftClickMessageCommand=function(self)
if isOver(self) then
tagFunction = i
MESSAGEMAN:Broadcast("RefreshTags")
end
end,
UpdateTagsMessageCommand=function(self)
self:queuecommand("Set")
end,
},
LoadFont("Common Large") .. {
InitCommand=function(self)
self:y(12):halign(0.5):diffuse(getMainColor('positive')):maxwidth((frameWidth/3-30)):maxheight(22)
end,
BeginCommand=function(self)
self:settext(fawa[i])
end,
}
}
return t
end
-- new tag input
r[#r+1] = Def.ActorFrame{
InitCommand=function(self)
self:xy(frameX+10,frameY+capWideScale(80,80)+225)
end,
SetCommand=function(self)
self:visible(tagFunction == 1)
end,
UpdateTagsMessageCommand=function(self)
self:queuecommand("Set")
end,
LoadFont("Common Large")..{
InitCommand=function(self)
self:halign(0):zoom(fontScale)
end,
SetCommand=function(self)
self:settext("Add new tag:")
end
},
Def.Quad{
InitCommand=function(self)
self:addx(377):addy(3):zoomto(250,21):halign(1):diffuse(color("#666666"))
end,
MouseLeftClickMessageCommand=function(self)
if isOver(self) and onTab then
hasFocus = true
curInput = ""
SCREENMAN:set_input_redirected(PLAYER_1, true)
self:diffusealpha(0.1)
MESSAGEMAN:Broadcast("RefreshTags")
MESSAGEMAN:Broadcast("NumericInputActive")
end
end,
SetCommand=function(self)
if hasFocus then
self:diffuse(color("#999999"))
else
self:diffuse(color("#000000"))
end
end,
UpdateTagsMessageCommand=function(self)
self:queuecommand("Set")
end,
},
LoadFont("Common Large")..{
InitCommand=function(self)
self:addx(133):addy(1):halign(0):maxwidth(600):zoom(fontScale - 0.05)
end,
SetCommand=function(self)
self:settext(curInput)
if curInput ~= "" or hasFocus then
self:diffuse(color("#FFFFFF"))
else
self:diffuse(color("#666666"))
end
end,
UpdateTagsMessageCommand=function(self)
self:queuecommand("Set")
end,
}
}
-- filter type
r[#r+1] = Def.ActorFrame{
InitCommand=function(self)
self:xy(frameX+10,frameY+capWideScale(80,80)+225)
end,
SetCommand=function(self)
self:visible(tagFunction == 2)
end,
UpdateTagsMessageCommand=function(self)
self:queuecommand("Set")
end,
LoadFont("Common Large")..{
InitCommand=function(self)
self:zoom(fontScale):halign(0)
end,
SetCommand=function(self)
self:settext("Mode: "..(filterMode and "AND" or "OR"))
end,
UpdateTagsMessageCommand=function(self)
self:queuecommand("Set")
end,
},
Def.Quad{
InitCommand=function(self)
self:zoomto(120,18):halign(0):diffusealpha(0)
end,
MouseLeftClickMessageCommand=function(self)
if isOver(self) and onTab then
filterMode = not filterMode
filterChanged = true
MESSAGEMAN:Broadcast("RefreshTags")
end
end,
},
}
-- main quad with paginator i guess?
r[#r+1] = Def.ActorFrame{
InitCommand=function(self)
self:xy(frameX+10,frameY+capWideScale(80,80)+250)
end,
Def.Quad{
InitCommand=function(self)
self:xy(300,-8):zoomto(40,20):halign(0):valign(0):diffuse(getMainColor('frames')):diffusealpha(buttondiffuse)
end,
MouseLeftClickMessageCommand=function(self)
if isOver(self) and currenttagpage < numtagpages then
currenttagpage = currenttagpage + 1
MESSAGEMAN:Broadcast("RefreshTags")
end
end
},
LoadFont("Common Large") .. {
InitCommand=function(self)
self:x(300):halign(0):zoom(0.3):diffuse(getMainColor('positive')):settext("Next")
end,
},
Def.Quad{
InitCommand=function(self)
self:y(-8):zoomto(65,20):halign(0):valign(0):diffuse(getMainColor('frames')):diffusealpha(buttondiffuse)
end,
MouseLeftClickMessageCommand=function(self)
if isOver(self) and currenttagpage > 1 then
currenttagpage = currenttagpage - 1
MESSAGEMAN:Broadcast("RefreshTags")
end
end
},
LoadFont("Common Large") .. {
InitCommand=function(self)
self:halign(0):zoom(0.3):diffuse(getMainColor('positive')):settext("Previous")
end,
},
LoadFont("Common Large") .. {
InitCommand=function(self)
self:x(175):halign(0.5):zoom(0.3):diffuse(getMainColor('positive'))
end,
SetCommand=function(self)
self:settextf("Showing %i-%i of %i", math.min(((currenttagpage-1)*tagsperpage)+1, #displayindex), math.min(currenttagpage*tagsperpage, #displayindex), #displayindex)
end,
UpdateTagsMessageCommand=function(self)
self:queuecommand("Set")
end,
}
}
for i=1,tagsperpage do
r[#r+1] = makeTag(i)
end
for i=1,3 do
r[#r+1] = funcButton(i)
end
t[#t+1] = r
return t
|
-- empty string
print("")
-- a * 253
print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
-- a * 254
print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
-- Initialize our Namespace Table
HelloPacrooti = {}
HelloPacrooti.name = "HelloPacrooti"
HelloPacrooti.version = "1.0.0"
-- Summon Pacrooti!!!
function HelloPacrooti.summon_pacrooti()
SetCrownCrateNPCVisible(true)
end
-- Dismiss Pacrooti
function HelloPacrooti.dismiss_pacrooti()
SetCrownCrateNPCVisible(false)
end
SLASH_COMMANDS["/hellopacrooti"] = HelloPacrooti.summon_pacrooti
SLASH_COMMANDS["/byepacrooti"] = HelloPacrooti.dismiss_pacrooti
|
local _
-- A modified header class for the inventory system.
-- Has the added functionality of a tabbar (of type BETTERUI_TabBarScrollList)
-----------------------------------------------------------------------------
-- Alias the control names to make the code less verbose and more readable.
local TABBAR = ZO_GAMEPAD_HEADER_CONTROLS.TABBAR
local TITLE = ZO_GAMEPAD_HEADER_CONTROLS.TITLE
local TITLE_BASELINE = ZO_GAMEPAD_HEADER_CONTROLS.TITLE_BASELINE
local DIVIDER_SIMPLE = ZO_GAMEPAD_HEADER_CONTROLS.DIVIDER_SIMPLE
local DIVIDER_PIPPED = ZO_GAMEPAD_HEADER_CONTROLS.DIVIDER_PIPPED
local GENERIC_HEADER_INFO_LABEL_HEIGHT = 33
BETTERUI_GAMEPAD_CONTENT_HEADER_DIVIDER_INFO_BOTTOM_PADDING_Y = GENERIC_HEADER_INFO_LABEL_HEIGHT
BETTERUI_GAMEPAD_CONTENT_DIVIDER_INFO_PADDING_Y = 50
local Anchor = ZO_Object:Subclass()
function Anchor:New(pointOnMe, targetId, pointOnTarget, offsetX, offsetY)
local object = ZO_Object.New(self)
object.targetId = targetId
object.anchor = ZO_Anchor:New(pointOnMe, nil, pointOnTarget, offsetX, offsetY)
return object
end
local function TabBar_Setup(control, data, selected, selectedDuringRebuild, enabled, activated)
local label = control:GetNamedChild("Label")
label:SetHidden(true)
local icon = control:GetNamedChild("Icon")
local text = data.text
if type(text) == "function" then
text = text()
end
local iconPath = data.iconsNormal[1]
icon:SetTexture(iconPath)
if not data.filterType then
icon:SetColor(1, 0.95, 0.5, icon:GetControlAlpha())
else
icon:SetColor(1, 1, 1, icon:GetControlAlpha())
end
if data.canSelect == nil then
data.canSelect = true
end
ZO_GamepadMenuHeaderTemplate_Setup(control, data, selected, selectedDuringRebuild, enabled, activated)
end
function BETTERUI.GenericHeader.Initialize(control, createTabBar, layout)
control.controls =
{
[TABBAR] = control:GetNamedChild("TabBar"),
[TITLE] = control:GetNamedChild("TitleContainer"):GetNamedChild("Title"),
[TITLE_BASELINE] = control:GetNamedChild("TitleContainer"),
[DIVIDER_SIMPLE] = control:GetNamedChild("DividerSimple"),
[DIVIDER_PIPPED] = control:GetNamedChild("DividerPipped"),
}
if createTabBar == ZO_GAMEPAD_HEADER_TABBAR_CREATE then
local tabBarControl = control.controls[TABBAR]
tabBarControl:SetHidden(false)
end
end
local TEXT_ALIGN_RIGHT = 2
function BETTERUI.GenericHeader.AddToList(control, data)
control.tabBar:AddEntry("BETTERUI_GamepadTabBarTemplate", data)
end
function BETTERUI.GenericHeader.SetEquipText(control, isEquipMain)
local equipControl = control:GetNamedChild("TitleContainer"):GetNamedChild("EquipText")
if isEquipMain then
equipControl:SetText(zo_strformat(GetString(SI_BETTERUI_INV_EQUIP_TEXT_HIGHLIGHT), GetString(SI_BETTERUI_INV_EQUIPSLOT_MAIN)))
else
equipControl:SetText(zo_strformat(GetString(SI_BETTERUI_INV_EQUIP_TEXT_NORMAL), GetString(SI_BETTERUI_INV_EQUIPSLOT_MAIN)))
end
equipControl:SetHorizontalAlignment(TEXT_ALIGN_RIGHT)
end
function BETTERUI.GenericHeader.SetBackupEquipText(control, isEquipMain)
local equipControl = control:GetNamedChild("TitleContainer"):GetNamedChild("BackupEquipText")
if isEquipMain then
equipControl:SetText(zo_strformat(GetString(SI_BETTERUI_INV_EQUIP_TEXT_NORMAL), GetString(SI_BETTERUI_INV_EQUIPSLOT_BACKUP)))
else
equipControl:SetText(zo_strformat(GetString(SI_BETTERUI_INV_EQUIP_TEXT_HIGHLIGHT), GetString(SI_BETTERUI_INV_EQUIPSLOT_BACKUP)))
end
equipControl:SetHorizontalAlignment(TEXT_ALIGN_RIGHT)
end
function BETTERUI.GenericHeader.SetTitleText(control, titleText)
local titleTextControl = control:GetNamedChild("TitleContainer"):GetNamedChild("Title")
titleTextControl:SetText(titleText)
end
function BETTERUI.GenericHeader.SetEquippedIcons(control, equipMain, equipOff, equipPoison)
local equipMainControl = control:GetNamedChild("TitleContainer"):GetNamedChild("MainHandIcon")
local equipOffControl = control:GetNamedChild("TitleContainer"):GetNamedChild("OffHandIcon")
local equipPoisonControl = control:GetNamedChild("TitleContainer"):GetNamedChild("PoisonIcon")
local DEFAULT_INVSLOT_ICON = "/esoui/art/inventory/inventory_slot.dds"
if(equipMain ~= "") then equipMainControl:SetTexture(equipMain) else equipMainControl:SetTexture(DEFAULT_INVSLOT_ICON) end
if(equipOff ~= "") then equipOffControl:SetTexture(equipOff) else equipOffControl:SetTexture(DEFAULT_INVSLOT_ICON) end
if(equipPoison ~= "") then equipPoisonControl:SetTexture(equipPoison) else equipPoisonControl:SetTexture(DEFAULT_INVSLOT_ICON) end
end
function BETTERUI.GenericHeader.SetBackupEquippedIcons(control, equipMain, equipOff, equipPoison)
local equipMainControl = control:GetNamedChild("TitleContainer"):GetNamedChild("BackupMainHandIcon")
local equipOffControl = control:GetNamedChild("TitleContainer"):GetNamedChild("BackupOffHandIcon")
local equipPoisonControl = control:GetNamedChild("TitleContainer"):GetNamedChild("BackupPoisonIcon")
local DEFAULT_INVSLOT_ICON = "/esoui/art/inventory/inventory_slot.dds"
if(equipMain ~= "") then equipMainControl:SetTexture(equipMain) else equipMainControl:SetTexture(DEFAULT_INVSLOT_ICON) end
if(equipOff ~= "") then equipOffControl:SetTexture(equipOff) else equipOffControl:SetTexture(DEFAULT_INVSLOT_ICON) end
if(equipPoison ~= "") then equipPoisonControl:SetTexture(equipPoison) else equipPoisonControl:SetTexture(DEFAULT_INVSLOT_ICON) end
end
function BETTERUI.GenericHeader.Refresh(control, data, blockTabBarCallbacks)
--ddebug("LOL")
--d(data)
control:GetNamedChild("TitleContainer"):GetNamedChild("Title"):SetText(data.titleText(data.name))
local tabBarControl = control.controls[TABBAR]
tabBarControl:SetHidden(false)
if not control.tabBar then
local tabBarData = { attachedTo=control, parent=data.tabBarData.parent, onNext=data.tabBarData.onNext, onPrev = data.tabBarData.onPrev }
control.tabBar = BETTERUI_TabBarScrollList:New(tabBarControl, tabBarControl:GetNamedChild("LeftIcon"), tabBarControl:GetNamedChild("RightIcon"), tabBarData)
control.tabBar:Activate()
control.tabBar.hideUnselectedControls = false
control.tabBar:AddDataTemplate("BETTERUI_GamepadTabBarTemplate", TabBar_Setup, ZO_GamepadMenuEntryTemplateParametricListFunction, MenuEntryTemplateEquality)
end
if control.tabBar then
if(blockTabBarCallbacks) then
control.tabBar:RemoveOnSelectedDataChangedCallback(TabBar_OnDataChanged)
else
control.tabBar:SetOnSelectedDataChangedCallback(TabBar_OnDataChanged)
end
if data.activatedCallback then
control.tabBar:SetOnActivatedChangedFunction(data.activatedCallback)
end
control.tabBar:Commit()
if(blockTabBarCallbacks) then
control.tabBar:SetOnSelectedDataChangedCallback(TabBar_OnDataChanged)
end
end
end
|
---------------------------------<
-- Messages Application
-- c_chat.lua
---------------------------------<
function main()
end
function close()
end
function updateTile(tile,mode)
end
|
local M = {}
M.base_30 = {
white = "#cdcecf",
darker_black = "#121c29",
black = "#192330",
black2 = "#202a37",
one_bg = "#252f3c", -- real bg of onedark
one_bg2 = "#313b48",
one_bg3 = "#3d4754",
grey = "#495360",
grey_fg = "#535d6a",
grey_fg2 = "#5c6673",
light_grey = "#646e7b",
red = "#c94f6d",
baby_pink = "#e26886",
pink = "#d85e7c",
line = "#2a3441",
green = "#8ebaa4",
vibrant_green = "#6ad4d6",
blue = "#719cd6",
nord_blue = "#86abdc",
yellow = "#dbc074",
sun = "#e0c989",
purple = "#baa1e2",
dark_purple = "#9d79d6",
teal = "#5cc6c8",
orange = "#fe9373",
cyan = "#8be5e7",
statusline_bg = "#202a37",
lightbg = "#313b48",
pmenu_bg = "#719cd6",
folder_bg = "#719cd6",
}
M.base_16 = {
base00 = "#192330",
base01 = "#252f3c",
base02 = "#313b48",
base03 = "#3d4754",
base04 = "#495360",
base05 = "#c0c8d5",
base06 = "#c7cfdc",
base07 = "#ced6e3",
base08 = "#e26886",
base09 = "#fe9373",
base0A = "#dbc074",
base0B = "#8ebaa4",
base0C = "#7ad4d6",
base0D = "#86abdc",
base0E = "#9d79d6",
base0F = "#d85e7c",
}
M.type = "dark"
M = require("base46").override_theme(M, "nightfox")
return M
|
WQTrackerDB = {
["profileKeys"] = {
["情伤难愈丶 - 凤凰之神"] = "Default",
},
["profiles"] = {
["Default"] = {
["quests_tracked"] = {
["Player-1515-040B5514"] = {
},
},
["rarescan"] = {
["recently_spotted"] = {
[142508] = {
1545924591, -- [1]
943, -- [2]
0.476323843002319, -- [3]
0.735235750675201, -- [4]
"Creature-0-0000-0000-00000-142508-0000000000", -- [5]
"枝条领主奥德鲁斯", -- [6]
"凌枫年华", -- [7]
1545924591, -- [8]
},
[141620] = {
1545924547, -- [1]
943, -- [2]
0.486133694648743, -- [3]
0.614766240119934, -- [4]
"Creature-0-0000-0000-00000-141620-0000000000", -- [5]
"轰鸣的土元素", -- [6]
"荇雲", -- [7]
1545924547, -- [8]
},
[126254] = {
1545924570, -- [1]
885, -- [2]
0.607216596603394, -- [3]
0.517145752906799, -- [4]
"Creature-0-3913-1669-13-126254-000024EEEE", -- [5]
"萨卡尔中尉", -- [6]
"狂野之狼", -- [7]
1545924570, -- [8]
},
[126946] = {
1545924627, -- [1]
885, -- [2]
0.564427375793457, -- [3]
0.542265176773071, -- [4]
"Creature-0-0000-0000-00000-126946-0000000000", -- [5]
"审判官维斯洛兹", -- [6]
"斗丶放飞自我", -- [7]
1545924627, -- [8]
},
[124185] = {
1545924559, -- [1]
862, -- [2]
0.721320688724518, -- [3]
0.257400870323181, -- [4]
"Creature-0-0000-0000-00000-124185-0000000000", -- [5]
"戈拉坎", -- [6]
"叁娃丶", -- [7]
1545924559, -- [8]
},
[126338] = {
1545924487, -- [1]
909, -- [2]
0.553978323936462, -- [3]
0.599923193454742, -- [4]
"Creature-0-0000-0000-00000-126338-0000000000", -- [5]
"愤怒领主亚雷兹", -- [6]
"北国之冬", -- [7]
1545924487, -- [8]
},
[141618] = {
1545924603, -- [1]
943, -- [2]
0.501281440258026, -- [3]
0.27753484249115, -- [4]
"Creature-0-0000-0000-00000-141618-0000000000", -- [5]
"潮涌巨怪", -- [6]
"双刀带奶", -- [7]
1545924603, -- [8]
},
[125820] = {
1545924535, -- [1]
830, -- [2]
0.395784020423889, -- [3]
0.663679957389832, -- [4]
"Creature-0-0000-0000-00000-125820-0000000000", -- [5]
"鬼母拉格拉丝", -- [6]
"Lowkeyman", -- [7]
1545924535, -- [8]
},
},
["name_cache"] = {
["审判官维斯洛兹"] = 126946,
["轰鸣的土元素"] = 141620,
["愤怒领主亚雷兹"] = 126338,
["潮涌巨怪"] = 141618,
["萨卡尔中尉"] = 126254,
["枝条领主奥德鲁斯"] = 142508,
["戈拉坎"] = 124185,
["鬼母拉格拉丝"] = 125820,
},
},
["player_names"] = {
["Player-1515-040B5514"] = {
["class"] = "MAGE",
["name"] = "情伤难愈丶",
["realm"] = "凤凰之神",
},
},
},
},
}
|
local community_pin_map = require("qnFiles/qnPlist/hall/community_pin");
local communityMessageListItem=
{
name="communityMessageListItem",type=0,typeName="View",time=0,x=0,y=0,width=1006,height=103,visible=1,nodeAlign=kAlignTopLeft,fillParentWidth=0,fillParentHeight=0,
{
name="bg",type=0,typeName="Image",time=98545899,x=0,y=0,width=1006,height=103,nodeAlign=kAlignCenter,visible=0,fillParentWidth=0,fillParentHeight=0,file="hall/community/friendListBg.png"
},
{
name="moveView",type=0,typeName="View",time=102162823,x=0,y=0,width=1191,height=103,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0
},
{
name="messageListView",type=0,typeName="View",time=96205122,x=0,y=0,width=1006,height=103,nodeAlign=kAlignCenter,visible=1,fillParentWidth=1,fillParentHeight=1,
{
name="headView",type=0,typeName="View",time=96205306,x=25,y=0,width=70,height=70,nodeAlign=kAlignLeft,visible=1,fillParentWidth=0,fillParentHeight=0,
{
name="headBg",type=0,typeName="View",time=99851778,x=0,y=0,width=70,height=70,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0
},
{
name="head_frame",type=1,typeName="Image",time=0,x=0,y=0,width=72,height=72,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignCenter,file=community_pin_map['head_frame.png']
}
},
{
name="name",type=0,typeName="Text",time=96205486,x=120,y=-1,width=64,height=64,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0,string=[[我们]],fontSize=30,textAlign=kAlignLeft,colorRed=255,colorGreen=255,colorBlue=255,colorA=1
},
{
name="describe",type=0,typeName="Text",time=96205507,x=120,y=40,width=528,height=64,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0,string=[[为何不讲话阿斯兰的几分啊撒娇地方撒娇地方按时]],fontSize=24,textAlign=kAlignLeft,colorRed=255,colorGreen=252,colorBlue=0
},
{
name="sex",type=0,typeName="Image",time=96205762,x=440,y=16,width=28,height=38,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0,file=community_pin_map['female.png']
},
{
name="time",type=0,typeName="Text",time=96205937,x=30,y=-5,width=136,height=64,nodeAlign=kAlignRight,visible=1,fillParentWidth=0,fillParentHeight=0,string=[[昨天 04:30]],fontSize=30,textAlign=kAlignRight,colorRed=255,colorGreen=255,colorBlue=255
}
},
{
name="friendMsgView",type=0,typeName="View",time=98545803,x=257,y=208,width=1006,height=103,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=1,fillParentHeight=1,
{
name="refuseBtn",type=0,typeName="Button",time=102175871,x=160,y=20,width=112,height=70,nodeAlign=kAlignBottomRight,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/btns/btn_orange_164x89_l25_r25_t25_b25.png",
{
name="Text",type=0,typeName="Text",time=102175895,x=0,y=0,width=64,height=64,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,string=[[拒绝]],fontSize=32,textAlign=kAlignCenter,colorRed=255,colorGreen=235,colorBlue=186
}
},
{
name="agreeBtn",type=0,typeName="Button",time=102175959,x=30,y=20,width=112,height=70,nodeAlign=kAlignBottomRight,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/btns/btn_green_164x89_l25_r25_t25_b25.png",gridLeft=25,gridRight=25,gridTop=25,gridBottom=25,
{
name="Text",type=0,typeName="Text",time=102175960,x=0,y=0,width=64,height=64,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,string=[[同意]],fontSize=32,textAlign=kAlignCenter,colorRed=255,colorGreen=235,colorBlue=186
}
},
{
name="nickAndidView",type=0,typeName="Text",time=98359035,x=25,y=20,width=371,height=64,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0,string=[[xxx[1234] 请求加您为好友]],fontSize=32,textAlign=kAlignLeft,colorRed=240,colorGreen=248,colorBlue=255
}
},
{
name="line",type=0,typeName="Image",time=99607295,x=0,y=52,width=1007,height=2,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/community/friendSplit.png"
},
{
name="redDot",type=0,typeName="Image",time=99742720,x=78,y=-30,width=32,height=32,nodeAlign=kAlignLeft,visible=0,fillParentWidth=0,fillParentHeight=0,file="hall/common/msg_icon.png",
{
name="redNum",type=0,typeName="Text",time=99742932,x=1,y=-2,width=64,height=64,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,string=[[99]],fontSize=24,textAlign=kAlignCenter,colorRed=255,colorGreen=255,colorBlue=255
},
{
name="dot",type=0,typeName="Text",time=99743086,x=-50,y=-5,width=64,height=64,nodeAlign=kAlignRight,visible=0,fillParentWidth=0,fillParentHeight=0,string=[[...]],fontSize=24,textAlign=kAlignCenter,colorRed=255,colorGreen=255,colorBlue=255
}
},
{
name="btnDelete",type=0,typeName="Button",time=102162938,x=1007,y=0,width=185,height=103,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/bg_blank.png",
{
name="deleteBg",type=0,typeName="Image",time=102163071,x=0,y=0,width=185,height=103,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0,file=community_pin_map['delete.png']
}
}
}
return communityMessageListItem;
|
--
-- A minimalist SILE class for a "resumé" (CV)
-- 2021, Didier Willis
-- License: MIT
--
-- This is indeed very minimalist :)
--
local plain = SILE.require("plain", "classes")
local omicv = plain { id = "omicv" }
-- Load all the support package we need so that the user
-- can directly work on their content. N.B. Other packages
-- that require class support are also loaded in the
-- class initialization method below.
local styles = SILE.require("packages/styles").exports
SILE.require("packages/rules") -- for section rules
SILE.require("packages/image") -- for the user picture
SILE.require("packages/ptable") -- for tables, all the CV is one
SILE.require("packages/enumitem") -- for bullet lists
SILE.require("packages/textsubsuper") -- for ranks, etc.
SILE.scratch.omicv = {}
-- PAGE MASTERS AND FRAMES
-- 1. We want two page masters:
-- one for the first page, slightly higher as it doesn't need a header
-- one for subsequent pages, which will have a header repeating the user name.
-- 2. The spacing at top and bottom should be close to that on sides, so
-- vertical dimensions are based on the same pw specification.
-- 3. The footer and folio are place side-by-side to gain a bit of space.
--
omicv.defaultFrameset = {
content = {
left = "10%pw",
right = "90%pw",
top = "10%pw",
bottom = "bottom(page)-22%pw"
},
folio = {
left = "right(footer)",
right = "right(content)",
top = "bottom(content)+3%ph",
bottom = "bottom(page)-10%pw"
},
header = { -- We don't need it, but let's define it somewhere harmless
-- just in case.
left = "left(content)",
right = "right(content)",
top = "top(content)-5%ph",
bottom = "top(content)-2%ph"
},
footer = {
left = "left(content)",
right = "right(content)-10%pw",
top = "bottom(content)+3%ph",
bottom = "bottom(page)-10%pw"
},
}
omicv.nextFrameset = {
content = {
left = "10%pw",
right = "90%pw",
top = "bottom(header)",
bottom = "bottom(page)-22%pw"
},
folio = {
left = "right(footer)",
right = "right(content)",
top = "bottom(content)+3%ph",
bottom = "bottom(page)-10%pw"
},
header = {
left = "left(content)",
right = "right(content)",
top = "10%pw",
bottom = "10%pw + 3%ph"
},
footer = {
left = "left(content)",
right = "right(content)-10%pw",
top = "bottom(content)+3%ph",
bottom = "bottom(page) - 10%pw"
},
}
local firstPage = true
function omicv:init ()
self:loadPackage("masters")
self:defineMaster({
id = "first",
firstContentFrame = self.firstContentFrame,
frames = self.defaultFrameset
})
self:defineMaster({
id = "next",
firstContentFrame = self.firstContentFrame,
frames = self.nextFrameset
})
if not SILE.scratch.headers then SILE.scratch.headers = {} end
self:loadPackage("omirefs") -- cross-reference, used to get the n/N page numbering
self:loadPackage("omiheaders") -- header facility
-- override foliostyle
self:loadPackage("folio")
SILE.registerCommand("foliostyle", function (_, content)
SILE.call("hbox", {}, {}) -- for vfill to be effective
SILE.call("vfill")
SILE.call("rightalign", {}, function()
SILE.process(content)
SILE.typesetter:typeset("/")
SILE.call("pageref", { marker = "omicv:end" })
end)
SILE.call("eject") -- for vfill to be effective
end)
-- override default document.parindent, we do not want it.
SILE.settings.set("document.parindent", SILE.nodefactory.glue())
return plain.init(self)
end
omicv.newPage = function (self)
self:newPageInfo()
if SILE.scratch.counters.folio.value > 1 then
self.switchMaster("next")
end
return plain.newPage(self)
end
omicv.finish = function (self)
local ret = plain.finish(self)
self:writeRefs()
return ret
end
omicv.endPage = function (self)
self:moveRefs()
if SILE.scratch.counters.folio.value > 1 then
self:outputHeader(SILE.scratch.headers.content)
end
SILE.typesetNaturally(SILE.getFrame("footer"), function ()
SILE.settings.pushState()
SILE.settings.toplevelState()
SILE.settings.set("document.parindent", SILE.nodefactory.glue())
SILE.settings.set("current.parindent", SILE.nodefactory.glue())
SILE.settings.set("document.lskip", SILE.nodefactory.glue())
SILE.settings.set("document.rskip", SILE.nodefactory.glue())
SILE.call("hbox", {}, {}) -- for vfill to be applied
SILE.call("vfill")
SILE.process(SILE.scratch.omicv.address)
SILE.call("eject") -- for vfill to be effective
SILE.settings.popState()
end)
return plain.endPage(self)
end
SILE.registerCommand("cv-header", function (_, content)
local closure = SILE.settings.wrap()
SILE.scratch.headers.content = function () closure(content) end
end, "Text to appear at the top of the page")
SILE.registerCommand("cv-footer", function (_, content)
local closure = SILE.settings.wrap()
SILE.scratch.omicv.address = function () closure(content) end
end, "Text to appear at the bottom of the page")
-- STYLES
styles.defineStyle("cv:firstname", {}, { font = { style = "light" }, color = { color = "#a6a6a6" } })
styles.defineStyle("cv:lastname", {}, { color = { color = "#737373" } })
styles.defineStyle("cv:fullname", {}, { font = { size = "30pt" }, paragraph = { align = "right" } })
styles.defineStyle("cv:color", {}, { color = { color = "#4080bf" } }) -- a nice tint of blue
styles.defineStyle("cv:dingbats", { inherit = "cv:color" }, { font = { family = "Symbola", size = "-1" } })
styles.defineStyle("cv:jobrole", {}, { font = { weight = 600 } })
styles.defineStyle("cv:headline", {}, { font = { weight = "300", style = "italic", size = "-1" },
color = { color = "#373737" },
paragraph = { align = "center" } })
styles.defineStyle("cv:section", { inherit = "cv:color" }, { font = { size = "+2" } })
styles.defineStyle("cv:topic", {}, { font = { style="light", size = "-1" },
paragraph = { align = "right" } })
styles.defineStyle("cv:description", {}, {})
styles.defineStyle("cv:contact", {}, { font = { style = "thin", size = "-0.5" },
paragraph = { align = "center" } })
styles.defineStyle("cv:jobtitle", {}, { font = { size = "20pt" },
color = { color = "#373737" }, paragraph = { align = "center", skipbefore = "0.5cm" } })
styles.defineStyle("cv:header", {}, { font = { size = "20pt" },
paragraph = { align = "right" } })
-- Redefine the 6 default itemize style to apply our cv:color
for i = 1, 6 do
local itemizeSty = styles.resolveStyle("list:itemize:"..i)
styles.defineStyle("list:itemize:"..i, { inherit = "cv:color" }, itemizeSty)
end
-- Same for the alternate variant
for i = 1, 6 do
local itemizeSty = styles.resolveStyle("list:itemize-alternate:"..i)
styles.defineStyle("list:itemize-alternate:"..i, { inherit = "cv:color" }, itemizeSty)
end
-- RESUME PROCESSING
local extractFromTree = function (tree, command)
for i=1, #tree do
if type(tree[i]) == "table" and tree[i].command == command then
return table.remove(tree, i)
end
end
end
-- Hacky-whacky way to create a ptable tree programmatically
-- loosely inspired by what inputfilter.createCommand() does.
local function C(command, options, content)
local result = content
result.options = options
result.command = command
result.id = "command"
return result
end
local doEntry = function (rows, _, content)
local topic = extractFromTree(content, "topic")
local description = extractFromTree(content, "description")
local titleRow = C("row", { }, {
C("cell", { valign = "top", padding = "4pt 4pt 0 4pt" }, { function ()
SILE.call("style:apply:paragraph", { name = "cv:topic" }, function ()
-- We are typesetting in a different style but want proper alignment
-- With the other style, so strut tweaking:
SILE.call("style:apply", { name = "cv:description" }, function ()
SILE.call("strut")
end)
-- The go ahead.
SILE.process(topic)
end)
end
}),
C("cell", { valign = "top", span = 2, padding = "4pt 4pt 0.33cm 0" }, { function ()
SILE.call("style:apply", { name = "cv:description" }, description)
end
})
})
for i = 0, #content do
if type(content[i]) == "table" and content[i].command == "entry" then
doEntry(rows, content[i].options, content[i])
end
end
table.insert(rows, titleRow)
end
local doSection = function (rows, _, content)
local title = extractFromTree(content, "title")
local titleRow = C("row", { }, {
C("cell", { valign = "bottom", padding = "4pt 4pt 0 4pt" }, { function ()
SILE.call("style:apply", { name = "cv:section" }, function ()
SILE.call("hrule", { width = "100%fw", height= "1ex" })
end)
end
}),
C("cell", { span = 2, padding = "4pt 4pt 0.33cm 0" }, { function ()
SILE.call("style:apply", { name = "cv:section" }, title)
end
})
})
table.insert(rows, titleRow)
for i = 0, #content do
if type(content[i]) == "table" and content[i].command == "entry" then
doEntry(rows, content[i].options, content[i])
end
end
end
SILE.registerCommand("resume", function (options, content)
local firstname = extractFromTree(content, "firstname") or SU.error("firstname is mandatory")
local lastname = extractFromTree(content, "lastname") or SU.error("lastname is mandatory")
local picture = extractFromTree(content, "picture") or SU.error("picture is mandatory")
local contact = extractFromTree(content, "contact") or SU.error("contact is mandatory")
local jobtitle = extractFromTree(content, "jobtitle") or SU.error("jobtitle is mandatory")
local headline = extractFromTree(content, "headline") -- can be omitted
SILE.call("cv-footer", {}, function()
SILE.process({ contact })
end)
SILE.call("cv-header", {}, function ()
SILE.call("style:apply:paragraph", { name = "cv:header" }, function ()
SILE.call("style:apply", { name = "cv:firstname" }, firstname)
SILE.typesetter:typeset(" ")
SILE.call("style:apply", { name = "cv:lastname" }, lastname)
end)
end)
local rows = {}
local fullnameAndPictureRow = C("row", {}, {
C("cell", { border = "0 1pt 0 0", padding = "4pt 4pt 0 4pt", valign = "bottom" }, { function ()
local w = SILE.measurement("100%fw"):absolute() - 7.2 -- padding and border
SILE.call("parbox", { width = w, border = "0.6pt", padding = "3pt" }, function ()
SILE.call("img", { width = "100%fw", src = picture.options.src })
end)
end
}),
C("cell", { span = 2, border = "0 1pt 0 0", padding = "4pt 2pt 4pt 0", valign = "bottom" }, { function ()
SILE.call("style:apply:paragraph", { name = "cv:fullname" }, function ()
SILE.call("style:apply", { name = "cv:firstname" }, firstname)
SILE.typesetter:typeset(" ")
SILE.call("style:apply", { name = "cv:lastname" }, lastname)
end)
end
})
})
table.insert(rows, fullnameAndPictureRow)
local jobtitleRow = C("row", { }, {
C("cell", { span = 3 }, { function ()
SILE.call("style:apply:paragraph", { name = "cv:jobtitle" }, jobtitle)
end
})
})
table.insert(rows, jobtitleRow)
-- NOTE: if headline is absent, no problem. We still insert a row, just for
-- vertical spacing.
local headlineRow = C("row", { }, {
C("cell", { span = 3 }, { function ()
SILE.call("center", {}, function ()
SILE.call("parbox", { width = "80%fw" }, function()
SILE.call("style:apply:paragraph", { name = "cv:headline" }, headline)
end)
end)
end
})
})
table.insert(rows, headlineRow)
for i = 0, #content do
if type(content[i]) == "table" and content[i].command == "section" then
doSection(rows, content[i].options, content[i])
end
-- We should error/warn upon other commands or non-space text content.
end
-- NOTE: All the above was made with 4 columns in mind, I ended up using only
-- three, with appropriate spanning. I had a more complex layout in mind. To refactor or extend...
SILE.call("ptable", { cols = "17%fw 43%fw 40%fw", cellborder = 0, cellpadding = "4pt 4pt 4pt 4pt" },
rows
)
-- An overkill? To get the number of pages, we insert a cross-reference label
-- at the end of the resume table. Might not even be right if the user
-- adds free text after it. Oh well, it will do for now.
SILE.call("label", { marker = "omicv:end" })
SILE.call("hbox", {}, {}) -- For some reason if the label is the last thing on the page,
-- the info node is not there.
end)
local charFromUnicode = function (str)
local hex = (str:match("[Uu]%+(%x+)") or str:match("0[xX](%x+)"))
if hex then
return luautf8.char(tonumber("0x"..hex))
end
return "*"
end
SILE.registerCommand("ranking", function (options, content)
local value = SU.cast("integer", options.value or 0)
local scale = SU.cast("integer", options.scale or 5)
SILE.call("style:apply", { name = "cv:dingbats" }, function ()
for i = 1, value do
SILE.typesetter:typeset(charFromUnicode("U+25CF"))
SILE.call("kern", { width = "0.1em" })
end
for i = value + 1, scale do
SILE.typesetter:typeset(charFromUnicode("U+25CB"))
SILE.call("kern", { width = "0.1em" })
end
end)
end)
SILE.registerCommand("cv-bullet", function (_, _)
SILE.call("kern", { width = "0.75em" })
SILE.call("style:apply", { name = "cv:dingbats" }, { charFromUnicode("U+2022") })
SILE.call("kern", { width = "0.75em" })
end)
SILE.registerCommand("cv-dingbat", function (options, _)
local symb = SU.required(options, "symbol", "cv-dingbat")
SILE.call("style:apply", { name = "cv:dingbats" }, { charFromUnicode(symb) })
end)
SILE.registerCommand("contact", function (_, content)
local street = SILE.findInTree(content, "street") or SU.error("street is mandatory")
local city = SILE.findInTree(content, "city") or SU.error("city is mandatory")
local phone = SILE.findInTree(content, "phone") or SU.error("phone is mandatory")
local email = SILE.findInTree(content, "email") or SU.error("email is mandatory")
SILE.call("style:apply:paragraph", { name = "cv:contact" }, function ()
SILE.call("cv-icon-text", { symbol="U+1F4CD" }, street)
SILE.call("cv-bullet")
SILE.process(city)
SILE.call("par")
SILE.process({ phone })
SILE.call("cv-bullet")
SILE.process({ email })
end)
end)
SILE.registerCommand("cv-icon-text", function (options, content)
SILE.call("cv-dingbat", options)
SILE.call("kern", { width = "1.5spc" })
SILE.process(content)
end)
SILE.registerCommand("email", function (options, content)
local symbol = options.symbol or "U+1F4E7"
SILE.call("cv-icon-text", { symbol = symbol }, content)
end)
SILE.registerCommand("phone", function (options, content)
local symbol = options.symbol or "U+2706"
SILE.call("cv-icon-text", { symbol = symbol }, content)
end)
SILE.registerCommand("jobrole", function (_, content)
SILE.call("style:apply", { name = "cv:jobrole" }, content)
end)
return omicv
|
--nbody particles in love
local lg = love.graphics
lg.setDefaultFilter("nearest", "nearest")
--dimension of the particles textures
local dim = 64
--time passes faster or slower
local timescale = 1.0
--break update step into multiple updates
local steps_per_render = 1
--percentage of particles that exert force per-update
local sampling_percent = 1.0
--visual zoom
local zoom = 1
--cam position
local cx, cy = 0, 0
--format for simulation configurations
local sim_template = {
--which worldgen to use
gen = "dense",
--stronger or weaker forces
force_scale = 1.0,
--distance scale forces act over
force_distance = 10.0,
--the term included in the shader inline; determines the "style" of force
force_term = "vec3 f = dir;",
--scale of masses present
--1 = all particles are same mass
--500 = particles mass between 1 and 500
mass_scale = 1.0,
--the term included in the shader that
--determines the distribution of particle masses
mass_distribution = "u * u",
}
local sim_configs = {
gravity = {
gen = "dense",
force_scale = 1.0,
force_distance = 10.0,
force_term = "vec3 f = dir * (m1 * m2) / max(1.0, r * r);",
mass_scale = 1.0,
mass_distribution = "u * u",
},
strings = {
gen = "sparse",
force_scale = 0.00005,
force_distance = 20.0,
force_term = "vec3 f = dir * m2 * max(1.0, r * r);",
mass_scale = 5.0,
mass_distribution = "u",
},
cloud = {
gen = "dense",
force_scale = 0.01,
force_distance = 10.0,
force_term = "vec3 f = dir * (r * m1 * 0.3 - 5.0);",
mass_scale = 2.0,
mass_distribution = "u",
},
boids = {
gen = "dense",
force_scale = 0.3,
force_distance = 10.0,
force_term = "vec3 f = dir / max(1.0, r);",
mass_scale = 2.0,
mass_distribution = "u",
},
shy = {
gen = "dense",
force_scale = 0.05,
force_distance = 5.0,
force_term = "vec3 f = dir * float(r > 2.0);",
mass_scale = 2.0,
mass_distribution = "u",
},
atoms = {
gen = "dense",
force_scale = 0.5,
force_distance = 15.0,
force_term = "vec3 f = dir * float(r < 2.0);",
mass_scale = 10.0,
mass_distribution = "u",
},
sines = {
gen = "dense",
force_scale = 0.1,
force_distance = 40.0,
force_term = "vec3 f = dir * sin(r);",
mass_scale = 10.0,
mass_distribution = "u",
},
cosines = {
gen = "sparse",
force_scale = 0.05,
force_distance = 25.0,
force_term = "vec3 f = dir * m2 * -cos(r);",
mass_scale = 10.0,
mass_distribution = "u",
},
spiral = {
gen = "sparse",
force_scale = 0.01,
force_distance = 5.0,
force_term = "vec3 f = dir * m2 + vec3(rotate(dir.xy, 0.025 * m1 * 3.14159), dir.z) * 0.5;",
mass_scale = 5.0,
mass_distribution = "u",
},
center_avoid = {
gen = "sparse",
force_scale = 1.0,
force_distance = 1.0,
constant_term = "vec3 acc = -pos; acc = acc / (length(acc) * 0.1);",
force_term = "vec3 f = -(dir * m1 * m2 / (r * r)) * 10.0;",
mass_scale = 1.0,
mass_distribution = "u",
},
nebula = {
gen = "dense",
force_scale = 1.0,
force_distance = 2.0,
force_term = [[
float factor = min(mix(-m2, 1.0, r), 1.0) / max(0.1, r * r) * m1;
vec3 f = dir * factor;
]],
mass_scale = 30.0,
mass_distribution = "u",
},
}
--parameters of worldgen
local gen_configs = {
dense = {
walk_scale = 3,
bigjump_scale = 30,
bigjump_chance = 0.01,
scatter_scale = 0.1,
},
sparse = {
walk_scale = 1,
bigjump_scale = 35,
bigjump_chance = 0.02,
scatter_scale = 3,
},
}
local init_vel_scale = 1.0
--proportion to fade towards black between frames
--basically smaller = longer trails
local basic_fade_amount = 0.1
--amount to downres the render buffer
local downres = 2
--format of the buffer textures
local fmt_t = {format="rgba32f"}
--set up separate buffers
local particles = {
pos = lg.newCanvas(dim, dim, fmt_t),
vel = lg.newCanvas(dim, dim, fmt_t),
acc = lg.newCanvas(dim, dim, fmt_t),
}
--larger points = more chunky look
--smaller = "higher fidelity"
lg.setPointSize(1)
--hide mouse since it's not used
love.mouse.setVisible(false)
local rotate_frag = [[
vec2 rotate(vec2 v, float t) {
float s = sin(t);
float c = cos(t);
return vec2(
c * v.x - s * v.y,
s * v.x + c * v.y
);
}
]]
local sim_types = {}
local selected_sim = nil
--pick random sim type
function pick_sim()
selected_sim = sim_types[love.math.random(1, #sim_types)]
end
for k,v in pairs(sim_configs) do
local accel_shader = lg.newShader([[
uniform Image MainTex;
const float timescale = ]]..timescale..[[;
const float force_scale = ]]..v.force_scale..[[;
const float force_distance = ]]..v.force_distance..[[;
uniform float dt;
uniform float sampling_percent;
uniform float sampling_percent_offset;
const int dim = ]]..dim..[[;
#ifdef PIXEL
const float mass_scale = ]]..v.mass_scale..[[;
float mass(float u) {
return mix(1.0, mass_scale, ]]..v.mass_distribution..[[);
}
]]..rotate_frag..[[
void effect() {
//get our position
vec3 pos = Texel(MainTex, VaryingTexCoord.xy).xyz;
float my_mass = mass(VaryingTexCoord.x);
float sample_accum = sampling_percent_offset;
float current_force_scale = force_scale / sampling_percent;
]]..(v.constant_term or "vec3 acc = vec3(0.0);")..[[
//iterate all particles
for (int y = 0; y < dim; y++) {
for (int x = 0; x < dim; x++) {
sample_accum = sample_accum + sampling_percent;
if (sample_accum >= 1.0) {
sample_accum -= 1.0;
vec2 ouv = (vec2(x, y) + vec2(0.5, 0.5)) / float(dim);
vec3 other_pos = Texel(MainTex, ouv).xyz;
//define mass quantities
float m1 = my_mass;
float m2 = mass(ouv.x);
//get normalised direction and distance
vec3 dir = other_pos - pos;
float r = length(dir) / force_distance;
if (r > 0.0) {
dir = normalize(dir);
]]..(v.force_term or "vec3 f = dir;")..[[
acc += (f / m1) * current_force_scale;
}
}
}
}
love_PixelColor = vec4(acc, 1.0);
}
#endif
]])
table.insert(sim_types, {
name = k,
accel_shader = accel_shader,
gen = v.gen,
})
end
local render_shader = lg.newShader([[
uniform Image MainTex;
uniform Image VelocityTex;
uniform float CamRotation;
const int dim = ]]..dim..[[;
]]..rotate_frag..[[
#ifdef VERTEX
vec4 position(mat4 transform_projection, vec4 vertex_position)
{
vec2 uv = vertex_position.xy;
vec3 pos = Texel(MainTex, uv).xyz;
vec3 vel = Texel(VelocityTex, uv).xyz;
//rotate with camera
pos.xz = rotate(pos.xz, CamRotation);
//perspective
float near = -500.0;
float far = 500.0;
float depth = (pos.z - near) / (far - near);
if (depth < 0.0) {
//clip
return vec4(0.0 / 0.0);
} else {
vertex_position.xy = pos.xy / mix(0.25, 2.0, depth);
}
//derive colour
float it = length(vel) * 0.1;
float clamped_it = clamp(it, 0.0, 1.0);
float i = (uv.x + uv.y * float(dim)) / float(dim);
i += length(pos) * 0.001;
i *= 3.14159 * 2.0;
VaryingColor.rgb = mix(
vec3(
(cos(i + 0.0) + 1.0) / 2.0,
(cos(i + 2.0) + 1.0) / 2.0,
(cos(i + 4.0) + 1.0) / 2.0
) * clamped_it,
vec3(1.0),
sqrt(it) * 0.01
);
VaryingColor.a = (it * 0.1) * (1.0 - depth);
//debug
//VaryingColor = vec4(1.0);
return transform_projection * vertex_position;
}
#endif
#ifdef PIXEL
void effect() {
love_PixelColor = VaryingColor;
}
#endif
]])
--sharpen convolution to add faint outlines to particles
local sharpen_shader = lg.newShader([[
extern vec2 texture_size;
extern float sharpen_amount;
#ifdef PIXEL
float conv[9] = float[9](
-1, -2, -1,
-2, 13, -2,
-1, -2, -1
);
vec4 effect( vec4 color, Image tex, vec2 uv, vec2 screen_coords ) {
vec4 pre = Texel(tex, uv);
vec4 c = vec4(0.0);
int i = 0;
float conv_sum = 0.0;
for (int y = -1; y <= 1; y++) {
for (int x = -1; x <= 1; x++) {
float conv_amount = conv[i++];
conv_sum += conv_amount;
vec2 o = vec2(x, y) / texture_size;
vec4 px = Texel(tex, uv + o);
c.rgb += px.rgb * conv_amount;
if (x == 0 && y == 0) {
c.a = px.a;
}
}
}
c.rgb /= conv_sum;
return mix(pre, c, sharpen_amount);
}
#endif
]])
--generate the mesh used to render the particles
local points = {}
for y = 1, dim do
for x = 1, dim do
table.insert(points, {
--position = uv
(x - 0.5) / dim,
(y -0.5) / dim
})
end
end
local render_mesh = lg.newMesh(points, "points", "static")
--generate the render buffer
local sw, sh = lg.getDimensions()
local rs = 1 / downres
local rw, rh = sw * rs, sh * rs
local render_cv = lg.newCanvas(rw, rh, {format="rgba16f"})
--some debug timing stuff
local update_time = 0
local draw_time = 0
local function update_timer(current_timer, lerp_amount, f)
local time_start = love.timer.getTime()
f()
local time_end = love.timer.getTime()
return current_timer * (1 - lerp_amount) + (time_end - time_start) * lerp_amount
end
--setup initial buffer state
function init_particles()
local gen = gen_configs[selected_sim.gen]
local walk_scale = gen.walk_scale
local bigjump_scale = gen.bigjump_scale
local bigjump_chance = gen.bigjump_chance
local scatter_scale = gen.scatter_scale
local function copy_img_to_canvas(img, canvas)
lg.setCanvas(canvas)
lg.setBlendMode("replace", "premultiplied")
lg.draw(img)
lg.setBlendMode("alpha", "alphamultiply")
lg.setCanvas()
end
--spawn particles with random walk
local pos_img = love.image.newImageData(dim, dim, fmt_t.format)
local _pos = {0, 0, 0}
local _total = {0, 0, 0}
pos_img:mapPixel(function(x, y, r, g, b, a)
--random walk
for i, v in ipairs(_pos) do
_pos[i] = v + love.math.randomNormal(walk_scale, 0)
end
if love.math.random() < bigjump_chance then
for i, v in ipairs(_pos) do
_pos[i] = v + love.math.randomNormal(bigjump_scale, 0)
end
end
r = _pos[1] + love.math.randomNormal(scatter_scale, 0)
g = _pos[2] + love.math.randomNormal(scatter_scale, 0)
b = _pos[3] + love.math.randomNormal(scatter_scale, 0)
a = 1
--note down for later
_total[1] = _total[1] + r
_total[2] = _total[2] + g
_total[3] = _total[3] + b
return r, g, b, a
end)
--apply mean offset
for i,v in ipairs(_total) do
_total[i] = v / (dim * dim)
end
pos_img:mapPixel(function(x, y, r, g, b, a)
r = r - _total[1]
g = g - _total[2]
b = b - _total[3]
return r, g, b, a
end)
copy_img_to_canvas(lg.newImage(pos_img), particles.pos)
--zero out acc, vel
lg.setCanvas(particles.vel)
lg.clear(0,0,0,1)
lg.setCanvas(particles.acc)
lg.clear(0,0,0,1)
--reset canvas
lg.setCanvas()
end
--timing for the visual hints
local hint_time = 5.0
local hint_timer = 0.0
function love.load()
pick_sim()
init_particles()
end
--update
function love.update(dt)
--put an upper cap on dt so we don't get any absurd jumps
dt = math.min(dt, 1 / 60)
--measure the update time we care about
update_time = update_timer(update_time, 0.99, function()
local actual_dt = dt / steps_per_render
local accel_shader = selected_sim.accel_shader
accel_shader:send("sampling_percent", sampling_percent)
for i = 1, steps_per_render do
--render next state
lg.setShader(accel_shader)
accel_shader:send("sampling_percent_offset", love.math.random())
lg.setBlendMode("replace", "premultiplied")
lg.setColor(1,1,1,1)
lg.setCanvas(particles.acc)
lg.draw(particles.pos)
--
lg.setShader()
lg.setBlendMode("add", "alphamultiply")
lg.setColor(1,1,1,actual_dt)
--integrate vel
lg.setCanvas(particles.vel)
lg.draw(particles.acc)
--integrate pos
lg.setCanvas(particles.pos)
lg.draw(particles.vel)
end
lg.setColor(1,1,1,1)
end)
lg.setCanvas()
lg.setBlendMode("alpha", "alphamultiply")
lg.setShader()
--pan
local pan_amount = (50 / zoom) * dt
if love.keyboard.isDown("up") then
cy = cy - pan_amount
end
if love.keyboard.isDown("down") then
cy = cy + pan_amount
end
--rotate
local rotate_amount = math.pi * 0.5 * dt
if love.keyboard.isDown("left") then
cx = cx - rotate_amount
end
if love.keyboard.isDown("right") then
cx = cx + rotate_amount
end
--zoom
if love.keyboard.isDown("i") then
zoom = zoom * 1.01
end
if love.keyboard.isDown("o") then
zoom = zoom / 1.01
end
--update hint timer
hint_timer = hint_timer + dt
end
--render
function love.draw()
--measure the render time we care about
draw_time = update_timer(draw_time, 0.99, function()
--fade render canvas one step
lg.setBlendMode("alpha", "alphamultiply")
lg.setCanvas(render_cv)
local lum = 0.075
lg.setColor(lum, lum, lum, basic_fade_amount)
lg.rectangle("fill", 0, 0, rw, rh)
lg.setColor(1,1,1,1)
--draw current state into render canvas
lg.push()
lg.translate(rw * 0.5, rh * 0.5)
lg.scale(zoom, zoom)
lg.translate(0, -cy)
lg.setShader(render_shader)
if render_shader:hasUniform("CamRotation") then render_shader:send("CamRotation", cx) end
if render_shader:hasUniform("VelocityTex") then render_shader:send("VelocityTex", particles.vel) end
lg.setBlendMode("add", "alphamultiply")
render_mesh:setTexture(particles.pos)
lg.draw(render_mesh)
lg.pop()
--draw render canvas as-is
lg.setCanvas()
lg.setShader(sharpen_shader)
sharpen_shader:send("texture_size", {render_cv:getDimensions()})
sharpen_shader:send("sharpen_amount", 0.025)
lg.setBlendMode("alpha", "premultiplied")
lg.setColor(1,1,1,1)
lg.draw(
render_cv,
0, 0,
0,
downres, downres
)
lg.setShader()
lg.setBlendMode("alpha", "alphamultiply")
end)
--debug
if love.keyboard.isDown("`") then
lg.print(string.format("%s\nfps: %4d\nupdate: %02.2fms\ndraw: %02.2fms", selected_sim.name, love.timer.getFPS(), update_time * 1e3, draw_time * 1e3), 10, 10)
lg.push()
lg.translate(200, 10)
for i,v in ipairs({
particles.pos,
particles.vel,
particles.acc,
}) do
lg.translate(0, v:getHeight())
lg.draw(v)
end
lg.pop()
end
--draw hints if recently pressed or on boot
if hint_timer < hint_time then
lg.setColor(1,1,1, 1.0 - (hint_timer / hint_time))
lg.printf("enbody", 0, 10, sw, "center")
for i,v in ipairs {
{"Q / ESC", "quit"},
{"ARROWS", "pan camera"},
{"I / O", "zoom in/out"},
{"S", "screenshot"},
{"E", "rebuild system"},
{"R", "new rules"},
} do
local y = sh - (16 * i + 10)
lg.printf(v[1], 0, y, sw * 0.5 - 10, "right")
lg.printf(v[2], sw * 0.5 + 10, y, sw * 0.5 - 10, "left")
lg.printf("-", sw * 0.5 - 10, y, 20, "center")
end
lg.setColor(1,1,1,1)
end
end
--respond to input
function love.keypressed(k)
--save a screenshot to png
if k == "s" then
love.graphics.captureScreenshot(function(id)
local f = io.open(string.format("%d.png", os.time()), "w")
if f then
f:write(id:encode("png"):getString())
f:close()
end
end)
--new setup
elseif k == "e" then
init_particles()
--new world
elseif k == "r" then
--restart, soft or hard
if love.keyboard.isDown("lctrl") then
love.event.quit("restart")
else
love.load()
end
--quit
elseif k == "q" or k == "escape" then
--quit out
love.event.quit()
--some other key? re-hint
elseif
--not arrow key
k ~= "up"
and k ~= "down"
and k ~= "left"
and k ~= "right"
--not i/o
and k ~= "i"
and k ~= "o"
then
hint_timer = 0
end
end
|
print("Hello World from Init Config");
print("Value of test: " .. test);
|
local opengl = opengl or {}
opengl.GL_DEPTH_BUFFER_BIT = 0x00000100
opengl.GL_STENCIL_BUFFER_BIT = 0x00000400
opengl.GL_COLOR_BUFFER_BIT = 0x00004000
opengl.GL_FALSE = false --0
opengl.GL_TRUE = true --1
opengl.GL_POINTS = 0x0000
opengl.GL_LINES = 0x0001
opengl.GL_LINE_LOOP = 0x0002
opengl.GL_LINE_STRIP = 0x0003
opengl.GL_TRIANGLES = 0x0004
opengl.GL_TRIANGLE_STRIP = 0x0005
opengl.GL_TRIANGLE_FAN = 0x0006
opengl.GL_ZERO = 0
opengl.GL_ONE = 1
opengl.GL_SRC_COLOR = 0x0300
opengl.GL_ONE_MINUS_SRC_COLOR = 0x0301
opengl.GL_SRC_ALPHA = 0x0302
opengl.GL_ONE_MINUS_SRC_ALPHA = 0x0303
opengl.GL_DST_ALPHA = 0x0304
opengl.GL_ONE_MINUS_DST_ALPHA = 0x0305
opengl.GL_DST_COLOR = 0x0306
opengl.GL_ONE_MINUS_DST_COLOR = 0x0307
opengl.GL_SRC_ALPHA_SATURATE = 0x0308
opengl.GL_FUNC_ADD = 0x8006
opengl.GL_BLEND_EQUATION = 0x8009
opengl.GL_BLEND_EQUATION_RGB = 0x8009
opengl.GL_BLEND_EQUATION_ALPHA = 0x883D
opengl.GL_FUNC_SUBTRACT = 0x800A
opengl.GL_FUNC_REVERSE_SUBTRACT = 0x800B
opengl.GL_BLEND_DST_RGB = 0x80C8
opengl.GL_BLEND_SRC_RGB = 0x80C9
opengl.GL_BLEND_DST_ALPHA = 0x80CA
opengl.GL_BLEND_SRC_ALPHA = 0x80CB
opengl.GL_CONSTANT_COLOR = 0x8001
opengl.GL_ONE_MINUS_CONSTANT_COLOR = 0x8002
opengl.GL_CONSTANT_ALPHA = 0x8003
opengl.GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004
opengl.GL_BLEND_COLOR = 0x8005
opengl.GL_ARRAY_BUFFER = 0x8892
opengl.GL_ELEMENT_ARRAY_BUFFER = 0x8893
opengl.GL_ARRAY_BUFFER_BINDING = 0x8894
opengl.GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895
opengl.GL_STREAM_DRAW = 0x88E0
opengl.GL_STATIC_DRAW = 0x88E4
opengl.GL_DYNAMIC_DRAW = 0x88E8
opengl.GL_BUFFER_SIZE = 0x8764
opengl.GL_BUFFER_USAGE = 0x8765
opengl.GL_CURRENT_VERTEX_ATTRIB = 0x8626
opengl.GL_FRONT = 0x0404
opengl.GL_BACK = 0x0405
opengl.GL_FRONT_AND_BACK = 0x0408
opengl.GL_TEXTURE_2D = 0x0DE1
opengl.GL_CULL_FACE = 0x0B44
opengl.GL_BLEND = 0x0BE2
opengl.GL_DITHER = 0x0BD0
opengl.GL_STENCIL_TEST = 0x0B90
opengl.GL_DEPTH_TEST = 0x0B71
opengl.GL_SCISSOR_TEST = 0x0C11
opengl.GL_POLYGON_OFFSET_FILL = 0x8037
opengl.GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E
opengl.GL_SAMPLE_COVERAGE = 0x80A0
opengl.GL_NO_ERROR = 0
opengl.GL_INVALID_ENUM = 0x0500
opengl.GL_INVALID_VALUE = 0x0501
opengl.GL_INVALID_OPERATION = 0x0502
opengl.GL_OUT_OF_MEMORY = 0x0505
opengl.GL_CW = 0x0900
opengl.GL_CCW = 0x0901
opengl.GL_LINE_WIDTH = 0x0B21
opengl.GL_ALIASED_POINT_SIZE_RANGE = 0x846D
opengl.GL_ALIASED_LINE_WIDTH_RANGE = 0x846E
opengl.GL_CULL_FACE_MODE = 0x0B45
opengl.GL_FRONT_FACE = 0x0B46
opengl.GL_DEPTH_RANGE = 0x0B70
opengl.GL_DEPTH_WRITEMASK = 0x0B72
opengl.GL_DEPTH_CLEAR_VALUE = 0x0B73
opengl.GL_DEPTH_FUNC = 0x0B74
opengl.GL_STENCIL_CLEAR_VALUE = 0x0B91
opengl.GL_STENCIL_FUNC = 0x0B92
opengl.GL_STENCIL_FAIL = 0x0B94
opengl.GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95
opengl.GL_STENCIL_PASS_DEPTH_PASS = 0x0B96
opengl.GL_STENCIL_REF = 0x0B97
opengl.GL_STENCIL_VALUE_MASK = 0x0B93
opengl.GL_STENCIL_WRITEMASK = 0x0B98
opengl.GL_STENCIL_BACK_FUNC = 0x8800
opengl.GL_STENCIL_BACK_FAIL = 0x8801
opengl.GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802
opengl.GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803
opengl.GL_STENCIL_BACK_REF = 0x8CA3
opengl.GL_STENCIL_BACK_VALUE_MASK = 0x8CA4
opengl.GL_STENCIL_BACK_WRITEMASK = 0x8CA5
opengl.GL_VIEWPORT = 0x0BA2
opengl.GL_SCISSOR_BOX = 0x0C10
opengl.GL_COLOR_CLEAR_VALUE = 0x0C22
opengl.GL_COLOR_WRITEMASK = 0x0C23
opengl.GL_UNPACK_ALIGNMENT = 0x0CF5
opengl.GL_PACK_ALIGNMENT = 0x0D05
opengl.GL_MAX_TEXTURE_SIZE = 0x0D33
opengl.GL_MAX_VIEWPORT_DIMS = 0x0D3A
opengl.GL_SUBPIXEL_BITS = 0x0D50
opengl.GL_RED_BITS = 0x0D52
opengl.GL_GREEN_BITS = 0x0D53
opengl.GL_BLUE_BITS = 0x0D54
opengl.GL_ALPHA_BITS = 0x0D55
opengl.GL_DEPTH_BITS = 0x0D56
opengl.GL_STENCIL_BITS = 0x0D57
opengl.GL_POLYGON_OFFSET_UNITS = 0x2A00
opengl.GL_POLYGON_OFFSET_FACTOR = 0x8038
opengl.GL_TEXTURE_BINDING_2D = 0x8069
opengl.GL_SAMPLE_BUFFERS = 0x80A8
opengl.GL_SAMPLES = 0x80A9
opengl.GL_SAMPLE_COVERAGE_VALUE = 0x80AA
opengl.GL_SAMPLE_COVERAGE_INVERT = 0x80AB
opengl.GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2
opengl.GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3
opengl.GL_DONT_CARE = 0x1100
opengl.GL_FASTEST = 0x1101
opengl.GL_NICEST = 0x1102
opengl.GL_GENERATE_MIPMAP_HINT = 0x8192
opengl.GL_BYTE = 0x1400
opengl.GL_UNSIGNED_BYTE = 0x1401
opengl.GL_SHORT = 0x1402
opengl.GL_UNSIGNED_SHORT = 0x1403
opengl.GL_INT = 0x1404
opengl.GL_UNSIGNED_INT = 0x1405
opengl.GL_FLOAT = 0x1406
opengl.GL_FIXED = 0x140C
opengl.GL_DEPTH_COMPONENT = 0x1902
opengl.GL_ALPHA = 0x1906
opengl.GL_RGB = 0x1907
opengl.GL_RGBA = 0x1908
opengl.GL_LUMINANCE = 0x1909
opengl.GL_LUMINANCE_ALPHA = 0x190A
opengl.GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033
opengl.GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034
opengl.GL_UNSIGNED_SHORT_5_6_5 = 0x8363
opengl.GL_FRAGMENT_SHADER = 0x8B30
opengl.GL_VERTEX_SHADER = 0x8B31
opengl.GL_MAX_VERTEX_ATTRIBS = 0x8869
opengl.GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB
opengl.GL_MAX_VARYING_VECTORS = 0x8DFC
opengl.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D
opengl.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C
opengl.GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872
opengl.GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD
opengl.GL_SHADER_TYPE = 0x8B4F
opengl.GL_DELETE_STATUS = 0x8B80
opengl.GL_LINK_STATUS = 0x8B82
opengl.GL_VALIDATE_STATUS = 0x8B83
opengl.GL_ATTACHED_SHADERS = 0x8B85
opengl.GL_ACTIVE_UNIFORMS = 0x8B86
opengl.GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87
opengl.GL_ACTIVE_ATTRIBUTES = 0x8B89
opengl.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A
opengl.GL_SHADING_LANGUAGE_VERSION = 0x8B8C
opengl.GL_CURRENT_PROGRAM = 0x8B8D
opengl.GL_NEVER = 0x0200
opengl.GL_LESS = 0x0201
opengl.GL_EQUAL = 0x0202
opengl.GL_LEQUAL = 0x0203
opengl.GL_GREATER = 0x0204
opengl.GL_NOTEQUAL = 0x0205
opengl.GL_GEQUAL = 0x0206
opengl.GL_ALWAYS = 0x0207
opengl.GL_KEEP = 0x1E00
opengl.GL_REPLACE = 0x1E01
opengl.GL_INCR = 0x1E02
opengl.GL_DECR = 0x1E03
opengl.GL_INVERT = 0x150A
opengl.GL_INCR_WRAP = 0x8507
opengl.GL_DECR_WRAP = 0x8508
opengl.GL_VENDOR = 0x1F00
opengl.GL_RENDERER = 0x1F01
opengl.GL_VERSION = 0x1F02
opengl.GL_EXTENSIONS = 0x1F03
opengl.GL_NEAREST = 0x2600
opengl.GL_LINEAR = 0x2601
opengl.GL_NEAREST_MIPMAP_NEAREST = 0x2700
opengl.GL_LINEAR_MIPMAP_NEAREST = 0x2701
opengl.GL_NEAREST_MIPMAP_LINEAR = 0x2702
opengl.GL_LINEAR_MIPMAP_LINEAR = 0x2703
opengl.GL_TEXTURE_MAG_FILTER = 0x2800
opengl.GL_TEXTURE_MIN_FILTER = 0x2801
opengl.GL_TEXTURE_WRAP_S = 0x2802
opengl.GL_TEXTURE_WRAP_T = 0x2803
opengl.GL_TEXTURE = 0x1702
opengl.GL_TEXTURE_CUBE_MAP = 0x8513
opengl.GL_TEXTURE_BINDING_CUBE_MAP = 0x8514
opengl.GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515
opengl.GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
opengl.GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517
opengl.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518
opengl.GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519
opengl.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A
opengl.GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C
opengl.GL_TEXTURE0 = 0x84C0
opengl.GL_TEXTURE1 = 0x84C1
opengl.GL_TEXTURE2 = 0x84C2
opengl.GL_TEXTURE3 = 0x84C3
opengl.GL_TEXTURE4 = 0x84C4
opengl.GL_TEXTURE5 = 0x84C5
opengl.GL_TEXTURE6 = 0x84C6
opengl.GL_TEXTURE7 = 0x84C7
opengl.GL_TEXTURE8 = 0x84C8
opengl.GL_TEXTURE9 = 0x84C9
opengl.GL_TEXTURE10 = 0x84CA
opengl.GL_TEXTURE11 = 0x84CB
opengl.GL_TEXTURE12 = 0x84CC
opengl.GL_TEXTURE13 = 0x84CD
opengl.GL_TEXTURE14 = 0x84CE
opengl.GL_TEXTURE15 = 0x84CF
opengl.GL_TEXTURE16 = 0x84D0
opengl.GL_TEXTURE17 = 0x84D1
opengl.GL_TEXTURE18 = 0x84D2
opengl.GL_TEXTURE19 = 0x84D3
opengl.GL_TEXTURE20 = 0x84D4
opengl.GL_TEXTURE21 = 0x84D5
opengl.GL_TEXTURE22 = 0x84D6
opengl.GL_TEXTURE23 = 0x84D7
opengl.GL_TEXTURE24 = 0x84D8
opengl.GL_TEXTURE25 = 0x84D9
opengl.GL_TEXTURE26 = 0x84DA
opengl.GL_TEXTURE27 = 0x84DB
opengl.GL_TEXTURE28 = 0x84DC
opengl.GL_TEXTURE29 = 0x84DD
opengl.GL_TEXTURE30 = 0x84DE
opengl.GL_TEXTURE31 = 0x84DF
opengl.GL_ACTIVE_TEXTURE = 0x84E0
opengl.GL_REPEAT = 0x2901
opengl.GL_CLAMP_TO_EDGE = 0x812F
opengl.GL_MIRRORED_REPEAT = 0x8370
opengl.GL_FLOAT_VEC2 = 0x8B50
opengl.GL_FLOAT_VEC3 = 0x8B51
opengl.GL_FLOAT_VEC4 = 0x8B52
opengl.GL_INT_VEC2 = 0x8B53
opengl.GL_INT_VEC3 = 0x8B54
opengl.GL_INT_VEC4 = 0x8B55
opengl.GL_BOOL = 0x8B56
opengl.GL_BOOL_VEC2 = 0x8B57
opengl.GL_BOOL_VEC3 = 0x8B58
opengl.GL_BOOL_VEC4 = 0x8B59
opengl.GL_FLOAT_MAT2 = 0x8B5A
opengl.GL_FLOAT_MAT3 = 0x8B5B
opengl.GL_FLOAT_MAT4 = 0x8B5C
opengl.GL_SAMPLER_2D = 0x8B5E
opengl.GL_SAMPLER_CUBE = 0x8B60
opengl.GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622
opengl.GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623
opengl.GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624
opengl.GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625
opengl.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A
opengl.GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645
opengl.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F
opengl.GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A
opengl.GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B
opengl.GL_COMPILE_STATUS = 0x8B81
opengl.GL_INFO_LOG_LENGTH = 0x8B84
opengl.GL_SHADER_SOURCE_LENGTH = 0x8B88
opengl.GL_SHADER_COMPILER = 0x8DFA
opengl.GL_SHADER_BINARY_FORMATS = 0x8DF8
opengl.GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9
opengl.GL_LOW_FLOAT = 0x8DF0
opengl.GL_MEDIUM_FLOAT = 0x8DF1
opengl.GL_HIGH_FLOAT = 0x8DF2
opengl.GL_LOW_INT = 0x8DF3
opengl.GL_MEDIUM_INT = 0x8DF4
opengl.GL_HIGH_INT = 0x8DF5
opengl.GL_FRAMEBUFFER = 0x8D40
opengl.GL_RENDERBUFFER = 0x8D41
opengl.GL_RGBA4 = 0x8056
opengl.GL_RGB5_A1 = 0x8057
opengl.GL_RGB565 = 0x8D62
opengl.GL_DEPTH_COMPONENT16 = 0x81A5
opengl.GL_STENCIL_INDEX8 = 0x8D48
opengl.GL_RENDERBUFFER_WIDTH = 0x8D42
opengl.GL_RENDERBUFFER_HEIGHT = 0x8D43
opengl.GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44
opengl.GL_RENDERBUFFER_RED_SIZE = 0x8D50
opengl.GL_RENDERBUFFER_GREEN_SIZE = 0x8D51
opengl.GL_RENDERBUFFER_BLUE_SIZE = 0x8D52
opengl.GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53
opengl.GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54
opengl.GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55
opengl.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0
opengl.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1
opengl.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2
opengl.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3
opengl.GL_COLOR_ATTACHMENT0 = 0x8CE0
opengl.GL_DEPTH_ATTACHMENT = 0x8D00
opengl.GL_STENCIL_ATTACHMENT = 0x8D20
opengl.GL_NONE = 0
opengl.GL_FRAMEBUFFER_COMPLETE = 0x8CD5
opengl.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6
opengl.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7
opengl.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9
opengl.GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD
opengl.GL_FRAMEBUFFER_BINDING = 0x8CA6
opengl.GL_RENDERBUFFER_BINDING = 0x8CA7
opengl.GL_MAX_RENDERBUFFER_SIZE = 0x84E8
opengl.GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506
return opengl
|
local memory = ARGV
|
-- --------------------
-- TellMeWhen
-- Originally by Nephthys of Hyjal <lieandswell@yahoo.com>
-- Other contributions by:
-- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol,
-- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune
-- Currently maintained by
-- Cybeloras of Aerie Peak/Detheroc/Mal'Ganis
-- --------------------
if not TMW then return end
local TMW = TMW
local L = TMW.L
local print = TMW.print
local UnitName, UnitClass, IsInRaid, GetNumGroupMembers, GetNumSubgroupMembers =
UnitName, UnitClass, IsInRaid, GetNumGroupMembers, GetNumSubgroupMembers
local GetNumRaidMembers, GetNumPartyMembers =
GetNumRaidMembers, GetNumPartyMembers
local strsub, select, pairs, strfind, wipe, strlower =
strsub, select, pairs, strfind, wipe, strlower
local SUG = TMW.SUG
local Module = SUG:NewModule("units", SUG:GetModule("default"))
Module.noMin = true
Module.noTexture = true
Module.table = TMW.UNITS.Units
Module.showColorHelp = false
Module.helpText = L["SUG_TOOLTIPTITLE_GENERIC"]
function Module:Table_Get()
return self.table
end
function Module:Entry_AddToList_1(f, index)
local isSpecial = strsub(index, 1, 1) == "%"
local prefix = isSpecial and strsub(index, 1, 2)
if not isSpecial then
local unitData = self.table[index]
if unitData then
local unit = unitData.value
f.tooltiptitle = unitData.tooltipTitle or unitData.text
if unitData.range then
unit = unit .. " 1-" .. unitData.range
end
f.tooltiptext = unitData.desc
f.Name:SetText(unit)
f.insert = unit
f.overrideInsertName = L["SUG_INSERTTUNITID"]
else
f.Name:SetText("<ERROR>")
f.insert = ""
end
else
if prefix == "%P" then
local name = strsub(index, 3)
local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[select(2, UnitClass(name))]
if not color then
color = ""
else
-- GLOBALS: CUSTOM_CLASS_COLORS, RAID_CLASS_COLORS
if color.colorStr then
color = "|c" .. color.colorStr
else
color = "|c" .. TMW:RGBATableToStringWithoutFlags(color)
end
end
f.Name:SetText(color .. name)
f.insert = name
elseif prefix == "%A" then
local name = SUG.lastName_unmodified
--name = name:gsub("^(%a)", strupper)
f.Name:SetText(name)
f.insert = name
end
end
if not f.tooltiptitle then
f.tooltiptitle = f.insert
end
end
function Module:Table_GetNormalSuggestions(suggestions, tbl, ...)
local atBeginning = SUG.atBeginning
for index, unitData in pairs(tbl) do
if strfind(unitData.value, atBeginning) then
suggestions[#suggestions + 1] = index
end
end
end
function Module:Table_GetSpecialSuggestions_1(suggestions, tbl, ...)
local atBeginning = SUG.atBeginning
self:UpdateGroupedPlayersMap()
for name in pairs(self.groupedPlayers) do
if SUG.inputType == "number" or strfind(strlower(name), atBeginning) then
suggestions[#suggestions + 1] = "%P" .. name
end
end
if #SUG.lastName > 0 then
suggestions[#suggestions + 1] = "%A"
end
TMW.tRemoveDuplicates(suggestions)
end
function Module.Sorter_Units(a, b)
--sort by name
local special_a, special_b = strsub(a, 1, 1), strsub(b, 1, 1)
local prefix_a, prefix_b = strsub(a, 1, 2), strsub(b, 1, 2)
local lastName = SUG.lastName
local t_a, t_b = Module.table[a], Module.table[b]
local haveA, haveB = t_a and strfind(t_a.value, lastName), t_b and strfind(t_b.value, lastName)
if (haveA and not haveB) or (haveB and not haveA) then
return haveA
end
local haveA, haveB = special_a ~= "%", special_b ~= "%"
if (haveA ~= haveB) then
return haveA
end
local haveA, haveB = prefix_a == "%P", prefix_b == "%P"
if (haveA ~= haveB) then
return haveA
end
local haveA, haveB = prefix_a == "%A", prefix_b == "%A"
if (haveA ~= haveB) then
return haveA
end
--sort by index/alphabetical/whatever
return a < b
end
function Module:Table_GetSorter()
return self.Sorter_Units
end
Module.groupedPlayers = {}
function Module:UpdateGroupedPlayersMap()
local groupedPlayers = self.groupedPlayers
wipe(groupedPlayers)
local numRaidMembers = IsInRaid() and GetNumGroupMembers() or 0
local numPartyMembers = GetNumSubgroupMembers()
groupedPlayers[UnitName("player")] = true
if UnitName("pet") then
groupedPlayers[UnitName("pet")] = true
end
-- Raid Players
for i = 1, numRaidMembers do
local name = UnitName("raid" .. i)
groupedPlayers[name] = true
end
-- Party Players
for i = 1, numPartyMembers do
local name = UnitName("party" .. i)
groupedPlayers[name] = true
end
end
local Module = SUG:NewModule("unitconditionunits", SUG:GetModule("units"))
Module.table = {
{ value = "unit", text = L["UNITCONDITIONS_STATICUNIT"], desc = L["UNITCONDITIONS_STATICUNIT_DESC"] },
{ value = "unittarget", text = L["UNITCONDITIONS_STATICUNIT_TARGET"], desc = L["UNITCONDITIONS_STATICUNIT_TARGET_DESC"] },
}
-- No sorting. Override the inherited function.
Module.Table_GetSorter = TMW.NULLFUNC
-- No specials. Override the inherited function.
Module.Table_GetSpecialSuggestions_1 = TMW.NULLFUNC
|
local Network = {}
function Network:make(inp, out)
local network = {
input = {},
hiddens = {},
output = {},
}
function network:randomize()
local Layer = require "intelligence/layer"
self.input = Layer:make(inp)
for n = 1, 3 do
self.hiddens[#self.hiddens + 1] = Layer:make(2)
if n == 1 then
self.hiddens[n]:randomize(self.input)
else
self.hiddens[n]:randomize(self.hiddens[n - 1])
end
end
self.output = Layer:make(out)
self.output:randomize(self.hiddens[#self.hiddens])
end
function network:pass(inputs)
if #inputs~=inp then
error("nil inputs or incorect amount stated.")
end
self.input:set(inputs)
for n = 1, #self.hiddens do
if n == 1 then
self.hiddens[n]:calculate(self.input)
else
self.hiddens[n]:calculate(self.hiddens[n - 1])
end
end
self.output:calculate(self.hiddens[#self.hiddens])
return self.output.x
end
function network:copy(other)
self = table.copy_recursive(other)
end
function network:mutate(min, max)
self.input:mutate(min, max)
for n = 1, #self.hiddens do
self.hiddens[n]:mutate(min, max)
end
end
return network
end
return Network
|
local NodeEntityState = require "njli.statemachine.nodeentitystate"
local Yap = {}
Yap.__index = Yap
local json = require('json')
setmetatable(Yap, {
__index = NodeEntityState,
__call = function (cls, ...)
local self = setmetatable({}, cls)
self:create(...)
return self
end,
})
function Yap:className()
return "Yap"
end
function Yap:class()
return self
end
function Yap:superClass()
return NodeEntityState
end
function Yap:isa(theClass)
local b_isa = false
local cur_class = theClass:class()
while ( nil ~= cur_class ) and ( false == b_isa ) do
if cur_class == theClass then
b_isa = true
else
cur_class = cur_class:superClass()
end
end
return b_isa
end
function Yap:destroy()
Yap.__gc(self)
NodeEntityState.destroy(self)
end
local init =
{
name = "name",
entityOwner = nil
}
function Yap:create(init)
NodeEntityState.create(self, init)
end
function Yap:__gc()
end
function Yap:__tostring()
return json:stringify(self)
end
function Yap:getNodeState()
return NodeEntityState.getNodeState(self)
end
function Yap:getEntityOwner()
return NodeEntityState.getEntityOwner(self)
end
function NodeEntity:isLoaded()
return NodeEntityState.isLoaded(self)
end
function Yap:load()
NodeEntityState.load(self)
end
function Yap:unLoad()
NodeEntityState.unLoad(self)
end
function Yap:push()
NodeEntityState.push(self)
end
function Yap:isIn()
return NodeEntityState.isIn(self)
end
function Yap:enter()
print("LoadingGameplaySceneEntityState:enter()")
end
function Yap:update(timeStep)
print("LoadingGameplaySceneEntityState:update()")
end
function Yap:exit()
print("LoadingGameplaySceneEntityState:exit()")
end
function Yap:onMessage(message)
print("LoadingGameplaySceneEntityState:onMessage()")
end
function Yap:touchDown(touches)
print("LoadingGameplaySceneEntityState:touchDown()")
end
function Yap:touchUp(touches)
print("LoadingGameplaySceneEntityState:touchUp()")
end
function Yap:touchMove(touches)
print("LoadingGameplaySceneEntityState:touchMove()")
end
function Yap:touchCancelled(touches)
print("LoadingGameplaySceneEntityState:touchCancelled()")
end
function Yap:render()
print("LoadingGameplaySceneEntityState:render()")
end
function Yap:actionUpdate(action, timeStep)
print("LoadingGameplaySceneEntityState:actionUpdate()")
end
function Yap:actionComplete(action)
print("LoadingGameplaySceneEntityState:actionComplete()")
end
function Yap:collide(otherNode, collisionPoint)
print("LoadingGameplaySceneEntityState:collide()")
end
function Yap:near(otherNode)
print("LoadingGameplaySceneEntityState:near()")
end
function Yap:rayTouchDown(rayContact)
print("LoadingGameplaySceneEntityState:rayTouchDown()")
end
function Yap:rayTouchUp(rayContact)
print("LoadingGameplaySceneEntityState:rayTouchUp()")
end
function Yap:rayTouchMove(rayContact)
print("LoadingGameplaySceneEntityState:rayTouchMove()")
end
function Yap:rayTouchCancelled(rayContact)
print("LoadingGameplaySceneEntityState:rayTouchCancelled()")
end
function Yap:pause()
print("LoadingGameplaySceneEntityState:pause()")
end
function Yap:unPause()
print("LoadingGameplaySceneEntityState:unPause()")
end
return Yap
|
#!/usr/bin/env lua
-- vim: ts=2 sw=2 sts=2 et :
local b4={}; for k,_ in pairs(_ENV) do b4[k]=k end
local Lib=require("lib")
local Keys=require("keys0")
----------------------------------------------------
--- Unit tests
local Eg={}
--- Run examples
Eg.all = {
"Run all (or some) examples.",
function(my)
local function one(k,v)
local pre="\n---------------------------"
Lib.misc.color("green",pre .."\n-- "..k..pre); v[2](my) end
if my.x=="all" then
for k,v in pairs(Eg) do
if k~="all" then one(k,v) end end
else
for k,v in pairs(Eg) do
if my.x==k or my.x=="" then one(k,v) end end end end }
Eg.dump = {
"show current options",
function (my)
print(Lib.tab.dump(my)) end}
Eg.sample = {
"compute frequency counts for discrete data files",
function(my)
local t= Lib.file.count(Lib.file.csv("../data/vote.csv") )
Lib.tab.rump(t)
end}
Eg.hi = {
"print usage",
function (my)
print("rast v1.0. usage: ./rast.lua -h") end}
Eg.csv = {
"show rows in a file",
function (my)
local n=0
for x in Lib.file.csv("../data/auto93.csv") do
n = n + 1
if n>20 then return end
Lib.tab.pump(x) end end }
Eg.poly = {
"demonstrate polymorphism",
function(my)
local dog,point,p1,p2
dog={}
function dog:new()
return Lib.obj.new(self,"DOG",{coat='black',age=0}) end
function dog:bark() print(self.age) end
point={}
function point:new(o)
return Lib.obj.new(self,"POINT",o) end
function point:bark() print(self.y) end
p1 = point:new{x=10,y=100}
p2 = point:new{x=20, y=dog:new()}
point:new{x=20,y=-10}:bark()
dog:new():bark()
print(p2) end}
----------------------------------------------------
Eg.all[2]( Lib.sys.cli( Keys.my, arg, Keys.usage, Eg ))
for k,_ in pairs(_ENV) do if not b4[k] then print("?? "..k) end end
|
local skyla = require "skyla"
local stack = require "skyla.base.stack"
local lfs = require "lfs"
local record = require "record"
local scene_graph_editor = require "scene_graph_editor"
local property_editor = require "property_editor"
local node_editor = require("node_editor")
local stack = require "skyla.base.stack"
local editor = {
root_dir_name = "",
file_tree = {}
}
local function on_toolbar_node()
print("on_toolbar_node")
end
local function on_toolbar_sprite()
print("on_toolbar_sprite")
end
local function on_toolbar_scale9sprite()
print("on_toolbar_scale9sprite")
end
local function on_toolbar_layercolor()
print("on_toolbar_layercolor")
end
local function on_toolbar_label_ttf()
print("on_toolbar_label_ttf")
end
local function on_toolbar_bmfont()
print("on_toolbar_bmfont")
end
local function on_toolbar_menu()
print("on_toolbar_menu")
end
local function on_toolbar_menu_item()
print("on_toolbar_menu_item")
end
local function on_toolbar_paritcle()
print("on_toolbar_paritcle")
end
local function on_toolbar_clipping_node()
print("on_toolbar_clipping_node")
end
local avaliable_widgets_on_toolbar = {
{name = "Node", func = on_toolbar_node},
{name = "Sprite", func = on_toolbar_sprite},
{name = "Scale9Sprite", func = on_toolbar_scale9sprite},
{name = "LayerColor", func = on_toolbar_layercolor},
{name = "LabelTTF", func = on_toolbar_label_ttf},
{name = "LabelBMFont", func = on_toolbar_bmfont},
{name = "Menu", func = on_toolbar_menu},
{name = "MenuItem", func = on_toolbar_menu_item},
{name = "Particle", func = on_toolbar_paritcle},
{name = "ClippingNode", func = on_toolbar_clipping_node},
}
-- we must have these limitations when we have a LARGE folder.
local max_visit_depth = 128
local total_tree_items = 512
local visit_depth = 0
local tree_items = 0
local recursive_visit_path -- forward declartion for recursive function :)
recursive_visit_path = function(path, t)
-- print("path = ", path)
if visit_depth >= max_visit_depth or tree_items >= total_tree_items then
return t
end
visit_depth = visit_depth + 1
lfs.chdir(path)
local pwd = lfs.currentdir()
-- print("pwd = ", pwd)
for file in lfs.dir(pwd) do
if (string.byte(file) ~= string.byte(".")) then
local f = path .. "/" .. file
local attr = lfs.attributes(f)
if attr and attr.mode == "directory" then
t[file] = {}
recursive_visit_path(f, t[file])
else
t[file] = "file"
end
tree_items = tree_items + 1
end
end
return t
end
local function reload_file_tree(root_path)
local saved_dir = lfs.currentdir()
visit_depth = 0
tree_items = 0
editor.file_tree = recursive_visit_path(root_path, {})
-- TODO: pattern matching?
local s = root_path
local i = #s
-- /abc/ddd/ee -> get the ee
while i >= 1 do
if string.byte(s, i) == string.byte('/') then
break
end
i = i - 1
end
editor.root_dir_name = string.sub(s, i+1, #s)
lfs.chdir(saved_dir)
end
local undo_funcs = {
["move_node"] = function(cmd)
local x, y = cmd.start_pos.x, cmd.start_pos.y
printf("undo, x, y = %.2f, %.2f", x, y)
cmd.node:set_pos(x, y)
end,
}
local function undo(cmd)
local f = undo_funcs[cmd.type]
if f then
f(cmd)
else
printf("no undo cmd found for cmd.type = %s", cmd.type)
end
end
local cmd_stack
function editor.init()
cmd_stack = stack.new()
skyla.dispatcher:on("move_node", function(_, cmd)
cmd_stack:push(cmd)
end)
skyla.dispatcher:on("super_z", function()
if not cmd_stack:empty() then
local cmd = cmd_stack:top()
undo(cmd)
cmd_stack:pop()
end
end)
local settings = record.load_settings()
print("the settings")
print_r(settings)
reload_file_tree(settings.work_dir)
node_editor.init()
property_editor.init()
end
local checked = false
local function on_open_file_menu()
if (imgui.MenuItem("New")) then
end
if (imgui.MenuItem("Open", "Ctrl+O")) then
print("ctrl + o");
end
if (imgui.BeginMenu("Open Recent")) then
imgui.MenuItem("fish_hat.c");
imgui.MenuItem("fish_hat.inl");
imgui.MenuItem("fish_hat.h");
if (imgui.BeginMenu("More..")) then
imgui.MenuItem("Hello");
imgui.MenuItem("Sailor");
if (imgui.BeginMenu("Recurse..")) then
imgui.EndMenu();
end
imgui.EndMenu();
end
imgui.EndMenu();
end
if (imgui.MenuItem("Save", "Ctrl+S")) then
end
if (imgui.MenuItem("Save As..")) then end
imgui.Separator();
if (imgui.BeginMenu("Disabled", false)) then
IM_ASSERT(0);
end
local t
t, checked = imgui.MenuItem("Checked", nil, checked)
if t then
print("checked = ", checked)
end
if (imgui.MenuItem("Quit", "Alt+F4")) then end
end
local function pressed(key)
local keys = imgui.KeysPressed()
local t = string.byte(key)
for i = 1, #keys do
if keys[i] == t then
return true
end
end
return false
end
local function response_to_shortcut()
local super = imgui.KeySuper()
local ctrl = imgui.KeyCtrl()
if super and pressed("Z") then
skyla.dispatcher:emit({name = "super_z"})
end
if super and pressed("S") then
print("super s pressed")
skyla.dispatcher:emit({name = "super_s"})
end
end
local function draw_menu()
if (imgui.BeginMainMenuBar()) then
if (imgui.BeginMenu("File")) then
on_open_file_menu()
imgui.EndMenu();
end
if (imgui.BeginMenu("Edit")) then
if (imgui.MenuItem("Undo", "CTRL+Z")) then
end
if (imgui.MenuItem("Redo", "CTRL+Y", false, false)) then
end
imgui.Separator()
if (imgui.MenuItem("Cut", "CTRL+X")) then
end
if (imgui.MenuItem("Copy", "CTRL+C")) then
end
if (imgui.MenuItem("Paste", "CTRL+V")) then
end
imgui.EndMenu()
end
imgui.EndMainMenuBar()
end
end
local function draw_code_connection_tab()
end
local function draw_tool_bar()
imgui.Begin("ToolBar", imgui.ImGuiWindowFlags_AlwaysUseWindowPadding)
imgui.Columns(1)
for _, w in ipairs(avaliable_widgets_on_toolbar) do
if imgui.Button(w.name) then
w.func()
end
end
imgui.End()
end
local function editable(file_name)
return string.match(file_name, ".json$") or string.match(file_name, ".png$")
end
local function proc_scene(full_relative_path)
print("call proc_scene, full_relative_path = ", full_relative_path)
local full_path = string.format("%s/%s", record.settings.work_dir, full_relative_path)
scene_graph_editor.init(full_path)
end
local function proc_png(full_relative_path)
print("call proc_png, full_relative_path = ", full_relative_path)
end
local file_proc_funcs = {
["json"] = proc_scene,
["png"] = proc_png,
}
local relative_path_from_file_tree
function relative_path_from_file_tree(file_tree, file_name, visit_path)
for k, v in pairs(file_tree) do
if type(v) == "table" then
visit_path[#visit_path + 1] = k
relative_path_from_file_tree(v, file_name, visit_path)
else
if v == file_name then
return table.concat(visit_path, "/")
end
end
end
end
local function on_click_file(file_tree, file_name, visit_stack)
local relative_path = visit_stack:concat("/", 2)
local full_relative_path = string.format("%s/%s", relative_path, file_name)
local suffix = string.sub(file_name, string.find(file_name, "%.")+1, #file_name)
local f = file_proc_funcs[suffix]
if f then
f(full_relative_path)
else
error(string.format("unsupported file type, file_name = %s", file_name))
end
end
local draw_file_tree
draw_file_tree = function(name, file_tree, visit_stack)
visit_stack:push(name)
if imgui.TreeNode(name) then
for k, v in pairs(file_tree) do
if type(v) == "table" then
draw_file_tree(k, v, visit_stack)
else
if editable(k) then
if imgui.Button(k) then
on_click_file(file_tree, k, visit_stack)
end
else
imgui.Text(k)
end
end
end
imgui.TreePop()
end
visit_stack:pop()
end
local function draw_file_system()
imgui.Begin("Works")
local work_dir = record.settings.work_dir
if imgui.Button("Open") then
local editor_core = require "editor.core"
local dir = editor_core.pick_folder(work_dir)
record.settings.work_dir = dir
record.save()
reload_file_tree(dir)
end
imgui.SameLine()
imgui.InputText("path", record.settings.work_dir)
imgui.Separator()
-- draw the file tree and caculate the relative path while visiting
local s = stack.new()
draw_file_tree(editor.root_dir_name, editor.file_tree, s)
imgui.End()
end
local function draw_scene_graph()
scene_graph_editor.render()
property_editor.render()
end
local function draw_cmd_stack()
if cmd_stack:length() > 0 then
imgui.Begin("cmd-stack", imgui.ImGuiWindowFlags_AlwaysUseWindowPadding)
cmd_stack:visit(function(cmd)
imgui.Text(cmd.type)
end)
imgui.End()
end
end
function editor.update(dt)
response_to_shortcut()
draw_menu()
draw_tool_bar()
draw_file_system()
draw_scene_graph()
draw_cmd_stack()
end
function editor.destory()
print("editor destroy")
end
return editor
|
-- 天气菜单
local Api = require("coreApi")
local http = require("http")
function menu()
local items = {
'nmc/天气 + 城市(简短,准确)',
'近10天全国最高气温实况图 => 最高气温实况',
'近10天全国最低气温实况图 => 最低气温实况',
'24小时最高气温预报 => 最高气温预报',
'24小时降水量预报 => 降水量预报',
'1小时降水量实况 => 降水量',
'全国逐时风 => 逐时风',
'全国雷达拼图 => 雷达',
'能见度 => 能见度',
'FY4A真彩色 => 真彩色',
'FY4A红外 => 4A红外',
'FY4A可见光 => 4A可见光',
'FY2G可见光 => 2G可见光',
'FY4A水汽 => 4A水汽',
'FY2G水汽增强图 => 2G水汽增强图',
'FY2G红外一增强图 => 2G红外一增强图',
'FY2G红外二增强图 => 2G红外二增强图',
'FY2G圆盘图 彩色圆盘图 => 彩色圆盘图',
'海区红外云图 => 海区红外云图',
'台风报文 => 台风报文',
'台风路径预报 => 台风路径预报',
'森林火险气象预报 => 森林火险气象预报',
'草原火险气象预报 => 草原火险气象预报',
'公路气象预报 => 公路气象预报',
'山洪灾害气象预警 => 山洪灾害气象预警',
'渍涝风险气象预警 => 渍涝风险气象预警',
'GRAPES_TYM台风路径 => GT台风路径'
}
local msg = ''
for _,val in pairs(items) do
msg = msg..val..'\n'
end
return '天气菜单:\n'..msg
end
function ReceiveGroupMsg(CurrentQQ, data)
if data.FromUserId == tonumber(CurrentQQ) then
return 1
end
if data.Content == '天气菜单' or data.Content == 'wmenu' then
Api.Api_SendMsg(
CurrentQQ,
{
toUser = data.FromGroupId,
sendToType = 2,
sendMsgType = "TextMsg",
groupid = 0,
content = menu(),
atUser = 0
}
)
return 2
end
return 1
end
function ReceiveFriendMsg(CurrentQQ, data) return 1 end
function ReceiveEvents(CurrentQQ, data, extData) return 1 end
|
local vim = vim
local lsp_semantic = require'lsp-semantic'
local dirpath = debug.getinfo(1, 'S').source:match("@(.*[/\\])")
local configs = {}
return setmetatable({}, {
__index = function (tbl, key)
-- dofile is used here as a performance hack to increase the speed of calls to setup({})
-- dofile does not cache module lookups, and requires the absolute path to the target file
local ok, val = pcall(dofile, string.format('%sservers/%s.lua', dirpath, key))
if ok then
rawset(tbl, key, val)
end
return val
end
})
|
------------------------------
-- function
------------------------------
function normalize_row(data)
for i = 1,data:size(1) do
datai = data[{i}]
rm_na = datai[torch.eq(datai,datai)]
rm_na:pow(2)
v = torch.sum(rm_na)
data[{i}]:div(math.sqrt(v))
end
return data
end
|
--[[
StaticPopupDialogs used in various areas
]]
StaticPopupDialogs["ED_CANT_DISENCHANT_BLACKLIST"] = {
text = "You cannot disenchant items on the blacklist.|n|nYou are currently viewing or editing a blacklist filter.",
button1 = "Okay",
timeout = 30,
whileDead = false,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["ED_CONFIRM_NEW_CHARACTER_FAVORITE"] = {
text = "You already have a favorite filter. Do you want to make this your new favorite filter?",
button1 = "Yes",
button2 = "No",
OnAccept = function(self) EasyDestroy.CharacterData.FavoriteID = UIDropDownMenu_GetSelectedValue(EasyDestroyDropDown) end,
OnCancel = function(self) EasyDestroyFilterSettings.Favorite:SetChecked(false) end,
timeout = 30,
whileDead = false,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["ED_BLACKLIST_NO_FAVORITE"] = {
text = "You cannot set a blacklist as a favorite. If you continue, this filter will be no longer be favorited. |n|n|cFFFF0000This applies to all characters that have this filter as a favorite.",
button1 = "Okay",
button2 = "Cancel",
OnAccept = function(self)
EasyDestroyFilterSettings.Favorite:SetChecked(false)
EasyDestroyFilterSettings.Favorite:Disable()
EasyDestroy.Favorites.UnsetFavorite()
end,
OnCancel = function(self)
EasyDestroyFilterSettings.Blacklist:SetChecked(false)
end,
timeout = 30,
whileDead = false,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["ED_SHOW_ALL_FILTERS"] = {
text = "You do not currently have both Searches and Blacklists checked. |nChecking this box will cause both Searches and Blacklists to show under the Filter selection. Do you wish to continue?",
button1 = "Yes",
button2 = "No",
OnAccept = function(self) EasyDestroy.UI.Filters.SelectAllFilterTypes() end,
timeout = 30,
whileDead = false,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["ED_FILTER_UNIQUE_NAME"] = {
text = "Filters require a unique name. %s is already used.|n|n|cFFFF0000Your filter has NOT been saved.|r",
button1 = "Okay",
-- OnAccept = function(self) return end,
timeout = 30,
whileDead = false,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["ED_RELOAD_CURRENT_FILTER"] = {
text = "This requires reloading the current filter. Do you wish to proceed?",
button1 = "Okay",
button2 = "Cancel",
OnAccept = function(self)
EasyDestroy.Data.Options.CharacterFavorites = not EasyDestroy.Data.Options.CharacterFavorites
EasyDestroy.UI.ReloadCurrentFilter()
end,
OnCancel = function(self, data) data:SetChecked(EasyDestroy.Data.Options.CharacterFavorites) end,
timeout = 30,
whileDead = false,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["ED_3_0_FEATURE_ALERT"] = {
text = [[EasyDestroy has been updated!
In version 3.0 you now have the ability to Mill and Prospect items as well as Disenchanting.
Additionally, there is an options window to configure this and other features! Click Okay to be taken to the new Options menu or Cancel to close this message.
]],
button1 = "Okay",
button2 = "Cancel",
OnAccept = function(self)
InterfaceOptionsFrame_OpenToCategory("EasyDestroy")
InterfaceOptionsFrame_OpenToCategory("EasyDestroy")
end,
OnCancel = function(self)
EasyDestroy.Data.Alerts = EasyDestroy.Data.Alerts or {}
end,
timeout = 60,
whileDead = false,
hideOnEscape = false,
preferredIndex = 3,
}
|
-- redis.log(redis.LOG_WARNING, 'start...')
local key = KEYS[1]
local period = tonumber(ARGV[1])
local count = tonumber(ARGV[2])
-- 每秒钟产生的令牌数
local tickets_per_sec = count / period
-- 请求的令牌数
local required_tickets = tonumber(ARGV[3])
-- 快速失败阈值
local enale_degrade = ARGV[4]
local degrade_strategy = ARGV[5]
local degrade_threshold = tonumber(ARGV[6])
-- 快速失败窗口时间
local degrade_window = tonumber(ARGV[7])
-- 添加令牌的时间间隔
local stable_interval_micros = 1000000 / tickets_per_sec
-- 当前时间
local time = redis.call('time')
local now_micros = tonumber(time[1]) * 1000000 + tonumber(time[2])
-- 判断是否进入快速失败期
local function isFailFast(key, now_micros, degrade_strategy, degrade_threshold)
local fail_fast_ts = tonumber(redis.call('hget', key, 'fail_fast_ts') or 0)
if (now_micros < fail_fast_ts) then
redis.log(redis.LOG_WARNING, 'in fail fast')
return true, fail_fast_ts
end
-- ------------------------------------------------------------------------------- 以下是快速失败检查
if (degrade_strategy == 'EC' or degrade_strategy == 'EP') then
-- 获取一分钟内错误次数 ec : error count
local error_count_list = redis.call('hmget', key,
'1ec', '2ec', '3ec', '4ec', '5ec', '6ec', '7ec', '8ec', '9ec',
'10ec', '11ec', '12ec', '13ec', '14ec', '15ec', '16ec', '17ec', '18ec', '19ec',
'20ec', '21ec', '22ec', '23ec', '24ec', '25ec', '26ec', '27ec', '28ec', '29ec',
'30ec', '31ec', '32ec', '33ec', '34ec', '35ec', '36ec', '37ec', '38ec', '39ec',
'40ec', '41ec', '42ec', '43ec', '44ec', '45ec', '46ec', '47ec', '48ec', '49ec',
'50ec', '51ec', '52ec', '53ec', '54ec', '55ec', '56ec', '57ec', '58ec', '59ec', '60ec')
-- 对应最后一分钟内错误更新时间 ect : ec + timestamp
local error_count_last_update_list = redis.call('hmget', key,
'1ect', '2ect', '3ect', '4ect', '5ect', '6ect', '7ect', '8ect', '9ect',
'10ect', '11ect', '12ect', '13ect', '14ect', '15ect', '16ect', '17ect', '18ect', '19ect',
'20ect', '21ect', '22ect', '23ect', '24ect', '25ect', '26ect', '27ect', '28ect', '29ect',
'30ect', '31ect', '32ect', '33ect', '34ect', '35ect', '36ect', '37ect', '38ect', '39ect',
'40ect', '41ect', '42ect', '43ect', '44ect', '45ect', '46ect', '47ect', '48ect', '49ect',
'50ect', '51ect', '52ect', '53ect', '54ect', '55ect', '56ect', '57ect', '58ect', '59ect', '60ect')
-- 最近一分钟内所有请求数量
local all_calls = {}
local all_calls_last_update_list = {}
if (degrade_strategy == 'EP') then
all_calls = redis.call('hmget', key,
'1ac', '2ac', '3ac', '4ac', '5ac', '6ac', '7ac', '8ac', '9ac',
'10ac', '11ac', '12ac', '13ac', '14ac', '15ac', '16ac', '17ac', '18ac', '19ac',
'20ac', '21ac', '22ac', '23ac', '24ac', '25ac', '26ac', '27ac', '28ac', '29ac',
'30ac', '31ac', '32ac', '33ac', '34ac', '35ac', '36ac', '37ac', '38ac', '39ac',
'40ac', '41ac', '42ac', '43ac', '44ac', '45ac', '46ac', '47ac', '48ac', '49ac',
'50ac', '51ac', '52ac', '53ac', '54ac', '55ac', '56ac', '57ac', '58ac', '59ac', '60ac')
all_calls_last_update_list = redis.call('hmget', key,
'1act', '2act', '3act', '4act', '5act', '6act', '7act', '8act', '9act',
'10act', '11act', '12act', '13act', '14act', '15act', '16act', '17act', '18act', '19act',
'20act', '21act', '22act', '23act', '24act', '25act', '26act', '27act', '28act', '29act',
'30act', '31act', '32act', '33act', '34act', '35act', '36act', '37act', '38act', '39act',
'40act', '41act', '42act', '43act', '44act', '45act', '46act', '47act', '48act', '49act',
'50act', '51act', '52act', '53act', '54act', '55act', '56act', '57act', '58act', '59act', '60act')
end
local total_error_count = 0
local total_call_count = 0
for k, v in ipairs(error_count_list) do
if (now_micros - tonumber(error_count_last_update_list[k] or now_micros) < 60000000) then
total_error_count = total_error_count + tonumber(v or 0)
end
if (degrade_strategy == 'EP'
and (now_micros - tonumber(all_calls_last_update_list[k] or now_micros) < 60000000)) then
total_call_count = total_call_count + tonumber(all_calls[k] or 0)
end
end
--redis.log(redis.LOG_WARNING, total_error_count)
--redis.log(redis.LOG_WARNING, total_call_count)
--redis.log(redis.LOG_WARNING, total_error_count/total_call_count)
if (degrade_strategy == 'EC' and total_error_count >= degrade_threshold) then
return true, 0
elseif (degrade_strategy == 'EP' and total_call_count > 0
and total_error_count/total_call_count >= degrade_threshold) then
return true, 0
end
return false, 0
else
-- 获取一分钟内平均响应时间
local rt_list = redis.call('hmget', key,
'1rt', '2rt', '3rt', '4rt', '5rt', '6rt', '7rt', '8rt', '9rt',
'10rt', '11rt', '12rt', '13rt', '14rt', '15rt', '16rt', '17rt', '18rt', '19rt',
'20rt', '21rt', '22rt', '23rt', '24rt', '25rt', '26rt', '27rt', '28rt', '29rt',
'30rt', '31rt', '32rt', '33rt', '34rt', '35rt', '36rt', '37rt', '38rt', '39rt',
'40rt', '41rt', '42rt', '43rt', '44rt', '45rt', '46rt', '47rt', '48rt', '49rt',
'50rt', '51rt', '52rt', '53rt', '54rt', '55rt', '56rt', '57rt', '58rt', '59rt', '60rt')
-- 对应最后一分钟内平均响应时间更新时间 ect : ec + timestamp
local rt_last_update_list = redis.call('hmget', key,
'1rtt', '2rtt', '3rtt', '4rtt', '5rtt', '6rtt', '7rtt', '8rtt', '9rtt',
'10rtt', '11rtt', '12rtt', '13rtt', '14rtt', '15rtt', '16rtt', '17rtt', '18rtt', '19rtt',
'20rtt', '21rtt', '22rtt', '23rtt', '24rtt', '25rtt', '26rtt', '27rtt', '28rtt', '29rtt',
'30rtt', '31rtt', '32rtt', '33rtt', '34rtt', '35rtt', '36rtt', '37rtt', '38rtt', '39rtt',
'40rtt', '41rtt', '42rtt', '43rtt', '44rtt', '45rtt', '46rtt', '47rtt', '48rtt', '49rtt',
'50rtt', '51rtt', '52rtt', '53rtt', '54rtt', '55rtt', '56rtt', '57rtt', '58rtt', '59rtt', '60rtt')
local total_rt = 0
local valid_count = 0
for k, v in ipairs(rt_list) do
if (now_micros - tonumber(rt_last_update_list[k] or 0) < 60000000) then
total_rt = total_rt + tonumber(v or 0)
valid_count = valid_count + 1
end
end
-- 计算平均响应时间(ms)
local avg_rt = total_rt / valid_count
-- redis.log(redis.LOG_WARNING, avg_rt)
redis.log(redis.LOG_WARNING, 'rt----')
redis.log(redis.LOG_WARNING, avg_rt)
if (avg_rt > degrade_threshold) then
return true, 0
end
return false, 0
end
end
-- 快速失败检查
if (enale_degrade == 'true') then
local is_fail_fast, next_micro = isFailFast(key, now_micros, degrade_strategy, degrade_threshold)
if (is_fail_fast) then
if (now_micros > next_micro) then
-- 执行命令
redis.replicate_commands()
redis.call('hset', key, 'fail_fast_ts', now_micros + degrade_window * 1000000)
redis.call('expire', key, math.max(period, degrade_window))
end
return 3
end
end
-- ------------------------------------------------------------------------------- 以下是令牌操作
-- client
local next_free_ticket_micro = tonumber(redis.call('hget', key, 'next_free_ticket_micro') or 0)
local stored_tickets = tonumber(redis.call('hget', key, 'stored_tickets') or count)
-- 添加令牌
if (now_micros > next_free_ticket_micro) then
-- redis.log(redis.LOG_WARNING, 'add ticket')
local new_tickets = (now_micros - next_free_ticket_micro) / stable_interval_micros
stored_tickets = math.min(count, stored_tickets + new_tickets)
next_free_ticket_micro = now_micros
end
if (stored_tickets < required_tickets) then
-- redis.log(redis.LOG_WARNING, 'short of ticket : fail_times : ', fail_times)
-- 令牌不足
return 1
end
local sec_slot = tonumber(time[1]) % 60 + 1
local hkey1 = tostring(sec_slot)..'ac'
local hkey2 = tostring(sec_slot)..'act'
-- 获取该节点总异常数
local ac = tonumber(redis.call('hget', key, hkey1) or 0)
-- 获取该slot上次更新时间
local lt = tonumber(redis.call('hget', key, hkey2) or 0)
-- 使用59s防止临界问题
if (now_micros - lt > 59000000) then
-- 已过期
ac = 1
else
ac = ac + 1
end
-- 执行命令
redis.replicate_commands()
redis.call('hset', key, 'stored_tickets', stored_tickets - required_tickets)
redis.call('hset', key, 'next_free_ticket_micro', next_free_ticket_micro)
redis.call('hset', key, 'next_free_ticket_micro', next_free_ticket_micro)
redis.call('hset', key, hkey1, ac)
redis.call('hset', key, hkey2, now_micros)
redis.call('expire', key, period)
-- 成功
return 0
|
--[[
Programmable robot ('hoverbot') mod for Minetest
Copyright (C) 2018 Pilcrow182
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
]]--
minetest.register_craft({
output = 'hoverbot:hoverbot',
recipe = {
{'', 'hoverbot:command_dome', ''},
{'hoverbot:copper_plate', 'default:chest', 'hoverbot:copper_plate'},
{'hoverbot:tool_arm', 'hoverbot:copper_fan', 'hoverbot:tool_arm'},
}
})
minetest.register_craft({
output = 'hoverbot:command_dome',
recipe = {
{'hoverbot:optical_lense'},
{'hoverbot:ocular_sensor'},
{'hoverbot:kinematic_processor'},
}
})
minetest.register_craft({
output = 'hoverbot:optical_lense',
recipe = {
{'', 'default:glass', ''},
{'default:glass', '', 'default:glass'},
}
})
minetest.register_craft({
output = 'hoverbot:ocular_sensor',
recipe = {
{'', 'default:glass', ''},
{'hoverbot:copper_plate', 'hoverbot:laser', 'default:glass'},
{'hoverbot:gold_wiring', 'default:glass', ''},
}
})
minetest.register_craft({
output = 'hoverbot:laser',
recipe = {
{'', '', 'default:diamond'},
{'', 'vessels:glass_bottle', ''},
{'default:torch', '', ''},
}
})
minetest.register_craft({
output = 'hoverbot:copper_plate',
recipe = {
{'default:copper_ingot', 'default:copper_ingot'},
{'default:copper_ingot', 'default:copper_ingot'},
}
})
minetest.register_craft({
output = 'hoverbot:gold_wiring 8',
recipe = {
{'', 'hoverbot:gold_plate'},
{'hoverbot:laser', ''},
},
replacements = {
{'hoverbot:laser', 'hoverbot:laser'}
}
})
minetest.register_craft({
output = 'hoverbot:gold_plate',
recipe = {
{'default:gold_ingot', 'default:gold_ingot'},
{'default:gold_ingot', 'default:gold_ingot'},
}
})
minetest.register_craft({
output = 'hoverbot:kinematic_processor',
recipe = {
{'hoverbot:position_sensor', 'hoverbot:crystal_cpu', 'hoverbot:equilibrium_sensor'},
}
})
minetest.register_craft({
output = 'hoverbot:position_sensor',
recipe = {
{'default:steel_ingot', '', ''},
{'default:copper_ingot', 'hoverbot:magnetic_needle', ''},
{'hoverbot:gold_wiring', 'default:copper_ingot', 'default:steel_ingot'},
}
})
minetest.register_craft({
output = 'hoverbot:magnetic_needle',
recipe = {
{'default:steel_ingot', '', ''},
{'', 'default:copper_ingot', ''},
{'', '', 'default:steel_ingot'},
}
})
minetest.register_craft({
output = 'hoverbot:crystal_cpu',
recipe = {
{'default:glass', 'hoverbot:gold_wiring', 'default:glass'},
{'hoverbot:gold_wiring', 'hoverbot:etched_crystal', 'hoverbot:gold_wiring'},
{'default:glass', 'hoverbot:gold_wiring', 'default:glass'},
}
})
minetest.register_craft({
output = 'hoverbot:etched_crystal',
recipe = {
{'', 'default:mese_crystal'},
{'hoverbot:laser', ''},
},
replacements = {
{'hoverbot:laser', 'hoverbot:laser'}
}
})
minetest.register_craft({
output = 'hoverbot:equilibrium_sensor',
recipe = {
{'default:copper_ingot', 'hoverbot:bronze_cog', 'default:copper_ingot'},
{'default:gold_ingot', 'default:stick', 'default:gold_ingot'},
{'hoverbot:gold_wiring', 'default:stone', 'hoverbot:gold_wiring'},
}
})
minetest.register_craft({
output = 'hoverbot:bronze_cog',
recipe = {
{'', 'default:bronze_ingot', ''},
{'default:bronze_ingot', 'default:steel_ingot', 'default:bronze_ingot'},
{'', 'default:bronze_ingot', ''},
}
})
minetest.register_craft({
output = 'hoverbot:tool_arm',
recipe = {
{'', 'default:shovel_steel', ''},
{'default:pick_steel', 'hoverbot:bronze_cog', 'default:axe_steel'},
{'', 'default:steel_ingot', ''},
}
})
minetest.register_craft({
output = 'hoverbot:copper_fan',
recipe = {
{'', 'default:copper_ingot', ''},
{'default:copper_ingot', 'hoverbot:bronze_cog', 'default:copper_ingot'},
{'', 'default:copper_ingot', ''},
}
})
|
local player = ...
local meterFillLength = 136
local meterFillHeight = 18
-- local meterXOffset = _screen.cx + (player==PLAYER_1 and -1 or 1) * WideScale(238, 288)
local meterXOffset = _screen.cx + (player==PLAYER_1 and -1 or 1) * WideScale(238, 288 + 84-27)
local meterYOffset = 20
-- Compute PLAYER1 center for being just above the background section
-- TODO make step stats capable of going on the left provided an option
if player == PLAYER_1 and PREFSMAN:GetPreference("Center1Player") then
-- local scroll = playeroptions:UsingReverse() and "Reverse" or "Standard"
--- TODO this is right side only
-- meterXOffset = _screen.cx + 280 -- TODO Need to standardize this.
-- left side rendering
meterXOffset = _screen.cx - 280 -- TODO Need to standardize this.
meterYOffset = 56 -- lol
meterFillLength = 240 - 4 -- Need to compensate for border
meterFillHeight = 30 - 4
end
local newBPS, oldBPS
local swoosh, move
local Update = function(self)
newBPS = GAMESTATE:GetSongBPS()
move = (newBPS*-1)/2
if GAMESTATE:GetSongFreeze() then move = 0 end
if swoosh then swoosh:texcoordvelocity(move,0) end
oldBPS = newBPS
end
local meter = Def.ActorFrame{
InitCommand=function(self)
local playeroptions = GAMESTATE:GetPlayerState(player):GetPlayerOptions("ModsLevel_Preferred")
local scroll = playeroptions:UsingReverse() and "Reverse" or "Standard"
local meterYPos = {
Standard = meterYOffset,
Reverse = meterYOffset,
-- Reverse = 480 - meterFillHeight + 4,
}
self:SetUpdateFunction(Update)
:y(meterYPos[scroll])
end,
-- frame
Border(meterFillLength+4, meterFillHeight+4, 2)..{
OnCommand=function(self)
self:x(meterXOffset)
end
},
-- // start meter proper //
Def.Quad{
Name="MeterFill";
InitCommand=function(self) self:zoomto(0,meterFillHeight):diffuse(PlayerColor(player)):horizalign(left) end,
OnCommand=function(self) self:x( meterXOffset - meterFillLength/2 ) end,
-- check state of mind
HealthStateChangedMessageCommand=function(self,params)
if(params.PlayerNumber == player) then
if(params.HealthState == 'HealthState_Hot') then
self:diffuse(color("1,1,1,1"))
else
self:diffuse(PlayerColor(player))
end
end
end,
-- check life (LifeMeterBar)
LifeChangedMessageCommand=function(self,params)
if(params.Player == player) then
local life = params.LifeMeter:GetLife() * (meterFillLength)
self:finishtweening()
self:bouncebegin(0.1)
self:zoomx( life )
end
end,
},
LoadActor("swoosh.png")..{
Name="MeterSwoosh",
InitCommand=function(self)
swoosh = self
self:zoomto(meterFillLength,meterFillHeight)
:diffusealpha(0.2)
:horizalign( left )
end,
OnCommand=function(self)
self:x(meterXOffset - meterFillLength/2);
self:customtexturerect(0,0,1,1);
--texcoordvelocity is handled by the Update function below
end,
HealthStateChangedMessageCommand=function(self,params)
if(params.PlayerNumber == player) then
if(params.HealthState == 'HealthState_Hot') then
self:diffusealpha(1)
else
self:diffusealpha(0.2)
end
end
end,
LifeChangedMessageCommand=function(self,params)
if(params.Player == player) then
local life = params.LifeMeter:GetLife() * (meterFillLength)
self:finishtweening()
self:bouncebegin(0.1)
self:zoomto( life, meterFillHeight )
end
end
}
}
return meter
-- copyright 2008-2012 AJ Kelly/freem.
-- do not use this code in your own themes without my permission.
|
-- Copyright (c) 2020, The Pallene Developers
-- Pallene is licensed under the MIT license.
-- Please refer to the LICENSE and AUTHORS files for details
-- SPDX-License-Identifier: MIT
local typedecl = require "pallene.typedecl"
-- Pallene IR is a lower level representation of Pallene that is easier for the optimizer and the
-- coder generator to work with.
--
-- * Each module is represented as an ir.Module
-- * Functions, global variables, records, etc are identified by a numeric ID.
-- * Function scopes are flat and local variables are identified by a numeric ID.
-- * Function bodies are represented by ir.Cmd nodes.
--
-- There is no expression-level nesting. an ir.Value can only be a variable name or a literal
-- constant. Nested subexpressions are converted into multiple commands, using temporary variables.
--
-- There is still some statement-level nesting, with if.Cmd.Loop, ir.Cmd.If, etc. We think that
-- structured control flow is easier to reason about then an unstructured control flow graph built
-- around basic blocks and gotos.
local ir = {}
local function declare_type(type_name, cons)
typedecl.declare(ir, "ir", type_name, cons)
end
function ir.Module()
return {
record_types = {}, -- list of Type
functions = {}, -- list of ir.Function
globals = {}, -- list of ir.VarDecl
exported_functions = {}, -- list of function ids
exported_globals = {}, -- list of variable ids
imported_functions = {}, -- list of imported functions
imported_vars = {}, -- list of imported variables
}
end
function ir.VarDecl(name, typ)
return {
name = name, -- string
typ = typ, -- Type
}
end
function ir.UpvalInfo(decl, val)
return {
decl = decl, -- ir.VarDecl
value = val, -- ir.Value
}
end
function ir.Function(loc, name, typ)
return {
loc = loc, -- Location
name = name, -- string
typ = typ, -- Type
vars = {}, -- list of ir.VarDecl
captured_vars = {}, -- list of ir.UpvalInfo
body = false, -- ir.Cmd
}
end
function ir.ImportedFunction(name, typ, mod)
return {
name = name, -- string
typ = typ, -- Type
mod = mod, -- Module name
}
end
---
--- Mutate modules
--
function ir.add_record_type(module, typ)
table.insert(module.record_types, typ)
return #module.record_types
end
function ir.add_function(module, loc, name, typ)
table.insert(module.functions, ir.Function(loc, name, typ))
return #module.functions
end
function ir.add_global(module, name, typ)
table.insert(module.globals, ir.VarDecl(name, typ))
return #module.globals
end
function ir.add_exported_function(module, f_id)
table.insert(module.exported_functions, f_id)
end
function ir.add_exported_global(module, g_id)
table.insert(module.exported_globals, g_id)
end
function ir.add_imported_function(module, mod_name, name, typ)
table.insert(module.imported_functions, ir.ImportedFunction(name, typ, mod_name))
return #module.imported_functions
end
--
-- Function variables
--
function ir.add_local(func, name, typ)
table.insert(func.vars, ir.VarDecl(name, typ))
return #func.vars
end
function ir.add_upvalue(func, name, typ, value)
local decl = ir.VarDecl(name, typ)
table.insert(func.captured_vars, ir.UpvalInfo(decl, value))
return #func.captured_vars
end
function ir.arg_var(func, i)
local narg = #func.typ.arg_types
assert(1 <= i and i <= narg)
return i
end
--
-- Pallene IR
--
declare_type("Value", {
Nil = {},
Bool = {"value"},
Integer = {"value"},
Float = {"value"},
String = {"value"},
LocalVar = {"id"},
Upvalue = {"id"},
Function = {"id"},
ImportedFunction = {"id"},
ImportedVar = {"id"},
})
-- declare_type("Cmd"
local ir_cmd_constructors = {
-- [IMPORTANT] Please use this naming convention:
-- - "src" fields contain an "ir.Value".
-- - "dst" fields contain a local variable ID.
-- Variables
Move = {"loc", "dst", "src"},
GetGlobal = {"loc", "dst", "global_id"},
SetGlobal = {"loc", "global_id", "src"},
-- Primitive Values
Unop = {"loc", "dst", "op", "src"},
Binop = {"loc", "dst", "op", "src1", "src2"},
Concat = {"loc", "dst", "srcs"},
ToFloat = {"loc", "dst", "src"},
--- Dynamic Value
ToDyn = {"loc", "src_typ", "dst", "src"},
FromDyn = {"loc", "dst_typ", "dst", "src"},
IsTruthy = {"loc", "dst", "src"},
IsNil = {"loc", "dst", "src"},
-- Arrays
NewArr = {"loc", "dst", "src_size"},
GetArr = {"loc", "dst_typ", "dst", "src_arr", "src_i"},
SetArr = {"loc", "src_typ", "src_arr", "src_i", "src_v"},
-- Tables
NewTable = {"loc", "dst", "src_size"},
GetTable = {"loc", "dst_typ", "dst", "src_tab", "src_k"},
SetTable = {"loc", "src_typ", "src_tab", "src_k", "src_v"},
-- Records
NewRecord = {"loc", "rec_typ", "dst"},
GetField = {"loc", "rec_typ", "dst", "src_rec", "field_name", },
SetField = {"loc", "rec_typ", "src_rec", "field_name", "src_v"},
-- Functions
NewClosure = {"loc", "dst", "srcs", "f_id"},
-- (dst is false if the return value is void, or unused)
CallStatic = {"loc", "f_typ", "dsts", "f_id", "srcs"},
CallDyn = {"loc", "f_typ", "dsts", "src_f", "srcs"},
-- Builtin operations
BuiltinIoWrite = {"loc", "srcs"},
BuiltinMathSqrt = {"loc", "dsts", "srcs"},
BuiltinStringChar = {"loc", "dsts", "srcs"},
BuiltinStringSub = {"loc", "dsts", "srcs"},
BuiltinType = {"loc", "dsts", "srcs"},
BuiltinTostring = {"loc", "dsts", "srcs"},
--
-- Control flow
--
Nop = {},
Seq = {"cmds"},
Return = {"loc", "srcs"},
Break = {},
Loop = {"body"},
If = {"loc", "src_condition", "then_", "else_"},
For = {"loc", "dst", "src_start", "src_limit", "src_step", "body"},
-- Garbage Collection (appears after memory allocations)
CheckGC = {},
}
declare_type("Cmd", ir_cmd_constructors)
-- We need to know, for each kind of command, which fields contain inputs (ir.Value) and which
-- fields refer to outputs (local variable ID). We use a common naming convention for this.
local value_fields = {}
for tag, fields in pairs(ir_cmd_constructors) do
local ff = { src = {}, srcs = {}, dst = {}, dsts = {} }
for _, field in ipairs(fields) do
if not field:match("_typ$") then
if field:match("^srcs") then table.insert(ff.srcs, field)
elseif field:match("^src") then table.insert(ff.src, field)
elseif field:match("^dsts") then table.insert(ff.dsts, field)
elseif field:match("^dst") then table.insert(ff.dst, field)
end
end
end
value_fields["ir.Cmd."..tag] = ff
end
-- Returns the inputs to the given command, a list of ir.Value.
-- The order is the same order used by the constructor.
function ir.get_srcs(cmd)
local ff = assert(value_fields[cmd._tag])
local srcs = {}
for _, k in ipairs(ff.src) do
table.insert(srcs, cmd[k])
end
for _, k in ipairs(ff.srcs) do
for _, src in ipairs(cmd[k]) do
table.insert(srcs, src)
end
end
return srcs
end
-- Returns the outputs of the given command, a list of local variable IDs.
-- The order is the same order used by the constructor.
function ir.get_dsts(cmd)
local ff = assert(value_fields[cmd._tag])
local dsts = {}
for _, k in ipairs(ff.dst) do
table.insert(dsts, cmd[k])
end
for _, k in ipairs(ff.dsts) do
for _, dst in ipairs(cmd[k]) do
if dst ~= false then
table.insert(dsts, dst)
end
end
end
return dsts
end
-- Iterate over the cmds with a pre-order traversal.
function ir.iter(root_cmd)
local function go(cmd)
coroutine.yield(cmd)
local tag = cmd._tag
if tag == "ir.Cmd.Seq" then
for _, c in ipairs(cmd.cmds) do
go(c)
end
elseif tag == "ir.Cmd.If" then
go(cmd.then_)
go(cmd.else_)
elseif tag == "ir.Cmd.Loop" then
go(cmd.body)
elseif tag == "ir.Cmd.For" then
go(cmd.body)
else
-- no recursion needed
end
end
return coroutine.wrap(function()
go(root_cmd)
end)
end
function ir.flatten_cmd(root_cmd)
local res = {}
for cmd in ir.iter(root_cmd) do
table.insert(res, cmd)
end
return res
end
-- Transform an ir.Cmd, via a mapping function that modifies individual nodes.
-- Returns the new root node. Child nodes are modified in-place.
-- If the mapping function returns a falsy value, the original version of the node is kept.
function ir.map_cmd(root_cmd, f)
local function go(cmd)
-- Transform child nodes recursively
local tag = cmd._tag
if tag == "ir.Cmd.Seq" then
for i = 1, #cmd.cmds do
cmd.cmds[i] = go(cmd.cmds[i])
end
elseif tag == "ir.Cmd.If" then
cmd.then_ = go(cmd.then_)
cmd.else_ = go(cmd.else_)
elseif tag == "ir.Cmd.Loop" then
cmd.body = go(cmd.body)
elseif tag == "ir.Cmd.For" then
cmd.body = go(cmd.body)
else
-- no child nodes
end
-- Transform parent node
return f(cmd) or cmd
end
return go(root_cmd)
end
-- Remove some kinds of silly control flow
-- - Empty If
-- - if statements w/ constant condition
-- - Nop and Seq statements inside Seq
-- - Seq commands w/ no statements
-- - Seq commans w/ only one element
function ir.clean(cmd)
local tag = cmd._tag
if tag == "ir.Cmd.Nop" then
return cmd
elseif tag == "ir.Cmd.Seq" then
local out = {}
for _, c in ipairs(cmd.cmds) do
c = ir.clean(c)
if c._tag == "ir.Cmd.Nop" then
-- skip
elseif c._tag == "ir.Cmd.Seq" then
for _, cc in ipairs(c.cmds) do
table.insert(out, cc)
end
else
table.insert(out, c)
end
end
if #out == 0 then
return ir.Cmd.Nop()
elseif #out == 1 then
return out[1]
else
return ir.Cmd.Seq(out)
end
elseif tag == "ir.Cmd.If" then
local v = cmd.src_condition
cmd.then_ = ir.clean(cmd.then_)
cmd.else_ = ir.clean(cmd.else_)
local t_empty = (cmd.then_._tag == "ir.Cmd.Nop")
local e_empty = (cmd.else_._tag == "ir.Cmd.Nop")
if t_empty and e_empty then
return ir.Cmd.Nop()
elseif v._tag == "ir.Value.Bool" and v.value == true then
return cmd.then_
elseif v._tag == "ir.Value.Bool" and v.value == false then
return cmd.else_
else
return cmd
end
elseif tag == "ir.Cmd.Loop" then
cmd.body = ir.clean(cmd.body)
return cmd
elseif tag == "ir.Cmd.For" then
cmd.body = ir.clean(cmd.body)
return cmd
else
return cmd
end
end
function ir.clean_all(module)
for _, func in ipairs(module.functions) do
func.body = ir.clean(func.body)
end
end
return ir
|
local nearTable=false
local animState=0
local animStateLU=getTickCount()
table_position={}
local Z
local W
local H
local s_w, s_h = guiGetScreenSize ()
local function doPoolShot(x,y,x2,y2)
local hit, hx,hy,hz, hitElement=processLineOfSight(x,y, Z, x2,y2,Z, false, false, false,true, false)
if not hit or not hitElement then
return triggerServerEvent("broadcastCaptionedEvent", localPlayer, getPlayerName(localPlayer) .. " nie trafia w żadną bilę.", 5, 5, true)
end
local model=getElementModel(hitElement)
if (rodzajeBil[model]) then
triggerServerEvent("broadcastCaptionedEvent", localPlayer, getPlayerName(localPlayer) .. " trafia w "..rodzajeBil[model].biernik..".", 5, 5, true)
end
triggerServerEvent("doPoolShot", resourceRoot, localPlayer, x,y,x2,y2, hitElement)
end
local function znajdzBile(x,y,x2,y2)
local hit, hx,hy,hz, hitElement=processLineOfSight(x,y, Z, x2,y2,Z, false, false, false,true, false)
if not hit then return x2,y2 end
return hx,hy
end
function billard_render()
if not nearTable then
removeEventHandler("onClientRender", root, billard_render)
return
end
if getControlState("aim_weapon") then
-- local x,y=getElementPosition(localPlayer)
local x,y=getPedWeaponMuzzlePosition(localPlayer)
local x2, y2 = getWorldFromScreenPosition ( s_w/2, s_h/2, 10 )
if (x2<table_position[1]-W/2) then x2=table_position[1]-W/2 end
if (x2>table_position[1]+W/2) then x2=table_position[1]+W/2 end
if (y2<table_position[2]-H/2) then y2=table_position[2]-H/2 end
if (y2>table_position[2]+H/2) then y2=table_position[2]+H/2 end
-- dxDrawLine3D ( x,y,Z,x2,y2,Z, tocolor(255,0,0,100),2 )
local x3,y3=znajdzBile(x,y,x2,y2)
dxDrawLine3D ( x,y,Z,x3,y3,Z, tocolor(255,0,0,100),2 )
if animState==0 then
triggerServerEvent("setPedAnimation", localPlayer, "POOL", "POOL_Med_Start", -1, false, false)
animState=1
animStateLU=getTickCount()
elseif animState==1 then
setPedRotation(localPlayer, findRotation(x,y,x2,y2))
if getControlState("fire") then
animState=2
animStateLU=getTickCount()
triggerServerEvent("setPedAnimation", localPlayer,"POOL", "POOL_Med_Shot", -1, false, false)
doPoolShot(x,y,x2,y2)
end
end
elseif animState==1 then
triggerServerEvent("setPedAnimation", localPlayer)
animState=0
animStateLU=getTickCount()
elseif animState==2 and getTickCount()-animStateLU>1500 then
-- setPedAnimation(localPlayer)
triggerServerEvent("setPedAnimation", localPlayer)
animState=0
animStateLU=getTickCount()
end
end
addEvent("onNearTable",true)
addEventHandler("onNearTable", resourceRoot, function(...)
table_position[1], table_position[2], Z, W, H = ...
if (not table_position[1]) then
nearTable=false
return
else
nearTable=true
addEventHandler("onClientRender", root, billard_render)
end
--
end)
local ballSounds={
"audio/108615__juskiddink__billiard-balls-single-hit-dry.ogg",
-- "audio/108616__juskiddink__hard-pop.ogg"
}
addEvent("playBallSound", true)
addEventHandler("playBallSound", resourceRoot, function()
-- outputDebugString("BS")
if not nearTable then return end
local x,y,z=getElementPosition(localPlayer)
local x2,y2,z2=getElementPosition(source)
if getDistanceBetweenPoints3D(x,y,z,x2,y2,z2)>10 then return end
playSound3D(ballSounds[math.random(1,#ballSounds)], x2,y2,z2)
end)
|
include("middleclass.lua")
include("uuid.lua")
include("von.lua")
include( "shared.lua" )
include("/classes/base.lua")
include("/classes/stats.lua")
include("/classes/character.lua")
|
BigWigs:AddColors("Grand Champions", {
[-7534] = "blue",
[66043] = {"blue","yellow"},
[67528] = "orange",
[67534] = {"blue","yellow"},
})
BigWigs:AddColors("Eadric the Pure", {
[66935] = "orange",
})
BigWigs:AddColors("Argent Confessor Paletress", {
[66515] = {"green","red","yellow"},
[66537] = "orange",
[66619] = {"blue","yellow"},
["confess"] = {"red","yellow"},
})
BigWigs:AddColors("The Black Knight", {
[-7598] = "orange",
[67781] = "blue",
})
|
application = {
content = {
scale = "adaptive",
fps = 60,
imageSuffix = {
["@2x"] = 2.0,
},
},
}
|
--[[ Netherstorm -- Talbuk Doe.lua
This script was written and is protected
by the GPL v2. This script was released
by BlackHer0 of the BLUA Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- BlackHer0, Oktober, 27th, 2008. ]]
function Doe_OnCombat(Unit, Event)
Unit:RegisterEvent("Doe_Gore", 5000, 0)
end
function Doe_Gore(Unit, Event)
Unit:FullCastSpellOnTarget(32019, Unit:GetMainTank())
end
function Doe_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
end
function Doe_OnDied(Unit, Event)
Unit:RemoveEvents()
end
function Doe_OnKilledTarget(Unit, Event)
end
RegisterUnitEvent(20610, 1, "Doe_OnCombat")
RegisterUnitEvent(20610, 2, "Doe_OnLeaveCombat")
RegisterUnitEvent(20610, 3, "Doe_OnKilledTarget")
RegisterUnitEvent(20610, 4, "Doe_OnDied")
|
-- Copyright (c) 2015-2017 Lymia Alusyia <lymia@lymiahugs.com>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-- THE SOFTWARE.
if _mpPatch_activateFrontEnd then
_mpPatch.hooks.protocol_chathandler_setupHooks()
Events.GameMessageChat.Remove(OnChat)
OnChat = _mpPatch.hooks.protocol_chathandler_new(OnChat, function(fromPlayer)
return not not m_PlayerNames[fromPlayer]
end)
Events.GameMessageChat.Add(OnChat)
_mpPatch.net.clientIsPatched(_mpPatch.protocolVersion)
_mpPatch.hookUpdate()
local countdownRunning = false
_mpPatch.event.update.registerHandler(function(...)
if not ContextPtr:IsHidden() and countdownRunning then
OnUpdate(...)
end
end)
Events.MultiplayerGamePlayerDisconnected.Add(function(...)
if not ContextPtr:IsHidden() then
_mpPatch.hooks.protocol_chathandler_onDisconnect(...)
end
end)
function StartCountdown()
g_fCountdownTimer = 10
countdownRunning = true
end
function StopCountdown()
Controls.CountdownButton:SetHide(true)
g_fCountdownTimer = -1
countdownRunning = false
end
_mpPatch.event.reset.registerHandler(function()
_mpPatch.patch.NetPatch.reset()
StopCountdown()
end)
end
|
game.AddParticles("particles/blaster_sparks.pcf")
game.AddParticles("particles/skull_fx.pcf")
game.AddParticles("particles/fire_test.pcf")
game.AddParticles("particles/fire_test2.pcf")
game.AddParticles("particles/splode_fx.pcf")
game.AddParticles("particles/flamethrower_fx.pcf")
game.AddParticles("particles/artillery_muzzle.pcf")
--Darken217's:
game.AddParticles("particles/boxglove_drr_fx.pcf")
game.AddParticles("particles/electrical_fx.pcf")
game.AddParticles("particles/napalmgrenade_fx.pcf")
game.AddParticles("particles/laser_fx.pcf")
game.AddParticles("particles/spectra_drr_fx.pcf")
game.AddParticles("particles/vapor_drr_fx.pcf")
game.AddParticles("particles/plasma_tracer.pcf")
PrecacheParticleSystem("fire_test2")
PrecacheParticleSystem("fire_test")
PrecacheParticleSystem("fire_man_disap")
PrecacheParticleSystem("sparks_rdbl")
PrecacheParticleSystem("skull_trail")
PrecacheParticleSystem("skull_impact")
PrecacheParticleSystem("skull_impact_fire")
PrecacheParticleSystem("splode_fire")
PrecacheParticleSystem("splode_big_main")
PrecacheParticleSystem("splode_drone_main")
PrecacheParticleSystem("splode_drone_sparks")
PrecacheParticleSystem("splode_big_drone_main")
PrecacheParticleSystem("flamethrower_fire_drr")
PrecacheParticleSystem("artillery_muzzle_main")
--Darken217's:
PrecacheParticleSystem("blade_glow_drr")
PrecacheParticleSystem("electrical_arc_01_parent")
PrecacheParticleSystem("electrical_arc_01_system")
PrecacheParticleSystem("laser_hit_drr")
PrecacheParticleSystem("laser_hit_r_drr")
PrecacheParticleSystem("laser_hit_g_drr")
PrecacheParticleSystem("laser_hit_b_drr")
PrecacheParticleSystem("napalmgren_shockwave_drr")
PrecacheParticleSystem("elecray_hit_drr")
//PrecacheParticleSystem("spectra_hit_drr")
PrecacheParticleSystem("stinger_explode_drr")
PrecacheParticleSystem("vapor_drr")
PrecacheParticleSystem("nrg_tracer_drr")
PrecacheParticleSystem("vapor_collapse_drr")
|
object_tangible_item_entertainer_console_stage_generated_backdrop_08 = object_tangible_item_entertainer_console_shared_stage_generated_backdrop_08:new {
}
ObjectTemplates:addTemplate(object_tangible_item_entertainer_console_stage_generated_backdrop_08, "object/tangible/item/entertainer_console/stage_generated_backdrop_08.iff")
|
self.i = 0
self:increment()
|
local ffi = require( "ffi" )
local glu = ffi.load("glu32");
GLU_FILL = 1;
GLU_INSIDE = 4;
GLU_LINE = 6;
GLU_NONE = 8;
GLU_OUTSIDE = 2;
GLU_POINT = 5;
GLU_SILHOUETTE = 7;
GLU_SMOOTH = 3;
ffi.cdef[[
typedef struct GLUnurbs GLUnurbs;
typedef struct GLUquadric GLUquadric;
typedef struct GLUtesselator GLUtesselator;
typedef struct GLUnurbs GLUnurbsObj;
typedef struct GLUquadric GLUquadricObj;
typedef struct GLUtesselator GLUtesselatorObj;
typedef struct GLUtesselator GLUtriangulatorObj;
]]
ffi.cdef[[
void gluBeginCurve (GLUnurbs* nurb);
void gluBeginPolygon (GLUtesselator* tess);
void gluBeginSurface (GLUnurbs* nurb);
void gluBeginTrim (GLUnurbs* nurb);
GLint gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLint gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
GLint gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLint gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
GLint gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLint gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
GLboolean gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
void gluDeleteNurbsRenderer (GLUnurbs* nurb);
void gluDeleteQuadric (GLUquadric* quad);
void gluDeleteTess (GLUtesselator* tess);
void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
void gluEndCurve (GLUnurbs* nurb);
void gluEndPolygon (GLUtesselator* tess);
void gluEndSurface (GLUnurbs* nurb);
void gluEndTrim (GLUnurbs* nurb);
const GLubyte* gluErrorString (GLenum error);
void gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
const GLubyte* gluGetString (GLenum name);
void gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
void gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
GLUnurbs* gluNewNurbsRenderer (void);
GLUquadric* gluNewQuadric (void);
GLUtesselator* gluNewTess (void);
void gluNextContour (GLUtesselator* tess, GLenum type);
void gluNurbsCallback (GLUnurbs* nurb, GLenum which, GLvoid (*CallBackFunc)());
void gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
void gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
void gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
void gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
void gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
void gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
void gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
GLint gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
void gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
void gluQuadricCallback (GLUquadric* quad, GLenum which, GLvoid (*CallBackFunc)());
void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
void gluQuadricNormals (GLUquadric* quad, GLenum normal);
void gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
void gluQuadricTexture (GLUquadric* quad, GLboolean texture);
GLint gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
void gluTessBeginContour (GLUtesselator* tess);
void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
void gluTessCallback (GLUtesselator* tess, GLenum which, GLvoid (*CallBackFunc)());
void gluTessEndContour (GLUtesselator* tess);
void gluTessEndPolygon (GLUtesselator* tess);
void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
GLint gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
GLint gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearPlane, GLdouble farPlane, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
]]
gluLookAt = glu.gluLookAt;
gluOrtho2D = glu.gluOrtho2D;
gluSphere = glu.gluSphere;
gluPerspective = glu.gluPerspective;
return glu
|
local genModelCode = require(PluginPath..'/NKG_GenerateModelCode')
local genHotfixCode = require(PluginPath..'/NKG_GenerateHotfixCode')
function onPublish(handler)
if not handler.genCode then
handler.genCode = false
genHotfixCode(handler)
fprint("使用NKG插件生成ET Hotfix代码完成")
else
handler.genCode = false
genModelCode(handler)
fprint("使用NKG插件生成ET Model层代码完成")
end
end
|
-- flowerpot/documentation.lua
-----Load documentation via doc_helper------------------------
local MP = minetest.get_modpath(minetest.get_current_modname())
local docpath = MP .. DIR_DELIM .. "doc"
doc.add_category("flowerpot",
{
name = "_flowerpot_",
description = "Flowerpot Documentation",
build_formspec = doc.entry_builders.text_and_square_gallery,
})
doc.build_entries(docpath, "flowerpot")
|
--- === plugins.core.midi.prefs ===
---
--- MIDI Preferences Panel
local require = require
local log = require "hs.logger".new "prefsMIDI"
local application = require "hs.application"
local dialog = require "hs.dialog"
local fnutils = require "hs.fnutils"
local image = require "hs.image"
local inspect = require "hs.inspect"
local menubar = require "hs.menubar"
local midi = require "hs.midi"
local mouse = require "hs.mouse"
local timer = require "hs.timer"
local config = require "cp.config"
local i18n = require "cp.i18n"
local json = require "cp.json"
local tools = require "cp.tools"
local chooseFileOrFolder = dialog.chooseFileOrFolder
local copy = fnutils.copy
local delayed = timer.delayed
local doesDirectoryExist = tools.doesDirectoryExist
local escapeTilda = tools.escapeTilda
local imageFromPath = image.imageFromPath
local infoForBundlePath = application.infoForBundlePath
local mergeTable = tools.mergeTable
local spairs = tools.spairs
local tableContains = tools.tableContains
local webviewAlert = dialog.webviewAlert
local mod = {}
--- plugins.core.midi.prefs.lastApplication <cp.prop: string>
--- Field
--- Last application used in the Preferences Drop Down.
mod.lastApplication = config.prop("midi.preferences.lastApplication", "All Applications")
--- plugins.core.midi.prefs.lastBank <cp.prop: string>
--- Field
--- Last bank used in the Preferences Drop Down.
mod.lastBank = config.prop("midi.preferences.lastBank", "1")
--- plugins.core.midi.prefs.scrollBarPosition <cp.prop: table>
--- Field
--- Scroll Bar Position
mod.scrollBarPosition = config.prop("midi.preferences.scrollBarPosition", {})
--- plugins.core.midi.prefs.lastExportPath <cp.prop: string>
--- Field
--- Last Export path.
mod.lastExportPath = config.prop("midi.preferences.lastExportPath", os.getenv("HOME") .. "/Desktop/")
--- plugins.core.midi.prefs.lastImportPath <cp.prop: string>
--- Field
--- Last Import path.
mod.lastImportPath = config.prop("midi.preferences.lastImportPath", os.getenv("HOME") .. "/Desktop/")
-- currentlyLearning -> boolean
-- Variable
-- Are we in learning mode?
local currentlyLearning = false
local learnApplication
local learnBank
local learnButton
local learningMidiDevices
local learningMidiDeviceNames
-- setItem(item, button, bundleID, bankID, value) -> none
-- Function
-- Stores a MIDI item in Preferences.
--
-- Parameters:
-- * item - The item you want to set.
-- * button - Button ID as string
-- * bundleID - The application bundle ID as string
-- * bankID - The bank ID as string
-- * value - The value of the item you want to set.
--
-- Returns:
-- * None
local function setItem(item, button, bundleID, bankID, value)
local items = mod.items()
button = tostring(button)
if not items[bundleID] then items[bundleID] = {} end
if not items[bundleID][bankID] then items[bundleID][bankID] = {} end
if not items[bundleID][bankID][button] then items[bundleID][bankID][button] = {} end
items[bundleID][bankID][button][item] = value
mod.items(items)
end
-- renderPanel(context) -> none
-- Function
-- Generates the Preference Panel HTML Content.
--
-- Parameters:
-- * context - Table of data that you want to share with the renderer
--
-- Returns:
-- * HTML content as string
local function renderPanel(context)
if not mod._renderPanel then
local err
mod._renderPanel, err = mod._env:compileTemplate("html/panel.html")
if err then
error(err)
end
end
return mod._renderPanel(context)
end
-- generateContent() -> string
-- Function
-- Generates the Preference Panel HTML Content.
--
-- Parameters:
-- * None
--
-- Returns:
-- * HTML content as string
local function generateContent()
--------------------------------------------------------------------------------
-- Build a table of all the devices recognised when initialising the panel:
--------------------------------------------------------------------------------
local midiDevices = mod._midi.devices()
local virtualMidiDevices = mod._midi.virtualDevices()
local devices = {}
for _, device in pairs(midiDevices) do
if device ~= "Loupedeck" and device ~= "Loupedeck+" then
table.insert(devices, device)
end
end
for _, device in pairs(virtualMidiDevices) do
table.insert(devices, "virtual_" .. device)
end
mod._devices = devices
--------------------------------------------------------------------------------
-- Get list of registered and custom apps:
--------------------------------------------------------------------------------
local builtInApps = {}
local registeredApps = mod._appmanager.getApplications()
for bundleID, v in pairs(registeredApps) do
if v.displayName then
builtInApps[bundleID] = v.displayName
end
end
local userApps = {}
local items = mod.items()
for bundleID, v in pairs(items) do
if v.displayName then
userApps[bundleID] = v.displayName
end
end
local context = {
builtInApps = builtInApps,
userApps = userApps,
numberOfBanks = mod.numberOfBanks,
maxItems = mod._midi.maxItems,
i18n = i18n,
lastApplication = mod.lastApplication(),
lastBank = mod.lastBank(),
spairs = spairs,
}
return renderPanel(context)
end
-- updateUI([highlightRow]) -> none
-- Function
-- Update the UI
--
-- Parameters:
-- * highlightRow - An optional row to highlight.
--
-- Returns:
-- * None
local function updateUI(highlightRow)
local injectScript = mod._manager.injectScript
local lastApplication = mod.lastApplication()
local lastBank = mod.lastBank()
local maxItems = mod._midi.maxItems
local items = mod.items()
local app = items and items[lastApplication]
local bank = app and app[lastBank]
local midiDevices = mod._midi.devices()
local virtualMidiDevices = mod._midi.virtualDevices()
local script = ""
--------------------------------------------------------------------------------
-- Update Bank Label:
--------------------------------------------------------------------------------
local bankLabel = bank and bank.bankLabel or ""
script = script .. [[
document.getElementById("bankLabel").value = "]] .. bankLabel .. [[";
]]
--------------------------------------------------------------------------------
-- Update Ignore Checkbox:
--------------------------------------------------------------------------------
local ignore = app and app.ignore or false
script = script .. [[
document.getElementById("ignore").checked = ]] .. tostring(ignore) .. [[;
]]
if lastApplication == "All Applications" then
script = script .. [[
document.getElementById("ignoreApp").style.display = "none";
]]
else
script = script .. [[
document.getElementById("ignoreApp").style.display = "block";
]]
end
--------------------------------------------------------------------------------
-- Highlight Row (if required):
--------------------------------------------------------------------------------
if highlightRow then
script = script .. [[
document.getElementById("row]] .. highlightRow .. [[").style.backgroundColor = "#cc5e53";
document.getElementById("row]] .. highlightRow .. [[").style.setProperty("-webkit-transition", "background-color 1s");
]]
end
--------------------------------------------------------------------------------
-- Update table contents:
--------------------------------------------------------------------------------
for i=1, maxItems do
local buttonID = tostring(i)
local item = bank and bank[buttonID]
local action = item and item.actionTitle or ""
local device = item and item.device or ""
local commandType = item and item.commandType or ""
local number = item and item.number or ""
local channel = item and item.channel or ""
local value = item and item.value or ""
--------------------------------------------------------------------------------
-- Unhighlight Row (unless highlighted):
--------------------------------------------------------------------------------
if i ~= tonumber(highlightRow or 0) then
script = script .. [[
document.getElementById("row]] .. i .. [[").style.backgroundColor = "";
document.getElementById("row]] .. i .. [[").style.setProperty("-webkit-transition", "background-color 0s");
]]
end
local dc = [[
<option value="">]] .. i18n("none") .. [[</option>
<option disabled="disabled" value="">--------------------------</option>
<option disabled="disabled" value="">]] .. string.upper(i18n("physical")) .. [[:</option>
<option disabled="disabled" value="">--------------------------</option>
]]
local foundDevice = false
for _, deviceName in ipairs(midiDevices) do
if deviceName ~= "Loupedeck" and deviceName ~= "virtual_Loupedeck" and deviceName ~= "Loupedeck+" and deviceName ~= "virtual_Loupedeck+" then
local selected = ""
if device == deviceName then
selected = [[selected=""]]
foundDevice = true
end
dc = dc .. [[
<option ]] .. selected .. [[ value="]] .. deviceName .. [[">]] .. deviceName .. [[</option>
]]
end
end
if device ~= "" and not foundDevice and not (string.sub(device, 1, 8) == "virtual_") then
dc = dc .. [[
<option selected="" value="]] .. device .. [[">]] .. device .. [[ (Offline)</option>
]]
elseif #midiDevices == 0 then
dc = dc .. [[
<option disabled="disabled" value="">]] .. i18n("noDevicesDetected") .. [[</option>
]]
end
dc = dc .. [[
<option disabled="disabled" value="">--------------------------</option>
<option disabled="disabled" value="">]] .. string.upper(i18n("virtual")) .. [[:</option>
<option disabled="disabled" value="">--------------------------</option>
]]
local foundVirtualDevice = false
for _, deviceName in ipairs(virtualMidiDevices) do
if deviceName ~= "Loupedeck" and deviceName ~= "virtual_Loupedeck" and deviceName ~= "Loupedeck+" and deviceName ~= "virtual_Loupedeck+" then
local selected = ""
if device == "virtual_" .. deviceName then
selected = [[selected=""]]
foundVirtualDevice = true
end
dc = dc .. [[
<option ]] .. selected .. [[ value="virtual_]] .. deviceName .. [[">]] .. deviceName .. [[</option>
]]
end
end
if device ~= "" and not foundVirtualDevice and string.sub(device, 1, 8) == "virtual_" then
dc = dc .. [[
<option selected="" value="virtual_]] .. device .. [[">]] .. string.sub(device, 9) .. [[ (Offline)</option>
]]
elseif #virtualMidiDevices == 0 then
dc = dc .. [[
<option disabled="disabled" value="">]] .. i18n("noDevicesDetected") .. [[</option>
]]
end
script = script .. [[
changeValueByID('button]] .. buttonID .. [[_action', `]] .. escapeTilda(action) .. [[`);
changeValueByID('button]] .. buttonID .. [[_device', ']] .. device .. [[');
changeValueByID('button]] .. buttonID .. [[_commandType', ']] .. commandType .. [[');
changeValueByID('button]] .. buttonID .. [[_number', ']] .. number .. [[');
changeValueByID('button]] .. buttonID .. [[_channel', ']] .. channel .. [[');
changeValueByID('button]] .. buttonID .. [[_value', ']] .. value .. [[');
changeInnerHTMLByID('button]] .. buttonID .. [[_device', `]] .. dc .. [[`);
]]
end
--------------------------------------------------------------------------------
-- Update Scroll Bar Position:
--------------------------------------------------------------------------------
local scrollBarPositions = mod.scrollBarPosition()
local scrollBarPosition = scrollBarPositions and scrollBarPositions[lastApplication] and scrollBarPositions[lastApplication][lastBank] or 0
script = script .. [[
document.getElementById("scrollArea").scrollTop = ]] .. scrollBarPosition .. [[;
]]
injectScript(script)
--------------------------------------------------------------------------------
-- Force MIDI watchers to update:
--------------------------------------------------------------------------------
mod._midi.update()
end
-- destroyMIDIWatchers() -> none
-- Function
-- Destroys any MIDI Watchers.
--
-- Parameters:
-- * None
--
-- Returns:
-- * None
local function destroyMIDIWatchers()
--------------------------------------------------------------------------------
-- Destroy the MIDI watchers:
--------------------------------------------------------------------------------
if learningMidiDeviceNames and learningMidiDevices then
for _, id in pairs(learningMidiDeviceNames) do
if learningMidiDevices[id] then
learningMidiDevices[id] = nil
end
end
end
learningMidiDevices = nil
learningMidiDeviceNames = nil
end
-- stopLearning(params) -> none
-- Function
-- Sets the Group Editor
--
-- Parameters:
-- * params - The paramaters from the callback
-- * cancel - A boolean specifying whether or not the learning has been cancelled
--
-- Returns:
-- * None
local function stopLearning(params, cancel)
--------------------------------------------------------------------------------
-- We've stopped learning:
--------------------------------------------------------------------------------
currentlyLearning = false
--------------------------------------------------------------------------------
-- Re-enable the main MIDI Callback:
--------------------------------------------------------------------------------
mod._midi.learningMode = false
--------------------------------------------------------------------------------
-- Reset the current line item:
--------------------------------------------------------------------------------
if cancel then
local app = params["application"]
local bank = params["bank"]
local button = params["buttonID"]
local items = mod.items()
if not items[app] then items[app] = {} end
if not items[app][bank] then items[app][bank] = {} end
if not items[app][bank][button] then items[app][bank][button] = {} end
items[app][bank][button].device = nil
items[app][bank][button].commandType = nil
items[app][bank][button].channel = nil
items[app][bank][button].number = nil
items[app][bank][button].value = nil
mod.items(items)
end
--------------------------------------------------------------------------------
-- Update the UI:
--------------------------------------------------------------------------------
mod._manager.injectScript("stopLearnMode()")
updateUI()
--------------------------------------------------------------------------------
-- Destroy the MIDI watchers:
--------------------------------------------------------------------------------
destroyMIDIWatchers()
end
-- startLearning(id, params) -> none
-- Function
-- Sets the Group Editor
--
-- Parameters:
-- * params - The paramaters from the callback
--
-- Returns:
-- * None
local function startLearning(params)
local app = params["application"]
local bank = params["bank"]
local buttonID = params["buttonID"]
--------------------------------------------------------------------------------
-- Save Application & Bank within the module for callback purposes:
--------------------------------------------------------------------------------
learnApplication = app
learnBank = bank
learnButton = buttonID
--------------------------------------------------------------------------------
-- Setup some locals:
--------------------------------------------------------------------------------
local injectScript = mod._manager.injectScript
--------------------------------------------------------------------------------
-- Destroy any leftover MIDI Watchers:
--------------------------------------------------------------------------------
destroyMIDIWatchers()
--------------------------------------------------------------------------------
-- We're currently learning:
--------------------------------------------------------------------------------
currentlyLearning = true
--------------------------------------------------------------------------------
-- Stop the main MIDI Callback Function:
--------------------------------------------------------------------------------
mod._midi.learningMode = true
--------------------------------------------------------------------------------
-- Start Learning Mode in JavaScript Land:
--------------------------------------------------------------------------------
injectScript("startLearnMode('" .. buttonID .. "')")
--------------------------------------------------------------------------------
-- Reset the current line item:
--------------------------------------------------------------------------------
setItem("device", buttonID, app, bank, nil)
setItem("commandType", buttonID, app, bank, nil)
setItem("channel", buttonID, app, bank, nil)
setItem("number", buttonID, app, bank, nil)
setItem("value", buttonID, app, bank, nil)
updateUI()
--------------------------------------------------------------------------------
-- Setup MIDI watchers:
--------------------------------------------------------------------------------
learningMidiDeviceNames = midi.devices()
for _, v in pairs(midi.virtualSources()) do
table.insert(learningMidiDeviceNames, "virtual_" .. v)
end
learningMidiDevices = {}
for _, deviceName in ipairs(learningMidiDeviceNames) do
--------------------------------------------------------------------------------
-- Prevent Loupedeck+'s from appearing in the MIDI Preferences:
--------------------------------------------------------------------------------
if deviceName ~= "Loupedeck" and deviceName ~= "virtual_Loupedeck" and deviceName ~= "Loupedeck+" and deviceName ~= "virtual_Loupedeck+" then
if string.sub(deviceName, 1, 8) == "virtual_" then
learningMidiDevices[deviceName] = midi.newVirtualSource(string.sub(deviceName, 9))
else
learningMidiDevices[deviceName] = midi.new(deviceName)
end
if learningMidiDevices[deviceName] then
learningMidiDevices[deviceName]:callback(function(_, callbackDeviceName, commandType, _, metadata)
if not currentlyLearning then
--------------------------------------------------------------------------------
-- First in, best dressed:
--------------------------------------------------------------------------------
return
end
if commandType == "controlChange" or commandType == "noteOn" or commandType == "pitchWheelChange" then
--------------------------------------------------------------------------------
-- Debugging:
--------------------------------------------------------------------------------
--log.df("commandType: %s", commandType)
--log.df("metadata: %s", hs.inspect(metadata))
--log.df("learnApplication: %s", learnApplication)
--log.df("learnButton: %s", learnButton)
--------------------------------------------------------------------------------
-- Support 14bit Control Change Messages:
--------------------------------------------------------------------------------
local controllerValue = metadata.controllerValue
if metadata.fourteenBitCommand then
controllerValue = metadata.fourteenBitValue
end
--------------------------------------------------------------------------------
-- Ignore noteOff Commands:
--------------------------------------------------------------------------------
if commandType == "noteOn" and metadata.velocity == 0 then return end
--------------------------------------------------------------------------------
-- Check it's not already in use:
--------------------------------------------------------------------------------
local items = mod.items()
local currentItem = items and items[learnApplication] and items[learnApplication][learnBank]
if currentItem then
for i, item in pairs(currentItem) do
if learnButton and i ~= tonumber(learnButton) then
--------------------------------------------------------------------------------
-- Check for matching devices:
--------------------------------------------------------------------------------
local deviceMatch = false
if metadata.isVirtual and item.device == "virtual_" .. callbackDeviceName then deviceMatch = true end
if not metadata.isVirtual and item.device == callbackDeviceName then deviceMatch = true end
--------------------------------------------------------------------------------
-- Check for matching metadata:
--------------------------------------------------------------------------------
local match = false
if item.commandType == commandType then
if commandType == "noteOn" then
if item.channel == metadata.channel and item.number == metadata.note then
match = true
end
end
if commandType == "controlChange" then
if item.channel == metadata.channel and item.number == metadata.controllerNumber and item.value == controllerValue then
match = true
end
end
if commandType == "pitchWheelChange" then
if item.number == metadata.pitchChange then
match = true
end
end
end
--------------------------------------------------------------------------------
-- Duplicate Found:
--------------------------------------------------------------------------------
if deviceMatch and match then
log.wf("Duplicate MIDI Command Found:\nApplication: %s\nBank: %s\nButton: %s", learnApplication, learnBank, learnButton)
--------------------------------------------------------------------------------
-- Reset the current line item:
--------------------------------------------------------------------------------
-- setItem(item, button, bundleID, bankID, value)
setItem("device", learnButton, learnApplication, learnBank, nil)
setItem("commandType", learnButton, learnApplication, learnBank, nil)
setItem("channel", learnButton, learnApplication, learnBank, nil)
setItem("number", learnButton, learnApplication, learnBank, nil)
setItem("value", learnButton, learnApplication, learnBank, nil)
--------------------------------------------------------------------------------
-- Exit the callback:
--------------------------------------------------------------------------------
stopLearning(params)
--------------------------------------------------------------------------------
-- Highlight the row red in JavaScript Land:
--------------------------------------------------------------------------------
updateUI(i)
return
end
end
end
end
--------------------------------------------------------------------------------
-- Save Preferences:
--------------------------------------------------------------------------------
if metadata.isVirtual then
setItem("device", learnButton, learnApplication, learnBank, "virtual_" .. callbackDeviceName)
else
setItem("device", learnButton, learnApplication, learnBank, callbackDeviceName)
end
setItem("commandType", learnButton, learnApplication, learnBank, commandType)
setItem("channel", learnButton, learnApplication, learnBank, metadata.channel)
if commandType == "noteOff" or commandType == "noteOn" then
setItem("number", learnButton, learnApplication, learnBank, metadata.note)
setItem("value", learnButton, learnApplication, learnBank, metadata.velocity)
elseif commandType == "controlChange" then
setItem("number", learnButton, learnApplication, learnBank, metadata.controllerNumber)
setItem("value", learnButton, learnApplication, learnBank, controllerValue)
elseif commandType == "pitchWheelChange" then
setItem("value", learnButton, learnApplication, learnBank, metadata.pitchChange)
end
--------------------------------------------------------------------------------
-- Stop Learning:
--------------------------------------------------------------------------------
stopLearning(params)
updateUI()
end
end)
else
log.ef("MIDI Device did not exist when trying to create watcher: %s", deviceName)
end
end
end
end
-- midiPanelCallback() -> none
-- Function
-- JavaScript Callback for the Preferences Panel
--
-- Parameters:
-- * id - ID as string
-- * params - Table of paramaters
--
-- Returns:
-- * None
local function midiPanelCallback(id, params)
local injectScript = mod._manager.injectScript
local callbackType = params and params["type"]
if callbackType then
if callbackType == "updateAction" then
--------------------------------------------------------------------------------
-- Setup Activators:
--------------------------------------------------------------------------------
local activatorID = params["application"]
if not mod.activator or mod.activator and not mod.activator[activatorID] then
mod.activator = {}
local handlerIds = mod._actionmanager.handlerIds()
--------------------------------------------------------------------------------
-- Get list of registered and custom apps:
--------------------------------------------------------------------------------
local apps = {}
local legacyGroupIDs = {}
local registeredApps = mod._appmanager.getApplications()
for bundleID, v in pairs(registeredApps) do
if v.displayName then
apps[bundleID] = v.displayName
end
legacyGroupIDs[bundleID] = v.legacyGroupID or bundleID
end
local items = mod.items()
for bundleID, v in pairs(items) do
if v.displayName then
apps[bundleID] = v.displayName
end
end
--------------------------------------------------------------------------------
-- Add allowance for "All Applications":
--------------------------------------------------------------------------------
apps["All Applications"] = "All Applications"
for groupID,_ in pairs(apps) do
--------------------------------------------------------------------------------
-- Create new Activator:
--------------------------------------------------------------------------------
mod.activator[groupID] = mod._actionmanager.getActivator("loupedeckCTPreferences" .. groupID)
--------------------------------------------------------------------------------
-- Restrict Allowed Handlers for Activator to current group (and global):
--------------------------------------------------------------------------------
local allowedHandlers = {}
for _,v in pairs(handlerIds) do
local handlerTable = tools.split(v, "_")
if handlerTable[1] == groupID or handlerTable[1] == legacyGroupIDs[groupID] or handlerTable[1] == "global" then
--------------------------------------------------------------------------------
-- Don't include "widgets" (that are used for the Touch Bar):
--------------------------------------------------------------------------------
if handlerTable[2] ~= "widgets" and v ~= "global_menuactions" then
table.insert(allowedHandlers, v)
end
end
end
local unpack = table.unpack
mod.activator[groupID]:allowHandlers(unpack(allowedHandlers))
--------------------------------------------------------------------------------
-- Gather Toolbar Icons for Search Console:
--------------------------------------------------------------------------------
local defaultSearchConsoleToolbar = mod._appmanager.defaultSearchConsoleToolbar()
local appSearchConsoleToolbar = mod._appmanager.getSearchConsoleToolbar(groupID) or {}
local searchConsoleToolbar = mergeTable(defaultSearchConsoleToolbar, appSearchConsoleToolbar)
mod.activator[groupID]:toolbarIcons(searchConsoleToolbar)
end
end
--------------------------------------------------------------------------------
-- Setup Activator Callback:
--------------------------------------------------------------------------------
mod.activator[activatorID]:onActivate(function(handler, action, text)
--------------------------------------------------------------------------------
-- Process Stylised Text:
--------------------------------------------------------------------------------
if text and type(text) == "userdata" then
text = text:convert("text")
end
local actionTitle = text
local handlerID = handler:id()
local items = mod.items()
local button = params["buttonID"]
local bundleID = params["application"]
local bankID = params["bank"]
if not items[bundleID] then items[bundleID] = {} end
if not items[bundleID][bankID] then items[bundleID][bankID] = {} end
if not items[bundleID][bankID][button] then items[bundleID][bankID][button] = {} end
items[bundleID][bankID][button]["actionTitle"] = actionTitle
items[bundleID][bankID][button]["handlerID"] = handlerID
items[bundleID][bankID][button]["action"] = action
mod.items(items)
updateUI()
end)
--------------------------------------------------------------------------------
-- Show Activator:
--------------------------------------------------------------------------------
mod.activator[activatorID]:show()
elseif callbackType == "clear" then
local buttonID = params["buttonID"]
local app = params["application"]
local bank = params["bank"]
--------------------------------------------------------------------------------
-- Clear:
--------------------------------------------------------------------------------
setItem("device", buttonID, app, bank, nil)
setItem("channel", buttonID, app, bank, nil)
setItem("commandType", buttonID, app, bank, nil)
setItem("number", buttonID, app, bank, nil)
setItem("value", buttonID, app, bank, nil)
--------------------------------------------------------------------------------
-- Remove the red highlight if it's still there:
--------------------------------------------------------------------------------
updateUI()
elseif callbackType == "applyToAll" then
--------------------------------------------------------------------------------
-- Apply the selected item to all banks:
--------------------------------------------------------------------------------
local app = params["application"]
local bank = params["bank"]
local button = params["buttonID"]
local items = mod.items()
local item = items and items[app] and items[app][bank] and items[app][bank][button]
local device = item and item.device or ""
local channel = item and item.channel or ""
local commandType = item and item.commandType or ""
local number = item and item.number or ""
local value = item and item.value or ""
local action = item and item.action or ""
local actionTitle = item and item.actionTitle or ""
local handlerID = item and item.handlerID or ""
for i = 1, mod.numberOfBanks do
local bankID = tostring(i)
setItem("device", button, app, bankID, device)
setItem("channel", button, app, bankID, channel)
setItem("commandType", button, app, bankID, commandType)
setItem("number", button, app, bankID, number)
setItem("value", button, app, bankID, value)
setItem("action", button, app, bankID, action)
setItem("actionTitle", button, app, bankID, actionTitle)
setItem("handlerID", button, app, bankID, handlerID)
end
elseif callbackType == "updateNumber" then
--------------------------------------------------------------------------------
-- Update Number:
--------------------------------------------------------------------------------
setItem("number", params["buttonID"], params["application"], params["bank"], params["number"])
elseif callbackType == "updateDevice" then
--------------------------------------------------------------------------------
-- Update Device:
--------------------------------------------------------------------------------
setItem("device", params["buttonID"], params["application"], params["bank"], params["device"])
elseif callbackType == "updateCommandType" then
--------------------------------------------------------------------------------
-- Update Command Type:
--------------------------------------------------------------------------------
setItem("commandType", params["buttonID"], params["application"], params["bank"], params["commandType"])
elseif callbackType == "updateChannel" then
--------------------------------------------------------------------------------
-- Update Channel:
--------------------------------------------------------------------------------
setItem("channel", params["buttonID"], params["application"], params["bank"], params["channel"])
elseif callbackType == "updateValue" then
--------------------------------------------------------------------------------
-- Update Value:
--------------------------------------------------------------------------------
setItem("value", params["buttonID"], params["application"], params["bank"], params["value"])
elseif callbackType == "learnButton" then
--------------------------------------------------------------------------------
-- Learn Button:
--------------------------------------------------------------------------------
if currentlyLearning then
stopLearning(params, true)
else
startLearning(params)
end
elseif callbackType == "scrollBarPosition" then
--------------------------------------------------------------------------------
-- Save Scrollbar Position:
--------------------------------------------------------------------------------
local app = params["application"]
local bank = params["bank"]
local value = params["value"]
local scrollBarPosition = mod.scrollBarPosition()
if not scrollBarPosition[app] then scrollBarPosition[app] = {} end
scrollBarPosition[app][bank] = value
mod.scrollBarPosition(scrollBarPosition)
elseif callbackType == "updateBankLabel" then
--------------------------------------------------------------------------------
-- Update Bank Label:
--------------------------------------------------------------------------------
local bundleID = params["application"]
local bankID = params["bank"]
local label = params["bankLabel"]
local items = mod.items()
if not items[bundleID] then items[bundleID] = {} end
if not items[bundleID][bankID] then items[bundleID][bankID] = {} end
items[bundleID][bankID]["bankLabel"] = label
mod.items(items)
elseif callbackType == "updateUI" then
--------------------------------------------------------------------------------
-- Update UI:
--------------------------------------------------------------------------------
updateUI()
elseif callbackType == "updateApplicationAndBank" then
--------------------------------------------------------------------------------
-- Update Application & Bank:
--------------------------------------------------------------------------------
stopLearning(params)
local app = params["application"]
local bank = params["bank"]
if app == "Add Application" then
injectScript([[
changeValueByID('application', ']] .. mod.lastApplication() .. [[');
]])
local files = chooseFileOrFolder(i18n("pleaseSelectAnApplication") .. ":", "/Applications", true, false, false, {"app"}, false)
if files then
local path = files["1"]
local info = path and infoForBundlePath(path)
local displayName = info and info.CFBundleDisplayName or info.CFBundleName or info.CFBundleExecutable
local bundleID = info and info.CFBundleIdentifier
if displayName and bundleID then
local items = mod.items()
--------------------------------------------------------------------------------
-- Get list of registered and custom apps:
--------------------------------------------------------------------------------
local apps = {}
local registeredApps = mod._appmanager.getApplications()
for theBundleID, v in pairs(registeredApps) do
if v.displayName then
apps[theBundleID] = v.displayName
end
end
for theBundleID, v in pairs(items) do
if v.displayName then
apps[theBundleID] = v.displayName
end
end
--------------------------------------------------------------------------------
-- Prevent duplicates:
--------------------------------------------------------------------------------
for i, _ in pairs(items) do
if i == bundleID or tableContains(apps, bundleID) then
return
end
end
items[bundleID] = {
["displayName"] = displayName,
}
mod.items(items)
else
webviewAlert(mod._manager.getWebview(), function() end, i18n("failedToAddCustomApplication"), i18n("failedToAddCustomApplicationDescription"), i18n("ok"))
log.ef("Something went wrong trying to add a custom application.\n\nPath: '%s'\nbundleID: '%s'\ndisplayName: '%s'",path, bundleID, displayName)
end
--------------------------------------------------------------------------------
-- Update the UI:
--------------------------------------------------------------------------------
mod._manager.refresh()
end
else
mod.lastApplication(app)
mod.lastBank(bank)
--------------------------------------------------------------------------------
-- Change the bank:
--------------------------------------------------------------------------------
local activeBanks = mod._midi.activeBanks()
activeBanks[app] = tostring(bank)
mod._midi.activeBanks(activeBanks)
--------------------------------------------------------------------------------
-- Update the UI:
--------------------------------------------------------------------------------
updateUI()
end
elseif callbackType == "applyTopDeviceToAll" then
--------------------------------------------------------------------------------
-- Apply Top Device To All:
--------------------------------------------------------------------------------
webviewAlert(mod._manager.getWebview(), function(result)
if result == i18n("yes") then
local app = params["application"]
local bank = params["bank"]
local items = mod.items()
local device = items and items[app] and items[app][bank] and items[app][bank]["1"] and items[app][bank]["1"].device
if device then
local maxItems = mod._midi.maxItems
for i=1, maxItems do
setItem("device", tostring(i), app, bank, device)
end
end
updateUI()
end
end, i18n("midiTopDeviceToAll"), i18n("doYouWantToContinue"), i18n("yes"), i18n("no"), "informational")
elseif callbackType == "resetEverything" then
--------------------------------------------------------------------------------
-- Reset Everything:
--------------------------------------------------------------------------------
webviewAlert(mod._manager.getWebview(), function(result)
if result == i18n("yes") then
local default = copy(mod._midi.defaultLayout)
mod.items(default)
updateUI()
end
end, i18n("midiResetAllConfirmation"), i18n("doYouWantToContinue"), i18n("yes"), i18n("no"), "informational")
elseif callbackType == "resetApplication" then
--------------------------------------------------------------------------------
-- Reset Application:
--------------------------------------------------------------------------------
webviewAlert(mod._manager.getWebview(), function(result)
if result == i18n("yes") then
local app = params["application"]
local items = mod.items()
local default = mod._midi.defaultLayout[app] or {}
items[app] = copy(default)
mod.items(items)
updateUI()
end
end, i18n("midiResetGroupConfirmation"), i18n("doYouWantToContinue"), i18n("yes"), i18n("no"), "informational")
elseif callbackType == "resetBank" then
--------------------------------------------------------------------------------
-- Reset Bank:
--------------------------------------------------------------------------------
webviewAlert(mod._manager.getWebview(), function(result)
if result == i18n("yes") then
local app = params["application"]
local bank = params["bank"]
local items = mod.items()
if not items[app] then items[app] = {} end
if not items[app][bank] then items[app][bank] = {} end
local default = mod._midi.defaultLayout[app] and mod._midi.defaultLayout[app][bank] or {}
items[app][bank] = copy(default)
mod.items(items)
updateUI()
end
end, i18n("midiResetSubGroupConfirmation"), i18n("doYouWantToContinue"), i18n("yes"), i18n("no"), "informational")
elseif callbackType == "copyApplication" then
--------------------------------------------------------------------------------
-- Copy Application:
--------------------------------------------------------------------------------
local copyApplication = function(destinationApp)
local items = mod.items()
local app = mod.lastApplication()
local data = items[app]
if data then
items[destinationApp] = fnutils.copy(data)
mod.items(items)
end
end
local builtInApps = {}
local registeredApps = mod._appmanager.getApplications()
for bundleID, v in pairs(registeredApps) do
if v.displayName then
builtInApps[bundleID] = v.displayName
end
end
local userApps = {}
local items = mod.items()
for bundleID, v in pairs(items) do
if v.displayName then
userApps[bundleID] = v.displayName
end
end
local menu = {}
table.insert(menu, {
title = string.upper(i18n("copyActiveApplicationTo")) .. ":",
disabled = true,
})
table.insert(menu, {
title = "-",
disabled = true,
})
for i, v in spairs(builtInApps, function(t,a,b) return t[a] < t[b] end) do
table.insert(menu, {
title = v,
fn = function() copyApplication(i) end
})
end
table.insert(menu, {
title = "-",
disabled = true,
})
for i, v in spairs(userApps, function(t,a,b) return t[a] < t[b] end) do
table.insert(menu, {
title = v,
fn = function() copyApplication(i) end
})
end
local popup = menubar.new()
popup:setMenu(menu):removeFromMenuBar()
popup:popupMenu(mouse.getAbsolutePosition(), true)
elseif callbackType == "copyBank" then
--------------------------------------------------------------------------------
-- Copy Bank:
--------------------------------------------------------------------------------
local numberOfBanks = mod.numberOfBanks
local copyToBank = function(destinationBank)
local items = mod.items()
local app = mod.lastApplication()
local bank = mod.lastBank()
local data = items[app] and items[app][bank]
if data then
items[app][destinationBank] = fnutils.copy(data)
mod.items(items)
end
end
local menu = {}
table.insert(menu, {
title = string.upper(i18n("copyActiveBankTo")) .. ":",
disabled = true,
})
table.insert(menu, {
title = "-",
disabled = true,
})
for i=1, numberOfBanks do
table.insert(menu, {
title = tostring(i),
fn = function() copyToBank(tostring(i)) end
})
end
local popup = menubar.new()
popup:setMenu(menu):removeFromMenuBar()
popup:popupMenu(mouse.getAbsolutePosition(), true)
elseif callbackType == "openAudioMIDISetup" then
hs.open("/Applications/Utilities/Audio MIDI Setup.app")
elseif callbackType == "importSettings" then
--------------------------------------------------------------------------------
-- Import Settings:
--------------------------------------------------------------------------------
local importSettings = function(action)
local lastImportPath = mod.lastImportPath()
if not doesDirectoryExist(lastImportPath) then
lastImportPath = "~/Desktop"
mod.lastImportPath(lastImportPath)
end
local path = chooseFileOrFolder(i18n("pleaseSelectAFileToImport") .. ":", lastImportPath, true, false, false, {"cpMIDI"})
if path and path["1"] then
local data = json.read(path["1"])
if data then
if action == "replace" then
mod.items(data)
elseif action == "merge" then
local original = mod.items()
local combined = mergeTable(original, data)
mod.items(combined)
end
mod._manager.refresh()
end
end
end
local menu = {}
table.insert(menu, {
title = string.upper(i18n("importSettings")) .. ":",
disabled = true,
})
table.insert(menu, {
title = "-",
disabled = true,
})
table.insert(menu, {
title = i18n("replace"),
fn = function() importSettings("replace") end,
})
table.insert(menu, {
title = i18n("merge"),
fn = function() importSettings("merge") end,
})
local popup = menubar.new()
popup:setMenu(menu):removeFromMenuBar()
popup:popupMenu(mouse.getAbsolutePosition(), true)
elseif callbackType == "exportSettings" then
--------------------------------------------------------------------------------
-- Export Settings:
--------------------------------------------------------------------------------
local app = params["application"]
local bank = params["bank"]
local exportSettings = function(what)
local items = mod.items()
local data = {}
local filename = ""
if what == "Everything" then
data = copy(items)
filename = "Everything"
elseif what == "Application" then
data[app] = copy(items[app])
filename = app
elseif what == "Bank" then
data[app] = {}
data[app][bank] = copy(items[app][bank])
filename = "Bank " .. bank
end
local lastExportPath = mod.lastExportPath()
if not doesDirectoryExist(lastExportPath) then
lastExportPath = "~/Desktop"
mod.lastExportPath(lastExportPath)
end
local path = chooseFileOrFolder(i18n("pleaseSelectAFolderToExportTo") .. ":", lastExportPath, false, true, false)
if path and path["1"] then
mod.lastExportPath(path["1"])
json.write(path["1"] .. "/" .. filename .. " - " .. os.date("%Y%m%d %H%M") .. ".cpMIDI", data)
end
end
local menu = {}
table.insert(menu, {
title = string.upper(i18n("exportSettings")) .. ":",
disabled = true,
})
table.insert(menu, {
title = "-",
disabled = true,
})
table.insert(menu, {
title = i18n("everything"),
fn = function() exportSettings("Everything") end,
})
table.insert(menu, {
title = i18n("currentApplication"),
fn = function() exportSettings("Application") end,
})
table.insert(menu, {
title = i18n("currentBank"),
fn = function() exportSettings("Bank") end,
})
local popup = menubar.new()
popup:setMenu(menu):removeFromMenuBar()
popup:popupMenu(mouse.getAbsolutePosition(), true)
elseif callbackType == "changeIgnore" then
--------------------------------------------------------------------------------
-- Change Ignore:
--------------------------------------------------------------------------------
local app = params["application"]
local ignore = params["ignore"]
local items = mod.items()
if not items[app] then items[app] = {} end
items[app]["ignore"] = ignore
mod.items(items)
else
--------------------------------------------------------------------------------
-- Unknown Callback:
--------------------------------------------------------------------------------
log.df("Unknown Callback in MIDI Preferences Panel:")
log.df("id: %s", inspect(id))
log.df("params: %s", inspect(params))
end
end
end
local plugin = {
id = "core.midi.prefs",
group = "core",
dependencies = {
["core.controlsurfaces.manager"] = "manager",
["core.midi.manager"] = "midi",
["core.action.manager"] = "actionmanager",
["core.application.manager"] = "appmanager",
}
}
function plugin.init(deps, env)
--------------------------------------------------------------------------------
-- Define the Panel ID:
--------------------------------------------------------------------------------
local panelID = "midi"
--------------------------------------------------------------------------------
-- Inter-plugin Connectivity:
--------------------------------------------------------------------------------
mod._appmanager = deps.appmanager
mod._midi = deps.midi
mod._manager = deps.manager
mod._webviewLabel = deps.manager.getLabel()
mod._actionmanager = deps.actionmanager
mod._env = env
mod.items = deps.midi.items
mod.numberOfBanks = deps.manager.NUMBER_OF_BANKS
--------------------------------------------------------------------------------
-- Refresh the webview if MIDI devices are added or removed.
-- There's a slight delay on this, otherwise CommandPost gets stuck in an
-- infinite loop.
--------------------------------------------------------------------------------
mod._refreshTimer = delayed.new(0.2, function()
if mod._manager._webview ~= nil and mod._manager.currentPanelID() == panelID then
--log.df("Refreshing MIDI Preferences as number of MIDI Devices have changed.")
updateUI()
--else
--log.df("Not Refereshing MIDI Preferences as the panel is not active.")
end
end)
mod._midi.numberOfMidiDevices:watch(function()
mod._refreshTimer:start()
end)
--------------------------------------------------------------------------------
-- Setup Preferences Panel:
--------------------------------------------------------------------------------
mod._panel = deps.manager.addPanel({
priority = 2035,
id = panelID,
label = i18n("midi"),
image = imageFromPath(config.bundledPluginsPath .. "/core/midi/prefs/images/AudioMIDISetup.icns"),
tooltip = i18n("midi"),
height = 820,
closeFn = destroyMIDIWatchers,
})
--------------------------------------------------------------------------------
--
-- MIDI TOOLS:
--
--------------------------------------------------------------------------------
:addHeading(1, i18n("midi"))
:addCheckbox(2,
{
label = i18n("enableMIDI"),
checked = mod._midi.enabled,
onchange = function(_, params) mod._midi.enabled(params.checked) end,
}
)
:addCheckbox(3,
{
label = i18n("displayMessageWhenChangingBanks"),
checked = mod._midi.displayMessageWhenChangingBanks,
onchange = function(_, params) mod._midi.displayMessageWhenChangingBanks(params.checked) end,
}
)
:addContent(10, generateContent, false)
--------------------------------------------------------------------------------
-- Setup Callback Manager:
--------------------------------------------------------------------------------
mod._panel:addHandler("onchange", "midiPanelCallback", midiPanelCallback)
return mod
end
return plugin
|
Database_Hunter = {date="2020-09-05 13:00:44",lookup={["Beast Mastery"] = {[2329] = {}, [2327] = {}, [2334] = {}, [2328] = {}, [2333] = {}, [2335] = {}, [2343] = {}, [2336] = {}, [2331] = {}, [2345] = {}, [2337] = {}, [2344] = {}},["Marksmanship"] = {[2329] = {}, [2327] = {}, [2334] = {}, [2328] = {}, [2333] = {}, [2335] = {}, [2343] = {}, [2336] = {}, [2331] = {}, [2345] = {}, [2337] = {}, [2344] = {}},["Survival"] = {[2329] = {}, [2327] = {}, [2334] = {}, [2328] = {}, [2333] = {}, [2335] = {}, [2343] = {}, [2336] = {}, [2331] = {}, [2345] = {}, [2337] = {}, [2344] = {}}}, size = 108}
F = function() Database_Hunter.lookup["Beast Mastery"][2329] = {["length"] = 219, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2329][1] = {7970, 12748, 67439, 176395, 312618, 679343, 719619, 1062153, 1553170, 1772383, 2219299, 2465316, 2873985, 3101130, 3327990, 3774340, 4036683, 4553496, 4729798, 4956837, 5535648, 5728580, 6078421, 6237209, 6491466, 6633847, 6815570, 7049163, 7178861, 7333760, 7408651, 7615333, 7696075, 7975596, 8054327, 8164053, 8369527, 8436445, 8478059, 8627023, 8673480, 8760333, 8842657, 8976570, 8994058, 9063302, 9128091, 9238590, 9274848, 9342250, 9371372, 9420013, 9585562, 9598998, 9598998, 9608012, 9608012, 9616873, 9664941, 9781068, 9872862, 10004550, 10184788, 10266295, 10345582, 10453607, 10596806, 10711884, 10821030, 10862546, 11026135, 11154972, 11196965, 11368075, 11455893, 11579173, 11648139, 11748272, 11790494, 11822680, 12013725, 12066531, 12098621, 12184233, 12276578, 12315990, 12366504, 12431025, 12480306, 12556120, 12695203, 12732390, 12814417, 12886642, 12958895, 13172809, 13484420, 13639850, 13811267, 14276258, 14371034, 14545145, 14911607, 14975483, 15113639, 15217793, 15467693, 15565263, 15648395, 15979653, 16040526, 16098771, 16256995, 16393885, 16455014, 16544589, 16603083, 16705211, 16784603, 16966823, 17054112, 17141314, 17199469, 17304252, 17360324, 17403515, 17607099, 17629526, 17646662, 17654163, 17654163, 17660167, 17660167, 17753673, 17826254, 17883226, 17977961, 18156619, 18194359, 18280207, 18460070, 18547091, 18688834, 18774087, 18879491, 19055497, 19167961, 19379128, 19435083, 19581889, 19663853, 19724662, 19831651, 19893050, 19984128, 20035002, 20182090, 20188008, 20188008, 20194225, 20194225, 20200748, 20200748, 20205689, 20205689, 20210696, 20210696, 20210696, 20210696, 20210696, 20247518, 20460687, 20669253, 20842932, 21178807, 21210155, 21357397, 21468448, 21559535, 21907387, 22037182, 22276874, 22719502, 22940845, 23113583, 24007305, 24634354, 25172255, 25830080, 26134810, 26537636, 27055285, 27845727, 29784063, 30757890, 31871239, 32674962, 33740803, 34145707, 34410106, 34534653, 34754928, 35226081, 35506810, 35774178, 35938132, 36044274, 36121561, 36322718, 36467374, 36467374, 36479940, 36522536, 36605135, 36655683, 36709072, 36772387, 36914616, 36933239, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2329][2] = {38737, 67539, 151220, 167444, 393897, 655003, 746228, 995349, 1118560, 1311154, 1404247, 1659029, 1870580, 2201284, 2300511, 2438011, 2627132, 2877776, 3121314, 3287527, 3631875, 3872475, 4033847, 4236947, 4422975, 4777932, 4876770, 5068849, 5218819, 5575588, 5698531, 5970100, 6305876, 6462030, 6741388, 6901192, 7055075, 7393104, 7469403, 7674136, 7986580, 8087076, 8298060, 8457271, 8505193, 8570275, 8820857, 8887298, 8990211, 9107395, 9364377, 9405900, 9613298, 9626706, 9631758, 9631758, 9636847, 9664017, 9751686, 9806446, 9914213, 9955510, 10170944, 10191084, 10256914, 10325742, 10429502, 10456004, 10469947, 10512524, 10522913, 10542580, 10594982, 10627058, 10645806, 10705357, 10722240, 10765007, 11053058, 11111786, 11366526, 11474374, 11680390, 11798766, 12032584, 12229912, 12495553, 12565016, 12921515, 13023104, 13265392, 13453507, 13612366, 13796401, 13971467, 14039585, 14208893, 14383520, 14755973, 15098676, 15274908, 15620052, 16003542, 16163606, 16358485, 16520943, 16714137, 17015885, 17117032, 17261105, 17388165, 17552995, 17681271, 17855850, 18141626, 18330371, 18710110, 18822141, 18983985, 19171956, 19437026, 19556309, 19672251, 19707529, 19855486, 19992395, 20062830, 20106327, 20159602, 20219675, 20296984, 20339738, 20345463, 20345463, 20351188, 20351188, 20390772, 20550244, 20592256, 20719968, 20759655, 20881501, 20987728, 21162458, 21190974, 21261488, 21352662, 21403585, 21445603, 21483464, 21486939, 21486939, 21490413, 21490413, 21493887, 21632557, 21771227, 21909897, 22048567, 22187237, 22325907, 22464577, 22603247, 22741917, 22880587, 23019257, 23157927, 23296597, 23435267, 23573937, 23712607, 23851277, 23989947, 24128617, 24267287, 24405957, 24544627, 24683297, 24821967, 24960637, 25099307, 25237977, 25376647, 25515317, 25653987, 25792657, 25931327, 26069997, 26208667, 26347337, 26486007, 26624677, 26763347, 26902017, 27040687, 27179357, 27318027, 27456697, 27595367, 27734037, 27872707, 28011377, 28150047, 28288717, 28427387, 28566057, 28704727, 28843397, 28982067, 29120737, 29259407, 29398077, 29536747, 29675417, 29814087, 29952757, 30091427, 30230097, 30368767, ["name"] = "Critzeel"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2327] = {["length"] = 120, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2327][1] = {8043, 48520, 113358, 248511, 512392, 620816, 923078, 1120403, 1788677, 2008190, 2182745, 2722578, 2900542, 3414378, 3650439, 3871820, 4324610, 4555342, 4819333, 5235259, 5375013, 5807266, 6083464, 6173056, 6400495, 6506801, 6599762, 6812124, 6878486, 6997197, 7194194, 7235174, 7309220, 7489602, 7570837, 7748742, 7786640, 7926814, 8152233, 8214114, 8376081, 8564715, 8669615, 8779612, 8927085, 9082336, 9172119, 9313615, 9502297, 9540272, 9616106, 9677133, 9857656, 9960396, 10035971, 10222652, 10298380, 10379973, 10553827, 10602772, 10692596, 10793146, 10903390, 11001196, 11068958, 11140691, 11286456, 11336390, 11388706, 11468656, 11482914, 11519220, 11594615, 11743289, 11803393, 11865841, 11943763, 12093251, 12125759, 12187984, 12274780, 12296827, 12501052, 12556108, 12590556, 12667975, 12804459, 12841308, 12877394, 12955910, 12982355, 13069635, 13136222, 13171344, 13212900, 13330711, 13395312, 13725177, 13867347, 14015402, 14102408, 14184543, 14267152, 14352549, 14423176, 14576099, 14921193, 15047859, 15215664, 15350838, 15434364, 15533554, 15737954, 15785555, 15919374, 15996484, 16125296, 16152777, 16256150, 16341912, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2327][2] = {0, 69592, 123843, 371631, 470774, 807287, 891364, 1113770, 1541527, 1793355, 1892682, 2246633, 2404785, 2601703, 3026249, 3212752, 3393840, 3766190, 4080127, 4303951, 4534571, 4886159, 4976104, 5150374, 5216966, 5351393, 5528229, 5600509, 5707926, 5863417, 5966328, 6207398, 6286791, 6371562, 6509230, 6577729, 6666424, 6783257, 6839928, 6936819, 7030867, 7198532, 7250291, 7423032, 7452267, 7601219, 7651010, 7736258, 7853784, 7908539, 8033919, 8085801, 8231456, 8408962, 8437573, 8593000, 8617785, 8735644, 8804325, 8922219, 9003880, 9137218, 9189601, 9269870, 9455635, 9645123, 9799706, 9893950, 10126298, 10290958, 10394429, 10520825, 10642390, 10763019, 10990878, 11477788, 11650871, 11966477, 12412371, 12759889, 12974396, 13248843, 13635115, 13831592, 14161474, 14450099, 14607101, 14776861, 15061507, 15515784, 15694183, 15925450, 16034895, 16034895, 16205478, 16376061, 16546644, 16717227, 16887810, 17058393, 17228976, 17399559, 17570142, 17740725, 17911308, 18081891, 18252474, 18423057, 18593640, 18764223, 18934806, 19105389, 19275972, 19446555, 19617138, 19787721, 19958304, 20128887, 20299470, 20470053, ["name"] = "Connorwarren"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2334] = {["length"] = 138, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2334][1] = {62554, 152840, 204140, 481716, 688393, 772783, 917707, 1111544, 1375991, 1413158, 1610785, 1818205, 2030955, 2182691, 2288548, 2451498, 2602580, 2801371, 2903339, 3103396, 3391431, 3613062, 3747346, 3798911, 3806983, 3982115, 4158685, 4248183, 4275905, 4275905, 4319742, 4419857, 4505829, 4606040, 4829785, 5045246, 5230068, 5479883, 5761489, 6111671, 6198066, 6596548, 6814158, 6989112, 7130152, 7288152, 7411465, 7490046, 7573586, 7821125, 7906788, 8017992, 8172085, 8464497, 8588018, 8803090, 9036085, 9108660, 9252809, 9429638, 9617634, 9687896, 10007470, 10157133, 10299331, 10329145, 10336330, 10336330, 10615471, 10661478, 10761801, 10782448, 10875675, 11059629, 11093270, 11174447, 11228008, 11253773, 11362546, 11455052, 11482709, 11518760, 11534757, 11600202, 11715781, 11794328, 11872242, 12017391, 12113044, 12250994, 12540418, 12564573, 12775698, 12869120, 12946818, 13176056, 13399983, 13450763, 13641276, 13725938, 13844378, 13926622, 14221912, 14554694, 14729320, 14918933, 15235955, 15511302, 15640189, 15958081, 16252457, 16439759, 16739503, 16865401, 17021347, 17149935, 17263142, 17381777, 17434451, 17485019, 17597989, 17743426, 17888863, 18034300, 18179737, 18325174, 18470611, 18616048, 18761485, 18906922, 19052359, 19197796, 19343233, 19488670, 19634107, 19779544, 19924981, 20070418, ["name"] = "냥여래"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2334][2] = {28598, 122202, 261480, 362174, 695284, 818345, 1012597, 1281103, 1413158, 1557637, 1781548, 1972429, 2108252, 2252488, 2403222, 2598905, 2835123, 3053469, 3221989, 3381000, 3663391, 3832973, 4226307, 4545531, 4843113, 5217099, 5385217, 5669076, 5820431, 5826973, 5826973, 6000384, 6066076, 6173813, 6373323, 6436816, 6604279, 6771861, 6771861, 6911365, 7006432, 7112922, 7212950, 7357345, 7446720, 7531083, 7728180, 7763644, 7944382, 7992569, 8050683, 8175834, 8259807, 8297752, 8405210, 8471772, 8633887, 8681061, 8872042, 8924306, 9059907, 9164253, 9291843, 9373217, 9462814, 9624918, 9755094, 9821774, 9872458, 10052786, 10116433, 10277139, 10333532, 10582900, 10700330, 10921836, 11084856, 11251064, 11488260, 11641867, 11850863, 11990073, 12145222, 12293889, 12508356, 12538794, 12780229, 12926504, 13034726, 13124364, 13124364, 13124364, 13233830, 13305609, 13364062, 13440034, 13531899, 13757280, 13823009, 13902081, 14027116, 14262150, 14298726, 14510029, 14602021, 14905161, 14962419, 15162147, 15229538, 15359703, 15632542, 15910762, 15986948, 16091601, 16289195, 16489196, 16678485, 16733912, 16913502, 16998652, 17134032, 17313794, 17519556, 17745094, 17994031, 18149724, 18348697, 18477150, 18706564, 18795021, 18835521, 19069560, 19258934, 19484282, 19657167, 19738919, 19811646, 20054693, ["name"] = "살수병기병하"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2328] = {["length"] = 243, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2328][1] = {20655, 84535, 265693, 328858, 620635, 717899, 869760, 1002240, 1253089, 1397580, 1726207, 1861530, 2049219, 2113612, 2328444, 2667579, 2738968, 3172921, 3264568, 3605932, 3869403, 4032852, 4241655, 4370198, 4575036, 4771005, 4898806, 5053052, 5229786, 5344606, 5657055, 5690589, 5804776, 6020437, 6081057, 6152455, 6398390, 6530321, 6639750, 6804657, 7002285, 7089217, 7143072, 7164845, 7285647, 7310842, 7400182, 7427263, 7526341, 7681374, 7807134, 8014915, 8108389, 8271555, 8455320, 8973507, 9128227, 9189004, 9518954, 9884799, 10204270, 10445080, 10603483, 10853679, 11040723, 11173538, 11500866, 11716561, 11878782, 12458218, 12681236, 13021775, 13493991, 13802705, 13959589, 14213633, 14453020, 14745298, 14825495, 15087346, 15193781, 15304552, 15540999, 15871455, 16085933, 16423696, 16609904, 16898574, 17293935, 17467290, 17608640, 17852151, 18116768, 18301740, 18521287, 18708692, 18866435, 19012155, 19115572, 19301982, 19465107, 19616046, 19693810, 19839492, 19936267, 20001167, 20142941, 20208511, 20341849, 20431329, 20560623, 20664634, 20715995, 20748226, 20893827, 20924787, 20993147, 21024431, 21117223, 21249665, 21303218, 21438165, 21487150, 21572708, 21752216, 21818938, 21910827, 22090070, 22173622, 22241835, 22302586, 22417391, 22499718, 22586949, 22664073, 22711704, 22763659, 22828836, 22974321, 23123990, 23371409, 23429471, 23651188, 23756729, 23975913, 24070517, 24752495, 25183781, 25607048, 26136170, 27214090, 27622966, 27895330, 28531513, 29174072, 29652937, 29861424, 30661404, 31001216, 31480255, 31891106, 32456156, 32742609, 33180306, 33454959, 33761562, 34127864, 34284366, 34408557, 34592616, 34873755, 35027023, 35136048, 35318329, 35469110, 35587779, 35703566, 35779025, 35897738, 35991694, 36075244, 36105216, 36202907, 36274268, 36341941, 36395854, 36568554, 36609778, 36676074, 36835225, 36884699, 36938612, 37031151, 37094574, 37222133, 37268115, 37370156, 37494998, 37541416, 37651448, 37690711, 37813286, 37875107, 37898974, 37906541, 38000639, 38135108, 38205317, 38290976, 38464178, 38515575, 38588164, 38708652, 38833416, 38896665, 39030804, 39082054, 39243746, 39341652, 39386072, 39442827, 39450674, 39561738, 39628177, 39704951, 39845083, 39945553, 40009866, 40148069, 40337995, 40566954, 41002284, 41275837, 41535160, 41967724, 42677607, 44316387, 44825886, 46986425, 48376183, 49169036, 51359458, 51362193, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2328][2] = {20433, 91766, 127749, 366599, 478884, 603987, 850424, 1033167, 1139197, 1385020, 1513191, 1771309, 1893068, 2243859, 2342142, 2535487, 2720390, 2891772, 3135109, 3278978, 3599865, 3672606, 3945414, 4089371, 4361724, 4451910, 4692518, 4962730, 5054369, 5274585, 5476928, 5524148, 5739642, 5819751, 5941303, 6091742, 6211083, 6361165, 6745987, 6944186, 7198727, 7489161, 7719240, 7872448, 7994026, 8123915, 8185044, 8202002, 8312407, 8457477, 8543329, 8695663, 8814958, 8901148, 9098744, 9233148, 9363641, 9661307, 9873716, 9985781, 10090727, 10191539, 10253341, 10362028, 10469397, 10532833, 10566539, 10636604, 10777086, 10855823, 10920697, 10958985, 11036000, 11265915, 11448047, 11566434, 11890143, 12082465, 12197387, 12403716, 12662739, 12884322, 13055331, 13430479, 13564418, 13812235, 14016536, 14277428, 14321072, 14489931, 14705315, 14806427, 14980593, 15117902, 15250479, 15372047, 15540995, 15583510, 15729338, 15831435, 15936497, 16004293, 16124968, 16153215, 16229102, 16413690, 16456432, 16513854, 16723527, 16827439, 16900625, 17082795, 17132207, 17237076, 17513407, 17670958, 17776069, 18043363, 18174839, 18389498, 18532377, 18666852, 18730386, 18867987, 18956282, 19049660, 19127005, 19266703, 19333258, 19467770, 19727526, 19917054, 20150677, 20480833, 20628236, 20832626, 21155853, 21469579, 21571297, 21803863, 21835783, 22180415, 22258617, 22455982, 22717345, 22797129, 22932827, 23068389, 23130075, 23199173, 23554040, 23763197, 24061924, 24362652, 24563551, 24795307, 25070492, 25154461, 25480680, 25741500, 26014174, 26211128, 26331048, 26565217, 26949269, 27090729, 27261011, 27525204, 27542390, 27705362, 27868334, 28031306, 28194278, 28357250, 28520222, 28683194, 28846166, 29009138, 29172110, 29335082, 29498054, 29661026, 29823998, 29986970, 30149942, 30312914, 30475886, 30638858, 30801830, 30964802, 31127774, 31290746, 31453718, 31616690, 31779662, 31942634, 32105606, 32268578, 32431550, 32594522, 32757494, 32920466, 33083438, 33246410, 33409382, 33572354, 33735326, 33898298, 34061270, 34224242, 34387214, 34550186, 34713158, 34876130, 35039102, 35202074, 35365046, 35528018, 35690990, 35853962, 36016934, 36179906, 36342878, 36505850, 36668822, 36831794, 36994766, 37157738, 37320710, 37483682, 37646654, 37809626, 37972598, 38135570, 38298542, 38461514, 38624486, 38787458, 38950430, 39113402, 39276374, 39439346, 39602318, ["name"] = "Bakeries"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2333] = {["length"] = 192, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2333][1] = {69831, 111002, 216042, 334674, 443993, 531184, 608136, 752787, 888856, 969382, 1083556, 1150177, 1365901, 1519814, 1621882, 1835260, 2247932, 2527541, 2977992, 3598620, 4342526, 4798059, 6867105, 7924424, 8858581, 10046743, 10646038, 10931947, 11535146, 11876729, 12224525, 12696308, 13055127, 13415096, 13666208, 13803121, 13951803, 14137781, 14342397, 14485387, 14654474, 14988750, 15236009, 15402494, 15715464, 15867953, 16004945, 16205782, 16426010, 16680618, 16885268, 17015342, 17213306, 17344113, 17634035, 17721083, 17876990, 18189975, 18410301, 18462683, 18643052, 18905031, 19024156, 19153218, 19255353, 19383652, 19477841, 19681796, 19902894, 19999662, 20203218, 20381779, 20520236, 20739292, 20880034, 21017980, 21156334, 21195967, 21253426, 21312776, 21389316, 21480261, 21579097, 21687013, 21732216, 21821378, 22053023, 22108662, 22259834, 22322327, 22492706, 22662155, 23016289, 23163353, 23713142, 24385016, 24931436, 25319625, 25986951, 26412110, 26668855, 26935025, 27327643, 27525214, 27739072, 27842553, 27960543, 28174148, 28320834, 28521465, 28626127, 28728739, 28762802, 28826988, 28985554, 29151605, 29241372, 29367268, 29462068, 29543306, 29725471, 29792065, 29901483, 30076668, 30501539, 30699915, 30932559, 31220239, 31312131, 31461571, 31583044, 31775066, 31967917, 32312799, 32466574, 32528193, 32821203, 32885456, 33059202, 33315053, 33576554, 33759180, 33840483, 34077129, 34313775, 34550421, 34787067, 35023713, 35260359, 35497005, 35733651, 35970297, 36206943, 36443589, 36680235, 36916881, 37153527, 37390173, 37626819, 37863465, 38100111, 38336757, 38573403, 38810049, 39046695, 39283341, 39519987, 39756633, 39993279, 40229925, 40466571, 40703217, 40939863, 41176509, 41413155, 41649801, 41886447, 42123093, 42359739, 42596385, 42833031, 43069677, 43306323, 43542969, 43779615, 44016261, 44252907, 44489553, 44726199, 44962845, 45199491, 45436137, ["name"] = "Marcel"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2333][2] = {15961, 65871, 118965, 313415, 575677, 705973, 903719, 1047220, 1242986, 1433684, 1675566, 1882310, 2002788, 2173540, 2523889, 2662229, 2907392, 3166031, 3490151, 3734342, 4284602, 4445875, 4994097, 6181746, 7608048, 8166027, 8848481, 9647746, 10014697, 10127795, 10345047, 10476563, 10543409, 10674980, 10884002, 10981131, 11069958, 11183586, 11270093, 11346502, 11492165, 11568554, 11652197, 11742394, 11813250, 11868900, 12148098, 12388797, 12464952, 12654605, 12789263, 13005740, 13049109, 13203367, 13308849, 13444046, 13805541, 13855961, 14036831, 14253622, 14411716, 14563456, 14715119, 15115726, 15142817, 15252936, 15480888, 15577120, 15755896, 16166924, 16357962, 16561647, 16807615, 17087338, 17187959, 17476094, 17488705, 17552918, 17643978, 17742549, 17764946, 17809639, 17847595, 17886723, 17976351, 18111426, 18169091, 18231381, 18302254, 18344821, 18408490, 18509870, 18766881, 18833329, 18910212, 19260431, 19385463, 19406747, 19472740, 19772786, 19990574, 20350030, 20933058, 21326368, 21984544, 22514250, 22946608, 23518234, 24009165, 24688416, 24936893, 25287083, 25710359, 26127181, 26549635, 26930318, 27102785, 27346198, 27675502, 27822414, 28188125, 28561953, 28754212, 28896343, 29217323, 29789543, 30009176, 30359875, 30961649, 31557304, 31948642, 32913521, 33154316, 33396650, 33947276, 34203809, 34508991, 34756050, 34963938, 35056705, 35192600, 35288353, 35487640, 35514609, 35702397, 35719148, 35894351, 35909579, 36032557, 36058436, 36202304, 36251657, 36405369, 36420597, 36500017, 36500788, 36546572, 36631717, 36732473, 36797340, 36888468, 36981663, 37237123, 37429698, 37782297, 38301684, 38675397, 38991768, 39259146, 40112404, 40519868, 41060070, 41413180, 41640099, 42019906, 42220587, 42432080, 42632912, 43071104, 43158786, 43431883, 43514821, 43857356, 44006790, 44097702, 44338905, 44579162, 44649166, 44870735, 44948542, 45076763, 45190461, ["name"] = "Jaggohi"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2335] = {["length"] = 162, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2335][1] = {10932, 84558, 169150, 476466, 632520, 1018870, 1051802, 1461158, 1766075, 1887537, 2124602, 2518604, 2678275, 3050035, 3210078, 3473009, 3587796, 3779386, 4118242, 4205296, 4595015, 4970818, 5050322, 5166380, 5456188, 5547963, 5730008, 5849033, 6073252, 6214722, 6471756, 6602573, 6760906, 6941772, 7004809, 7107034, 7177821, 7374024, 7459794, 7630817, 7741811, 7831725, 7910066, 8072597, 8122288, 8297386, 8368115, 8424709, 8570976, 8635560, 8744805, 8774630, 8826278, 8996801, 9054691, 9175248, 9239641, 9319031, 9428195, 9541439, 9635820, 9708146, 9758011, 9861302, 9939391, 10054012, 10121938, 10210310, 10259550, 10366746, 10402145, 10440791, 10504332, 10544328, 10815943, 10935568, 11238227, 11595242, 11980672, 12216485, 12473045, 12961426, 13429184, 13654580, 14089886, 14588583, 14845364, 15101111, 15606391, 15777598, 15925046, 16062044, 16417704, 16493472, 16614002, 16667081, 16782968, 16836831, 16913134, 16965797, 17063986, 17113835, 17205413, 17231653, 17310575, 17422063, 17469888, 17491020, 17594634, 17619057, 17650540, 17730486, 17843741, 17876247, 17925187, 18008303, 18123042, 18165939, 18332421, 18421401, 18466359, 18585619, 18679160, 18788668, 18970290, 19078557, 19196244, 19235166, 19373475, 19417736, 19451159, 19652800, 19676472, 19881449, 19959873, 20075164, 20155189, 20389423, 20475925, 20560722, 20705463, 20791369, 20866946, 20999278, 21454035, 21670653, 22036337, 22297256, 22527917, 22724074, 23203906, 23497912, 23712342, 24006617, 24314624, 24650863, 24791425, 25102516, 25244559, 25520939, 25644922, 25644922, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2335][2] = {13160, 71156, 155318, 378454, 660034, 747007, 981866, 1262205, 1360097, 1445620, 1823824, 1932979, 2195558, 2313446, 2508841, 2735374, 2876454, 3130889, 3208351, 3433438, 3590066, 3692021, 3912371, 4204828, 4301760, 4542926, 4793119, 4868335, 5016287, 5327537, 5389677, 5452918, 5691891, 5755107, 5825765, 5907462, 6027361, 6151245, 6320012, 6519784, 6677888, 6729793, 6960232, 6992306, 7135625, 7283321, 7333812, 7483892, 7610952, 7752231, 7925589, 8214451, 8531535, 8588411, 8701206, 8944899, 9037431, 9157134, 9228596, 9340014, 9379349, 9418539, 9488492, 9587169, 9685740, 10039204, 10190934, 10456948, 10805322, 10920484, 11100398, 11240203, 11276543, 11593288, 11716632, 11928095, 12046117, 12332976, 12428579, 12553090, 12771524, 12919092, 12955142, 13084647, 13366620, 13404115, 13605598, 13874696, 13987824, 14273719, 14339010, 14535706, 14710987, 14807907, 15069177, 15287366, 15405203, 15513342, 15584267, 15822454, 15987325, 16258068, 16365828, 16582916, 16787589, 16881408, 17117762, 17215357, 17402615, 17583774, 17841284, 17931572, 18063292, 18155008, 18216640, 18287362, 18409378, 18474091, 18634121, 18697867, 18840040, 18920253, 19029429, 19093757, 19220375, 19304234, 19354649, 19439605, 19681247, 19753251, 19886651, 19957557, 20012434, 20085027, 20145646, 20338699, 20500536, 20668181, 20832347, 21183502, 21278754, 21368809, 21679168, 21936234, 22039331, 22316508, 22666309, 22751094, 22870759, 23004255, 23114357, 23485214, 23576285, 23823798, 23863850, 24051362, 24108694, 24222467, 24282468, 24435187, 24587906, 24740625, ["name"] = "Scotech"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2343] = {["length"] = 258, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2343][1] = {16113, 113668, 210530, 232316, 311212, 386747, 450003, 609942, 737234, 809685, 891553, 947598, 994243, 1027626, 1094291, 1184366, 1203284, 1293495, 1346799, 1397692, 1486084, 1860191, 2013767, 2311310, 2651631, 3002917, 3375070, 3563062, 3763314, 4076701, 4269288, 4575361, 4717844, 5108223, 5249785, 5369146, 5520164, 5785712, 5916519, 6131103, 6276132, 6341238, 6582585, 6781621, 6879454, 7080218, 7192435, 7328900, 7433973, 7600368, 7720521, 7829874, 8032850, 8160645, 8300742, 8633723, 8909357, 9118900, 9308603, 9418630, 9594948, 9671427, 9678720, 9724138, 9751486, 9837362, 9883455, 9908777, 9943921, 9951157, 10001619, 10201094, 10296112, 10356231, 10591110, 10830077, 10997806, 11276955, 11401391, 11456020, 11689053, 11771979, 11877428, 12114421, 12114421, 12114421, 12132619, 12141718, 12193308, 12193308, 12421028, 12438393, 12513580, 12644186, 12690694, 12808959, 13321087, 13537104, 13606298, 14178492, 14293898, 14293898, 14293898, 14293898, 14693426, 14781676, 15168408, 15307238, 15538642, 15658675, 15933848, 15999704, 16126113, 16357025, 16441415, 16569748, 16648178, 16715143, 16788882, 16991010, 17108313, 17259470, 17328399, 17458098, 17677573, 17994659, 18275409, 18419156, 18619332, 18672277, 18874188, 18959827, 19079220, 19169659, 19266943, 19317054, 19398506, 19521878, 19698955, 19752895, 19862672, 19972459, 20129199, 20178209, 20279912, 20346800, 20433960, 20557419, 20969521, 21080563, 21317623, 21592703, 21877095, 22030970, 22208866, 22480389, 22596739, 22925286, 23041729, 23263482, 23512693, 23512693, 23595124, 23733001, 23792499, 23859580, 23922023, 23993370, 24271123, 24359485, 24512808, 24628837, 24865932, 24996161, 25316636, 25471972, 25570990, 26044234, 26095202, 26140566, 26146505, 26267568, 26480026, 26649241, 26986437, 27139760, 27359248, 27431739, 27526886, 27783962, 27868045, 28119927, 28372150, 28458414, 28819119, 28952476, 29238717, 29333306, 29486203, 29602041, 29748587, 29831972, 29981195, 30078586, 30182532, 30298358, 30405941, 30529322, 30594297, 30740681, 30887065, 31033449, 31179833, 31326217, 31472601, 31618985, 31765369, 31911753, 32058137, 32204521, 32350905, 32497289, 32643673, 32790057, 32936441, 33082825, 33229209, 33375593, 33521977, 33668361, 33814745, 33961129, 34107513, 34253897, 34400281, 34546665, 34693049, 34839433, 34985817, 35132201, 35278585, 35424969, 35571353, 35717737, 35864121, 36010505, 36156889, 36303273, 36449657, 36596041, 36742425, 36888809, 37035193, 37181577, 37327961, 37474345, 37620729, 37767113, ["name"] = "Rngjumala"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2343][2] = {38599, 234925, 290074, 398305, 619200, 792386, 865679, 1121337, 1175659, 1330163, 1603368, 1683237, 1808209, 2067332, 2212808, 2367281, 2520493, 2730742, 3014280, 3616603, 3719672, 3760449, 3760449, 3799392, 3870888, 4134704, 4253411, 4396136, 4498114, 4630988, 4685010, 4759399, 4830154, 4887526, 5061360, 5273798, 5502609, 5730609, 5974749, 6115817, 6318570, 6488522, 6710685, 6950403, 7186451, 7308018, 7425395, 7780840, 7951645, 8054796, 8200550, 8263022, 8278261, 8317086, 8436833, 8484160, 8613281, 8740233, 9029962, 9292681, 9428978, 9728587, 9862136, 9934588, 10116186, 10204829, 10257708, 10342263, 10489594, 10524663, 10611168, 10893025, 10957856, 11063090, 11316476, 11434968, 11697643, 11774489, 12038012, 12214358, 12499281, 12568135, 12714401, 12736779, 12844792, 12914276, 13001062, 13139512, 13438129, 13589977, 13717689, 13737839, 13887400, 13961417, 13961417, 13961417, 13981568, 14066682, 14117650, 14178486, 14231370, 14249361, 14256688, 14456133, 14568460, 15041412, 15202525, 15368759, 15701868, 15796821, 15945687, 15955065, 15955065, 15981264, 16101418, 16167684, 16444617, 16569088, 16855379, 16951457, 17143721, 17342045, 17475854, 17881928, 17949421, 18350931, 18445584, 18686417, 18731431, 18775420, 18993787, 19105705, 19169098, 19430225, 19523317, 19729784, 20001648, 20107178, 20344736, 20489187, 20916181, 21034329, 21425707, 21524212, 21852406, 21908885, 22058966, 22216979, 22366285, 22925488, 23045617, 23480019, 23804000, 23804000, 23851988, 23960441, 24163236, 24460446, 24633939, 24764502, 25027234, 25139313, 25474167, 25602870, 25682550, 25797290, 26023036, 26158818, 26239188, 26337519, 26493721, 26590015, 26689209, 26771217, 26841836, 26956102, 27078953, 27218838, 27286819, 27416105, 27456711, 27527570, 27541965, 27551425, 27645896, 27684478, 27764256, 27806501, 28040396, 28067811, 28272985, 28330556, 28485526, 28581132, 28805363, 28879700, 28879700, 28916690, 28949048, 29109961, 29197389, 29266899, 29348569, 29473212, 29522249, 29561994, 29874151, 29994287, 30221208, 30473821, 30853792, 31319867, 31587008, 31762882, 32124563, 32705972, 32848030, 33132968, 33263354, 33272115, 33285762, 33324756, 33626491, 33768023, 33866645, 34187360, 34313152, 34577274, 34795108, 35105982, 35161917, 35198907, 35278316, 35308988, 35525358, 35577301, 35648881, 35841967, 35964200, 35988489, 36113253, 36252291, 36359024, 36465416, 36593517, 36632907, 36883293, 36939607, 37041516, 37161982, 37335466, 37353458, 37437847, 37580036, 37671428, 37739818, 37845723, 37913618, ["name"] = "Wood"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2336] = {["length"] = 255, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2336][1] = {21546, 106536, 141200, 414119, 640280, 805213, 1118970, 1570315, 1645587, 1894766, 2411964, 2488639, 2628466, 2866191, 3068170, 3139194, 3465667, 3598992, 3817235, 3880249, 4204048, 4504005, 4620400, 4795620, 4930061, 5073420, 5240060, 5371319, 5568658, 5660509, 5755738, 5932689, 6089629, 6225622, 6281878, 6330525, 6359913, 6545756, 6676917, 6823411, 7191895, 7467926, 7803091, 8162168, 8367342, 8935725, 9122648, 9549550, 10320402, 11049519, 11851023, 12931869, 13387143, 14069958, 14683215, 15143126, 16218296, 17185390, 17581688, 18112340, 18916728, 19578492, 19965031, 21010460, 21501791, 21845623, 22511325, 22888273, 23217030, 23794593, 24291174, 24450376, 24481657, 24708101, 24976236, 25835438, 26110131, 26798961, 27290392, 27594736, 28161654, 28413243, 28890807, 29749215, 30169690, 30427769, 30877595, 31389851, 31800162, 32041046, 32755885, 32885380, 33248277, 34902035, 35382600, 35821763, 36882659, 37311042, 37772470, 38399435, 38964605, 39576538, 39787709, 40333860, 40702577, 41094789, 41332351, 41443657, 41540557, 41676408, 41822396, 41883716, 42023705, 42075586, 42190159, 42212686, 42308871, 42321571, 42374243, 42432677, 42522080, 42551823, 42639831, 42676351, 42806886, 42866563, 42951094, 42997695, 43177999, 43260721, 43321397, 43343331, 43463482, 43584080, 43613791, 43704447, 43762326, 43864722, 44169968, 44217319, 44392434, 44482118, 44786959, 45024700, 45166880, 45401350, 46108467, 46416429, 47836388, 48118847, 48648480, 50096781, 50332720, 50843029, 51818928, 52642590, 53794675, 54091935, 54585430, 55198796, 55619286, 57078170, 57501106, 58393907, 59626090, 60339924, 60595994, 60963406, 61863374, 61886452, 62263989, 63180825, 63458937, 63775305, 64196602, 64765568, 64918407, 65226063, 65493649, 65656713, 65938947, 66126305, 66260898, 66551688, 66873117, 66965058, 67139125, 67470191, 67612672, 67788239, 69231434, 69612293, 69869825, 70843009, 72024083, 72637143, 73255147, 74080997, 74734663, 75303627, 76199962, 76837814, 77292443, 77386523, 77619827, 77909344, 77983613, 78102498, 78772188, 78886160, 79048086, 79152673, 79246102, 79281864, 79368618, 79513704, 79604071, 79664123, 79854343, 79911352, 80050960, 80129238, 80250431, 80380099, 80507321, 80603378, 80692827, 80848272, 80934164, 81014466, 81053919, 81187059, 81220164, 81250092, 81344787, 81448603, 81495644, 81583646, 81769642, 81812741, 81874161, 81926081, 82264618, 82603155, 82941692, 83280229, 83618766, 83957303, 84295840, 84634377, 84972914, 85311451, 85649988, 85988525, 86327062, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2336][2] = {7943, 63977, 126931, 196225, 333638, 361570, 423065, 498682, 553701, 699884, 763133, 832074, 923041, 969519, 1072374, 1179510, 1193428, 1274572, 1340967, 1438725, 1489551, 1566076, 1650780, 1717044, 1752448, 1844951, 1891291, 1969141, 2033747, 2169262, 2248563, 2537042, 2560502, 2650921, 2819753, 2896862, 2996726, 3115917, 3277240, 3648666, 4388495, 5337952, 5548952, 7196832, 7421974, 7979171, 8586927, 9907862, 10338809, 10578347, 11169061, 11507707, 11685349, 12299730, 12952456, 13389862, 13899673, 14233318, 14777662, 15170791, 15772524, 15963243, 16405282, 16801138, 16999738, 17227706, 17576009, 17770991, 17883845, 18026518, 18128796, 18214944, 18373153, 18458263, 18617345, 18855948, 19501173, 20221235, 20460058, 20738918, 20938518, 21075106, 21425940, 21614504, 21933046, 22262054, 22873629, 23063832, 23291981, 23827006, 24119930, 24484860, 25218288, 25414541, 25723157, 25761938, 26359966, 26661035, 26933633, 27359390, 27535184, 27720811, 28102756, 28457768, 28561880, 28657459, 28892026, 28908412, 28990336, 29165724, 29257383, 29420395, 29684684, 29889509, 29989068, 30021068, 30287332, 30429178, 30485178, 30587086, 30661107, 30892399, 30997333, 31070768, 31212641, 31310174, 31393603, 31424803, 31481076, 31544613, 31644744, 31833451, 31876489, 31979819, 32037987, 32124938, 32166775, 32271258, 32356601, 32424794, 32491045, 32937540, 33199474, 33392915, 33538656, 34041218, 34174455, 34426964, 34787535, 35220977, 35566300, 37048474, 37931561, 38829257, 39957746, 40670727, 41646360, 42225498, 43198942, 44206411, 45159560, 45744398, 46233808, 46565495, 47273342, 47776391, 48446919, 49173091, 49559341, 49911924, 50275104, 50675288, 51054113, 51292533, 51633962, 51722450, 51881033, 52031846, 52919352, 53104547, 53297989, 53840846, 53997335, 54278984, 54506744, 54814549, 55029588, 55164118, 55690909, 56182087, 56198952, 56219930, 56303571, 56403940, 56511893, 56555551, 56664162, 56707329, 56775307, 56857691, 57041411, 57107369, 57198434, 57285279, 57496709, 57564810, 57651943, 57723651, 58014166, 58076944, 58207316, 58536183, 58607018, 58744225, 58892631, 59123072, 59262476, 59345764, 59530938, 59654679, 59701145, 59827529, 59878088, 59994401, 60102450, 60303759, 60349769, 60428414, 60494870, 60585240, 60622258, 60700423, 60873815, 60950428, 61045218, 61076348, 61185450, 61207387, 61251129, 61277649, 61366978, 61466712, 61693858, 61784791, 61892123, 61946189, 62206415, 62248402, 62299704, 62384202, 62462902, 62501260, 62552563, 62661669, 62661669, ["name"] = "후리덤쏭"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2331] = {["length"] = 204, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2331][1] = {22081, 74762, 131108, 353356, 712483, 785300, 984711, 1399810, 1565241, 1845927, 2074812, 2243979, 2559842, 2728425, 2844132, 3036435, 3170198, 3342883, 3591964, 3717714, 3922789, 4154973, 4267420, 4405616, 4548321, 4596875, 4720270, 4820210, 4887210, 4957882, 5058435, 5107278, 5229931, 5296326, 5339976, 5442733, 5550527, 5642776, 5743455, 5860952, 6031495, 6191177, 6307104, 6499266, 6587464, 6724502, 6938160, 7037896, 7137302, 7426413, 7615235, 7695369, 7902694, 8234388, 8355810, 8508063, 8823197, 8976359, 9068255, 9311256, 9386536, 9516731, 9605515, 9782929, 10088060, 10302960, 10662711, 11062754, 11396964, 11866765, 12064415, 12456306, 12710881, 13273801, 13756714, 14158437, 14418777, 14777992, 15107971, 15478941, 15946357, 16205651, 16420744, 16635532, 16733804, 16954444, 17123157, 17286750, 17378216, 17428315, 17528029, 17661696, 17760287, 17819704, 17953810, 18111037, 18209933, 18666879, 19009563, 19173571, 19475139, 19804969, 20108760, 20390777, 21035171, 21512179, 22047630, 22628748, 23430617, 23745145, 24316414, 25148421, 25555072, 26165998, 26949282, 27577674, 27787933, 28683256, 29301715, 29694476, 30021603, 30523269, 31105006, 31461455, 31949081, 32107048, 32412949, 32683524, 32860174, 33063516, 33259896, 33632759, 33842070, 34086449, 34484000, 34754267, 35132748, 35736678, 36321325, 36500870, 37011789, 37566824, 37928321, 38167443, 38838440, 39389801, 39992817, 40527883, 40943379, 41605446, 42517335, 43019325, 43334123, 44084016, 44738667, 45083879, 45201497, 45301756, 45360159, 45627811, 45907466, 45982492, 46177377, 46724640, 47063696, 47371559, 47916298, 48315200, 48567143, 48779534, 49386042, 49797994, 50099744, 50451926, 50854486, 51047363, 51685259, 52047784, 52271526, 52572370, 52798781, 52938610, 53353667, 53566312, 53715303, 53876849, 53985524, 54119044, 54192727, 54353908, 54908698, 54959670, 55445423, 55585353, 55695370, 55719354, 55759864, 55787448, 55885732, 56039343, 56215611, 56938856, 57345399, 57478523, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2331][2] = {0, 110374, 168759, 338441, 451182, 707181, 823524, 1065999, 1208642, 1341160, 1553604, 1657828, 1979163, 2120959, 2349415, 2662003, 2853093, 3190019, 3378118, 3666308, 3835264, 3978498, 4296144, 4430485, 4542414, 4779789, 5006336, 5166516, 5392209, 5561204, 5842495, 6001563, 6260247, 6402108, 6774859, 6916980, 7215837, 7346313, 7633292, 7859237, 8049298, 8246337, 8484019, 8750515, 8859275, 8971885, 9176763, 9409292, 9439440, 9687740, 9883992, 9928893, 10033670, 10127198, 10295591, 10405735, 10530812, 10826640, 10945163, 11254571, 11406366, 11674541, 11735966, 11840158, 11969297, 12009524, 12117180, 12174035, 12321043, 12434870, 12571736, 12635683, 12730764, 12961172, 13013690, 13199258, 13362986, 13615365, 13728108, 13850273, 14088057, 14391839, 14502388, 14621501, 14898998, 15023968, 15258752, 15360415, 15415178, 15543147, 15616867, 15656960, 15700586, 15886444, 15925892, 16086924, 16108610, 16203196, 16390277, 16551761, 16694195, 16895427, 16976617, 17152827, 17284671, 17646429, 17720847, 17975933, 18095869, 18181975, 18568081, 18642044, 18757643, 19078852, 19457551, 19493968, 19745601, 19869043, 20213743, 20414284, 20435706, 20604596, 20773486, 20942376, 21111266, 21280156, 21449046, 21617936, 21786826, 21955716, 22124606, 22293496, 22462386, 22631276, 22800166, 22969056, 23137946, 23306836, 23475726, 23644616, 23813506, 23982396, 24151286, 24320176, 24489066, 24657956, 24826846, 24995736, 25164626, 25333516, 25502406, 25671296, 25840186, 26009076, 26177966, 26346856, 26515746, 26684636, 26853526, 27022416, 27191306, 27360196, 27529086, 27697976, 27866866, 28035756, 28204646, 28373536, 28542426, 28711316, 28880206, 29049096, 29217986, 29386876, 29555766, 29724656, 29893546, 30062436, 30231326, 30400216, 30569106, 30737996, 30906886, 31075776, 31244666, 31413556, 31582446, 31751336, 31920226, 32089116, 32258006, 32426896, 32595786, 32764676, 32933566, 33102456, 33271346, 33440236, 33609126, 33778016, 33946906, 34115796, 34284686, 34453576, ["name"] = "Adrenalynz"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2345] = {["length"] = 466, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2345][1] = {23328, 79162, 211058, 501095, 610818, 970801, 1081804, 1323743, 1428908, 1714060, 1902879, 2210183, 2398183, 2722760, 2862763, 2989183, 3264924, 3376968, 3635672, 3789074, 4221635, 4372615, 4594922, 4685497, 4848424, 4969061, 5085669, 5272564, 5393689, 5459239, 5600122, 5788569, 5867569, 6008245, 6183771, 6347531, 6454387, 6541294, 6650910, 6721751, 6850834, 6968322, 7019977, 7123119, 7241008, 7270362, 7363859, 7450564, 7566087, 7631103, 7694480, 7755208, 7890815, 7929371, 8004411, 8067646, 8240101, 8245448, 8245448, 8268947, 8308793, 8370270, 8405590, 8447911, 8592581, 8634044, 8708554, 8786486, 8858798, 9048743, 9183539, 9280115, 9517283, 9876064, 10030456, 10353114, 10764577, 10934617, 11165598, 11558302, 12007576, 12240713, 12567287, 12750984, 12910037, 13330864, 13549193, 13601276, 13621439, 13667732, 13927463, 14018816, 14061675, 14136036, 14254076, 14299866, 14350463, 14583651, 14707611, 14867447, 15033014, 15239816, 15909119, 16094875, 16362265, 16418063, 16537194, 16798273, 16961115, 17049383, 17166928, 17342571, 17588217, 17675578, 17920330, 18150004, 18369139, 18641142, 18895347, 19038158, 19182381, 19302085, 19580282, 19731516, 19806477, 19876228, 19949177, 20306678, 20351734, 20505014, 20629240, 20969847, 21047776, 21410916, 21529491, 21594748, 21781674, 22202475, 22276551, 22423447, 22749593, 23043114, 23061036, 23110378, 23117651, 23133322, 23153393, 23166213, 23177050, 23196043, 23223331, 23310582, 23341215, 23494209, 23620602, 23738761, 23926256, 24059034, 24209075, 24461069, 24555689, 24649148, 24884215, 25009700, 25054433, 25215779, 25284942, 25338278, 25428386, 25557943, 25761429, 25878565, 26091383, 26262073, 26457722, 26608791, 26670973, 26756412, 26836923, 26960060, 26994293, 27083093, 27165745, 27461567, 27614677, 27697872, 27773618, 28096802, 28122488, 28274124, 28410417, 28765304, 28839827, 29002455, 29337292, 29428033, 29766863, 30089134, 30165917, 30556529, 30746180, 30936692, 31111862, 31210791, 31420410, 31505649, 31629807, 31698239, 31742112, 31833608, 31938740, 31996898, 32074613, 32246517, 32382177, 32505572, 32650371, 32816993, 32929330, 33629081, 33808779, 34014640, 34080818, 34197625, 34287348, 34455635, 34638186, 34792190, 34973924, 35133600, 35399931, 35596500, 35875413, 36134339, 36277856, 36440099, 36879807, 37013208, 37374113, 37647081, 37967831, 38093114, 38441970, 38761483, 38859323, 39078154, 39167280, 39280793, 39589917, 39967421, 40083859, 40207700, 40450134, 40759866, 40949477, 41025381, 41154204, 41246087, 41421761, 41594124, 41717066, 41782550, 41996001, 42066635, 42133265, 42393527, 42539679, 42643161, 42716616, 42988358, 43049440, 43130220, 43310585, 43389195, 43457029, 43559050, 43599776, 43802682, 43881223, 43955446, 44071389, 44183793, 44366314, 44432385, 44549155, 44740298, 44950285, 45216547, 45447109, 45584020, 45675061, 45902306, 45982690, 46063111, 46149398, 46464140, 46546194, 46642147, 46790012, 46937429, 47016020, 47233862, 47338034, 47433037, 47476205, 47511984, 47572149, 47640503, 47713561, 47840734, 47928981, 48006333, 48147334, 48210875, 48349692, 48386541, 49270142, 49405299, 49548847, 49827697, 50005732, 50085072, 50279855, 50435022, 50509601, 50509601, 50556113, 50661689, 50755025, 50854561, 50915037, 51002340, 51206311, 51330738, 51507411, 51725902, 51982387, 52183790, 52288783, 52705507, 53017833, 53230317, 53759497, 54326146, 54547369, 54959616, 55433202, 55728116, 56017384, 56660925, 57019765, 57373845, 57881313, 58260745, 58672743, 59214026, 59772815, 60202713, 60382687, 60765718, 60921102, 60985913, 61146884, 61268561, 61329087, 61382142, 61464513, 61657258, 61929238, 62002383, 62089691, 62168475, 62314391, 62562751, 62805982, 63126225, 63303468, 63515441, 63606789, 63920168, 64017225, 64208795, 64318794, 64713219, 64771927, 64901472, 64960077, 64968379, 64968379, 65128006, 65298646, 65322546, 65336311, 65455273, 65469232, 65510141, 65571791, 65610749, 65708635, 65814561, 65948873, 66029729, 66230268, 66506576, 66612968, 66777603, 66995204, 67075455, 67158361, 67276043, 67313406, 67919558, 67956926, 68096875, 68225946, 68331078, 68440035, 68612490, 68746382, 68950961, 69054399, 69182790, 69346730, 69510670, 69674610, 69838550, 70002490, 70166430, 70330370, 70494310, 70658250, 70822190, 70986130, 71150070, 71314010, 71477950, 71641890, 71805830, 71969770, 72133710, 72297650, 72461590, 72625530, 72789470, 72953410, 73117350, 73281290, 73445230, 73609170, 73773110, 73937050, 74100990, 74264930, 74428870, 74592810, 74756750, 74920690, 75084630, 75248570, 75412510, 75576450, 75740390, 75904330, 76068270, 76232210, 76396150, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2345][2] = {0, 12788, 93855, 242897, 258382, 455806, 504189, 759604, 781305, 954549, 1143610, 1221956, 1437525, 1536340, 1732631, 1836433, 1990533, 2046573, 2306122, 2619685, 2689456, 2947893, 3057690, 3137757, 3330906, 3456111, 3544422, 3588316, 3673572, 3793580, 3880060, 3993903, 4039953, 4089114, 4147761, 4265148, 4351042, 4409680, 4673333, 4719159, 4854593, 5130735, 5294311, 5366438, 5426380, 5575181, 5621991, 5860033, 5974097, 6038954, 6172384, 6237867, 6345315, 6416065, 6475272, 6545537, 6655343, 6783691, 6855845, 6904437, 6943133, 7219846, 7248118, 7401810, 7478122, 7551845, 7705526, 7819586, 7882435, 8036185, 8094759, 8125478, 8314069, 8446715, 8582677, 8712164, 8834698, 8933922, 9223080, 9341174, 9701961, 9741156, 9845605, 9929657, 9954524, 10133629, 10318149, 10401528, 10590802, 10740444, 11033145, 11080218, 11338665, 11459733, 11541289, 11682087, 11946792, 12047905, 12176858, 12584943, 12864006, 12977922, 13181941, 13351947, 13766500, 14001555, 14182333, 14507230, 14727680, 14975706, 15057541, 15168649, 15258775, 15407746, 15640967, 15788200, 15942279, 16044804, 16230001, 16425146, 16564273, 16611336, 16777571, 16870144, 17053319, 17214681, 17342324, 17665772, 17741880, 17828374, 18043012, 18181742, 18308385, 18633984, 18984598, 19088081, 19444309, 19769452, 19856563, 20153435, 20362117, 20433124, 20667994, 20742610, 20830900, 20905419, 21016593, 21196625, 21364409, 21472846, 21784647, 21888713, 22155883, 22274461, 22532460, 22596643, 22736587, 22943241, 22974285, 23217496, 23290536, 23492894, 23517729, 23672122, 23766579, 24040577, 24126271, 24357735, 24667812, 24765203, 24898076, 24985370, 25273587, 25334899, 25389869, 25435427, 25483750, 25570072, 25602827, 25687009, 25700111, 25901259, 25976880, 26150713, 26184176, 26287332, 26393948, 26451606, 26561524, 26702129, 26772347, 26849128, 27026558, 27100356, 27146907, 27404309, 27518980, 27651480, 27828002, 27937444, 27994943, 28078239, 28202066, 28224175, 28320961, 28416905, 28501024, 28563494, 28622249, 28815252, 28948659, 28955680, 28955680, 28962700, 28962700, 29063835, 29129363, 29354428, 29368324, 29486320, 29693058, 29728107, 29858463, 30135563, 30211516, 30412798, 30569132, 30824282, 31003005, 31207199, 31415660, 31529244, 31837233, 32058900, 32151166, 32446904, 32490082, 32673607, 32787061, 33039751, 33136006, 33202639, 33271961, 33335580, 33372431, 33557164, 33701672, 33771142, 33871499, 34008175, 34089321, 34129856, 34348911, 34370823, 34431327, 34612585, 34697002, 34713329, 34827782, 34860125, 34896791, 35021172, 35047739, 35119161, 35292909, 35421348, 35482166, 35563518, 35682841, 35736252, 35830916, 35990036, 36085224, 36155668, 36307996, 36412112, 36532799, 36586340, 36697301, 36794978, 36901725, 37003646, 37105229, 37173038, 37241015, 37397175, 37507063, 37539921, 37611188, 37683513, 37942820, 38012548, 38143271, 38405986, 38718941, 38821966, 39036670, 39368759, 39660866, 39699677, 39878640, 40111053, 40172626, 40475245, 40621077, 40901632, 41054093, 41321498, 41483041, 41501023, 41508325, 41667031, 41745281, 41802227, 41871150, 41915612, 42043085, 42060566, 42100549, 42143469, 42216010, 42236044, 42377786, 42426360, 42538740, 42569344, 42614827, 42734136, 42754514, 42926379, 43083214, 43172043, 43353405, 43487996, 43579776, 43878471, 43987528, 44287651, 44362086, 44645268, 44673474, 44873587, 45121116, 45236389, 45398051, 45398051, 45483262, 45634884, 45715897, 45782730, 45925603, 46026032, 46112145, 46181769, 46279976, 46428078, 46457835, 46515320, 46577824, 46685173, 46723803, 46827156, 46886071, 46972705, 47111946, 47158647, 47257328, 47405844, 47452642, 47566820, 47751614, 47946062, 47979062, 48193681, 48358145, 48639777, 48953280, 49061217, 49207373, 49437752, 49590775, 49630940, 49788644, 49833340, 49936594, 49998740, 50332135, 50455101, 50668746, 50847072, 50921316, 51046194, 51179981, 51226403, 51263543, 51270497, 51358388, 51599995, 51664343, 51953621, 52102704, 52292011, 52679628, 52827506, 53136113, 53313815, 53526147, 53913809, 54123190, 54268390, 54601394, 54770872, 55149385, 55312719, 55447225, 55714284, 56035651, 56132880, 56312596, 56470024, 56768906, 57008114, 57125929, 57391694, 57495168, 57701393, 57847722, 58045385, 58117043, 58353544, 58454768, 58564139, 58800276, 59091928, 59219087, 59558906, 59777251, 59937701, 60031157, 60182058, 60368555, 60399178, 60565307, 60643772, 60753612, 60955633, 61010593, 61065317, 61129027, 61219322, 61288925, 61332801, 61453478, 61785656, 61887290, 62062479, 62263876, 62335988, 62512090, 62755508, 62853648, 63058295, 63430703, 63593281, 63810249, 63870052, ["name"] = "아숩다"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2337] = {["length"] = 397, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2337][1] = {30271, 171295, 342845, 394401, 663460, 1012061, 1200747, 1688840, 1919792, 2295148, 2479483, 2798806, 2992687, 3203009, 3507663, 3601317, 3803086, 3917978, 3934845, 3934845, 3934845, 3994333, 4098987, 4315377, 4488701, 4560115, 4757400, 4895088, 4989450, 5145190, 5343080, 5392085, 5554077, 5654272, 5815934, 5888944, 5961237, 6010033, 6106538, 6235256, 6482725, 6673599, 6885435, 6985011, 7090911, 7122497, 7247051, 7408742, 7507658, 7576439, 7675905, 7819186, 7866491, 7986707, 8037889, 8148924, 8308041, 8387210, 8481842, 8559755, 8671574, 8719183, 8784586, 8887382, 8972432, 8999146, 9054225, 9106019, 9239390, 9322183, 9561319, 9633819, 9818023, 10127985, 10255043, 10655883, 11027966, 11487722, 11913448, 12388725, 12808062, 12922830, 13238034, 13609900, 13765485, 14130735, 14325472, 14489751, 14810101, 15090355, 15179778, 15257891, 15493936, 15519450, 15619953, 15711067, 15789054, 15797615, 15932730, 16093031, 16264875, 16312319, 16491752, 16549933, 16676239, 16731791, 16790435, 16933122, 16956275, 17050351, 17050351, 17050351, 17050351, 17068248, 17068248, 17091982, 17119434, 17146197, 17160150, 17202173, 17236580, 17330635, 17362350, 17424753, 17470483, 17646044, 17679577, 17796119, 17857300, 17982906, 18040920, 18193039, 18268241, 18354217, 18536666, 18558257, 18671552, 18801148, 18885155, 19028972, 19104874, 19224792, 19345117, 19345117, 19474638, 19513780, 19546238, 19650648, 19689185, 20159246, 20378429, 20638565, 20869299, 20918976, 20938481, 20938489, 21252312, 21844517, 22499804, 22995063, 23314782, 24021473, 24370061, 24777253, 24794304, 24872766, 24962399, 24972991, 24972991, 24972991, 24972991, 24972991, 24972991, 24986455, 25007219, 25007219, 25086016, 25321083, 25609903, 26006587, 26479856, 26710549, 26929332, 27122283, 27170717, 27201036, 27207811, 27252799, 27256121, 27277862, 27306004, 27324044, 27362749, 27377290, 27472614, 27570136, 27591182, 27666145, 27703827, 27791118, 28314131, 28329811, 28577083, 28688725, 28748817, 29025059, 29154358, 29214000, 29214000, 29214000, 29214000, 29214000, 29239219, 29239219, 29239219, 29261068, 29352578, 29425479, 29484397, 29565250, 29586083, 29670241, 29819434, 29867705, 29953572, 29990620, 30115497, 30149752, 30216848, 30339111, 30472628, 30576422, 30640350, 30663154, 30781257, 30821569, 30945563, 30991786, 31120996, 31205144, 31428059, 31458399, 31685241, 31784681, 32118898, 32372617, 32494456, 32685715, 32887291, 33258788, 33484181, 33851380, 34041119, 34233264, 34565914, 34723507, 35127528, 35223793, 35372488, 35593485, 35657490, 35678674, 35678674, 35678674, 35678674, 35678674, 35678674, 35678674, 35740288, 35862765, 35985716, 36034897, 36123516, 36202987, 36309829, 36664235, 36790934, 37059308, 37450167, 37583972, 37733128, 37938577, 38362819, 38567213, 38991516, 39632378, 39976412, 40256427, 40594735, 40840431, 40884393, 40985821, 41240142, 41348228, 41480795, 41533375, 41624644, 41762808, 41820041, 41935196, 42034512, 42202524, 42225777, 42311861, 42340032, 42383084, 42967066, 43390183, 43956948, 44965564, 45434770, 45993287, 46091583, 46272149, 46432898, 46432898, 46432898, 46432898, 46432898, 46432898, 46728325, 46831885, 47048940, 47283898, 47381848, 47443300, 47557949, 47780483, 47988199, 48187274, 48396312, 48580286, 48736983, 48914179, 49118244, 49162830, 49269489, 49434950, 49657298, 49787317, 49945160, 50009708, 50233253, 50335682, 50583671, 50852260, 50987441, 51186214, 51235403, 51508244, 51944101, 52088558, 52408560, 52581984, 52674976, 52823356, 52971736, 53120116, 53268496, 53416876, 53565256, 53713636, 53862016, 54010396, 54158776, 54307156, 54455536, 54603916, 54752296, 54900676, 55049056, 55197436, 55345816, 55494196, 55642576, 55790956, 55939336, 56087716, 56236096, 56384476, 56532856, 56681236, 56829616, 56977996, 57126376, 57274756, 57423136, 57571516, 57719896, 57868276, 58016656, 58165036, 58313416, 58461796, 58610176, 58758556, 58906936, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2337][2] = {0, 28474, 61862, 113427, 169548, 244959, 476777, 711341, 781269, 927281, 1147618, 1215954, 1480004, 1574104, 1875481, 1947999, 2036435, 2155671, 2155671, 2155671, 2155671, 2219407, 2380185, 2631434, 2769651, 2919594, 3267969, 3331216, 3465599, 3621317, 3774036, 3982966, 4092641, 4179967, 4472188, 4580355, 4603907, 4637105, 4654983, 5010826, 5103745, 5303226, 5486709, 5628910, 5915500, 5978199, 6193548, 6259864, 6363115, 6443371, 6488985, 6488985, 6488985, 6488985, 6488985, 6488985, 6521743, 6521743, 6521743, 6699533, 6815037, 7049880, 7235769, 7488202, 7649220, 8010380, 8286735, 8534414, 8584719, 8584719, 8825914, 8967696, 9084643, 9251213, 9356008, 9385017, 9605445, 9729047, 9820127, 9990776, 10088387, 10272313, 10280719, 10280719, 10280719, 10280719, 10280719, 10507652, 10626531, 10859491, 10989643, 11130483, 11249991, 11342862, 11472917, 11589526, 11734221, 11932447, 12002590, 12179570, 12265057, 12398193, 12500000, 12784973, 12840999, 13093912, 13491043, 13737228, 14035214, 14194745, 14472090, 14580241, 14702359, 14960638, 15014931, 15014931, 15014931, 15148451, 15242085, 15470070, 15830066, 15899956, 15899956, 15927830, 16111532, 16337397, 16426713, 16490058, 16537360, 16569625, 16685148, 16717774, 16848648, 17044146, 17089089, 17162763, 17248607, 17259009, 17259009, 17259009, 17259009, 17269564, 17269564, 17288592, 17294036, 17388524, 17468866, 17468866, 17559380, 17587727, 17658603, 17721170, 17792994, 17944105, 18022609, 18128877, 18200386, 18370578, 18456602, 18531510, 18555050, 18692426, 18951870, 19127676, 19387500, 19437389, 19457059, 19518480, 19637079, 19716114, 19796769, 19833031, 19833031, 19864709, 19901807, 19901807, 19901807, 19901807, 19901807, 19901807, 19916893, 19931978, 19931978, 19931978, 19963123, 20102293, 20979242, 21388882, 22069769, 22735732, 23167238, 23387319, 23509906, 23615308, 23786025, 23821457, 23821457, 23920047, 24135655, 24167640, 24232914, 24356694, 24438278, 24710102, 24809315, 25018046, 25018048, 25465377, 25644163, 25858693, 26079065, 26283125, 26316666, 26327784, 26327784, 26327784, 26418505, 26479491, 26534446, 26534446, 26534446, 26631158, 26770534, 26887220, 26961280, 26990908, 27014907, 27056955, 27056955, 27056955, 27056955, 27056955, 27056955, 27056955, 27056955, 27056955, 27056955, 27056955, 27056955, 27088760, 27113883, 27137540, 27187744, 27267290, 27310250, 27467640, 27535070, 27693560, 27717936, 27804451, 27932516, 27997623, 28146486, 28162186, 28162186, 28162186, 28162186, 28162186, 28188562, 28188562, 28233656, 28233656, 28341223, 28569050, 28840307, 28958048, 29072686, 29327133, 29457830, 29736374, 29784056, 29949243, 30109940, 30215951, 30315508, 30373007, 30588120, 30635910, 30978969, 31074548, 31314314, 31377606, 31399980, 31448990, 31655349, 32055440, 32152859, 32354750, 32707986, 32823678, 32910166, 33107651, 33182758, 33303112, 33358047, 33430444, 33496067, 33659245, 33816784, 33889685, 34005617, 34094514, 34262252, 34297494, 34391280, 34464181, 34716085, 34716085, 34716085, 34716085, 34716085, 34716085, 34716085, 34755356, 34938256, 35126543, 35257498, 35564167, 35659484, 35789013, 36003198, 36146642, 36319334, 36592992, 36695135, 36792438, 36886344, 37020724, 37197782, 37318997, 37376072, 37502248, 37560572, 37784244, 37999379, 38183866, 38297999, 38651383, 38724291, 38870786, 39163048, 39375855, 39457905, 39748019, 39961054, 40226150, 40323903, 40480104, 40666759, 40722439, 40786216, 40933037, 41073819, 41285054, 41500960, 41544826, 41715695, 41773430, 41840853, 42028898, 42072908, 42072908, 42072908, 42072908, 42072908, 42072908, 42104247, 42209343, 42310077, 42397927, 42530585, 42661536, 42706380, 42749208, 42819108, 42949046, 43090754, 43181415, 43252015, 43440304, 43581162, 43761684, 43842251, 44198849, 44299735, 44422538, 44651836, 44950524, 44986434, 45098141, 45274729, 45529529, 45621491, 45792586, 45927521, 46001109, 46070147, ["name"] = "Rokhanxz"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2344] = {["length"] = 660, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2344][1] = {66986, 105724, 154766, 213219, 787195, 927893, 1215363, 1765411, 1895312, 2162787, 2379355, 2638064, 2767952, 2962949, 3127004, 3203470, 3292903, 3557682, 3611341, 3842669, 4010959, 4181069, 4417795, 4521462, 4573743, 4656036, 4870935, 4894108, 4931201, 5034501, 5098836, 5147502, 5192313, 5269620, 5319231, 5319231, 5319427, 5323888, 5349580, 5436962, 5483969, 5517688, 5571336, 5658697, 5773182, 5854530, 5928834, 5942152, 5942152, 5942152, 5942152, 6057276, 6057276, 6077519, 6113488, 6183859, 6211833, 6211833, 6211833, 6212076, 6212618, 6213022, 6213196, 6213438, 6213438, 6213684, 6213684, 6213739, 6213739, 6213793, 6213793, 6228758, 6335543, 6412732, 6496053, 6607213, 6737801, 6804418, 6881054, 7003393, 7112660, 7404175, 8013568, 9476191, 10095215, 11223913, 12390856, 12952043, 13515416, 14031538, 14645404, 15117908, 15756370, 16919558, 17303145, 17487507, 17744448, 17874942, 18025970, 18076313, 18723308, 18851149, 19039362, 19209878, 19337631, 19564979, 20769676, 20941558, 21288323, 21612338, 21980963, 22543244, 22915804, 23250215, 23629265, 23928024, 24355562, 24860220, 25185620, 25625458, 25943692, 26300021, 26912618, 27589165, 27988892, 27988892, 28385982, 28766470, 29023139, 29639283, 30078520, 30478014, 30637497, 32057426, 32335038, 32830145, 33293729, 33631174, 33911652, 34717716, 34894691, 35250556, 35723929, 36258742, 36658089, 36799605, 37063132, 37063132, 37063132, 37106431, 37167328, 37236972, 37286928, 37389850, 37482382, 38042370, 38235257, 38642518, 39147725, 40013643, 40515180, 41395361, 43035758, 43432461, 44302642, 45163555, 45713729, 46704901, 47494119, 48358845, 49292276, 50124808, 50210774, 50268816, 50457928, 50730173, 50838175, 50852073, 50859945, 51077900, 52967960, 53449833, 53705307, 54154619, 54576027, 54576091, 54928162, 55010389, 55193294, 55369027, 55550381, 55685521, 55961047, 56267517, 56373952, 56493362, 56750070, 56788314, 56881552, 56947847, 56954939, 57091545, 57091545, 57091545, 57091904, 57091974, 57092009, 57092727, 57093575, 57093962, 57094428, 57094652, 57095155, 57203367, 57228872, 57321289, 57451157, 57619836, 57731441, 57831818, 57916412, 58148847, 58194121, 58276017, 58356763, 58581501, 58766442, 58766442, 58766442, 58790440, 58864162, 59061734, 59123024, 59336060, 59418062, 59508675, 59730702, 59838294, 59868543, 59981087, 60253597, 60323090, 60406192, 60473792, 60615061, 60646071, 60701258, 60701517, 60728550, 60745196, 60860562, 60957693, 61006269, 61139579, 61210910, 61377583, 61529391, 61660854, 61766911, 61840869, 61981383, 62059897, 62151320, 62236938, 62295269, 62364010, 62427483, 62467477, 62550177, 62559625, 62585549, 62585549, 62624534, 62707727, 62751594, 62751596, 62829555, 62886772, 62948983, 62970666, 63143908, 63190115, 63251584, 63286294, 63451917, 63491774, 63554631, 63589434, 63657419, 63696398, 63696403, 63696411, 63696415, 63696418, 63696422, 63696424, 63696425, 63696425, 63696425, 63730812, 63866372, 64501017, 64829446, 65128814, 65667793, 65690469, 65974539, 66808396, 68286639, 68852963, 69795399, 70712410, 71216260, 71440383, 72025295, 72587190, 73004761, 73327829, 73398715, 73547058, 73818673, 73962801, 74097879, 74510958, 74865311, 74891788, 74911495, 74973826, 75410107, 75759580, 75860147, 76335935, 76588899, 76941304, 77048149, 77382897, 77710309, 78078740, 78533361, 78605700, 78896823, 79167360, 79352150, 79406312, 79656360, 79724824, 79938125, 80001509, 80191665, 80276903, 80336849, 80544530, 80594102, 80671735, 80812201, 80861980, 80918420, 81129553, 81158597, 81251676, 81440104, 81505305, 81589955, 81636014, 81739670, 81781586, 81840366, 81890564, 82031781, 82133170, 82832508, 82977828, 83165856, 83403747, 83878599, 84155605, 84440502, 84894191, 85041935, 85155399, 85418968, 85498447, 85608722, 85694729, 85797895, 85940388, 85983490, 86080146, 86118074, 86178913, 86339830, 86385221, 86410096, 86502214, 86549992, 86633559, 86799896, 86820829, 86896102, 86956171, 87037633, 87236012, 87274926, 87395044, 87562120, 87607972, 87684653, 87756381, 87908228, 87941495, 88018349, 88146296, 88191032, 88253142, 88317978, 88423664, 88465733, 88499037, 88552996, 88602904, 88641707, 88739516, 88817238, 88861782, 88920296, 88971298, 89075335, 89087751, 89111438, 89154404, 89182229, 89194811, 89245891, 89312743, 89552973, 89635735, 89866778, 89935921, 90030036, 90282187, 90347945, 90456817, 90546768, 90635044, 90977264, 91721001, 91987517, 92494054, 92971202, 93455198, 93700420, 93824667, 94376268, 94404132, 94476774, 94524713, 94574051, 94648690, 94887669, 95030114, 95105735, 95277226, 95429496, 95599747, 95643765, 95717564, 95730683, 95808714, 96062108, 96124326, 96207933, 96396733, 96527389, 96658731, 96718399, 96899101, 96956909, 97018623, 97149097, 97250766, 97331156, 97413503, 97441346, 97556990, 97644198, 97700592, 97844183, 97875038, 97967471, 98039541, 98252249, 98398350, 98432390, 98611611, 98832494, 98982016, 99055635, 99243809, 99331610, 99481673, 99644270, 99705267, 99768468, 99829079, 99873161, 99945106, 100027458, 100126108, 100212808, 100284220, 100671684, 100806840, 101303327, 101470693, 101993872, 102490187, 102847792, 103199586, 103577511, 103696628, 104021188, 104355879, 104478434, 104775647, 104875155, 105204695, 105299201, 105541640, 105876548, 105983005, 106158697, 106185897, 106218606, 106231256, 106430190, 106629124, 106828058, 107026992, 107225926, 107424860, 107623794, 107822728, 108021662, 108220596, 108419530, 108618464, 108817398, 109016332, 109215266, 109414200, 109613134, 109812068, 110011002, 110209936, 110408870, 110607804, 110806738, 111005672, 111204606, 111403540, 111602474, 111801408, 112000342, 112199276, 112398210, 112597144, 112796078, 112995012, 113193946, 113392880, 113591814, 113790748, 113989682, 114188616, 114387550, 114586484, 114785418, 114984352, 115183286, 115382220, 115581154, 115780088, 115979022, 116177956, 116376890, 116575824, 116774758, 116973692, 117172626, 117371560, 117570494, 117769428, 117968362, 118167296, 118366230, 118565164, 118764098, 118963032, 119161966, 119360900, 119559834, 119758768, 119957702, 120156636, 120355570, 120554504, 120753438, 120952372, 121151306, 121350240, 121549174, 121748108, 121947042, 122145976, 122344910, 122543844, 122742778, 122941712, 123140646, 123339580, 123538514, 123737448, 123936382, 124135316, 124334250, 124533184, 124732118, 124931052, 125129986, 125328920, 125527854, 125726788, 125925722, 126124656, 126323590, 126522524, 126721458, 126920392, 127119326, 127318260, 127517194, 127716128, 127915062, 128113996, 128312930, 128511864, 128710798, 128909732, 129108666, 129307600, 129506534, 129705468, 129904402, 130103336, 130302270, 130501204, 130700138, 130899072, 131098006, 131296940, ["name"] = "머즈커"} end F()
F = function() Database_Hunter.lookup["Beast Mastery"][2344][2] = {23172, 106632, 317731, 444206, 725536, 992373, 1064491, 1344015, 1429033, 1658971, 1847130, 2010219, 2142059, 2149302, 2195252, 2314688, 2419444, 2517438, 2544034, 2544034, 2544034, 2544845, 2545089, 2545781, 2546168, 2547600, 2548001, 2548821, 2549546, 2549898, 2550389, 2551485, 2551909, 2552493, 2553159, 2553370, 2676966, 2734068, 2807847, 2955637, 3018593, 3105080, 3130180, 3314606, 3388343, 3457408, 3667579, 3698677, 3750723, 3830792, 3927057, 4052656, 4163408, 4206870, 4287232, 4428670, 4449626, 4544671, 4750314, 4762954, 4762954, 4764065, 4764065, 4764238, 4764238, 4764468, 4764468, 4764511, 4764511, 4764554, 4807433, 4813636, 4886508, 4903930, 4982831, 5017414, 5083427, 5457767, 5672492, 6439495, 6990459, 7229569, 7729549, 9061868, 9642213, 10622988, 11216998, 11636277, 11927968, 12923544, 13146187, 13592382, 14185546, 14886470, 15830374, 16261470, 16791764, 17121551, 17257453, 18086866, 18127939, 18290903, 18519866, 18677381, 18805865, 18993283, 19141550, 19478067, 19707331, 19880938, 20267533, 20495056, 20832871, 21801436, 22102654, 23294032, 24127549, 24499557, 24876157, 25200850, 25663366, 25956181, 26072820, 26643296, 26827443, 27088366, 27358264, 27565675, 28054119, 28160660, 28383670, 28456729, 28973840, 29154142, 29378524, 29721476, 30080478, 31107757, 31196809, 31500578, 32616660, 33233337, 34020415, 34296529, 34526069, 34526069, 34556305, 34733246, 34799183, 34876280, 34943695, 35001642, 35101304, 35186656, 35325834, 35583291, 35687372, 35914174, 36108335, 36533681, 36900674, 37025340, 37554663, 37592444, 37708360, 38375536, 38453331, 38526731, 38805703, 38884324, 38972947, 39364259, 39480341, 39759792, 39839062, 39975799, 40103307, 40161008, 40258659, 40456444, 40598875, 40814130, 40937710, 40975368, 41186278, 41446631, 41502602, 41602388, 41638086, 41754661, 41796573, 41930606, 41989261, 42061977, 42094426, 42335674, 42396549, 42493610, 42538327, 42538594, 42538649, 42548861, 42667760, 42668188, 42668681, 42668967, 42669616, 42669786, 42670112, 42670316, 42671016, 42720735, 42740577, 42766603, 42841900, 42989228, 43045327, 43135640, 43354343, 43493286, 43557938, 43614615, 43699855, 43761164, 43870129, 44036366, 44089006, 44165024, 44295353, 44339235, 44454523, 44665584, 44753511, 44882284, 45089993, 45232351, 45295032, 45295383, 45296512, 45434304, 45435750, 45436400, 45437388, 45438082, 45438680, 45438857, 45481555, 45638278, 45900313, 46064228, 46125999, 46213650, 46400170, 46471560, 46626204, 46795674, 46893287, 46939514, 47051298, 47167596, 47191466, 47191466, 47191466, 47191466, 47191466, 47245498, 47300736, 47333938, 47484074, 47514177, 47544162, 47587160, 47641655, 47734341, 47814006, 47892114, 47998401, 48060134, 48182552, 48182563, 48182569, 48296385, 48495430, 48619853, 48685746, 48699882, 48707024, 48747462, 48852978, 48926553, 48947776, 48977192, 49085350, 49102317, 49128323, 49154672, 49240858, 49247538, 49253943, 49314408, 49319400, 49394576, 49421564, 49590632, 49651656, 50012260, 50124943, 50261462, 50555190, 50774787, 51095552, 51532522, 51682059, 51785237, 52228035, 52649373, 52784322, 52947639, 53296608, 53529715, 53739206, 53952896, 54631861, 54870929, 55172480, 55518735, 55712229, 56029981, 56502283, 56631120, 56725080, 57230399, 57627668, 57803101, 57915787, 58334829, 58407595, 58617029, 58878881, 58963642, 59080641, 59339305, 59465284, 59512148, 59624356, 59723848, 59938045, 59993965, 60090213, 60220169, 60312121, 60439223, 60495869, 60631233, 60887384, 60961173, 61034908, 61368845, 61428621, 61601816, 61675869, 61735718, 61791736, 62015756, 62119253, 62272376, 62422671, 62550241, 62715412, 62841822, 62965706, 63160794, 63279308, 63386397, 63452341, 63678636, 63790034, 63906072, 64028127, 64278906, 64569327, 64654899, 64866127, 65124863, 65196733, 65454096, 65555682, 65694968, 66000026, 66107871, 66366590, 66472459, 66836790, 66915508, 67136945, 67263898, 67366526, 67548823, 67657717, 67693451, 67744662, 67835521, 67968875, 68017938, 68132352, 68241427, 68366479, 68527453, 68677754, 68738644, 68871279, 69061968, 69102437, 69183173, 69361401, 69500062, 69587879, 69713840, 69823307, 69897076, 69951510, 70040687, 70081156, 70120549, 70173580, 70268616, 70306948, 70375168, 70416342, 70505672, 70657690, 70710727, 70744341, 70800139, 70962066, 71029421, 71165095, 71238344, 71304114, 71416664, 71462726, 71569004, 71591780, 71702441, 72207495, 72379169, 72689026, 72917442, 73197454, 73381626, 73659493, 73899920, 73997014, 74291015, 74678773, 74849900, 75200626, 75385197, 75677811, 75808873, 76254550, 76505590, 76924666, 77235065, 77332851, 77700899, 77962627, 78218749, 78492104, 78583673, 79063112, 79313401, 79457164, 79706569, 79815938, 79895826, 80041714, 80217318, 80373656, 80492316, 80640258, 80740754, 80889407, 81060777, 81145365, 81266449, 81339613, 81497108, 81592246, 81610359, 81786762, 81818684, 81922131, 82094070, 82161874, 82305570, 82441132, 82585107, 82656198, 82705520, 82996939, 83093087, 83252461, 83310773, 83655994, 83738667, 84104022, 84162299, 84250829, 84397126, 84428565, 84492276, 84564296, 84730414, 84798387, 84875146, 84992361, 85089333, 85104578, 85186271, 85262800, 85383843, 85420379, 85461347, 85468276, 85468276, 85474252, 85494964, 85544964, 85634482, 85676951, 85769107, 85778074, 86022584, 86154290, 86222742, 86434521, 86550984, 86729055, 86832669, 87058618, 87200645, 87306287, 87530230, 87597878, 87786073, 87901884, 87980916, 88233836, 88445405, 88736602, 88810447, 89057424, 89247049, 89517442, 89605563, 89757731, 89862606, 89974758, 90177746, 90230119, 90360642, 90423820, 90493088, 90527525, 90634914, 90698829, 90761347, 90783155, 90965137, 91000311, 91100055, 91194706, 91281747, 91348178, 91449629, 91582418, 91631484, 91729149, 91885442, 91976206, 92104023, 92219090, 92277657, 92427109, 92488903, 92654575, 92706521, 92789587, 92935308, 93022542, 93091921, 93346016, 93408247, 93494237, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93669393, 93685058, 93740369, 93777901, 93811951, 93862015, 93940661, 94098298, 94149929, 94283495, 94373130, 94461190, 94742724, 94850253, 95267651, 95317482, 95462314, 95900828, 96236359, 96431481, 96745731, 96970113, 97174658, 97576529, 97689815, 97802460, 98019758, 98163432, 98452516, 98576177, 98800632, 99034741, 99237264, 99626383, 99822078, 99987535, 100453128, 100730051, 100996452, 101314114, 101544072, 101720519, 101900895, 102016752, 102129895, 102366603, 102473256, 102604549, 102759417, 102879100, 102970302, 103059929, 103059929, ["name"] = "Apathyrean"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2329] = {["length"] = 299, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2329][1] = {0, 241098, 384689, 488118, 664382, 746081, 1063039, 1181453, 1374297, 1394189, 1842973, 2363907, 2698201, 3095549, 3380831, 3493865, 4063437, 4701451, 5119136, 5312557, 5563255, 5794289, 5889716, 6148326, 6495920, 6601197, 6713780, 6812313, 7010921, 7094968, 7212835, 7301801, 7451071, 7489677, 7489677, 7548502, 7582447, 7613343, 7660174, 7754825, 7754825, 7785991, 7947808, 7973688, 8153071, 8685868, 8776239, 8982920, 8990949, 9130696, 9233681, 10011262, 10146930, 10146930, 10146930, 10146930, 10146930, 10146930, 10159887, 10832227, 10981452, 11035286, 11094428, 11833549, 11960533, 11989271, 12007604, 12177308, 12177308, 12177308, 12177308, 12177308, 12177308, 12286516, 12320873, 12349120, 12349120, 12384163, 12444789, 12500779, 12570003, 12648011, 12754269, 12949327, 12976571, 13020262, 13150862, 13150862, 13353012, 13363954, 13637460, 13698161, 13788300, 13974454, 14780718, 14966874, 15016941, 15186597, 15220778, 15302265, 15388844, 15476499, 15554624, 15576450, 15680625, 15680625, 15712682, 16670892, 16714423, 16737436, 16770239, 16827201, 16883284, 16974440, 17029100, 17129205, 17193863, 17263634, 17355266, 17562445, 18013275, 18080013, 18118047, 18126478, 18211447, 18239730, 19319768, 19361538, 19907014, 19971823, 19971823, 19971823, 19971823, 19971823, 20266551, 20365439, 20624712, 20890308, 20940415, 21015413, 21040304, 21040304, 21040304, 21040304, 21186417, 21332530, 21478643, 21624756, 21770869, 21916982, 22063095, 22209208, 22355321, 22501434, 22647547, 22793660, 22939773, 23085886, 23231999, 23378112, 23524225, 23670338, 23816451, 23962564, 24108677, 24254790, 24400903, 24547016, 24693129, 24839242, 24985355, 25131468, 25277581, 25423694, 25569807, 25715920, 25862033, 26008146, 26154259, 26300372, 26446485, 26592598, 26738711, 26884824, 27030937, 27177050, 27323163, 27469276, 27615389, 27761502, 27907615, 28053728, 28199841, 28345954, 28492067, 28638180, 28784293, 28930406, 29076519, 29222632, 29368745, 29514858, 29660971, 29807084, 29953197, 30099310, 30245423, 30391536, 30537649, 30683762, 30829875, 30975988, 31122101, 31268214, 31414327, 31560440, 31706553, 31852666, 31998779, 32144892, 32291005, 32437118, 32583231, 32729344, 32875457, 33021570, 33167683, 33313796, 33459909, 33606022, 33752135, 33898248, 34044361, 34190474, 34336587, 34482700, 34628813, 34774926, 34921039, 35067152, 35213265, 35359378, 35505491, 35651604, 35797717, 35943830, 36089943, 36236056, 36382169, 36528282, 36674395, 36820508, 36966621, 37112734, 37258847, 37404960, 37551073, 37697186, 37843299, 37989412, 38135525, 38281638, 38427751, 38573864, 38719977, 38866090, 39012203, 39158316, 39304429, 39450542, 39596655, 39742768, 39888881, 40034994, 40181107, 40327220, 40473333, 40619446, 40765559, 40911672, 41057785, 41203898, 41350011, 41496124, 41642237, 41788350, 41934463, 42080576, 42226689, 42372802, 42518915, 42665028, 42811141, 42957254, 43103367, 43249480, 43395593, 43541706, 43687819, ["name"] = "Círidae"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2329][2] = {77072, 95639, 144969, 174473, 310372, 478762, 551125, 734274, 903121, 1194236, 1331632, 1532832, 1632979, 2057073, 2350441, 2621976, 2804224, 3007947, 3207621, 3290987, 3638701, 3748619, 3911083, 4095751, 4360501, 4565037, 4763415, 4832955, 4902608, 4999352, 5035677, 5068158, 5243147, 5332594, 5374313, 5428383, 5428383, 5554332, 5651851, 5810302, 5973123, 6449078, 6554865, 7054945, 7264381, 7505012, 7619451, 7686834, 8005875, 8198437, 8425686, 8425686, 8707971, 8749224, 8749224, 8749224, 8749224, 8749224, 8749224, 8777649, 9268323, 9276609, 9322190, 9371214, 9371214, 9520981, 9557213, 9765058, 9781871, 9891768, 9997245, 10425928, 10487540, 10497095, 10640609, 10934298, 11006372, 11006372, 11126144, 11207714, 11333226, 11393695, 11561748, 11715104, 11829180, 12036420, 12309683, 12354766, 12507012, 12536473, 12820109, 13021812, 13053874, 13102855, 13102855, 13274510, 13294851, 13373443, 13672600, 13790517, 13801435, 13844449, 14118366, 14223294, 14223294, 14324689, 14352073, 14472931, 14519975, 14536448, 14632608, 14720283, 14808819, 14808819, 14858009, 14993425, 15087447, 15129721, 15163101, 15275971, 15320374, 15329118, 15379646, 15435391, 15752582, 16359659, 16628545, 16827787, 16827787, 16860201, 16860201, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17021627, 17058170, 17305214, 17405021, 17405021, 17413426, 17413426, 17413426, 17413426, 17413426, 17413426, 17413426, 17413426, 17413426, 17413426, 17413426, 17421541, 17421541, 17605585, 17676189, 17699811, 17774363, 18000152, 18211482, 18334644, 18472241, 18661488, 18681131, 19548101, 19741600, 20062119, 20188028, 20665610, 20788069, 21240101, 21270364, 21560465, 21691446, 21712161, 21895111, 22002913, 22028664, 22157035, 22157035, 22229448, 22286037, 22286037, 22360338, 22444951, 22444951, 22574486, 22574486, 22582763, 22757224, 22765345, 22773936, 22792855, 22897810, 22954692, 22997845, 22997845, 23020167, 23082827, 23130287, 23216536, 23292452, 23356426, 23366128, 23534180, 23570433, 23626090, 23666721, 23889526, 23988387, 24338916, 24410045, 24692320, 24801420, 25066668, 25168498, 25285759, 25614495, 25637029, 25849403, 26391893, 26601648, 26621540, 26728556, 26782076, 26809555, 26873485, 27052513, 27100930, 27169829, 27681157, 27821086, 27854463, 28042582, 28042582, 28175611, 28569695, 28699041, 28699041, 28733875, 28985797, 29605302, 29605302, 29697438, 29707254, 29707254, 29707254, 29707254, 29707254, 29707254, 29707254, 30112831, 30359875, 30370720, 30592385, 30652114, 30708215, 31001396, 31563225, 31841156, 31974544, 32206352, 32556015, 32653533, 33062859, 33250786, 33429763, 33876747, 33979355, 34814380, 34831715, 34948275, 35213492, 35337422, 35483642, 35846183, 35915611, 36529945, 36695893, 36713948, ["name"] = "Komets"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2327] = {["length"] = 94, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2327][1] = {122665, 122665, 186158, 224690, 429114, 496161, 827588, 1086442, 1312965, 1566602, 1814210, 1854883, 2255258, 2835802, 3359163, 3541099, 3757549, 3912668, 4015968, 4149848, 4232294, 4519916, 5052632, 5194427, 5576433, 5614350, 5740062, 6345675, 6449008, 6486088, 6667036, 6705638, 7078302, 7107261, 7242885, 7311226, 7368519, 7447600, 7847043, 7874792, 7912202, 8268928, 8399749, 8476350, 8537187, 8947813, 9102517, 9102517, 9102517, 9116075, 9168854, 9292426, 10192870, 10450899, 10993608, 12027490, 12098745, 13246371, 14260392, 14283030, 15416431, 16368248, 16435925, 16532819, 16714333, 16735918, 16763778, 16932836, 16990250, 17039783, 17090093, 17125703, 17257233, 17344863, 17449196, 17787778, 17787778, 18529254, 18589537, 18660038, 18681554, 18723783, 18750024, 18910818, 18910818, 18910818, 18910818, 18910818, 18910818, 19009862, 20073388, 20651194, 20726834, 20765885, ["name"] = "Círidae"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2327][2] = {102322, 139010, 190073, 228582, 228582, 583958, 950825, 1047220, 1184802, 1568992, 1723936, 1884939, 2269037, 2659632, 2813450, 3137734, 3367627, 3775609, 3927702, 4140325, 4200238, 4401782, 4423806, 4534102, 4767176, 4804258, 5065424, 5080661, 5137694, 5311041, 5381194, 5494454, 5744158, 5757035, 5895702, 5962314, 5994502, 6308856, 6391270, 6400788, 6428982, 6552737, 6625441, 6714896, 6912285, 6933733, 7163286, 7274552, 7305789, 7468410, 7745363, 7875410, 8169816, 8236768, 8340146, 8358752, 8566632, 8606285, 8731360, 8731360, 8784643, 9054288, 9108779, 9146243, 9165963, 9225121, 9284279, 9418360, 9440942, 9521197, 9548854, 9730882, 9764652, 9835115, 9835115, 10184305, 10238568, 10248525, 10313274, 10374055, 10459592, 10480859, 10498030, 10842770, 10922394, 11226457, 11269817, 11513744, 11975667, 12322903, 12519253, 12656827, 12794401, 12931975, ["name"] = "射击猎半藏"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2334] = {["length"] = 130, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2334][1] = {158565, 181761, 372582, 410040, 616984, 814201, 1051343, 1419060, 1787573, 2150861, 2292956, 2697188, 2857133, 3119683, 3288116, 3498933, 3604401, 3714696, 3855090, 4044579, 4224638, 4308118, 4333622, 4379237, 4394455, 4552934, 4645399, 4711501, 4741685, 4741685, 4741685, 4776697, 4887634, 4887634, 4946148, 5019819, 5435854, 5447246, 5583265, 5607023, 5640370, 5640370, 5678205, 5711589, 5795355, 5820005, 5841330, 5857845, 5918783, 5964050, 6266341, 6312862, 6515063, 7199703, 7266657, 7348220, 7528803, 7697191, 7697191, 7858223, 7940556, 8005126, 8061865, 8249502, 8249502, 8278717, 8429763, 8489328, 8774576, 8826490, 8846163, 8855758, 9028638, 9028638, 9028638, 9028638, 9028638, 9051981, 9089380, 9139043, 9163753, 9271317, 9352447, 9352447, 9399528, 9458554, 9541159, 9560308, 9583274, 9633478, 9720481, 9720481, 9720481, 9823725, 9870691, 9933885, 10296152, 11026490, 11145404, 11608205, 11616406, 11654762, 11688079, 11688079, 11699953, 11822386, 12633290, 12718885, 12906034, 13180819, 13799544, 13870210, 14201146, 14227022, 14313636, 15415512, 15505377, 15505377, 15636778, 15768179, 15899580, 16030981, 16162382, 16293783, 16425184, 16556585, 16687986, 16819387, 16950788, 17082189, ["name"] = "Círidae"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2334][2] = {86595, 136527, 163302, 250722, 468361, 566525, 840691, 973805, 1183681, 1320527, 1701951, 1752884, 2018721, 2455120, 2652860, 2782999, 3020313, 3151449, 3322182, 3372261, 3459931, 3558086, 3941637, 3941637, 3971346, 4199371, 4220015, 4245056, 4265842, 4399059, 4444653, 4541441, 4613550, 4737518, 4767535, 4767535, 4880742, 4944246, 4966504, 4997842, 5063586, 5120601, 5247312, 5392072, 5470541, 5470541, 5470541, 5536197, 5597539, 5613664, 5818420, 5818420, 5868158, 5945565, 6129380, 6326339, 6923817, 7117986, 7163677, 7245273, 8294386, 8312130, 8509608, 8522454, 8608097, 8679546, 9466054, 9554204, 9567670, 9599023, 9743366, 10175781, 10189247, 10427297, 10504023, 10504023, 10550364, 10612880, 10639298, 10648405, 10736114, 10845603, 10845603, 10865585, 10865585, 10874719, 10874719, 10883757, 11043037, 11115360, 11115360, 11167168, 11214627, 11265612, 11383316, 11425726, 11425726, 11452432, 11532651, 11532651, 11575064, 11575064, 11575064, 11645259, 11653746, 11721075, 11743777, 11785843, 12240791, 12357131, 12433576, 12467035, 12545789, 12545789, 12559709, 12765461, 13099226, 13132017, 13202704, 13257986, 13492559, 13846307, 14010294, 14182224, 15366745, 15446072, 15683446, 16083272, 16103574, 16169938, ["name"] = "Implection"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2328] = {["length"] = 196, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2328][1] = {0, 205518, 253927, 260843, 501078, 676791, 764067, 1161563, 1427306, 1549965, 1730377, 2048884, 2195514, 2325860, 2609043, 3095188, 3261221, 3594848, 3723126, 3785575, 3980563, 4232887, 4336480, 4386390, 4510724, 4545523, 4721179, 4797953, 5091953, 5153828, 5277476, 5337586, 5564458, 5591426, 5904572, 6232473, 6266442, 6861933, 7569426, 7628323, 7628323, 7645444, 7760649, 7809069, 7834094, 7871655, 7890944, 8000351, 8022578, 8081848, 8163382, 8287972, 8375634, 8500224, 8671995, 8869608, 9114069, 9189120, 9389765, 9736866, 9854858, 9900864, 10681854, 10681854, 10692002, 10894317, 10989860, 11000157, 11015040, 11638640, 11669707, 11844722, 11869532, 11902900, 11914517, 12025833, 12049782, 12061029, 12061029, 12101167, 12127131, 12179268, 12231447, 12413033, 12471989, 12471989, 12528978, 12634975, 12681325, 13579312, 13768129, 14279734, 14790429, 14818935, 14877239, 14877239, 14887070, 14887070, 14977801, 15015021, 15059685, 15151637, 15276413, 15368612, 15498521, 15663757, 15813257, 15943166, 17054117, 17274879, 17445376, 17488510, 18035794, 18065008, 18111471, 18265052, 18308692, 18308692, 18349786, 18377830, 18963328, 18981469, 19014107, 19044715, 19044715, 19301667, 19340444, 19367717, 19404248, 19498603, 19520253, 19542119, 19662188, 20868738, 21003544, 21077911, 22351247, 22532915, 22573849, 22614624, 22710389, 22784845, 22801858, 22837652, 22848159, 23038296, 23122928, 23122928, 23410959, 23449163, 23646870, 23661477, 23924029, 24010635, 24257649, 24362783, 24570390, 24570390, 24834970, 24897658, 24920360, 24942727, 25058337, 25100970, 25108114, 25260284, 25412454, 25564624, 25716794, 25868964, 26021134, 26173304, 26325474, 26477644, 26629814, 26781984, 26934154, 27086324, 27238494, 27390664, 27542834, 27695004, 27847174, 27999344, 28151514, 28303684, 28455854, 28608024, 28760194, 28912364, 29064534, 29216704, 29368874, 29521044, 29673214, 29825384, ["name"] = "Trumpetti"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2328][2] = {0, 112180, 176071, 184188, 199927, 362676, 503962, 652214, 959118, 1195157, 1430781, 1880128, 2196221, 2364606, 2557783, 2674032, 2954013, 3031605, 3285088, 3449718, 3535282, 3947918, 4277320, 4332010, 4421750, 4920512, 4969752, 5061010, 5131785, 5282748, 5343720, 5446378, 5502202, 5572783, 5602213, 5757545, 5798426, 5831142, 6043860, 6060554, 6104144, 6120147, 6172275, 6534877, 6565183, 6597526, 6666220, 6684172, 6846503, 6884416, 6907533, 6923307, 6997542, 7738562, 7829765, 8177191, 8188809, 8324380, 8338231, 8377415, 8449680, 8645630, 8820701, 8842154, 8885013, 9092250, 9161005, 9219392, 9310980, 9425777, 9480341, 9575196, 9581299, 9618327, 10096939, 10601445, 10604497, 10653070, 10697768, 10887389, 10905787, 10990335, 11086440, 11132465, 12040181, 12097611, 12680563, 12713415, 13250832, 13807168, 13828765, 13855977, 14044022, 14093945, 14165256, 14185101, 14207432, 15339454, 15363397, 15431986, 15619272, 15668211, 15730784, 15781696, 16012788, 16030128, 16257501, 16346625, 16490164, 16619807, 16692272, 16822284, 16826132, 17014559, 18110049, 18150678, 18195374, 18214737, 18318727, 18321779, 18419736, 18443767, 18459542, 18474073, 18668299, 18671351, 18710976, 18747979, 18759651, 18765755, 18807417, 18834984, 19120574, 19175087, 19294430, 19340505, 19348252, 19392678, 19473682, 19476734, 19620499, 19623551, 19641132, 19658775, 19684535, 19731450, 19734502, 19834847, 20348346, 20370673, 20409398, 20469641, 20501982, 20530959, 20584833, 20614098, 20656349, 20659492, 20825514, 20890882, 20893934, 20967383, 21989701, 21993574, 22059030, 22283724, 22295355, 22349434, 22360233, 22363285, 22369389, 22627714, 22667720, 22735455, 23053642, 23140934, 23389492, 24410778, 24495047, 24770156, 24823889, 25031401, 25240982, 25330064, 25336351, 25494846, 26842871, 27005204, 27097126, 27363607, 27426372, 27532611, 27990886, 28157541, 28227655, 28304009, ["name"] = "Ghosteld"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2333] = {["length"] = 211, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2333][1] = {145816, 165300, 236135, 262738, 298038, 380736, 462942, 497652, 518766, 684450, 759030, 774036, 976514, 1033519, 1127353, 1227417, 1227417, 1250952, 1272941, 1700938, 1956938, 2387637, 3152561, 3439979, 3868678, 3940605, 4564635, 5511695, 6115818, 6367108, 6886395, 7049116, 7274841, 7598595, 7615644, 8020212, 8240677, 8319691, 8372658, 8406499, 8440088, 8750245, 8790674, 8826263, 8843653, 9131806, 9214110, 9325256, 9464550, 9481465, 9515292, 9638165, 9709816, 9727128, 9807211, 9840323, 9946881, 9946881, 10139700, 10191542, 10237184, 10575442, 10856222, 10931169, 11125850, 11240231, 11410732, 11474014, 11482340, 11671932, 11741952, 11775002, 11799759, 12068499, 12110530, 12119029, 12152654, 12365903, 12386809, 12395237, 12438102, 12529878, 12570777, 12599438, 12653246, 12673944, 12702178, 12784223, 12799253, 12818881, 12828482, 13188647, 13188647, 13799633, 14583402, 14583402, 14875452, 15698643, 16327434, 17156036, 17526796, 17692919, 17862065, 18057788, 18196100, 18214397, 18362468, 18449525, 18495157, 18512786, 18607451, 18710948, 18732736, 18851871, 18909308, 18921812, 18937478, 19138969, 19175130, 19212161, 19320440, 19384006, 19414604, 19435353, 19485642, 19641774, 19641774, 19784609, 19808911, 19888187, 20036624, 20036624, 20320374, 20334469, 20334469, 20354609, 20390482, 20574584, 20597361, 20667832, 20804748, 20814323, 21083620, 21103482, 21124145, 21171669, 21226380, 21337486, 21345286, 21345504, 21345504, 21567313, 21567313, 21622048, 21622048, 21659931, 21735918, 21798326, 21809116, 21964351, 21995960, 22020504, 22124978, 22153575, 22197844, 22206143, 22230558, 22230558, 22722302, 22733931, 23180111, 23956635, 23978758, 24051353, 24627135, 25799972, 26029379, 26879302, 27801150, 27936557, 28303234, 28710021, 29494941, 29494941, 29923040, 30042301, 30092050, 30315364, 30434256, 30643664, 30745489, 30754164, 30809347, 30825674, 31037783, 31132689, 31355082, 31363272, 31384580, 31689680, 31730731, 31888595, 32046459, 32204323, 32362187, 32520051, 32677915, 32835779, 32993643, 33151507, 33309371, ["name"] = "怪頭獵人"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2333][2] = {146340, 182248, 261941, 368549, 438886, 567388, 686401, 701338, 941214, 1012961, 1216434, 1365817, 1561559, 1714350, 1921175, 2134739, 2422512, 2547890, 2732483, 3265926, 3590817, 4036475, 4610738, 4668582, 5032470, 5177501, 5726344, 5880911, 5880911, 5901714, 6191956, 6212709, 6293847, 6389879, 6551810, 6551810, 6767370, 6789020, 6851753, 7020703, 7028818, 7302633, 7334143, 7457854, 7640794, 7893434, 8005529, 8414088, 8630083, 8905983, 9086190, 9347148, 9357202, 9683753, 9928673, 10107013, 10316463, 10668389, 10704501, 11013410, 11260130, 11313102, 11313102, 11344998, 11468722, 11493660, 11602271, 11708463, 11717021, 11812157, 11820373, 11957021, 12033798, 12041787, 12062308, 12139015, 12208375, 12258214, 12322458, 12403190, 12403190, 12403190, 12529341, 12576664, 12707669, 12754414, 12845580, 12878014, 13008393, 13008393, 13321735, 13321735, 13565987, 13745211, 13908902, 14312962, 14401930, 14648435, 14657799, 14657799, 14749779, 14971856, 15192256, 15217610, 15384691, 15673628, 15750602, 16141100, 16175599, 16229981, 16751190, 16771433, 16791638, 17254675, 17427559, 17427559, 17471367, 17576945, 17636958, 17727101, 17837941, 17933238, 17953480, 18082784, 18208824, 18722755, 18778679, 19063144, 19232332, 19321819, 19453306, 19469571, 19795885, 20586586, 20667610, 20930160, 21361856, 21537521, 21628274, 21644817, 21791099, 21936739, 22079285, 22079285, 22106492, 22288155, 22355903, 22504918, 22504918, 22515903, 22515903, 22646690, 22701394, 22701394, 22818443, 22848698, 22988040, 22988040, 23068950, 23068950, 23203081, 23225527, 23308968, 23363892, 23419548, 23436349, 23628689, 23738114, 23797594, 24294336, 24347455, 24634242, 24895426, 25445399, 25863913, 26113694, 26866303, 26945357, 27211287, 27400971, 27870898, 27981290, 28314740, 28583536, 28619210, 28957747, 29019572, 29135100, 29240922, 29303190, 29780368, 29843787, 29999318, 30133651, 30220471, 30470409, 30611479, 30695932, 30910289, 31017084, 31060116, 31297206, 31474557, 31850774, 32163829, 32335200, 32463052, 32744887, 32982299, 33115453, 33189282, ["name"] = "Knoox"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2335] = {["length"] = 153, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2335][1] = {0, 128012, 227024, 279473, 483025, 538411, 930396, 1051476, 1145341, 1413077, 1450090, 1986118, 2275651, 2397765, 2576767, 2996052, 3244531, 3886202, 3977035, 4074783, 4361319, 4550500, 4698025, 4769236, 4908913, 5118914, 5184006, 5288928, 5304598, 5397514, 5452450, 5571978, 5794089, 5809475, 5859000, 6026520, 6089014, 6384666, 6715212, 6803830, 7499503, 7547819, 9014121, 9038853, 9056813, 9171533, 9221723, 9365218, 9439198, 9500059, 9675487, 9693039, 9745672, 10638986, 10779774, 10864876, 10979945, 11918915, 12106337, 12158367, 12259378, 12274036, 12411267, 12580815, 12679566, 12775170, 12822771, 12860805, 12945447, 13028603, 13479434, 13509521, 13553498, 13553498, 13566336, 13743119, 14249576, 14249576, 14294812, 14373028, 14435276, 14593138, 14669940, 14712058, 14815936, 14851187, 14974165, 15012402, 15038725, 15079236, 15079236, 15284884, 15296701, 15347570, 15398092, 15527856, 15608109, 15683843, 15773723, 15897205, 15914099, 15990354, 16075065, 16162364, 17133644, 17238251, 17238251, 17371526, 17463228, 17463228, 17493878, 17573864, 17649834, 17802323, 17845769, 17949129, 17983695, 18078962, 18134434, 18273228, 18306041, 18854899, 19354523, 19537248, 19692029, 19692029, 19752320, 19845957, 19845957, 19897143, 19906677, 19964262, 20021663, 20021663, 20443765, 21241588, 21335786, 21359734, 21728372, 21845069, 21864518, 22019585, 22174652, 22329719, 22484786, 22639853, 22794920, 22949987, 23105054, 23260121, 23415188, 23570255, 23725322, ["name"] = "Círidae"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2335][2] = {178953, 275079, 319996, 367497, 382638, 659781, 798007, 912170, 1027528, 1407308, 1645793, 1886437, 2012354, 2336494, 2596723, 2752022, 2918209, 3380792, 3469339, 3904745, 4362501, 4494602, 4804768, 4859612, 5003555, 5378179, 5631087, 5712123, 5745464, 5837275, 5997430, 6112687, 6194585, 6275975, 6339730, 6664430, 6791778, 6834071, 6914955, 7084497, 7149245, 7159162, 7213680, 7213680, 7368040, 7432094, 7494522, 7509623, 7627600, 7627600, 7771227, 7906728, 7961020, 8049003, 8143969, 8191451, 8372958, 8905094, 8905094, 9024026, 9085257, 9178286, 9338722, 9347832, 9398408, 9529812, 9539194, 9564202, 9579531, 9754345, 9773789, 9805144, 9857686, 9950465, 10004666, 10056185, 10064982, 10230416, 10656441, 10680293, 10709669, 10718952, 10718952, 10932623, 10956400, 11028045, 11102493, 11490889, 11510397, 11519938, 11586914, 11670615, 11746929, 11746929, 11757050, 11841079, 12325133, 12484234, 12652895, 13608024, 13767126, 13821621, 13898161, 14075827, 14075827, 14378702, 14394718, 14506003, 15764897, 17221062, 17233910, 17447171, 17493935, 17530202, 17603037, 17650450, 18309273, 18414340, 18479037, 18514361, 18548119, 18755836, 18755836, 18832356, 18848059, 18865291, 19908652, 20066953, 20198381, 20226695, 20288850, 20341716, 20372581, 20372581, 20557106, 20557106, 20690304, 20760038, 20841577, 20855901, 20920088, 20969846, 20969846, 20996530, 21142186, 21297516, 21333735, 22612549, 22893134, 23220849, 23326336, 23369971, 23369971, ["name"] = "Joeragon"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2343] = {["length"] = 366, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2343][1] = {146117, 170969, 217248, 267683, 267683, 386608, 415724, 468235, 612706, 664441, 680253, 832173, 832173, 895882, 952336, 970513, 1145761, 1174087, 1302358, 1653362, 1776172, 1945294, 1945294, 1988788, 2047219, 2086362, 2086362, 2275133, 2417652, 2741787, 2912715, 3036407, 3225106, 3568314, 3749825, 4021773, 4152686, 4678726, 4815187, 5145908, 5293238, 5721855, 5878101, 6225081, 6279254, 6400986, 6569085, 6655481, 6829764, 6945351, 7106131, 7363561, 7496382, 7584843, 7917966, 8025452, 8264482, 8297926, 8488180, 8614486, 8789677, 8920062, 9125896, 9125896, 9173877, 9173877, 9252433, 9318812, 9332508, 9425615, 9442304, 9489046, 9516870, 9532989, 9706699, 9844858, 9879374, 9972762, 10047905, 10081525, 10234277, 10302477, 10372274, 10557026, 10736371, 10868448, 10986299, 11067851, 11152666, 11152666, 11152666, 11184670, 11271869, 11385441, 11437026, 11576211, 11612452, 11687785, 11721345, 11796406, 11796406, 11807312, 11943104, 11953782, 12175684, 12230680, 12340702, 12360051, 12545583, 12578770, 12641547, 12750552, 12789001, 12975728, 12991968, 13031806, 13187431, 13240677, 13390080, 13406019, 13465621, 13606095, 13648407, 13904505, 13951042, 14071636, 14352478, 14383959, 14598829, 14708836, 14828160, 14980486, 15037263, 15115061, 15283200, 15394722, 15504970, 15747830, 15773824, 15846574, 16026268, 16105172, 16250460, 16468193, 16501840, 16598753, 16598753, 16788647, 16869405, 16869405, 16886970, 16928730, 16963083, 16977780, 17007325, 17104096, 17164332, 17189122, 17515083, 17515083, 17515083, 17647167, 17705029, 17973361, 18318258, 18330717, 18635403, 18763244, 18829480, 18829480, 18829480, 18829480, 18908007, 18916696, 18916696, 18929682, 19087865, 19256961, 19284995, 19466325, 19501307, 19610969, 19819401, 19870469, 19884024, 20156631, 20183688, 20270021, 20330922, 20330922, 20330922, 20417409, 20434334, 20562767, 20562767, 20646458, 20726096, 20743021, 21001586, 21012804, 21093198, 21093198, 21240368, 21309910, 21376807, 21591681, 21609173, 21776449, 21827753, 21924505, 22130572, 22148622, 22316683, 22387822, 22554301, 22691392, 22768978, 22793530, 22930729, 22969522, 23126290, 23126290, 23335157, 23357849, 23431267, 23526088, 23945983, 23971919, 24059511, 24096100, 24315668, 24315668, 24396455, 24520444, 24784875, 24784875, 24819258, 25002140, 25011017, 25199881, 25229151, 25416898, 25613710, 25646302, 25705672, 25892911, 26026982, 26170602, 26376264, 26391000, 26391000, 26438354, 26453100, 26594757, 26621739, 26797725, 26883424, 26892063, 27000921, 27009900, 27165975, 27203979, 27256867, 27293777, 27346858, 27346858, 27346858, 27355427, 27355427, 27364807, 27487116, 27560576, 27671768, 27926929, 27946535, 28368570, 28754474, 28984574, 29370153, 29818037, 30161472, 30305215, 30681159, 30856051, 31070830, 31285974, 31365481, 31537914, 31591276, 31758564, 32133080, 32217443, 32330691, 32505102, 32531788, 32648067, 32674773, 32860877, 32903679, 32949895, 33089412, 33137443, 33175146, 33477149, 33593203, 33687350, 33687350, 33898377, 34610828, 34610828, 34749322, 34903213, 35359171, 35911108, 35977079, 36158132, 36385788, 36446189, 36581895, 36590452, 36844802, 37101679, 37118852, 37385450, 37401035, 37515798, 37690683, 37798010, 37897022, 37913134, 38028022, 38142910, 38257798, 38372686, 38487574, 38602462, 38717350, 38832238, 38947126, 39062014, 39176902, 39291790, 39406678, 39521566, 39636454, 39751342, 39866230, 39981118, 40096006, 40210894, 40325782, 40440670, 40555558, 40670446, 40785334, 40900222, 41015110, 41129998, 41244886, 41359774, 41474662, 41589550, 41704438, 41819326, 41934214, 42049102, ["name"] = "Komets"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2343][2] = {77770, 98563, 139695, 196567, 196567, 304085, 377017, 437268, 536155, 557692, 761573, 1047018, 1221794, 1346110, 1549595, 1752790, 2176238, 2569521, 2770545, 2770545, 2770545, 2805379, 2912096, 2970384, 3052690, 3266169, 3364297, 3507792, 3614915, 3704703, 3891046, 3992279, 4063561, 4406846, 4533269, 4794601, 4875036, 5026278, 5192212, 5446259, 5528610, 5563287, 5759345, 5799797, 5935672, 6162772, 6382512, 6650494, 6759909, 6759909, 6759909, 7027544, 7286842, 7311933, 7406235, 7486812, 7812432, 8128864, 8203248, 8555685, 8629084, 8728907, 8791035, 8947734, 9016932, 9117284, 9117284, 9117284, 9117284, 9117284, 9126923, 9126923, 9352132, 9393173, 9467140, 9566723, 9566723, 9566723, 9637934, 9669947, 9669947, 9679629, 9689297, 10147433, 10271089, 10316445, 10395151, 10627142, 10740034, 10912127, 10924625, 11318730, 11318730, 11318730, 11318730, 11318730, 11318730, 11422991, 11500596, 11687295, 11797300, 11797300, 11835349, 11843409, 11851985, 12028060, 12090630, 12233667, 12292006, 12433200, 12452133, 12510612, 12706705, 12760366, 12781141, 12809161, 13056087, 13072997, 13072997, 13291911, 13348218, 13525111, 13610037, 13724052, 13724052, 13759116, 13833253, 13895115, 13895115, 14170776, 14193722, 14207396, 14423168, 14423168, 14431621, 14486735, 14568926, 14844883, 14844883, 15066387, 15217252, 15573247, 15652460, 15837291, 16165058, 16381237, 16606937, 16783780, 17055100, 17187178, 17538348, 17609868, 17609868, 17668631, 17694798, 17784342, 17784342, 17800712, 17920354, 17977280, 18045879, 18103991, 18150113, 18239353, 18323454, 18323454, 18811694, 18981573, 18995688, 18995688, 18995688, 18995688, 19026499, 19026499, 19026499, 19026499, 19301691, 19329515, 19329515, 19425584, 19593012, 19965732, 20257840, 20423278, 20733446, 20953080, 21202790, 21665243, 21947041, 22128883, 22319982, 22495505, 22610461, 22809203, 22839053, 23011534, 23077415, 23189874, 23229801, 23273696, 23273696, 23339616, 23387708, 23387708, 23461714, 23510054, 23563984, 23563984, 23745576, 23848382, 23939675, 24010716, 24160524, 24322004, 24394521, 24496039, 24548825, 24693380, 24916446, 25082508, 25493652, 25588424, 25915585, 26048642, 26371702, 26475648, 26598350, 26689114, 26777548, 26961210, 27042824, 27061161, 27128066, 27205487, 27350810, 27412461, 27420629, 27450892, 27627149, 27676728, 27715274, 27766341, 27804978, 28017950, 28063372, 28133653, 28171101, 28208254, 28230367, 28243840, 28407823, 28579755, 28690131, 28711576, 28772235, 28959025, 28969815, 28988831, 29038138, 29208728, 29218870, 29256777, 29306808, 29399315, 29565184, 29586295, 29759789, 30080011, 30133631, 30283778, 30659332, 30852121, 30884295, 31430726, 31727712, 31887997, 32353507, 32517561, 32710762, 32800237, 32800237, 32845910, 32894769, 33029933, 33221354, 33257277, 33265884, 33297855, 33430625, 33521807, 33567923, 33714185, 33766243, 33796375, 33796375, 33923210, 33942706, 33972061, 34008612, 34030460, 34229144, 34324117, 34398429, 34424859, 34537158, 34595695, 34717167, 34779330, 34779330, 34886634, 34945682, 34945682, 34993849, 35076388, 35615766, 35643468, 35948717, 36193556, 36318753, 36651666, 36962487, 36990190, 37064498, 37322505, 37496892, 37617428, 37631408, 37693423, 37942881, 37998532, 38044641, 38044641, 38044641, 38083897, 38114962, 38140687, 38192346, 38235453, 38400397, 38400397, 38449909, 38667441, 38696883, 38726732, 38794788, 38999542, 39034418, 39034418, 39034418, 39111374, 39155859, 39155859, 39380436, 39452877, 39506671, 39627176, 39676755, 39693720, 39917089, 40153998, 40188621, 40343146, 40551771, 40569861, 40862203, 40862203, ["name"] = "Olepsovac"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2336] = {["length"] = 217, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2336][1] = {253415, 310301, 365030, 365030, 666121, 734174, 955126, 1000906, 1126798, 1420026, 1649870, 1677155, 1835392, 2327867, 2643767, 2797007, 3254678, 3320188, 3609704, 3626266, 3808494, 3840776, 4061652, 4114899, 4210903, 4268424, 4337754, 4414833, 4656154, 4678191, 4753086, 4932498, 5014144, 5292321, 5356721, 5421199, 5471490, 5811927, 5903230, 5969957, 5969957, 6056721, 6191615, 6541881, 6759167, 7268092, 7825278, 7956362, 8209937, 8634732, 9313279, 9656855, 10132292, 10972194, 11074017, 11283790, 11513787, 11568602, 11568602, 11712566, 11740563, 11952228, 12008819, 12155410, 12253149, 12405566, 12420132, 12472484, 12695367, 12798106, 12816322, 12816322, 13179095, 13193133, 13479911, 13906551, 13937933, 14865337, 15301930, 15579124, 16463298, 16610955, 16877362, 17120807, 17558271, 18015060, 18123542, 18143364, 18187426, 18275937, 18350840, 18502553, 18649963, 18706210, 18752849, 18766659, 18952332, 19023338, 19070452, 19097766, 19110669, 19240817, 19280758, 19331561, 19402854, 19402854, 19512220, 19512220, 19738414, 19805554, 19860127, 19988143, 19996631, 20089319, 20174694, 20264003, 20313978, 20521551, 20603966, 20688572, 20855187, 21024477, 21202055, 21508032, 21730163, 21790535, 21874523, 22048414, 22221052, 22506494, 22632136, 22811505, 22858637, 22965680, 23010174, 23037880, 23074073, 23437923, 23491043, 23711844, 23878824, 23889867, 24292448, 24363033, 24404479, 24417338, 24417338, 24819722, 24926721, 24939600, 25023582, 25079569, 25244566, 25409563, 25574560, 25739557, 25904554, 26069551, 26234548, 26399545, 26564542, 26729539, 26894536, 27059533, 27224530, 27389527, 27554524, 27719521, 27884518, 28049515, 28214512, 28379509, 28544506, 28709503, 28874500, 29039497, 29204494, 29369491, 29534488, 29699485, 29864482, 30029479, 30194476, 30359473, 30524470, 30689467, 30854464, 31019461, 31184458, 31349455, 31514452, 31679449, 31844446, 32009443, 32174440, 32339437, 32504434, 32669431, 32834428, 32999425, 33164422, 33329419, 33494416, 33659413, 33824410, 33989407, 34154404, 34319401, 34484398, 34649395, 34814392, 34979389, 35144386, 35309383, 35474380, 35639377, 35804374, ["name"] = "射击猎半藏"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2336][2] = {86549, 114655, 263531, 277275, 438375, 508065, 725681, 916201, 949559, 1202205, 1594307, 1875110, 2031126, 2097901, 2602647, 2759985, 3169867, 3265606, 3720250, 3904149, 3974939, 4193252, 4366820, 4412897, 4600423, 4710111, 5006525, 5089561, 5351308, 5372130, 5421249, 5455873, 5485966, 5699956, 5752379, 5842557, 5896116, 6121024, 6379550, 6751964, 7565407, 7574588, 8319689, 8520278, 8950894, 9360635, 9790605, 10321440, 10459829, 10671261, 11154249, 11529445, 11708436, 11861224, 12275746, 12336404, 12638193, 12724358, 12745984, 12950685, 12987667, 13046309, 13086580, 13197695, 13458786, 13480961, 13500147, 13530172, 13717356, 13765569, 13806192, 13939073, 13959523, 14224635, 14963828, 15194722, 15958081, 16055459, 16420359, 16743023, 17327544, 17982398, 18066360, 18196516, 18775122, 19330120, 19476199, 19476199, 19722567, 19760725, 19785385, 19831950, 19840758, 19848868, 19889419, 19921859, 19955368, 20176114, 20176114, 20402489, 20411313, 20503643, 20610908, 20629526, 20694689, 20804249, 20886173, 20886173, 20886173, 20886173, 20951944, 20979354, 20979354, 20979354, 20979354, 20979354, 20979354, 20979354, 20979354, 20979354, 20979354, 21009439, 21052264, 21052264, 21052264, 21052264, 21052264, 21052264, 21052264, 21069319, 21172912, 21248170, 21312907, 21400128, 21504729, 21513461, 21533699, 21672109, 21790263, 22047945, 22168889, 22449927, 22613065, 22872604, 23605066, 23846081, 24912657, 24946206, 25273792, 25950256, 26007105, 26551112, 26551112, 26641059, 27165907, 27189394, 27566893, 27628414, 27830754, 27911324, 27949105, 28189310, 28272762, 28369887, 28369887, 28485785, 28499027, 28657078, 28744325, 28767059, 28832905, 28868470, 28953082, 28980278, 29218314, 29236442, 29378978, 29546651, 29587268, 29736100, 29853645, 30155853, 30313452, 30708187, 30760396, 31033272, 31374068, 31408808, 31773862, 31837292, 31994662, 32229013, 32330553, 32465398, 32648584, 32871575, 33030203, 33123805, 33206651, 33231895, 33304460, 33380621, 33568421, 33709695, 33869128, 33932550, 34151804, 34268869, 34393166, 34488534, 34521736, 34795159, 34844564, 34989609, 35071095, 35451058, 35451058, ["name"] = "Joeragon"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2331] = {["length"] = 145, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2331][1] = {105078, 138917, 166573, 186492, 206268, 544437, 838003, 942322, 1323653, 1432222, 1777078, 2206856, 2353866, 2628098, 2790020, 3192647, 3425546, 3713915, 3915374, 4023510, 4225073, 4280698, 4349028, 4610947, 4649188, 4845465, 4964909, 5161954, 5398772, 5464403, 5529935, 5751738, 5800069, 5893127, 5893127, 6019464, 6319059, 6384175, 6444212, 6469543, 6513752, 6513752, 6513752, 6654814, 6961978, 7042317, 7127483, 7149435, 7199872, 7214193, 7447262, 7708087, 7727977, 7847275, 8004299, 8042026, 8398078, 8415271, 8503479, 8605724, 8816566, 9027017, 9055994, 9236781, 9248330, 9354723, 9399708, 9691561, 9832849, 9832849, 10002950, 10067783, 10375669, 10500303, 10547169, 10588208, 10602059, 10737722, 10741481, 10798203, 10809763, 10844058, 10844058, 10949068, 10952140, 11001108, 11029420, 11056384, 11098245, 11136269, 11147143, 11309626, 11381433, 11461937, 11468081, 11527819, 12036838, 12177760, 12191559, 12268183, 12304939, 12363653, 12446900, 12494958, 12605025, 12788044, 12839907, 12919069, 13239785, 13301962, 13614206, 13634862, 13686080, 13754263, 13770122, 13874851, 13915072, 13963454, 14162114, 14431685, 15196616, 15486724, 16439708, 16461832, 16476195, 16818343, 16844296, 17080067, 17127259, 17166651, 17210839, 17523090, 17538787, 17669058, 17676031, 17729191, 17855216, 18323938, 18425809, 19375271, 19933497, 20177881, 20238730, 20251672, 20251672, ["name"] = "Ghosteld"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2331][2] = {0, 102484, 295698, 366711, 402957, 506631, 761961, 993723, 1112478, 1392477, 1882872, 2107223, 2337851, 2568419, 2709435, 2796783, 3091479, 3297539, 3706962, 3815010, 4082189, 4142470, 4235912, 4541240, 4754019, 4878545, 4934144, 5013742, 5396352, 5712205, 5801943, 5868762, 6011952, 6049061, 6103600, 6353552, 6361720, 6420471, 6613031, 6665452, 6712728, 6855405, 6855405, 6949823, 7228015, 7286449, 7286449, 7306846, 7362713, 7423656, 7471632, 7571950, 7590786, 7649973, 7790815, 7819282, 7852392, 7926592, 7998184, 8314243, 8500104, 9229176, 9361895, 9495739, 9616302, 9701616, 9807651, 9937369, 9949027, 9973020, 9984185, 10090026, 10147643, 10147643, 10181997, 10235253, 10261862, 10282259, 10406167, 10458053, 10516570, 10914296, 10914296, 11067811, 11067811, 11121380, 11197206, 11197206, 11217660, 11395610, 11395610, 11433284, 11489540, 11516100, 11554711, 11610307, 11770227, 11780565, 11811294, 11890586, 11948371, 11948371, 12168858, 12168858, 12211393, 12300672, 12366410, 12576832, 12774167, 12961922, 13029126, 13120417, 14868560, 14995195, 15272607, 15483403, 15656098, 16569406, 16681979, 16734597, 17400107, 17408730, 17482782, 18024089, 18099522, 18129348, 18193880, 18435780, 18517675, 18540203, 18572988, 18590559, 18700728, 18882207, 18882207, 19117910, 19146637, 19210143, 19329454, 19468514, 19607574, 19746634, 19885694, 20024754, 20163814, ["name"] = "Ragnarøkkr"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2345] = {["length"] = 388, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2345][1] = {184580, 184580, 197543, 232688, 317036, 470138, 586461, 626065, 1065621, 1106826, 1294498, 1301179, 1414217, 1566637, 1772238, 1922293, 2019664, 2094237, 2171887, 2317377, 2520313, 2586645, 2680524, 2743618, 2881557, 3098751, 3347749, 3387783, 3438469, 3612123, 3728305, 3728305, 3757503, 3777115, 3786708, 3883581, 4182583, 4182583, 4241687, 4586281, 4621972, 4734010, 4851388, 4880830, 4905165, 4919329, 4997494, 5344882, 5441755, 5441755, 5511727, 5511727, 5534329, 5610078, 5654603, 5687377, 5820501, 5834689, 6024111, 6195422, 6417934, 6629200, 6850550, 7636836, 7997547, 8805560, 8951886, 8951886, 8951886, 8951886, 8951886, 8951886, 9059218, 9141613, 9184199, 9302528, 9335959, 9578130, 9704145, 9730611, 9871764, 10007668, 10041392, 10054417, 10103917, 10148621, 10253664, 10500336, 10542415, 10576140, 10627654, 10644627, 10644627, 10644627, 10644627, 10762216, 10762216, 10773296, 11074714, 11338589, 11338589, 11361743, 11403902, 11484592, 11513472, 11690315, 11866237, 11905811, 11973036, 12032897, 12129591, 12193317, 12327588, 12444869, 13336924, 13512958, 13599209, 13734530, 13870352, 13976585, 13995948, 14024277, 14074893, 14107348, 14195737, 14428628, 14501574, 14525285, 14569885, 14603101, 14760374, 15005952, 15044642, 15115209, 15194415, 15270168, 15298156, 15331792, 15381126, 15381126, 15487646, 15508487, 15508487, 15526905, 15554746, 15584021, 15643780, 15692574, 15791444, 15791444, 15815057, 15955664, 16044445, 16073476, 16080226, 16161301, 16319505, 16859160, 16873324, 16906776, 16940405, 17126334, 17216933, 17310003, 17319627, 17362929, 17441464, 17722146, 18894770, 19047559, 20224079, 20224080, 20224080, 20224080, 20224080, 20224080, 20232540, 20241839, 20357730, 20398505, 20398505, 20398505, 20423948, 20592300, 20622185, 20823727, 20911392, 20918014, 20961004, 21000290, 21101493, 21120765, 21130005, 21143495, 21143495, 21143495, 21143495, 21337459, 22350653, 22364329, 22443940, 23045266, 23045266, 23299412, 23381930, 23381930, 23414343, 23573624, 23594465, 23604423, 23673222, 23689619, 23724509, 23822200, 23893834, 23948590, 24135116, 24146443, 24332970, 24355910, 24406737, 24626120, 24826274, 24912789, 25165443, 25184136, 25239814, 25339287, 25604030, 25644483, 25770603, 25869093, 25938822, 26090455, 26130506, 26148642, 26177820, 26322642, 26346911, 26480258, 26535846, 26535846, 26545183, 26573512, 26596944, 27574727, 27647043, 27683768, 27900936, 28919190, 28927934, 29021985, 29142505, 29142505, 29142505, 29142505, 29142505, 29142505, 29221195, 29344566, 29424953, 29499293, 29513883, 29537822, 29552412, 29610626, 30633730, 30867552, 30902963, 31240759, 31240759, 31471411, 31611182, 31640795, 31640795, 31880624, 31880624, 32125372, 32137618, 32203605, 32232855, 32434865, 32505048, 32518573, 32531806, 32593385, 32620589, 32770372, 32798341, 32798341, 32825485, 32825485, 32863239, 32891286, 32943859, 33038077, 33080531, 33080531, 33132390, 33195124, 33313833, 33377400, 33403940, 33403940, 33474607, 33607638, 33607638, 33607638, 33666764, 33693938, 33782466, 33927447, 34083957, 34267400, 34339543, 34417785, 34482213, 34772371, 34830751, 34900045, 35108452, 35179232, 35407318, 35601310, 35868705, 36907060, 37137401, 37434656, 37507382, 37711221, 37908692, 37993715, 38306193, 38491392, 38576169, 38711941, 38849630, 38971968, 38971968, 39020270, 39101889, 39101889, 39113406, 39343191, 39403473, 39431750, 39449053, 39460553, 39661959, 39673657, 39815545, 39989091, 40299502, 40590284, 40629434, 40687101, 40771034, 40926264, 40982834, 40982834, 40982834, 40982834, 40982834, 41095734, 41208634, 41321534, 41434434, 41547334, 41660234, 41773134, 41886034, 41998934, 42111834, 42224734, 42337634, 42450534, 42563434, 42676334, 42789234, 42902134, 43015034, 43127934, 43240834, 43353734, 43466634, 43579534, 43692434, 43805334, ["name"] = "Fyolie"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2345][2] = {75267, 110129, 142712, 267988, 413537, 447161, 750987, 859356, 1089017, 1255081, 1503987, 1637644, 1671079, 1867438, 1958190, 2167725, 2369112, 2483443, 2588740, 2753758, 2806546, 2953902, 3154206, 3204389, 3282288, 3404810, 3421229, 3482667, 3777261, 3829483, 3847963, 3861663, 4034111, 4042764, 4095181, 4379545, 4387491, 4457632, 4606162, 4616662, 4648984, 4670486, 4747747, 4747747, 4979092, 4979092, 5031692, 5276255, 5370292, 5393960, 5729433, 5915812, 6237470, 6385638, 6413134, 6442743, 6830189, 6922839, 7485824, 8603535, 8877219, 9223690, 9223690, 9223690, 9244339, 9305478, 9451961, 9543470, 9594777, 9725751, 9725751, 9809601, 9854735, 9981936, 9997629, 10034975, 10136625, 10136625, 10161585, 10369844, 10385059, 10521489, 10570007, 10585636, 10611236, 10768691, 10768691, 10849068, 10994071, 11110679, 11256593, 11256593, 11256593, 11256593, 11285706, 11285706, 11441023, 11600814, 11896421, 12132596, 12283425, 12524891, 12632246, 13013467, 13035035, 13101261, 13397837, 13464910, 13481895, 13702655, 13956400, 14026605, 14050574, 14095986, 14185058, 14193448, 14248667, 14248667, 14316173, 14392646, 14392646, 14411717, 14512807, 14550081, 14752260, 14761845, 14784125, 14863004, 14963565, 15127558, 15187024, 15221713, 15292239, 15346417, 15346417, 15359832, 15368205, 15462406, 15471012, 15490867, 15659299, 15713138, 15857747, 15866131, 16019313, 16025752, 16611348, 16823539, 16832064, 16941590, 17008663, 17062727, 17196933, 17281716, 17396010, 17652392, 17652392, 17674250, 17882356, 17909051, 17973153, 18128042, 18136593, 18176141, 18263119, 18279515, 18525052, 18574065, 18574065, 18616764, 18680143, 18707436, 18874348, 18938227, 18963956, 18976391, 19010461, 19055434, 19161218, 19239469, 19260614, 19316471, 19420816, 19480135, 19596040, 19660973, 19690787, 19829647, 19879396, 20064141, 20136702, 20342169, 20511004, 20729386, 20904684, 21120204, 21373723, 21549708, 21845168, 21909404, 22153870, 22261711, 22388584, 22497855, 22531557, 22850166, 22914681, 23261774, 23290037, 23348791, 23389355, 23609886, 23701745, 23787995, 23813440, 23877762, 24181057, 24254467, 24392446, 24539707, 24562257, 24829145, 24829145, 24965271, 25083862, 25136998, 25190388, 25218446, 25367393, 25389490, 25422149, 25430630, 25486166, 25512459, 25616667, 25632588, 25828817, 25949647, 25991628, 26174653, 26222339, 26301932, 26636852, 26740934, 26950636, 27077597, 27425682, 27459230, 27541151, 27623418, 27655127, 27796991, 27844271, 27889807, 27983375, 28069893, 28069893, 28093760, 28437111, 28437111, 28533881, 28533881, 28619670, 28675412, 28742077, 28760370, 28944613, 28958447, 29050191, 29059198, 29131818, 29159314, 29197452, 29221319, 29234875, 29482495, 29554789, 29649921, 29716127, 29904833, 30045011, 30063963, 30063963, 30080572, 30115760, 30337248, 30354706, 30469249, 30572134, 30929654, 31020185, 31201390, 31219785, 31316646, 31545885, 31561757, 31786381, 31818321, 31868177, 31947732, 32155875, 32155875, 32189618, 32312974, 32376353, 32402985, 32531517, 32552084, 32678785, 32702188, 32782474, 32798307, 32946094, 33077909, 33118422, 33149272, 33169954, 33326650, 33349113, 33640642, 33697813, 33810682, 34089874, 34123043, 34421768, 34471526, 34520801, 34665863, 34756813, 34971422, 34971422, 35051909, 35334469, 35492744, 35575699, 35615025, 35821748, 35871350, 36012356, 36146636, 36185962, 36378458, 36420291, 36549509, 36549509, 36604616, 36635850, 36767380, 36789442, 36864331, 36978741, 37482155, 37578412, 37587653, 37662283, 37676250, 37738084, 37908443, 37962730, 38065128, 38074963, 38148436, 38184038, 38310800, 38369516, 38403898, 38569698, 38620070, 38685069, 38779513, 38842999, 39022578, 39104405, 39223721, 39262723, 39323479, 39421381, 39500910, 39687270, 39794117, 39810968, 39991879, 40340490, 40520257, 40984972, 41095752, 41585013, 42195720, ["name"] = "Komets"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2337] = {["length"] = 392, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2337][1] = {161631, 221232, 249622, 258844, 541396, 773495, 899068, 1338997, 1611054, 1866945, 2524472, 2943563, 3025107, 3133550, 3496899, 3754735, 3887649, 3983991, 4097862, 4097862, 4097862, 4125774, 4311921, 4343333, 4380639, 4428501, 4710043, 4794971, 5251979, 5379396, 5430498, 5719091, 5798892, 5851495, 5934600, 6090348, 6104770, 6147132, 6304883, 6324509, 6395413, 6403327, 6411922, 6626224, 6680988, 6680988, 6863857, 6863857, 6863857, 6963107, 6963107, 6963107, 6963107, 6963107, 6963107, 6963107, 6963107, 6963107, 7052921, 7261415, 7318288, 7361387, 7406863, 7424034, 7572124, 7598551, 7622363, 7669985, 7867691, 8027474, 8111432, 8147814, 8220578, 8395882, 8417599, 8571074, 9136938, 9168283, 9264882, 9286713, 9478648, 9504101, 9587462, 9633251, 9633251, 9830482, 9873721, 9902827, 9961039, 10290163, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10512842, 10587201, 10603400, 10728084, 10728084, 10881172, 10920263, 10928206, 10959356, 10967885, 11110681, 11151294, 11208458, 11253377, 11286827, 11309075, 11336881, 11356625, 11356625, 11542670, 11914952, 11914952, 11914952, 11914952, 11914952, 11914952, 11914952, 11983213, 11983213, 11983213, 11983213, 12010470, 12010470, 12431707, 12709690, 12962271, 13016475, 13121868, 13246054, 13384574, 13488230, 13488230, 13488230, 13488230, 13512320, 13533398, 13533398, 13533398, 13665028, 13665028, 13665028, 13665028, 13665028, 13665028, 13665028, 13665028, 13665028, 13665028, 13665028, 13665028, 13742482, 13742482, 13742482, 13742482, 13742482, 13834220, 14242354, 14336373, 14366357, 14543480, 14600579, 14625133, 14713292, 14731020, 14860089, 15686933, 15717325, 15760751, 15798848, 15821585, 15943679, 16017817, 16025289, 16107352, 16111088, 16114824, 16114824, 16114824, 16114824, 16114824, 16114824, 16114824, 16114824, 16114824, 16486153, 17114643, 17137714, 17179897, 17253085, 17435782, 17477532, 17545542, 17713448, 17792733, 17840490, 17900874, 17920034, 17928684, 18080714, 18172310, 18175367, 18229379, 18278393, 18787742, 19276514, 19280250, 19511728, 19557364, 19579964, 19615932, 19670995, 19704269, 19759024, 19927462, 19971325, 19996850, 21001590, 21022120, 21150816, 21182037, 21196737, 21250671, 21795461, 21829739, 21841354, 21892582, 21910423, 21940557, 21956792, 21956792, 21956792, 21956792, 21956792, 21956792, 21956792, 21993856, 22059304, 22179564, 22201746, 22419379, 22436316, 22508529, 22599177, 22784314, 22914361, 23002031, 23038921, 24011187, 24055182, 24131467, 24234647, 24271983, 24283648, 24303083, 24326303, 24420031, 24458200, 24469002, 24487604, 24999293, 25002350, 25184105, 25205003, 25266605, 25308771, 25338848, 25443437, 25539890, 25583838, 25599215, 25645862, 25748747, 25764230, 25783093, 25872510, 25902688, 25908600, 25911556, 25917468, 25917468, 25917468, 25917468, 25984986, 25984986, 25984986, 25984986, 25984986, 25984986, 26356120, 26745731, 26924327, 27043651, 27422725, 28863955, 29026835, 29258381, 29552559, 29721010, 29880730, 30352498, 30492730, 30680578, 30865080, 30912238, 31025758, 31271575, 31303633, 31367870, 31436720, 31534653, 31632586, 31730519, 31828452, 31926385, 32024318, 32122251, 32220184, 32318117, 32416050, 32513983, 32611916, 32709849, 32807782, 32905715, 33003648, 33101581, 33199514, 33297447, 33395380, 33493313, 33591246, 33689179, 33787112, 33885045, 33982978, 34080911, 34178844, 34276777, 34374710, 34472643, 34570576, 34668509, 34766442, 34864375, 34962308, 35060241, 35158174, 35256107, 35354040, 35451973, 35549906, 35647839, 35745772, 35843705, 35941638, 36039571, 36137504, 36235437, 36333370, 36431303, 36529236, 36627169, 36725102, 36823035, 36920968, 37018901, 37116834, 37214767, 37312700, 37410633, 37508566, 37606499, 37704432, 37802365, 37900298, 37998231, 38096164, 38194097, 38292030, 38389963, ["name"] = "Ghosteld"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2337][2] = {156301, 228398, 337575, 353618, 527623, 712253, 951106, 1168108, 1263268, 1370456, 1745262, 1866816, 1987933, 2097179, 2357546, 2627405, 2853463, 2994523, 3028478, 3028478, 3028478, 3045577, 3191735, 3409644, 3497112, 3545735, 3592043, 3782980, 3819241, 4085847, 4143770, 4210457, 4235280, 4253353, 4289151, 4443370, 4493701, 4542885, 4568678, 4735877, 4774318, 4826478, 4870539, 4870539, 5135046, 5253273, 5428905, 5481982, 5643276, 5699943, 5699943, 5740766, 5834476, 6032414, 6054952, 6275894, 6488667, 6522441, 6592724, 6639580, 6814930, 6843370, 6851979, 7097290, 7159314, 7168210, 7204542, 7276912, 7298623, 7388771, 7397122, 7419076, 7548481, 7583690, 7627033, 7691371, 7700093, 7700093, 7891664, 7891664, 7963314, 8036939, 8097107, 8150065, 8150065, 8361878, 8613619, 8630207, 9002537, 9244395, 9255491, 9370816, 9457344, 9598251, 9867020, 10405355, 10499986, 10804817, 10804817, 11043812, 11075268, 11086830, 11344265, 11412167, 11471582, 11568891, 11687442, 11795084, 11808478, 11816916, 11938142, 11946560, 12001779, 12021007, 12037091, 12050856, 12099037, 12126670, 12126670, 12126670, 12126670, 12126670, 12126670, 12126670, 12126670, 12253063, 12279599, 12279599, 12529193, 12545728, 12545728, 12736896, 12764699, 12827254, 12962707, 13146408, 13234548, 13234548, 13439614, 13457197, 13457197, 13457197, 13558631, 13611708, 13649620, 13734152, 13857175, 14039163, 14039163, 14087165, 14095003, 14095003, 14131271, 14167072, 14167072, 14167072, 14167072, 14167072, 14167072, 14167072, 14167072, 14208132, 14256075, 14340773, 14380560, 14388675, 14474967, 14526953, 14623120, 14650778, 14667176, 14816202, 14824313, 14824313, 14824313, 14824313, 14824313, 14824313, 14824313, 14824313, 14824313, 14824313, 14916751, 14944216, 15069356, 15069356, 15069356, 15069356, 15069356, 15069356, 15147570, 15192527, 15265152, 15273242, 15273242, 15301559, 15301559, 15351534, 15351535, 15419065, 15419065, 15522265, 15599577, 16060338, 16060338, 16252833, 16808748, 16829990, 16943588, 17179864, 17300122, 17408570, 17540286, 17540286, 17540286, 17540286, 17540286, 17540286, 17540286, 17540286, 17540286, 17540286, 17540286, 17540286, 17597291, 17597291, 17640667, 17640667, 17658568, 17783175, 17813529, 17894392, 18290903, 18290903, 18487621, 18593925, 18931546, 18986258, 19117472, 19237964, 19395658, 19943850, 20524747, 20788774, 20906368, 21010715, 21105656, 21407340, 21596513, 21687431, 21699083, 21744568, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21768355, 21922762, 21922762, 21988472, 22130682, 22205645, 22244661, 22340911, 22340911, 22461707, 22990297, 23055801, 23564638, 23588086, 23619388, 23735676, 23791947, 23934891, 23971462, 23990318, 24014471, 24077978, 24223457, 24748589, 24820246, 25003975, 25110876, 25246403, 25294772, 25574870, 25662446, 25860485, 26064285, 26198158, 26276902, 26382094, 26412149, 26571675, 26641643, 26716922, 26753304, 26838275, 26908059, 26919144, 26981153, 26981153, 26981153, 26981153, 26981153, 26981153, 26981153, 27210604, 27510820, 27847602, 27921144, 27975751, 28004151, 28137853, 28192834, 28536374, 28780235, 28857996, 28902748, 29059847, 29132313, 29229553, 29423858, 29574689, 29675296, 29705407, 29844861, 30045984, 30638609, 30888013, 30950195, 31017819, 31312083, 31378339, 31412103, 31528582, 31619726, 31759790, 31836327, 32170597, 32435771, 32498181, 32777421, 32790937, 32875109, 33285243, 33330053, 33406074, 33645021, 33743554, 33765733, 33779901, 33873526, 33920161, 34133170, 34133170, 34133170, 34133170, 34133170, 34133170, 34255141, 34374843, 34538023, 34689206, 34793881, 34872810, 35248675, 35394799, 35595501, 35969287, 36170866, 36198203, 36317846, 36590722, 36656087, 36810397, 37046192, 37081886, 37225186, 37361968, 37413536, 37671412, 37741058, 37741058, ["name"] = "Joeragon"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2344] = {["length"] = 643, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2344][1] = {14105, 77415, 135836, 313708, 383606, 540169, 656780, 708622, 921641, 1110951, 1178371, 1366124, 1420561, 1420561, 1420561, 1420561, 1420561, 1422848, 1424227, 1424227, 1424836, 1425055, 1425055, 1425947, 1425947, 1426866, 1428025, 1428257, 1428882, 1429208, 1429860, 1430809, 1431123, 1431436, 1431899, 1433060, 1440795, 1524084, 1531978, 1805360, 1879150, 1980751, 2057575, 2262083, 2360796, 2483833, 2525773, 2658683, 2949272, 3101738, 3204738, 3577272, 3577272, 3753942, 3799241, 3799241, 3799241, 3799241, 3799241, 3799620, 3800271, 3800814, 3801316, 3802381, 3803027, 3803653, 3804036, 3805082, 3805580, 3806452, 3806733, 3807246, 3808299, 3842295, 3852667, 4119646, 4130087, 4413479, 4462986, 4477778, 4671415, 4687290, 4747586, 4838725, 5011841, 5011841, 5027320, 5027320, 5027320, 5027320, 5104470, 5284318, 5300236, 5344227, 5485032, 5614127, 5719419, 5829900, 5877020, 6281630, 6384363, 6431137, 6515501, 6530871, 6546526, 6815206, 6909315, 6964662, 6972411, 7054580, 7054580, 7054580, 7054580, 7054580, 7094015, 7094015, 7102029, 7102029, 7102029, 7102029, 7102029, 7110003, 7216674, 7232813, 7232813, 7476231, 7694021, 7781792, 7892465, 8061836, 8136816, 8312017, 8658431, 8675324, 9014457, 9177091, 9454468, 9464428, 9982218, 9982218, 10036360, 10088335, 10253444, 10362032, 10389357, 10453117, 10505145, 10505145, 10532192, 10542815, 10561748, 10599465, 10752997, 10843829, 10923178, 11139433, 11552142, 11707003, 12012893, 12020916, 12222760, 12282804, 12335677, 12537355, 12690133, 12856405, 12993083, 13068566, 13400158, 13535394, 13597149, 13955986, 14181884, 14371132, 14685686, 14738044, 14785333, 14862186, 15017226, 15282839, 15296991, 15296991, 15296991, 15517742, 15564758, 15620322, 15737279, 15776108, 15784331, 15830740, 16001088, 16098664, 16146599, 16208976, 16256144, 16379483, 16664557, 16716931, 16716931, 16716931, 16716931, 16717328, 16717328, 16717946, 16718117, 16718868, 16719200, 16719780, 16720083, 16720609, 16720763, 16721157, 16816367, 16853329, 16906675, 17052018, 17226900, 17305131, 17466377, 17656889, 17766643, 17866645, 18178681, 18178681, 18365532, 18391190, 18391190, 18451534, 18451534, 18451534, 18451534, 18539021, 18557253, 18584360, 18701394, 18799024, 18844468, 18931709, 18941147, 18941147, 18941147, 18941147, 18941147, 18941147, 18941147, 18941147, 18941147, 18941147, 18941147, 18941147, 19039761, 19039761, 19039761, 19039761, 19091011, 19173798, 19225000, 19225000, 19565839, 19603529, 20050794, 20245240, 20771684, 20801335, 21299223, 21721198, 22084197, 22770197, 22838707, 23425893, 23905829, 24009797, 24605552, 24841791, 25293273, 25382502, 26159841, 26211668, 26551213, 26576474, 27470624, 27640616, 27998855, 28255178, 29109397, 29140835, 29432141, 29479571, 30338680, 30483850, 30777665, 30912759, 31235233, 31360934, 31744753, 31999475, 31999475, 32177084, 32440468, 32650414, 33075352, 33178367, 33407332, 33652617, 33710492, 34065233, 35039897, 35499075, 36472392, 36723101, 37266299, 38223557, 38499832, 39849596, 39895247, 40407050, 40767322, 41856233, 42076673, 42076673, 42076673, 42076673, 42076673, 42124969, 42192586, 42212025, 42418720, 42418720, 42521855, 42521855, 42664970, 42802481, 42819139, 42887866, 42989558, 43007548, 43016610, 43025432, 43251535, 43501839, 43649186, 43809000, 44124305, 44310845, 44455190, 44761421, 45025152, 45322415, 45529968, 45738653, 45933571, 46083180, 46337145, 46554685, 46647032, 46689900, 46778235, 46957548, 47023186, 47071065, 47140571, 47265035, 47464955, 47495069, 47866231, 47948729, 48091640, 48138523, 48228262, 48240939, 48447730, 48455976, 48483244, 48794330, 48843815, 48896759, 48986377, 49173021, 49268778, 49353613, 49689139, 49771673, 49841803, 50088116, 50186844, 50410072, 50427981, 50664957, 50679990, 50812271, 50954283, 51017383, 51056497, 51090776, 51317086, 51351599, 51414855, 51635997, 51696236, 51722408, 51852120, 51908362, 51947592, 51997363, 52124887, 52142443, 52219224, 52242778, 52367944, 52414308, 52529479, 52538094, 52590570, 52620846, 52620846, 52686542, 52735823, 52768980, 52975771, 53048930, 53105080, 53285511, 53285511, 53383225, 53435229, 53435229, 53435229, 53435229, 53582310, 53678142, 53903595, 53903595, 53979329, 54012988, 54021812, 54086731, 54213395, 54244865, 54280984, 54372067, 54421322, 54476549, 54476549, 54818884, 54974695, 55230329, 55256416, 55503965, 55603308, 55603308, 55603308, 55603308, 55675336, 55831374, 55935790, 56028857, 56155968, 56205824, 56373716, 56477609, 56838392, 56985813, 57231119, 57530222, 57887004, 58201965, 58513000, 58806269, 59142774, 59711001, 59767653, 60013050, 60079821, 60096008, 60096008, 60362013, 60454880, 60539015, 60631097, 60923234, 60940426, 61013147, 61030101, 61374919, 61401288, 61461362, 61525700, 61542479, 61574085, 61681965, 61703392, 61750299, 61758771, 61798927, 61807370, 62033943, 62059626, 62128290, 62294857, 62513240, 62749308, 62903172, 63058329, 63212167, 63436173, 63590011, 63690197, 63739104, 63905022, 63941345, 64042106, 64199336, 64280794, 64358434, 64367101, 64514149, 64607486, 64662034, 64747570, 64890600, 64989487, 64989487, 65007325, 65007325, 65016157, 65024562, 65024562, 65024562, 65039911, 65039911, 65075514, 65166211, 65225995, 65505746, 65516189, 65700845, 65721989, 65732711, 65984073, 66209365, 66355828, 66546781, 66731207, 66858129, 67042562, 67322088, 67340555, 67656257, 67830442, 68068521, 68143104, 68453696, 68562254, 68631145, 68737558, 68760089, 68971370, 69021837, 69052386, 69242792, 69326882, 69446949, 69552724, 69552724, 69577720, 69683892, 69772676, 69772676, 69822786, 69864650, 69881396, 70096921, 70130758, 70155981, 70183530, 70380985, 70433127, 70747563, 70794208, 70922680, 71183564, 71183564, 71202392, 71558504, 71558504, 71558504, 71558504, 71558504, 71558504, 71558504, 71558504, 71558504, 71558504, 71558504, 71558504, 71621815, 71694461, 71703801, 71841177, 71888542, 72028431, 72036899, 72220550, 72298824, 72307052, 72469706, 72531255, 72531255, 72531255, 72531255, 72531255, 72531255, 72575207, 72582820, 72640110, 72709963, 72788889, 72804672, 73067347, 73150986, 73478248, 73594949, 73716121, 73838164, 74015835, 74325849, 74424254, 74788321, 74846578, 74948627, 75277260, 75368065, 75776756, 76327970, 76359688, 76693111, 76897960, 77271860, 77683882, 77990606, 78157285, 78276573, 78297901, ["name"] = "Joeragon"} end F()
F = function() Database_Hunter.lookup["Marksmanship"][2344][2] = {0, 154239, 154239, 188248, 250059, 487726, 487726, 655992, 822228, 883655, 974897, 1038402, 1268471, 1401316, 1525145, 1665950, 1724741, 1754833, 1755014, 1755217, 1755828, 1756218, 1756660, 1757110, 1757425, 1757648, 1758432, 1758432, 1758749, 1758998, 1759609, 1760211, 1760711, 1760854, 1761520, 1761659, 1794291, 1861481, 1878362, 1994105, 2057655, 2324265, 2334570, 2719343, 2774147, 2868616, 3155862, 3155862, 3453431, 3552454, 3599057, 3717048, 3925804, 3949221, 3957697, 4130854, 4174306, 4236703, 4344099, 4377926, 4437325, 4437325, 4458526, 4521469, 4561184, 4561575, 4561575, 4562399, 4562937, 4563039, 4563386, 4564298, 4624105, 4724768, 4724768, 5037035, 5218352, 5238149, 5466706, 5652245, 5733330, 5850854, 5880235, 6147443, 6263720, 6263720, 6263720, 6265613, 6268104, 6268318, 6268594, 6270184, 6271248, 6271467, 6272164, 6273546, 6273650, 6275191, 6275662, 6392618, 6473053, 6493770, 6535481, 6542389, 6542389, 6633143, 6684757, 6716597, 6738042, 6788265, 6806867, 6825535, 6841522, 6850855, 7093357, 7135236, 7135236, 7135236, 7135236, 7135236, 7135236, 7145209, 7358401, 7641533, 7822342, 8005720, 8005720, 8924399, 9427958, 9829566, 10657271, 10701039, 11007418, 11349570, 11851552, 11999403, 12101093, 12109011, 12221644, 12297308, 12347513, 12396368, 12396368, 12690622, 12778373, 12834500, 13149694, 13166272, 13206116, 13238869, 13457856, 13490609, 13613397, 13680808, 13785907, 13940733, 14027948, 14065378, 14482805, 14608854, 14608854, 14867326, 14940067, 15075183, 15302720, 15567424, 15747410, 15817869, 16065488, 16156268, 16478158, 16743397, 16827552, 16828085, 16829126, 16844383, 16927386, 16960520, 17145904, 17155855, 17172642, 17333645, 17383601, 17383601, 17544508, 17581520, 17643110, 17768489, 17777188, 17916388, 18011130, 18051258, 18107509, 18107509, 18154267, 18162078, 18320017, 18359230, 18359230, 18359230, 18359465, 18359833, 18359915, 18360391, 18360697, 18361336, 18361628, 18361802, 18361802, 18411332, 18484498, 18689698, 18762685, 19068849, 19142885, 19175738, 19340043, 19354733, 19595717, 19852668, 19869114, 20030835, 20114518, 20159488, 20339647, 20493048, 20524219, 20524219, 20616454, 20616454, 20616454, 20616890, 20617092, 20617178, 20617669, 20617751, 20617751, 20617927, 20617927, 20617927, 20617927, 20617927, 20617927, 20617927, 20617927, 20622749, 20622749, 20622749, 20722853, 20722853, 20884864, 20953197, 21061348, 21303508, 21310635, 21497954, 21547088, 21571264, 22254916, 22664823, 22899591, 23234466, 23536967, 23816728, 24093267, 24116799, 24945638, 25068947, 25537619, 25804585, 25804585, 26818432, 27138427, 27599669, 27773562, 27777922, 27872792, 28406138, 28431604, 28950337, 28972714, 29013804, 29022918, 29339672, 29385321, 29385321, 29486078, 29541250, 29606509, 29661969, 29767148, 29801669, 29801669, 29801669, 29821839, 29849927, 29901200, 29991593, 30108929, 30212965, 30324855, 30393199, 30472862, 30616744, 30624541, 30837321, 30917165, 31124548, 31313015, 31468340, 31989594, 32712010, 33123667, 33479811, 33962733, 34502929, 35489115, 35662985, 35848416, 36395269, 36635289, 36635289, 36635289, 36635289, 36672585, 36751903, 36751903, 37068167, 37096350, 37096350, 37452259, 37480627, 37608092, 37787961, 37806814, 38169176, 38179697, 38269954, 38352439, 38435195, 38745778, 38793412, 38793412, 38915906, 38952942, 39027670, 39092340, 39165312, 39265548, 39424503, 39460395, 39513521, 39536340, 39675597, 39764884, 39773215, 39773215, 39796848, 39881567, 39955457, 40021722, 40068735, 40237606, 40249299, 40427242, 40751301, 40838312, 41260334, 41346063, 41713957, 42060470, 42347598, 42834175, 43053447, 43671268, 44013309, 44173902, 44498695, 44867262, 45013523, 45383281, 45677729, 45817637, 45883070, 45914205, 45935759, 45996176, 46004115, 46019229, 46058338, 46072212, 46100227, 46115144, 46160296, 46239159, 46252722, 46260863, 46425305, 46624317, 46693489, 46849791, 46880570, 46984393, 47061366, 47106229, 47122819, 47324321, 47324321, 47521192, 47755510, 47925422, 48014400, 48143288, 48187381, 48251824, 48268603, 48318109, 48349590, 48403195, 48433507, 48630659, 48650598, 48658918, 48681007, 48809978, 48879365, 48887093, 48981236, 48988965, 48988965, 48988965, 48988965, 48997202, 49128921, 49163187, 49177870, 49195484, 49216460, 49225171, 49336787, 49370390, 49419844, 49491241, 49514688, 49514688, 49550025, 49947169, 50002946, 50222248, 50267292, 50340308, 50369688, 50387622, 50586449, 50722779, 50794516, 50871064, 51223415, 51382852, 51624085, 51660389, 51803399, 51879488, 51940667, 52026676, 52060689, 52319281, 52450256, 52563000, 52821190, 53040346, 53076070, 53076070, 53309986, 53317733, 53404707, 53532194, 53568105, 53568105, 53568105, 53620883, 53620883, 53730493, 53884762, 54111195, 54208968, 54295990, 54496547, 54645514, 55085437, 55085437, 55318141, 55335471, 55465273, 55696659, 55715936, 55949037, 56043845, 56114191, 56211598, 56262168, 56422493, 56439883, 56490940, 56532441, 56601571, 56609184, 56711722, 56757258, 56792665, 56823990, 56926796, 56947167, 56955647, 56978145, 57012776, 57029663, 57043922, 57098195, 57160439, 57353596, 57436592, 57453196, 57556124, 57582067, 57582067, 57582067, 57582067, 57582067, 57582067, 57582067, 57582067, 57582067, 57582067, 57582067, 57858513, 58010143, 58010143, 58273486, 58415653, 58431396, 58549317, 58820154, 58837719, 59189782, 59468216, 59558779, 59660959, 59700163, 59803925, 59820596, 59929557, 59968790, 60110918, 60154206, 60257537, 60275410, 60293376, 60472794, 60572725, 60581371, 60627008, 60697236, 60756804, 60841639, 60892789, 60998701, 61007323, 61046947, 61057557, 61152304, 61252775, 61353010, 61398116, 61642513, 61788363, 61897731, 62088645, 62207951, 62464135, 62610989, 62765504, 62906136, 63153686, 63193209, 63256571, 63256571, 63427698, 63643654, 63679303, 63854505, 63896062, 63943696, 63986632, 64007003, 64065507, 64073826, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64108693, 64261819, 64298536, 64395089, 64506424, 64538450, 64585665, 64664810, 64906822, 64922505, 65117841, 65333721, 65544105, 65670457, 66231916, 66665169, 66960074, 67183367, 67634481, 68360000, 68817872, 68995479, 69341702, 69889657, 70135477, 70410239, 70537142, 70647528, 70757914, 70868300, 70978686, ["name"] = "Círidae"} end F()
F = function() Database_Hunter.lookup["Survival"][2329] = {["length"] = 253, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2329][1] = {0, 105166, 178948, 284881, 387015, 562388, 714281, 903464, 1092138, 1182512, 1330976, 1443225, 1626271, 2027896, 2189969, 2410393, 2603694, 2673734, 2813751, 2953289, 3084160, 3213042, 3389593, 3513378, 3703922, 3929757, 4256633, 4324166, 4733452, 4796805, 4955275, 5097390, 5232499, 5312569, 5432302, 5533964, 5587432, 5722843, 5826554, 5865359, 6045328, 6329582, 6511098, 6600731, 6814450, 6896764, 6982233, 7144037, 7197892, 7249798, 7348878, 7476104, 7500296, 7511492, 7516661, 7519245, 7524414, 7548711, 7577451, 7707613, 7778391, 7875847, 7905086, 8004351, 8196305, 8656157, 8779445, 8912064, 9031510, 9109745, 9128529, 9255699, 9356094, 9493024, 9621060, 9698617, 9779129, 9836656, 9970910, 10061059, 10168175, 10273666, 10830698, 10878569, 11165737, 11226319, 11366000, 11522855, 11564150, 11737321, 11954600, 12022276, 12120549, 12621635, 12751467, 12864282, 12957819, 13056004, 13148539, 13169952, 13288657, 13420723, 13459851, 13719711, 13868294, 13903837, 14069590, 14207325, 14250755, 14398771, 14441401, 14511402, 14644908, 14743216, 14798460, 14965202, 14997152, 15427392, 15560755, 15741570, 15815408, 15930151, 16428541, 16492358, 16577131, 16594401, 16780379, 16864250, 16872718, 16906363, 16924144, 16927237, 16956666, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 16964809, 17003693, 17130573, 17635583, 17644277, 17652970, 17657317, 17666010, 17670357, 17670357, 17670357, 17670357, 17670357, 17748228, 17786928, 17887301, 17989734, 18096968, 18169418, 18189669, 18325846, 18446467, 18564566, 18661423, 18758120, 18848179, 18994356, 19132467, 19204597, 19240672, 19324439, 19624872, 19679257, 19816993, 19882280, 19906767, 20093052, 20107750, 20107750, 20129527, 20224326, 20420838, 20535304, 20591349, 20687401, 20687401, 20748830, 20821240, 20821240, 20821240, 20821240, 20853408, 21033226, 21121867, 21191213, 21344543, 21500445, 21648174, 21760692, 21810131, 21835132, 22028815, 22272407, 22521586, 22750264, 22946724, 23056077, 23394651, 23550215, 23636912, 23757920, 23942973, 24057737, 24213487, 24454318, 24534445, 24658151, 24901656, 25035582, 25086582, 25280082, 25407419, 25511847, 25549040, 25656841, 25764642, 25872443, 25980244, 26088045, 26195846, 26303647, 26411448, 26519249, 26627050, 26734851, 26842652, 26950453, 27058254, 27166055, 27273856, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2329][2] = {66057, 130904, 487731, 674759, 836254, 896280, 1078611, 1214834, 1303119, 1469715, 1571774, 1674312, 1764399, 1825554, 2015539, 2071533, 2273604, 2502272, 2792349, 3011826, 3139158, 3214681, 3301787, 3443399, 3571112, 3752301, 3884471, 4096515, 4228944, 4352574, 4475058, 4607225, 4728852, 4836706, 4991263, 5073772, 5158329, 5236239, 5299002, 5383493, 5532065, 5675314, 5846027, 5903995, 6045320, 6128936, 6292641, 6450434, 6616383, 6664942, 6846130, 6899889, 6961190, 7107852, 7144882, 7176578, 7188374, 7204076, 7230145, 7413266, 7530126, 7571090, 7624204, 7738227, 7803187, 7884574, 8143313, 8190922, 8294243, 8301708, 8338043, 8350171, 8526684, 8813578, 8922152, 9010126, 9210688, 9247385, 9296691, 9407329, 9501361, 9627720, 9759002, 9919337, 9965958, 10059277, 10256857, 10338174, 10410317, 10550681, 10875093, 10913796, 11026423, 11127052, 11182084, 11354775, 11380504, 11437919, 11487568, 11659533, 11712682, 11807106, 11991390, 12048973, 12131959, 12276019, 12340989, 12418638, 12486349, 12586943, 12663019, 12725584, 12849730, 12986063, 13083148, 13188242, 13286570, 13402102, 13733544, 13805827, 14029969, 14090894, 14167569, 14302501, 14349933, 14787061, 14986837, 15510702, 15585647, 15597827, 15612674, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15618839, 15631634, 15647087, 15756210, 15766095, 15788092, 15806115, 15837965, 15874961, 16067685, 16294223, 16320565, 16334823, 16347864, 16400931, 16481885, 16617758, 16645417, 16658367, 16739166, 16755222, 16819424, 16869656, 16916056, 17009816, 17165487, 17209920, 17313221, 17365184, 17484932, 17619495, 17692722, 17791396, 17848242, 17848242, 17848242, 17848242, 17848242, 17913716, 17958314, 18063944, 18147958, 18208830, 18327132, 18593414, 18722637, 18744261, 18855498, 18901510, 19466617, 19566044, 19735001, 19866603, 19974953, 20093132, 20210047, 20315297, 20459110, 20596959, 20839134, 21093888, 21225964, 21499439, 21736878, 22063897, 22260353, 22629940, 22761609, 23069543, 23313170, 23357586, 23492626, 23646588, 23947605, 24779325, 24972137, 25248683, 25381432, 25510394, 25658625, 25878154, 26031246, 26606223, 26757125, 26783608, ["name"] = "Avashah"} end F()
F = function() Database_Hunter.lookup["Survival"][2327] = {["length"] = 107, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2327][1] = {0, 173680, 240417, 316724, 529913, 737092, 834819, 995178, 1187501, 1336125, 1587364, 1729934, 1978887, 2204945, 2572894, 2618844, 2901192, 3179339, 3399180, 3664347, 3947001, 4140093, 4341431, 4803892, 4960105, 5086932, 5416239, 5673074, 5834719, 6149917, 6226078, 6343048, 6487284, 6564018, 6681054, 6790720, 6908621, 6993711, 7061224, 7190206, 7326207, 7477740, 7607855, 7713822, 7908147, 8025660, 8053326, 8158428, 8237762, 8312251, 8484209, 8508421, 8631743, 8725078, 8881014, 8974176, 9090125, 9117052, 9258453, 9309643, 9430720, 9492848, 9543710, 9670880, 9832302, 9869985, 10063066, 10174438, 10275417, 10363691, 10544032, 10752323, 10788857, 10836579, 11019074, 11082090, 11122002, 11290194, 11456805, 11564891, 11702044, 11807357, 12011530, 12229163, 12422989, 12468451, 12579906, 12691967, 12808519, 12944099, 13099051, 13256930, 13413285, 13641952, 13759001, 13875335, 14016420, 14105265, 14337299, 14474186, 14599456, 14719250, 14788571, 14923102, 15131513, 15292961, 15504807, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2327][2] = {14530, 70099, 148021, 220837, 377053, 548221, 616396, 829916, 972712, 1008279, 1184651, 1360917, 1504337, 1626221, 1846984, 1967740, 2067449, 2287380, 2343207, 2522453, 2604952, 2881257, 3050394, 3170515, 3323384, 3573844, 3864113, 4088887, 4203833, 4331384, 4517053, 4573684, 4757211, 5068383, 5217667, 5329813, 5581922, 5616739, 5744462, 5911235, 6008458, 6052208, 6177239, 6310526, 6422026, 6468343, 6500818, 6634822, 6712831, 6747771, 6940175, 6998518, 7119621, 7268670, 7405750, 7497901, 7711463, 7866448, 7946515, 8091903, 8228676, 8278801, 8500940, 8544124, 8666360, 8802211, 8984257, 9021320, 9134065, 9196700, 9289729, 9442311, 9504787, 9630437, 9697387, 9750125, 9882647, 9954345, 10042904, 10133271, 10171589, 10315510, 10419913, 10601354, 10800735, 10828650, 11000612, 11146992, 11230111, 11405616, 11527895, 11677702, 11866966, 11998880, 12103732, 12256252, 12538320, 12733365, 12905513, 13134020, 13308988, 13602848, 13728199, 13825525, 14059250, 14185318, 14202183, ["name"] = "忧伤的岚"} end F()
F = function() Database_Hunter.lookup["Survival"][2334] = {["length"] = 140, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2334][1] = {52395, 109338, 270559, 383170, 519955, 751254, 806072, 1209277, 1358500, 1562769, 1800399, 2012552, 2155685, 2328874, 2456745, 2757467, 2961004, 3044941, 3163790, 3228033, 3337353, 3461333, 3526629, 3616691, 3772686, 4006693, 4091913, 4237191, 4437890, 4442977, 4442977, 4567795, 4698616, 4764712, 4859920, 5002947, 5110303, 5196445, 5394862, 5479625, 5525113, 5687086, 5813028, 5848642, 5909693, 5919392, 5950343, 6035535, 6143272, 6192733, 6309195, 6391343, 6508071, 6551257, 6728347, 6787606, 6870771, 7058935, 7201854, 7271454, 7291259, 7455387, 7605045, 7670352, 7783467, 7850996, 7932376, 7998803, 8104279, 8196476, 8327065, 8388426, 8737640, 8833351, 8918265, 9030772, 9163975, 9609558, 9658872, 9712537, 9891959, 10143586, 10319744, 10621267, 10679773, 10775944, 10901105, 11014979, 11146725, 11150046, 11205290, 11365655, 11474581, 11502728, 11631658, 11736127, 11761301, 11925261, 11935253, 11964136, 12025161, 12085278, 12174916, 12241849, 12409681, 12528502, 12663665, 12808334, 12893097, 13016320, 13202942, 13333668, 13411499, 13525186, 13776277, 13881349, 14213667, 14296235, 14458899, 14568798, 15117716, 15210444, 15315538, 15559205, 15629071, 15738274, 16023796, 16111270, 16256942, 16571239, 16696884, 16869884, 17025938, 17139412, 17243148, 17418269, 17488342, 17570445, 17668961, 17796075, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2334][2] = {27495, 118506, 238552, 425957, 516637, 636895, 816774, 1067114, 1145707, 1346722, 1495510, 1667815, 1803747, 1941721, 2066186, 2222824, 2370162, 2542114, 2683210, 2850095, 3006677, 3138209, 3339287, 3400749, 3567974, 3580911, 3634208, 3699502, 3864676, 3975146, 4060130, 4147673, 4227536, 4314267, 4428679, 4519847, 4616005, 4813973, 4941097, 5047329, 5207087, 5315706, 5466998, 5589024, 5692394, 5773374, 5972105, 6132987, 6180937, 6284043, 6393036, 6462964, 6573377, 6744411, 6831288, 6964876, 7076071, 7122880, 7198327, 7439142, 7504548, 7656788, 7724175, 7785188, 7932006, 8027605, 8155988, 8329810, 8452444, 8620360, 8819077, 9063309, 9284531, 9398004, 9627338, 9779818, 9921314, 10064836, 10104570, 10246114, 10381765, 10546433, 10591923, 10603872, 10689989, 10771001, 10951491, 11052585, 11122549, 11252272, 11406180, 11467754, 11494454, 11551775, 11721189, 11775537, 11855898, 12001360, 12099062, 12192522, 12460741, 12521862, 12665335, 12840364, 12958005, 13105344, 13314072, 13365636, 13454925, 13531548, 13648609, 13775556, 13873380, 13953895, 14163870, 14260376, 14430682, 14586297, 14746495, 14893186, 14948930, 15041038, 15183348, 15311838, 15429863, 15486436, 15713302, 15900014, 15953672, 16098323, 16268329, 16383599, 16500392, 16609682, 16688224, 16760618, 16985026, 17040094, 17060809, 17110460, ["name"] = "Bóppers"} end F()
F = function() Database_Hunter.lookup["Survival"][2328] = {["length"] = 218, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2328][1] = {35949, 105923, 164207, 211409, 475276, 613600, 711898, 831836, 952802, 1044369, 1202402, 1352766, 1595836, 1772273, 1896563, 2098894, 2408361, 2608750, 2799842, 2925602, 3076868, 3203961, 3296799, 3505844, 3675540, 3814774, 4085472, 4290563, 4453968, 4612358, 4948395, 5020473, 5107807, 5619848, 6025860, 6055411, 6150403, 6252200, 6352753, 6504727, 6777423, 6865869, 6918433, 7272470, 7388116, 7679896, 7751400, 7858920, 7966135, 8171750, 8264771, 8770804, 8810770, 8876170, 8918756, 9048030, 9169066, 9260258, 9325635, 9368586, 9458649, 9547879, 9611839, 9685952, 9796064, 9886746, 9944722, 10062144, 10213428, 10284141, 10412147, 10602191, 10652933, 10815665, 10998877, 11056458, 11126983, 11150977, 11261345, 11525792, 11578521, 11687538, 11722471, 11782868, 11897339, 11968906, 12119635, 12237139, 12277741, 12414444, 12486376, 12569611, 12767456, 12806229, 13006371, 13024857, 13334105, 13435986, 13546420, 14065639, 14136361, 14244648, 14623197, 14717855, 14898544, 14943680, 15061609, 15117203, 15197369, 15270981, 15343520, 15427935, 15547807, 15840040, 15908172, 16061610, 16208673, 16366159, 16488848, 16527105, 16640526, 16739949, 16863447, 16932784, 17000354, 17046443, 17180656, 17280225, 17382317, 17534141, 17621537, 17745268, 17795366, 18005367, 18090573, 18579971, 19209066, 19510026, 19633073, 19700299, 19818487, 19864426, 19981917, 20045956, 20114388, 20177976, 20230777, 20321087, 20420580, 20556844, 20628952, 20748978, 20882668, 20992733, 21066917, 21238713, 21281232, 21399445, 21423137, 21590334, 21891860, 21943513, 22107740, 22586608, 22742810, 22846201, 22998551, 23441899, 23557044, 23750303, 23833183, 23862660, 24193423, 24744712, 24812474, 24895125, 25033067, 25337587, 25660482, 25794367, 26279368, 26350335, 26557284, 26675284, 27172793, 27326965, 27448943, 27591045, 27745028, 27956423, 28027036, 28122714, 28396679, 28572994, 28703775, 28972774, 29066090, 29318250, 29449650, 29585720, 29719859, 29821366, 29918865, 30281070, 30798389, 31026377, 31191387, 31357380, 31514638, 31678518, 31793499, 31793499, 31943468, 32093437, 32243406, 32393375, 32543344, 32693313, ["name"] = "Symexx"} end F()
F = function() Database_Hunter.lookup["Survival"][2328][2] = {5104, 48171, 91847, 182536, 379715, 530316, 649554, 740302, 919744, 1268807, 1511688, 1612670, 1750971, 1906513, 2028075, 2173630, 2429290, 2684734, 2862564, 3189819, 3310172, 3390215, 3542950, 3632297, 3717085, 4009022, 4127816, 4364020, 4477329, 4680854, 4756453, 4921117, 5062211, 5325369, 5410744, 5568556, 5771285, 5924227, 6034576, 6325584, 6452014, 6570518, 6856962, 7157150, 7310663, 7478441, 7515446, 7537644, 7643458, 7731227, 7756415, 7858807, 7953249, 8089881, 8150333, 8293852, 8443655, 8585532, 8740136, 8803786, 8963293, 9054066, 9203944, 9292116, 9311007, 9468016, 9543858, 9626049, 9785094, 9846879, 9992376, 10113682, 10229141, 10317556, 10428984, 10599090, 10921227, 11045966, 11162911, 11224696, 11307154, 11412677, 11857722, 11922397, 11994112, 12089068, 12228456, 12342240, 12546513, 12655213, 12782798, 13035904, 13331200, 13434286, 13555731, 13654674, 13739978, 13868525, 14015102, 14074835, 14127278, 14248927, 14315701, 14498611, 14612010, 14745537, 14832903, 14989960, 15189757, 15222170, 15275454, 15409279, 15677116, 15804100, 15852478, 15936942, 16229001, 16264655, 16352355, 16415559, 16510059, 16693408, 16753384, 16846770, 17050243, 17066238, 17072391, 17160370, 17231032, 17297557, 17400792, 17500934, 17590553, 17744041, 17852861, 17926599, 18024130, 18146510, 18272206, 18326987, 18407351, 18452434, 18602357, 18994048, 19115967, 19179220, 19280986, 19337544, 19444413, 19576693, 19649184, 19813136, 19993311, 20528776, 20597218, 20806502, 20992023, 21073021, 21118106, 21208196, 21257546, 21370713, 21441753, 21607965, 21666905, 21709112, 21835623, 21928051, 21986057, 22100661, 22187501, 22218941, 22341619, 22380554, 22400239, 22605008, 22724951, 22814066, 22908984, 23001962, 23488938, 23668834, 23764716, 23785140, 23893136, 24110268, 24298729, 24493619, 24633267, 24759392, 24862503, 24984105, 25187418, 25316664, 25425655, 25606506, 25708820, 25862916, 26152891, 26234303, 26422062, 26579036, 26818411, 26985318, 27286816, 27412395, 27547195, 28325652, 28451461, 28561698, 28674213, 28834650, 29228730, 29325749, 29464170, 29522489, 29690672, 29702026, ["name"] = "Urshek"} end F()
F = function() Database_Hunter.lookup["Survival"][2333] = {["length"] = 165, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2333][1] = {17201, 45367, 107855, 162227, 265632, 353594, 439609, 663629, 763295, 871172, 992085, 1223517, 1296831, 1449477, 1620220, 1746751, 1824990, 2165997, 2320412, 2494325, 2783886, 3541971, 4546459, 4844168, 5005518, 5487530, 5769438, 5856558, 6032660, 6155730, 6332665, 6529298, 6617975, 6679949, 6801022, 6883567, 7933254, 8001207, 8120549, 8368524, 9139731, 9279379, 9427149, 9653133, 9721258, 9903015, 10024033, 10239424, 10347756, 10445314, 10487416, 10663063, 10768354, 10831355, 10971425, 11272345, 11372281, 11622417, 11839754, 12022341, 12120424, 12373605, 12462680, 12578781, 12923856, 13027320, 13277311, 13371671, 13569030, 14045258, 14106879, 14233467, 14344192, 14461547, 14665448, 14805881, 14891995, 15015544, 15066814, 15130814, 15234416, 15327297, 15462895, 15565141, 15697877, 15757280, 15888060, 15966087, 16237726, 16331903, 16561345, 16669627, 16893641, 16982649, 17056552, 17427160, 17537424, 17778931, 18121569, 18330119, 18495313, 18547591, 18679714, 18894207, 19028170, 19072611, 19185980, 19351090, 19392847, 19493017, 19588920, 19876101, 20669084, 21039854, 21173840, 21355799, 21754573, 22009491, 22113977, 22211502, 23634992, 23720738, 23853032, 24100593, 24179124, 24461778, 24591084, 24828675, 25052225, 25172109, 25386689, 25548554, 25706388, 25802346, 25927553, 26069576, 26235824, 26308700, 26392667, 26584894, 26766346, 26863261, 26999617, 27064803, 27158080, 27265954, 27452707, 27639460, 27826213, 28012966, 28199719, 28386472, 28573225, 28759978, 28946731, 29133484, 29320237, 29506990, 29693743, 29880496, 30067249, 30254002, 30440755, 30627508, 30814261, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2333][2] = {0, 30743, 160323, 269199, 396809, 484678, 566510, 751156, 948704, 1116949, 1243367, 1887645, 1991155, 2199361, 2403233, 2474887, 2693354, 2880267, 3019388, 3141798, 3255380, 3436849, 3897963, 4459490, 4549261, 4725628, 4779325, 5178683, 5501923, 5555390, 5763290, 5894014, 6058282, 6194025, 6264474, 6439375, 6575248, 6734128, 6841265, 7011134, 7215199, 7531900, 7654211, 7778294, 7971680, 8131577, 8224010, 8370329, 8552015, 8699367, 8797633, 9669429, 9812843, 9898568, 9971860, 10060423, 10176148, 10448086, 10620628, 10690286, 10841700, 10886831, 10940226, 11019250, 11103424, 11240377, 11297980, 11368880, 11507789, 11605270, 11643276, 11676103, 12245700, 12247282, 12248898, 12398939, 12507543, 12648214, 12792971, 12926601, 13099413, 13239089, 13271151, 13296243, 13363180, 13709161, 13806844, 13836064, 13920773, 13967334, 14187042, 14319451, 14629844, 14721031, 14917814, 15106296, 15330513, 15578635, 15623866, 16059068, 16858665, 16969456, 17083871, 17207138, 17325954, 17382805, 17582203, 17671571, 17831123, 17883152, 17924070, 18054110, 18155539, 18204097, 18275431, 18371775, 18463565, 18569097, 18606572, 18664140, 18691560, 18851918, 19016124, 19157028, 19333687, 19650114, 19793548, 20121135, 20175609, 20327756, 20474091, 20608344, 20735890, 20830428, 20947398, 21103300, 21132589, 21241856, 21334986, 21484936, 21609392, 21883529, 22098155, 22168464, 22191223, 22410731, 22511940, 22579046, 22647216, 22796228, 22901876, 23028987, 23116204, 23155869, 23255877, 23389862, 23562645, 23804923, 24252298, 24568442, 24782232, 25004709, 25295560, 25361054, 25361054, ["name"] = "Lilricky"} end F()
F = function() Database_Hunter.lookup["Survival"][2335] = {["length"] = 164, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2335][1] = {0, 42953, 78800, 140918, 341098, 436201, 548917, 679251, 866867, 973785, 1191810, 1335157, 1542529, 1788799, 1969635, 2139621, 2241549, 2412452, 2498570, 2584371, 2706249, 2775283, 2896651, 3193073, 3363740, 3569829, 3630044, 3777611, 3888039, 4036144, 4131090, 4188170, 4309146, 4548085, 4633641, 5506680, 6102810, 6139268, 6255563, 6412010, 6437938, 6760633, 6890273, 6985380, 7020860, 7140084, 7188549, 7261647, 7317338, 7414679, 7503799, 7654983, 7744518, 7851563, 8052783, 8109251, 8354317, 8407030, 8673805, 8763932, 8874169, 8954637, 9050970, 9683243, 9786885, 10269288, 10349020, 10408308, 10512667, 11296175, 11317861, 11419338, 11522789, 11580722, 11635648, 11819233, 11945922, 12042486, 12130759, 12252573, 12322496, 12411182, 12475002, 13284191, 13361705, 13456753, 13583032, 13684845, 13812709, 13878740, 14087934, 14155767, 14159964, 14191090, 14318375, 14367797, 14418264, 14539226, 14599665, 14757504, 14848288, 15015385, 15144704, 15259176, 15351480, 15366579, 15512697, 15610952, 15622747, 15803349, 15929126, 15965733, 16122520, 16164219, 16232174, 16436672, 16556292, 17315837, 17344700, 17356495, 17485563, 17583406, 17621467, 18153373, 18280019, 18489141, 18678928, 18811925, 18889704, 19058443, 19212808, 19287908, 19305465, 19342079, 19384736, 19403956, 19533649, 19665805, 19784419, 19935461, 20077469, 20084828, 20195921, 20492635, 20731400, 20848346, 21531791, 22025360, 22084259, 22121462, 22294120, 22355389, 22471789, 22604400, 22668482, 22767664, 22925332, 22979056, 23057189, 23117027, 23231575, 23467759, 23728237, 23766670, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2335][2] = {0, 67165, 152441, 202309, 238905, 454508, 625044, 793071, 863931, 1011963, 1156364, 1259919, 1389679, 1610939, 1697232, 1852975, 1985671, 2143215, 2262333, 2474438, 2654003, 2723601, 2990845, 3120795, 3235750, 3370628, 3628203, 3682437, 3933533, 4097444, 4132540, 4274061, 4399039, 4494494, 4554533, 4679340, 4773132, 5124853, 5281490, 5415581, 5504810, 5795538, 5916688, 6013312, 6128065, 6223992, 6306768, 6353332, 6452808, 6548316, 6620809, 6928221, 6983663, 7094120, 7386030, 7454230, 7700183, 7777802, 7897898, 8090275, 8156425, 8215040, 8326096, 8391688, 8461130, 8549029, 8639601, 8799134, 8994397, 9210287, 9523264, 9621291, 9773441, 9951652, 10114234, 10336187, 10424304, 10546157, 10785345, 10972795, 11221421, 11233973, 11359886, 11452169, 11548547, 11677191, 11906192, 11999928, 12181012, 12267925, 12347165, 12508063, 12605073, 12684730, 12854808, 12919836, 12994712, 13092658, 13213503, 13275764, 13338927, 13480864, 13599488, 13649135, 13719909, 13782155, 13859477, 13919982, 14031226, 14128223, 14244374, 14286349, 14813098, 14909286, 14951055, 15015067, 15161348, 15297615, 15320977, 15916031, 16035486, 16280709, 16328374, 16425961, 16586060, 16655621, 17207702, 17272487, 17375334, 17559053, 17764238, 17792572, 18006332, 18223880, 18338477, 18430647, 18515997, 18701453, 18839402, 19083985, 19211202, 19425989, 19766987, 19865045, 20029941, 20200070, 20353804, 20511636, 20636462, 20702148, 20896728, 21081094, 21297990, 21351575, 21490221, 21628867, 21767513, 21906159, 22044805, 22183451, 22322097, 22460743, 22599389, 22738035, ["name"] = "Planck"} end F()
F = function() Database_Hunter.lookup["Survival"][2343] = {["length"] = 419, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2343][1] = {5260, 114917, 147406, 194825, 260537, 313470, 395041, 501790, 686409, 757834, 936617, 1071427, 1129278, 1195523, 1365703, 1422463, 1506160, 1591774, 1591774, 1591774, 1591774, 1591774, 1677029, 1734704, 1799259, 1928111, 2010056, 2154771, 2269275, 2351373, 2457963, 2609246, 2668753, 2794640, 2956076, 3237670, 3389841, 3611587, 3762519, 3905145, 4029144, 4230351, 4391259, 4537470, 4750076, 4887136, 5069273, 5536267, 5886158, 6222420, 6403777, 6445974, 6489108, 6746867, 6841876, 6937160, 7202100, 7402339, 7582034, 7783415, 7907443, 8062229, 8115327, 8342240, 8490884, 8693045, 8825571, 8893646, 9000667, 9058422, 9137308, 9215274, 9227172, 9289680, 9332335, 9446863, 9537428, 9573336, 9715321, 9874491, 10002284, 10072836, 10227247, 10274122, 10336031, 10347428, 10561243, 10741143, 10819765, 10912345, 11147779, 11215192, 11372087, 11594782, 11814868, 12113594, 12150121, 12378809, 12378809, 12378809, 12440504, 12570663, 12687436, 12811286, 12924360, 13037102, 13210599, 13333978, 13532403, 13636594, 13860122, 13868061, 14009545, 14094385, 14259136, 14360294, 14423016, 14487730, 14587897, 14634479, 14747658, 14761673, 14839779, 14947144, 15073646, 15139527, 15184227, 15384715, 15430968, 15460670, 15516181, 15603263, 15693457, 15821613, 15851979, 15938325, 16054724, 16244346, 16492752, 16554696, 16747512, 16892932, 17142423, 17244335, 17533378, 17802831, 18028327, 18086830, 18111764, 18351848, 18498054, 18681719, 18746105, 19097406, 19224373, 19236525, 19356174, 19501145, 19652950, 19904322, 19993693, 20146562, 20259745, 20322151, 20410974, 20447998, 20519178, 20574326, 20780125, 20953415, 21042199, 21240561, 21362085, 21622737, 21807179, 21954211, 22099049, 22455808, 22570539, 22740383, 22879781, 23067283, 23199580, 23403426, 23494154, 23653284, 23758854, 23897546, 23990888, 24153458, 24358127, 24553506, 24793695, 24845251, 24850391, 24864684, 24896802, 24960591, 24994391, 25016036, 25077492, 25273423, 25375007, 25518115, 25551248, 25645112, 25785391, 25865880, 25986682, 26206312, 26328411, 26359336, 26446516, 26570594, 26645714, 26688445, 26757233, 26822830, 26909613, 26995374, 27043272, 27119809, 27249356, 27285055, 27296452, 27409327, 27553777, 27639057, 27762723, 27882626, 27898982, 27919850, 27960708, 28027997, 28080698, 28255433, 28319186, 28380617, 28498181, 28644490, 28814859, 29014758, 29323001, 29610375, 29715579, 30242452, 30540240, 30844837, 30975727, 31201749, 31393138, 31578749, 31715761, 31820526, 32304596, 32605580, 32844103, 33174083, 33304215, 33577858, 33876079, 33920291, 34049178, 34208054, 34427710, 34523183, 34540025, 34617053, 34689513, 34770272, 34898023, 34916908, 35029923, 35174803, 35336266, 35411575, 35589917, 35666875, 35771942, 35836577, 35949344, 36016526, 36231248, 36287536, 36410449, 36531720, 36604518, 36978268, 37076795, 37196187, 37305979, 37361822, 37528481, 37716804, 37759386, 37882411, 37937087, 38012551, 38035264, 38041918, 38168724, 38295530, 38422336, 38549142, 38675948, 38802754, 38929560, 39056366, 39183172, 39309978, 39436784, 39563590, 39690396, 39817202, 39944008, 40070814, 40197620, 40324426, 40451232, 40578038, 40704844, 40831650, 40958456, 41085262, 41212068, 41338874, 41465680, 41592486, 41719292, 41846098, 41972904, 42099710, 42226516, 42353322, 42480128, 42606934, 42733740, 42860546, 42987352, 43114158, 43240964, 43367770, 43494576, 43621382, 43748188, 43874994, 44001800, 44128606, 44255412, 44382218, 44509024, 44635830, 44762636, 44889442, 45016248, 45143054, 45269860, 45396666, 45523472, 45650278, 45777084, 45903890, 46030696, 46157502, 46284308, 46411114, 46537920, 46664726, 46791532, 46918338, 47045144, 47171950, 47298756, 47425562, 47552368, 47679174, 47805980, 47932786, 48059592, 48186398, 48313204, 48440010, 48566816, 48693622, 48820428, 48947234, 49074040, 49200846, 49327652, 49454458, 49581264, 49708070, 49834876, 49961682, 50088488, 50215294, 50342100, 50468906, 50595712, 50722518, 50849324, 50976130, 51102936, 51229742, 51356548, 51483354, 51610160, 51736966, 51863772, 51990578, 52117384, 52244190, 52370996, 52497802, 52624608, 52751414, 52878220, 53005026, 53131832, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2343][2] = {5319, 66172, 116248, 212506, 233106, 361426, 492971, 623570, 693301, 767080, 1035699, 1265415, 1338256, 1508554, 1600395, 1640861, 1749087, 1824890, 1890445, 1974498, 2075683, 2124716, 2207193, 2220470, 2346755, 2410428, 2646541, 2732183, 2903720, 3067778, 3152755, 3208996, 3332362, 3422040, 3549930, 3690854, 4071353, 4312356, 4535744, 4619347, 5033646, 5164173, 5257730, 5472330, 5744341, 6038344, 6051532, 6054672, 6164373, 6355358, 6396223, 6552283, 6767593, 6851400, 7052247, 7141049, 7211735, 7372396, 7493096, 7638313, 7708986, 7788253, 7854207, 7921768, 8092743, 8138635, 8169536, 8341545, 8501058, 8522872, 8664294, 8753148, 8961095, 9024795, 9102016, 9244857, 9360257, 9461478, 9530320, 9564139, 9623325, 9680827, 9794359, 9835469, 10032190, 10150694, 10313919, 10502418, 10631232, 10718084, 10955980, 10999451, 11245733, 11473295, 11581068, 11700789, 11920396, 12115291, 12195508, 12284932, 12420731, 12512885, 12586419, 12586419, 12591014, 12595609, 12934056, 13081869, 13281384, 13443075, 13553424, 13678027, 13821024, 13909803, 13970850, 13981539, 14000712, 14043377, 14121780, 14179382, 14251993, 14404943, 14498562, 14526337, 14562058, 14562058, 14585167, 14662445, 14809112, 14923304, 15051438, 15174255, 15292517, 15458966, 15681412, 15759921, 15918255, 16213214, 16441235, 16494693, 16745589, 16951442, 17152162, 17411662, 17593188, 17763016, 17839162, 18109356, 18285298, 18419347, 18496751, 18699559, 18839581, 18890022, 18968475, 19068678, 19239096, 19300208, 19382775, 19401813, 19642130, 19777763, 19891823, 20155501, 20349446, 20571715, 20771736, 20780260, 20893604, 21135328, 21272809, 21470779, 21721218, 21721218, 21745507, 21775858, 21783569, 21950969, 22080138, 22144208, 22291006, 22421349, 22505242, 22562168, 22742265, 22772835, 22822379, 22864837, 22944308, 23067095, 23159899, 23328922, 23494668, 23587146, 23740386, 23809686, 23908433, 23934570, 24183439, 24273539, 24322159, 24446157, 24509931, 24563809, 24655895, 24701960, 24730620, 24933567, 25031902, 25163412, 25192271, 25347045, 25561528, 25714603, 26131792, 26200798, 26243695, 26357648, 26437688, 26627850, 26762418, 26849528, 26981598, 27024171, 27162216, 27195570, 27310635, 27486713, 27789618, 28010072, 28146838, 28296544, 28522122, 28623819, 28744189, 28873366, 28983176, 29105228, 29238896, 29543443, 29710692, 29882450, 29980881, 30188155, 30259840, 30465647, 30736103, 30860568, 31015132, 31320952, 31646327, 31765850, 31921481, 31991181, 32128618, 32276658, 32480140, 32562919, 32574078, 32581161, 32709999, 32752402, 32814226, 32961160, 33017930, 33117609, 33137547, 33229577, 33284987, 33470254, 33664444, 33737484, 33841533, 34123864, 34290466, 34466336, 34699422, 34699422, 34711088, 34723056, 34827149, 34995855, 35227450, 35339061, 35526475, 35570572, 35674027, 35832031, 35875915, 36042245, 36159380, 36268478, 36333355, 36402827, 36512028, 36551447, 36655197, 36828453, 36840421, 36951066, 37130054, 37273603, 37382787, 37466728, 37550090, 37599597, 37677811, 37797347, 37890115, 37990974, 38118360, 38318390, 38557873, 38571150, 38679045, 38815425, 38854954, 38939988, 39133224, 39228473, 39374352, 39438490, 39560693, 39759006, 39878472, 39969115, 40145513, 40302623, 40529674, 40743815, 40886049, 41108163, 41280078, 41314255, 41435654, 41481893, 41493280, 41507310, 41514325, 41599969, 41785032, 41854288, 41981595, 42054432, 42355973, 42474420, 42712949, 42822163, 43229144, 43400889, 43475026, 43559052, 43663163, 43682387, 43761688, 43838590, 43840998, 43853703, 43888274, 43988430, 44035270, 44073068, 44162567, 44302733, 44445428, 44565021, 44664780, 44813435, 44912153, 44978804, 45050330, 45155668, 45293284, 45463537, 45542327, 45746547, 45863426, 45965982, 46077915, 46200625, 46300295, 46397813, 46540962, 46620114, 46836894, 46893878, 47007061, 47070160, 47290125, 47450910, 47467802, 47566243, 47660399, 47772087, 47783618, 47959395, 48173174, 48401331, 48487090, 48587159, 48656119, 48930388, 49155605, 49217570, 49484130, 49639205, 49797537, 49932081, 50107988, 50147663, 50234514, 50297892, 50337133, 50409569, 50510286, 50599924, 50638189, 50684763, 50688927, ["name"] = "네구네군"} end F()
F = function() Database_Hunter.lookup["Survival"][2336] = {["length"] = 237, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2336][1] = {0, 71673, 148570, 204416, 340314, 407027, 509290, 583676, 689320, 937801, 997917, 1176924, 1349814, 1486889, 1697750, 1813476, 1924121, 1996400, 2175475, 2258159, 2398334, 2563654, 2608115, 2717743, 3115026, 3257287, 3331312, 3491420, 3904248, 4007756, 4273158, 4400066, 4504884, 4614487, 4816890, 5044000, 5228264, 6691697, 7533945, 7637711, 7920058, 7969497, 8257726, 8517237, 8675136, 8917669, 9041510, 9134845, 9398142, 9522067, 9584942, 9674762, 9848059, 9920246, 9982702, 10072410, 10241485, 10490462, 10606880, 10669632, 10796190, 10934167, 11012637, 11139342, 11233687, 11298713, 11570447, 11620758, 11805087, 12174579, 12251747, 12327350, 12363471, 12479881, 12743934, 13099817, 13255283, 13371316, 13666736, 13758948, 13850643, 14044977, 14200757, 14439721, 14518596, 14585326, 14700520, 14779416, 15035984, 15126357, 15207772, 15395840, 15445256, 15518538, 15639213, 15799429, 15837834, 15857842, 15952267, 16064329, 16113013, 16161145, 16296723, 16383816, 16435563, 16534271, 16688275, 16698346, 16857343, 16935509, 17021010, 17056368, 17056368, 17056368, 17056368, 17056368, 17056368, 17056368, 17056368, 17056368, 17056368, 17056368, 17056368, 17072087, 17080988, 17090158, 17092955, 17104922, 17114093, 17116889, 17164081, 17175643, 17188171, 17250907, 17320579, 17370869, 17443394, 17546884, 17710709, 17829860, 17932697, 18106441, 18259700, 18321553, 18419371, 18430895, 19933564, 21694039, 21717888, 21820140, 21983377, 22049881, 22180599, 22278755, 22512795, 22595286, 22684560, 22754514, 22984693, 23061641, 23189471, 23319535, 23361831, 23411386, 23523906, 23654544, 23722167, 23823653, 23952620, 24004190, 24077900, 24157478, 24262058, 24473868, 24685371, 24780925, 24994328, 25160649, 25216171, 25447133, 25577256, 25714384, 25869757, 25985455, 26152189, 26286490, 26376353, 26499105, 26581492, 26825883, 27321395, 27504286, 27651331, 27980663, 28042791, 28193598, 28413011, 28614891, 28769081, 28920541, 29234576, 29391622, 29485553, 29558868, 29648643, 29689968, 29816229, 29910595, 30065498, 30259064, 30346686, 30406029, 30540738, 30709453, 30767759, 30966305, 31118569, 31300271, 31478440, 31636621, 31693350, 31800683, 32011053, 32195577, 32276265, 32425121, 32482555, 32702001, 32874212, 32902890, 33070004, 33131235, 33186203, 33243763, 33361732, 33525406, 33641286, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2336][2] = {0, 49241, 80400, 124965, 161185, 220557, 331215, 438554, 488795, 506044, 594451, 661147, 803603, 957851, 1035070, 1152436, 1289381, 1420809, 1573433, 1755582, 1907345, 2026617, 2105283, 2153383, 2296861, 2370285, 2500328, 2686203, 2825125, 2934893, 3070271, 3197830, 3304270, 3369944, 3528359, 3618317, 3674377, 3809457, 5031531, 5792373, 5911189, 6012973, 6262801, 6389933, 6660319, 6891714, 6916687, 7011941, 7119126, 7162596, 7366054, 7486461, 7552731, 7653366, 7748530, 7815235, 7895190, 8031413, 8148349, 8283622, 8374884, 8514253, 8603925, 8675538, 8841457, 8923488, 9004739, 9061037, 9079253, 9257333, 9326425, 9345399, 9481476, 9682259, 10072594, 10216583, 10544225, 10812314, 11017093, 11113882, 11282759, 11479199, 11812103, 12014412, 12112537, 12286768, 12521659, 12643591, 13130114, 13323592, 13440932, 13636072, 13773741, 13910445, 14014262, 14145881, 14263262, 14344336, 14425841, 14510793, 14669161, 14751881, 14821660, 14892032, 14927303, 15054749, 15082642, 15257283, 15349915, 15394902, 15432665, 15578684, 15682027, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15689982, 15734579, 15772710, 15842724, 15954934, 16106258, 16175037, 16268733, 16335761, 16486153, 16584008, 16732460, 16948528, 17095733, 17144649, 17270306, 17403984, 17428272, 18050882, 18806039, 19095925, 19149569, 19469501, 19601689, 19687095, 19975624, 20242520, 20365793, 20447759, 20582111, 20664619, 20746661, 20789047, 20824814, 20905243, 21023192, 21151119, 21186314, 21324600, 21482911, 21519801, 21665556, 21737812, 21847994, 21886900, 22007212, 22176666, 22245236, 22370834, 22474876, 22686046, 22810636, 22943332, 23037817, 23157211, 23248368, 23340328, 23515426, 23735751, 23846891, 24028512, 24206616, 24260732, 24426431, 24457611, 24533643, 24614972, 24687127, 24869869, 24991724, 25182251, 25371192, 25523478, 25674552, 25821580, 25965862, 25965862, 26091909, 26217956, 26344003, 26470050, 26596097, 26722144, 26848191, 26974238, 27100285, 27226332, 27352379, 27478426, 27604473, 27730520, 27856567, 27982614, 28108661, 28234708, 28360755, 28486802, 28612849, 28738896, 28864943, 28990990, 29117037, 29243084, 29369131, 29495178, 29621225, 29747272, 29873319, ["name"] = "Planck"} end F()
F = function() Database_Hunter.lookup["Survival"][2331] = {["length"] = 176, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2331][1] = {54319, 102991, 155795, 300111, 404041, 529229, 686750, 809215, 877602, 1247908, 1409209, 1551409, 1730125, 1954763, 2128090, 2170838, 2255390, 2573754, 2658343, 2814352, 3042323, 3082651, 3247558, 3373096, 3460159, 3591008, 3693391, 3825842, 3946572, 4047910, 4188086, 4235350, 4260557, 4380177, 4474239, 4523418, 4625738, 4711354, 4837985, 4989730, 5001488, 5060755, 5367985, 5591836, 5699856, 5869640, 6149795, 6292255, 6410006, 6769492, 6999510, 7232008, 7410751, 7715389, 7883103, 8020426, 8150681, 8394604, 8574982, 8693564, 8791078, 8948678, 9057093, 9202476, 9272148, 9352341, 9738450, 9874179, 9919603, 9982975, 10060382, 10202486, 10278407, 10397668, 10557232, 10620302, 10708720, 10803262, 10900925, 10941946, 11056106, 11116861, 11225851, 11339747, 11381734, 11442846, 11529006, 11659576, 11708038, 11849784, 11928517, 12032784, 12081830, 12145066, 12471587, 12524259, 12642317, 12849220, 12907144, 13026642, 13180271, 13252558, 13605644, 13678054, 13886228, 14069950, 14492040, 14987963, 15080737, 15169878, 15469997, 15624238, 15803646, 16177138, 16263537, 16483911, 16755557, 17438635, 17549365, 17804346, 17979627, 18120612, 18699566, 18918624, 19094534, 19110542, 19191079, 19266216, 19306165, 19339256, 19534114, 19614170, 19681340, 19806156, 19877309, 20005393, 20155152, 20184395, 20207362, 20394890, 20478901, 20654020, 20837700, 20900400, 21063156, 21233615, 21393693, 21404220, 21560142, 21572044, 21715857, 21859670, 22003483, 22147296, 22291109, 22434922, 22578735, 22722548, 22866361, 23010174, 23153987, 23297800, 23441613, 23585426, 23729239, 23873052, 24016865, 24160678, 24304491, 24448304, 24592117, 24735930, 24879743, 25023556, 25167369, 25311182, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2331][2] = {0, 50369, 88130, 325478, 375992, 533362, 669549, 808342, 943137, 1020155, 1238077, 1378206, 1478893, 1765033, 1935652, 2075361, 2162649, 2319887, 2391697, 2730426, 2869142, 2980077, 3048310, 3176126, 3301646, 3359003, 3602573, 3899384, 4098030, 4175771, 4365862, 4571721, 4757183, 4826155, 4894497, 4974969, 5091383, 5280117, 5398026, 5512938, 5640178, 5720303, 5975441, 6242222, 6456826, 6742162, 6974169, 7006724, 7137201, 7387350, 7551249, 7682634, 7869627, 8292032, 8591566, 8781540, 8892039, 9095430, 9219942, 9479328, 9645038, 9771524, 9999638, 10389707, 10568815, 10719385, 10872961, 11102702, 11288247, 11492615, 11689941, 11780621, 12067034, 12115149, 12223252, 12279310, 12347639, 12462656, 12553717, 12618335, 12681079, 12791733, 12911025, 13009546, 13108598, 13245275, 13388421, 13448761, 13698304, 13820493, 13842334, 13943284, 14106503, 14193420, 14224463, 14326515, 14400308, 14484547, 14583532, 14736302, 14853021, 14982372, 15277794, 15398451, 15498767, 15557399, 15595326, 15679575, 15832743, 15964890, 16066606, 16182444, 16314871, 16511428, 16664278, 16795517, 16957197, 17008139, 17158464, 17262256, 17472298, 17594172, 17709179, 17747103, 17856860, 17969278, 18063439, 18181372, 18220907, 18631709, 18696796, 18862069, 18979969, 19110990, 19160452, 19340012, 19429838, 19602456, 19699778, 19977013, 20127505, 20246543, 20337197, 20361939, 20503638, 20629791, 20639742, 20669514, 20821319, 20986091, 21077140, 21124404, 21200927, 21304726, 21377576, 21669028, 21760914, 21834558, 21951271, 22106244, 22200764, 22399989, 22557551, 22737718, 23003124, 23069859, 23163857, 23711236, 23813896, 23900316, 23985169, 24037928, 24145858, 24224498, 24295900, 24510924, ["name"] = "Courgettie"} end F()
F = function() Database_Hunter.lookup["Survival"][2345] = {["length"] = 425, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2345][1] = {0, 12812, 132793, 228753, 284872, 402199, 570406, 677945, 832023, 1047319, 1197742, 1291829, 1570647, 1778855, 1875354, 2110533, 2167438, 2284246, 2400617, 2549653, 2632292, 2725082, 2900653, 2974300, 3089474, 3244335, 3358558, 3427851, 3582576, 3733866, 3808631, 3935609, 4112185, 4172502, 4251819, 4548199, 4610974, 4765127, 4879989, 5005645, 5091167, 5228524, 5339019, 5520398, 5543138, 5551024, 5556063, 5708962, 5763218, 5922953, 6083014, 6161258, 6362621, 6589765, 6643966, 6852209, 6943651, 7004980, 7094758, 7141154, 7316598, 7347630, 7375521, 7614621, 7698668, 7873916, 7963536, 8076929, 8185832, 8185833, 8206849, 8233472, 8396711, 8438319, 8558524, 8647931, 8702031, 8895257, 9147568, 9212314, 9293581, 9415662, 9509387, 9553957, 9659006, 9782338, 9916575, 9999647, 10178082, 10320620, 10373630, 10469973, 10525238, 10591200, 10728046, 10883540, 10977488, 11184719, 11303915, 11359455, 11606235, 11685056, 11834895, 11919694, 11984498, 12105899, 12257941, 12349881, 12401611, 12496019, 12584804, 12830773, 12848984, 12964819, 13092429, 13240889, 13324489, 13500033, 13639682, 13766605, 13927732, 14065279, 14167559, 14311576, 14387029, 14394566, 14442325, 14550796, 14619766, 14686703, 15106554, 15189597, 15437678, 15489224, 15620165, 15823469, 15957410, 16075343, 16221959, 16315098, 16452914, 16566804, 16643624, 16849776, 16870530, 17048850, 17109746, 17126964, 17291502, 17413049, 17583245, 17668475, 17792380, 17849332, 17907533, 18067030, 18087610, 18254363, 18385315, 18426439, 18571265, 18711476, 18760726, 18932912, 18977006, 19123746, 19265708, 19345625, 19429296, 19477029, 19477031, 19477033, 19574333, 19680390, 19791255, 19800914, 19955665, 20128009, 20265007, 20394647, 20500147, 20572877, 20609782, 20699833, 20810437, 20926525, 21039176, 21094680, 21203613, 21268834, 21359499, 21382144, 21578092, 21714455, 21801017, 21895415, 22128353, 22229950, 22336565, 22518661, 22672536, 22813660, 22921853, 22961037, 23007617, 23051775, 23171742, 23256077, 23330218, 23417863, 23447700, 23532121, 23632629, 23683074, 23724132, 23860174, 23972773, 24011264, 24112023, 24181456, 24226838, 24329551, 24367908, 24451259, 24551623, 24644912, 24718180, 24813185, 24901663, 25052381, 25172529, 25264315, 25422754, 25611285, 25711499, 25966321, 26023682, 26220382, 26319433, 26540726, 26584918, 26658795, 26718972, 26921376, 26997719, 27168196, 27203502, 27206107, 27208712, 27250242, 27301536, 27446415, 27541132, 27593885, 27713176, 27871912, 28059845, 28298362, 28379352, 28548159, 28755679, 28858303, 28906145, 29122380, 29330690, 29458073, 29539377, 29683620, 29857917, 29929153, 29994854, 30090964, 30204624, 30240036, 30377482, 30435065, 30524029, 30724540, 30724542, 30724544, 30747891, 30855181, 30930599, 31010192, 31131116, 31239852, 31390987, 31513613, 31630167, 31755835, 31815588, 31933316, 32054310, 32210551, 32341047, 32424201, 32568848, 32711413, 32845730, 32928619, 33041735, 33108545, 33202734, 33285775, 33451240, 33573111, 33684835, 33735480, 33855129, 33961473, 34058819, 34143485, 34209090, 34302233, 34368548, 34402780, 34542892, 34586363, 34729804, 34754529, 35012253, 35074860, 35209254, 35382773, 35430043, 35518757, 35615374, 35724326, 35876836, 35970409, 36146812, 36179652, 36306074, 36479368, 36586259, 36749039, 36961396, 37043569, 37133360, 37492925, 37597476, 37756264, 37858081, 38010182, 38118315, 38189857, 38358712, 38606051, 38946121, 39097474, 39209181, 39320888, 39432595, 39544302, 39656009, 39767716, 39879423, 39991130, 40102837, 40214544, 40326251, 40437958, 40549665, 40661372, 40773079, 40884786, 40996493, 41108200, 41219907, 41331614, 41443321, 41555028, 41666735, 41778442, 41890149, 42001856, 42113563, 42225270, 42336977, 42448684, 42560391, 42672098, 42783805, 42895512, 43007219, 43118926, 43230633, 43342340, 43454047, 43565754, 43677461, 43789168, 43900875, 44012582, 44124289, 44235996, 44347703, 44459410, 44571117, 44682824, 44794531, 44906238, 45017945, 45129652, 45241359, 45353066, 45464773, 45576480, 45688187, 45799894, 45911601, 46023308, 46135015, 46246722, 46358429, 46470136, 46581843, 46693550, 46805257, 46916964, 47028671, 47140378, 47252085, 47363792, 47475499, ["name"] = "Planck"} end F()
F = function() Database_Hunter.lookup["Survival"][2345][2] = {0, 0, 21272, 117716, 213036, 242912, 363557, 636687, 711799, 896504, 1078796, 1212177, 1231268, 1442896, 1551658, 1624360, 1906052, 2005315, 2112694, 2288668, 2367146, 2452964, 2540878, 2683748, 2769879, 2895245, 3060174, 3257926, 3421376, 3494735, 3624196, 3790912, 3846036, 3899271, 3999768, 4059893, 4160474, 4218292, 4308972, 4387050, 4525446, 4644463, 4785178, 4941106, 5057486, 5109443, 5310842, 5352834, 5406928, 5505380, 5597930, 5685244, 5752474, 5848106, 5933931, 6010064, 6224224, 6332939, 6377933, 6484923, 6641587, 6700389, 6873015, 7003462, 7053855, 7131226, 7282480, 7406971, 7492222, 7553558, 7617018, 7755542, 7804550, 7820509, 7847017, 7885745, 7981951, 8063135, 8089751, 8275949, 8358140, 8372473, 8491781, 8696243, 8744813, 8894796, 9042528, 9136510, 9377758, 9587315, 9623048, 9773546, 9906912, 10134877, 10227435, 10344971, 10440630, 10451112, 10537865, 10624703, 10691082, 10764574, 10929398, 10947851, 11094678, 11094679, 11109621, 11173896, 11258265, 11303561, 11359948, 11447937, 11572427, 11729767, 11795751, 11902862, 11997830, 12109568, 12196158, 12307271, 12369333, 12560948, 12731059, 12804229, 12881420, 12968009, 13060352, 13188474, 13219735, 13379609, 13552290, 13653325, 13803492, 13925834, 14070063, 14096058, 14124563, 14257113, 14380986, 14485698, 14680235, 14759196, 14867814, 15018604, 15132796, 15282748, 15450505, 15541395, 15653153, 15730956, 16015213, 16075635, 16227983, 16310715, 16356786, 16420127, 16576216, 16639428, 16693475, 16822523, 16905206, 17007024, 17134692, 17226700, 17389832, 17510396, 17656893, 17721234, 17776428, 17888145, 17969691, 17997466, 18085088, 18153353, 18302918, 18584407, 18634098, 18804368, 18842715, 18993879, 19241770, 19322377, 19524049, 19656579, 19853894, 19992513, 20277064, 20446495, 20543141, 20551232, 20699466, 20736030, 20868368, 20931134, 21114052, 21242277, 21256864, 21309155, 21472607, 21608466, 21623489, 21790246, 21952573, 22019221, 22165135, 22285522, 22377264, 22526967, 22710498, 22759658, 22888863, 23090101, 23217795, 23432775, 23503552, 23633630, 23760450, 23886722, 23957088, 24142419, 24249983, 24407796, 24419630, 24495282, 24525222, 24636770, 24730225, 24784487, 24912847, 25059300, 25145912, 25207217, 25298825, 25397484, 25501298, 25621937, 25697610, 25754719, 25956516, 26035451, 26075846, 26117621, 26197880, 26275836, 26342033, 26450425, 26521491, 26726597, 26840291, 26916611, 27025737, 27247271, 27381002, 27431618, 27592872, 27651366, 27730542, 27921468, 28146253, 28284708, 28357645, 28600533, 28682426, 28823760, 28979128, 29076652, 29217911, 29348361, 29447601, 29697326, 29886191, 29941687, 30163345, 30324686, 30460506, 30524429, 30669465, 30867446, 30908961, 31000249, 31124412, 31162247, 31281522, 31348046, 31431798, 31501766, 31629827, 31702800, 31859799, 32011601, 32110144, 32216968, 32338073, 32427167, 32503112, 32540298, 32673871, 32761725, 32822919, 32900941, 33035348, 33160661, 33231891, 33353062, 33428863, 33504176, 33627889, 33698439, 33896109, 33951203, 34162439, 34217588, 34273373, 34518300, 34560138, 34602871, 34720411, 34817039, 34842059, 34860606, 34884827, 35015690, 35081496, 35313295, 35327695, 35455573, 35554495, 35582218, 35782596, 35956710, 35973251, 36200390, 36313277, 36399465, 36583695, 36793952, 36895678, 37005148, 37082802, 37205506, 37226176, 37255343, 37373364, 37403954, 37500174, 37584180, 37645203, 37691314, 37881713, 37935875, 38008227, 38107921, 38238137, 38310048, 38486566, 38567482, 38599681, 38650293, 38678046, 38845143, 38902043, 39003113, 39066948, 39163594, 39252745, 39351495, 39434206, 39594047, 39693764, 39834076, 39929225, 40033772, 40061234, 40155056, 40341746, 40425669, 40506272, 40580282, 40660743, 40698866, 40924068, 41041453, 41143053, 41286297, 41510472, 41640716, 41810116, 41994906, 42070933, 42242378, 42468990, 42636664, 42789904, 42968006, 43101062, 43322613, 43529069, 43801732, 43959003, 44132995, 44356474, 44412747, 44570621, 44759471, 44913664, 45032459, 45141729, 45363264, 45443411, 45577107, 45708459, 45841731, 45972778, 46086788, 46235871, 46302428, 46422471, 46565381, 46710605, 46910832, 46975441, 47057463, 47240500, 47470451, 47473788, ["name"] = "네구네군"} end F()
F = function() Database_Hunter.lookup["Survival"][2337] = {["length"] = 399, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2337][1] = {23634, 105705, 188513, 359651, 455857, 547738, 697710, 831357, 1006113, 1224202, 1387237, 1506887, 1618166, 1924094, 2206093, 2440756, 2576852, 2752396, 2752396, 2752396, 2752396, 2828745, 2976133, 3105049, 3274927, 3408678, 3604634, 3769999, 4049554, 4235327, 4300931, 4521235, 4613886, 4695428, 4898914, 5020455, 5285399, 5314541, 5465398, 5605457, 5746224, 5955959, 6049359, 6187458, 6515093, 6596062, 6701176, 6784216, 6916735, 6983199, 7007076, 7046087, 7054473, 7065986, 7077230, 7180331, 7269946, 7480598, 7568973, 7654736, 7710230, 7951068, 8015108, 8131940, 8381787, 8460414, 8507200, 8586639, 8614348, 8672108, 8808431, 8836827, 9104611, 9230393, 9303788, 9377114, 9482994, 9551767, 9633037, 9754346, 9850853, 9942623, 10014173, 10157904, 10351150, 10420438, 10529388, 10612722, 10769614, 10878600, 11030796, 11030796, 11030796, 11030796, 11030796, 11030796, 11030796, 11030796, 11030796, 11044797, 11049926, 11099956, 11213709, 11249976, 11269935, 11294457, 11389780, 11420711, 11491872, 11608468, 11608468, 11621917, 11621917, 11733841, 11828022, 11957880, 12008977, 12050989, 12076609, 12175603, 12206112, 12235344, 12294484, 12299177, 12303870, 12303872, 12303874, 12303874, 12303874, 12475573, 12475573, 12475573, 12475573, 12475573, 12499583, 12624707, 12693679, 12771761, 13125205, 13211098, 13345873, 13372890, 13492161, 13492161, 13492161, 13492161, 13492161, 13492162, 13492162, 13531758, 13554367, 13570025, 13609339, 13667500, 13756230, 13758832, 13823508, 13824257, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13824258, 13829477, 13829477, 13902239, 14086545, 14308118, 14389100, 14427011, 14496691, 14532266, 14552435, 14953617, 15004750, 15062792, 15151771, 15170889, 15176175, 15176175, 15176175, 15176175, 15176175, 15176175, 15176175, 15176175, 15176175, 15245900, 15309584, 15614490, 15895103, 15950756, 16022928, 16197103, 16355713, 16477762, 16697558, 16739306, 16790474, 17350712, 17422963, 17551966, 17608391, 17647285, 17660966, 17685636, 17693859, 17734753, 17769963, 17897979, 18018181, 18047524, 18110401, 18858291, 18985713, 19035993, 19254910, 19303495, 19406525, 19574431, 19624631, 19755745, 19911884, 20033458, 20170435, 20293443, 20488469, 20509604, 20550933, 20639044, 20662792, 20721741, 20721741, 20721741, 20721741, 20721741, 20721741, 20721741, 20764666, 20913193, 20982450, 21078818, 21220060, 21433283, 21526355, 21769826, 21912914, 22249365, 22347665, 22513039, 22651149, 22805697, 22987033, 23148576, 23352862, 23987647, 24141813, 24324024, 24976844, 25090857, 25281546, 25400286, 25555050, 25671858, 25821351, 26047221, 26383197, 26564829, 26908629, 26951230, 27085284, 27286091, 27369001, 27955213, 28084216, 28156196, 28357393, 28418169, 28599265, 28692271, 28771794, 28819137, 29002060, 29161869, 29259938, 29338965, 29338965, 29338965, 29338965, 29338965, 29394932, 29602885, 29682848, 29759859, 29858358, 29979043, 30071655, 30244922, 30252616, 30403928, 30615373, 30685471, 30788882, 31121577, 31190608, 31461144, 31519106, 31722316, 31909171, 32045611, 32080178, 32141363, 32241491, 32341619, 32441747, 32541875, 32642003, 32742131, 32842259, 32942387, 33042515, 33142643, 33242771, 33342899, 33443027, 33543155, 33643283, 33743411, 33843539, 33943667, 34043795, 34143923, 34244051, 34344179, 34444307, 34544435, 34644563, 34744691, 34844819, 34944947, 35045075, 35145203, 35245331, 35345459, 35445587, 35545715, 35645843, 35745971, 35846099, 35946227, 36046355, 36146483, 36246611, 36346739, 36446867, 36546995, 36647123, 36747251, 36847379, 36947507, 37047635, 37147763, 37247891, 37348019, 37448147, 37548275, 37648403, 37748531, 37848659, 37948787, 38048915, 38149043, 38249171, 38349299, 38449427, 38549555, 38649683, 38749811, 38849939, 38950067, 39050195, 39150323, 39250451, 39350579, 39450707, 39550835, 39650963, 39751091, 39851219, 39951347, ["name"] = "Thyminde"} end F()
F = function() Database_Hunter.lookup["Survival"][2337][2] = {56274, 81287, 152559, 199898, 340658, 409807, 508068, 663188, 860053, 949876, 1057256, 1185715, 1337661, 1398397, 1532436, 1641607, 1739900, 1854179, 1859243, 1859243, 1859243, 1859243, 1907879, 2024314, 2148566, 2264977, 2341268, 2395021, 2518252, 2676321, 2852737, 2905527, 2948053, 3059093, 3081323, 3202640, 3313841, 3401545, 3648752, 3816789, 3956036, 4073405, 4221112, 4388581, 4502791, 4606521, 4688175, 4756797, 4963028, 5128084, 5163023, 5163023, 5163023, 5241908, 5260188, 5260188, 5375050, 5510336, 5601955, 5650986, 5756770, 5813878, 5892862, 6016349, 6069613, 6097117, 6233928, 6277884, 6391274, 6593372, 6696837, 6883175, 7133447, 7247971, 7460004, 7697662, 7831323, 7963712, 8139096, 8288739, 8391249, 8582310, 8761886, 8891561, 9004735, 9107355, 9217226, 9457696, 9572622, 9733721, 9810669, 9948942, 10086269, 10155467, 10385508, 10640604, 10855210, 10958601, 11034626, 11168306, 11208302, 11262270, 11361968, 11428845, 11449281, 11627027, 11725376, 11824550, 11900997, 12024565, 12210489, 12441109, 12595630, 12785010, 12818505, 12828018, 12832775, 12894607, 12908348, 12953687, 13089103, 13194690, 13279714, 13590049, 13681268, 13762903, 13864419, 14113930, 14243662, 14405355, 14490570, 14602977, 14733676, 14790580, 14898909, 15028465, 15064274, 15139499, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15190711, 15201951, 15201951, 15249976, 15282229, 15300450, 15311085, 15365013, 15399071, 15506715, 15508561, 15508561, 15508561, 15582426, 15739800, 15819956, 15860116, 16135139, 16156798, 16161554, 16186624, 16229148, 16229150, 16229152, 16229154, 16229155, 16229156, 16229157, 16229158, 16229159, 16263444, 16465452, 16465452, 16530476, 16645966, 16759610, 16883129, 16952098, 17085170, 17179888, 17179888, 17225979, 17239515, 17248822, 17357002, 17370341, 17415835, 17584005, 17590079, 17596737, 17596737, 17596737, 17596737, 17735244, 17805471, 18085290, 18206482, 18273531, 18440826, 18516437, 18572205, 18572205, 18572205, 18572205, 18572205, 18572205, 18572205, 18572205, 18572205, 18572205, 18598226, 18683908, 18739278, 18790830, 18808938, 18831166, 18970923, 19002174, 19030046, 19073389, 19175648, 19216440, 19346718, 19440642, 19484753, 19588699, 19710018, 19793409, 19909072, 20019285, 20046293, 20157688, 20174387, 20208185, 20313044, 20531644, 20550082, 20609014, 20692580, 20720039, 20825874, 20830338, 20830338, 20830338, 20830338, 20865223, 20868275, 20874379, 20877431, 20880483, 20922042, 21091863, 21187621, 21216631, 21239274, 21257250, 21361763, 21415951, 21456109, 21552060, 21584537, 21600119, 21701955, 21747489, 21814552, 21865095, 21902520, 21910240, 21943844, 21990741, 22042295, 22164308, 22209077, 22401295, 22464728, 22541969, 22666827, 22732428, 22786278, 22858625, 22907132, 22968680, 23068146, 23392041, 23404521, 23454778, 23705045, 23764400, 23829900, 23919294, 23953851, 23991368, 24012898, 24022780, 24050303, 24050303, 24050303, 24050303, 24050303, 24050303, 24050303, 24158303, 24250184, 24324372, 24471010, 24543776, 24604500, 24673164, 24792993, 24901266, 24959261, 25077513, 25171616, 25851791, 25957210, 26088390, 26290840, 26402848, 26475953, 26700647, 26816731, 26956130, 27040606, 27105562, 27211146, 27291173, 27373007, 27465182, 27512026, 27580034, 27850659, 28000081, 28140123, 28158747, 28318304, 28495585, 28570135, 28589997, 28668971, 28816511, 28894760, 28927224, 29121910, 29225730, 29310724, 29428448, 29505671, 29590971, 29849129, 29849129, 29849129, 29849129, 29849129, 29849129, 29897374, 29987067, 30077203, 30201405, 30362067, 30457636, 30660279, 30920065, 31126755, 31288538, 31393249, 31619244, 31863210, 31997355, 32696747, 33019771, 33212399, 33390615, 33563501, 33836265, 34260911, 34599668, 34920298, 35051202, 35364956, 35713995, 36385052, 36629026, 37062013, 37845045, 38147123, 38370758, 38483118, ["name"] = "Avashah"} end F()
F = function() Database_Hunter.lookup["Survival"][2344] = {["length"] = 716, ["rank_count"] = 2} end F()
F = function() Database_Hunter.lookup["Survival"][2344][1] = {0, 184604, 203211, 381410, 468600, 572856, 724010, 815628, 958510, 1241465, 1467175, 1635669, 1720982, 1887282, 1958028, 1978643, 2008850, 2025909, 2025909, 2025909, 2025909, 2035089, 2199321, 2208361, 2231406, 2277480, 2300005, 2308930, 2308930, 2308930, 2308930, 2308930, 2308930, 2308930, 2308930, 2308930, 2342633, 2369568, 2395812, 2472964, 2594686, 2758238, 2817392, 2945559, 3038163, 3201090, 3275807, 3438815, 3668933, 3776316, 3850678, 3888461, 4253120, 4524395, 4524395, 4539042, 4580365, 4930655, 5018143, 5018288, 5018288, 5018433, 5018433, 5018433, 5018433, 5018433, 5018433, 5018433, 5018433, 5018433, 5018433, 5028232, 5030920, 5052523, 5243997, 5261208, 5666109, 5697039, 5742731, 5806019, 5978789, 6126400, 6398573, 6464932, 7025002, 7078613, 7193383, 7385976, 7925632, 8017899, 8172564, 8627527, 8699136, 9287305, 9573077, 9819624, 9892584, 10110041, 10409619, 10514604, 10848336, 11337429, 11398830, 11564292, 11850990, 12173499, 12223878, 12380887, 12479212, 12767446, 13037584, 13624627, 13734890, 13903131, 14317658, 14555443, 14834468, 14991108, 15337659, 15503868, 15863950, 15906308, 16481466, 16789160, 17094549, 17217372, 17518542, 17893185, 18098097, 18669674, 18938870, 19232142, 19418157, 19868530, 20645234, 21156739, 21547370, 21719293, 22035075, 23133027, 23600812, 23824288, 24200194, 24472210, 25509093, 25509093, 25509093, 25698431, 25838526, 25886051, 25980237, 26222653, 26373478, 26433500, 26493792, 26620313, 26707733, 26859782, 27051620, 27158399, 27352044, 27567641, 27675271, 27921218, 27960312, 28062161, 28166978, 28236715, 28299035, 28412574, 28490183, 28523355, 28724051, 28740970, 28748961, 28749769, 28764096, 28797938, 28799136, 28888767, 28932729, 29023028, 29113070, 29197861, 29297333, 29423963, 29526067, 29641929, 29922032, 30024616, 30131568, 30194313, 30413759, 30461715, 30461715, 30503782, 30533287, 30558963, 30944501, 30944501, 30944501, 30944501, 30944501, 30944501, 30944501, 30944501, 30944501, 30944501, 30944501, 30944501, 30949988, 30968078, 31017432, 31166020, 31410285, 31444182, 31465394, 31561851, 31575224, 31616625, 31728721, 31776696, 31858254, 31965399, 32008574, 32036898, 32080694, 32180407, 32317790, 32506013, 32626968, 32661924, 32767761, 32817237, 32914177, 33111926, 33143142, 33152130, 33152130, 33152130, 33152368, 33152625, 33152814, 33153003, 33153003, 33159742, 33204990, 33261107, 33375151, 33496708, 33648363, 33803167, 34011030, 34156676, 34449429, 34513269, 34880720, 34956989, 35128277, 35351939, 35437355, 35544967, 35555359, 35663137, 35697141, 35701790, 35801578, 35842788, 35855397, 35891764, 35950137, 35989914, 36066444, 36111674, 36372843, 36391111, 36413475, 36529788, 36620832, 36675078, 36729200, 36810641, 36849984, 36880404, 36904430, 36921792, 36950090, 36971820, 37012088, 37044794, 37064159, 37088153, 37130786, 37151786, 37171559, 37171559, 37171559, 37224302, 37256093, 37309010, 37427597, 37487907, 37630769, 37717122, 37780819, 37957582, 38103663, 38251272, 38390767, 38441587, 38500724, 38609125, 38680956, 38820588, 39050607, 39151787, 39225195, 39303953, 39475443, 39565018, 39600514, 39636649, 39795944, 39876297, 39910718, 40016152, 40069038, 40264071, 40319543, 40517167, 40666040, 40872346, 40921888, 41078493, 41111938, 41378644, 41437798, 41519592, 41687526, 41789417, 42132687, 42320045, 42508520, 42716183, 42798484, 42859402, 42922220, 43014761, 43142350, 43233401, 43281367, 43407553, 43454536, 43649798, 43862982, 43979967, 44024005, 44089722, 44238677, 44313644, 44498801, 44662352, 44800055, 44945887, 45107141, 45328418, 45456050, 45644799, 45815577, 45964551, 46106910, 46236376, 46336003, 46447147, 46534215, 46598907, 46718475, 46763135, 46869943, 47184885, 47245753, 47452338, 47474225, 47485312, 47500600, 47525621, 47768127, 47808399, 48097667, 48190793, 48304240, 48437399, 48524458, 48670637, 48770464, 48922755, 49059374, 49184309, 49276740, 49359550, 49524067, 49572436, 49740999, 49809592, 49870553, 49913476, 49943884, 50071604, 50254288, 50326007, 50509631, 50578615, 50720612, 50911974, 50928388, 51014933, 51106406, 51224536, 51287338, 51374161, 51417981, 51435659, 51468476, 51503990, 51529097, 51564009, 51600675, 51620726, 51626595, 51670778, 51745167, 51765682, 51806292, 51823851, 51848039, 51889705, 51935189, 51973654, 52184673, 52301905, 52405109, 52472742, 52606841, 52694500, 52792081, 52979518, 53035110, 53073315, 53113434, 53209799, 53382205, 53426516, 53576944, 53757633, 53899042, 53974329, 54038642, 54245760, 54492454, 54554089, 54734803, 54941982, 55132057, 55169981, 55207337, 55378817, 55560917, 55577613, 55635573, 55688920, 55817964, 55841262, 55880199, 55905855, 56105329, 56176860, 56212672, 56363333, 56402950, 56828600, 57086219, 57177566, 57255708, 57491268, 57559735, 57588898, 57631226, 57874164, 57941763, 58036933, 58104281, 58138896, 58228034, 58283185, 58329813, 58495045, 58674114, 58754412, 58827799, 58844434, 58971760, 59179355, 59241791, 59343066, 59431762, 59542299, 59645796, 59720656, 59860666, 59894845, 60111911, 60270424, 60312646, 60360554, 60427032, 60447810, 60582980, 60757758, 60848399, 60881554, 60899937, 60936786, 60964845, 60999837, 61030440, 61049904, 61072189, 61083524, 61114367, 61117458, 61161389, 61183110, 61420796, 61497506, 61571916, 61629403, 61676342, 61796808, 61915367, 61979818, 62037830, 62114469, 62246959, 62294407, 62363774, 62449018, 62476125, 62533365, 62589005, 62637112, 62736621, 62866444, 62968841, 63116559, 63231125, 63311025, 63401661, 63495531, 63654417, 63703298, 63832040, 63924366, 63965198, 64063560, 64103273, 64158701, 64227888, 64336373, 64407432, 64468820, 64570246, 64600922, 64702432, 64846377, 64896394, 64976315, 65026652, 65099676, 65220081, 65340981, 65450908, 65546888, 65674339, 65796294, 65926681, 66016915, 66247101, 66360263, 66502639, 66621618, 66786235, 66920366, 67032477, 67155855, 67347504, 67420605, 67420605, 67420605, 67420605, 67420605, 67420605, 67420605, 67420605, 67420605, 67420605, 67420605, 67420605, 67438033, 67557454, 67582244, 67683377, 67785005, 67888632, 67945532, 68028999, 68194952, 68302384, 68410530, 68474758, 68515390, 68552121, 68566239, 68580147, 68587101, 68616507, 68719389, 68846121, 68991835, 69164055, 69342463, 69493215, 69541656, 69788638, 69806813, 70039161, 70249014, 70331599, 70382667, 70488131, 70622245, 70667693, 70762747, 70814832, 70872572, 70927473, 71043128, 71196953, 71310946, 71493012, 71570497, 71614188, 71715713, 71791992, 71971070, 72071532, 72326226, 72439844, 72605678, 72685545, 72833461, 72957068, 73053671, 73146118, 73297276, 73324382, 73480985, 73611141, 73732675, 73823927, 73911294, 73956825, 73989540, 74094880, 74111245, 74357805, 74369724, 74424750, 74476854, 74495946, 74546356, 74693846, 74712686, 74753532, 74785562, 74807904, 74874927, 74986990, 75266706, 75378687, 75492150, 75492150, 75601400, 75710650, 75819900, 75929150, 76038400, 76147650, 76256900, 76366150, 76475400, 76584650, 76693900, 76803150, 76912400, 77021650, 77130900, 77240150, 77349400, 77458650, 77567900, 77677150, 77786400, 77895650, 78004900, 78114150, 78223400, ["name"] = "Tayu"} end F()
F = function() Database_Hunter.lookup["Survival"][2344][2] = {0, 29723, 62594, 93613, 166786, 190550, 235469, 344932, 380789, 588752, 689575, 816953, 816996, 817145, 817717, 817835, 818111, 818291, 818665, 818885, 819605, 819968, 820238, 820628, 820978, 821339, 821739, 822352, 822701, 823000, 823492, 824005, 824419, 825138, 825844, 855004, 896177, 913824, 977536, 1155551, 1167945, 1176792, 1311372, 1348744, 1457861, 1533206, 1611574, 1709174, 1731695, 1869904, 1974061, 2435423, 2462824, 2497565, 2686732, 2696459, 2715817, 2829057, 2918832, 2975359, 3123348, 3139793, 3254412, 3266366, 3276758, 3285216, 3287150, 3291018, 3292952, 3294886, 3298754, 3301666, 3301666, 3309987, 3315041, 3378704, 3408680, 3530114, 3650014, 4039052, 4044779, 4283738, 4459575, 4562428, 4939146, 5108535, 5168350, 5399235, 5763908, 5877188, 6020736, 6399015, 6637389, 6760289, 7109952, 7397152, 7518328, 7848651, 8473598, 8592443, 8844828, 9264211, 9614138, 9793401, 10317613, 10463251, 10796731, 11238156, 11397170, 11571158, 11911631, 12105295, 12407509, 12652119, 13006249, 13398430, 13707495, 13761413, 13807289, 14121781, 14896015, 15255835, 15655901, 16137899, 16535102, 16742539, 17179340, 17284132, 17904485, 18610676, 19362002, 19736235, 20391025, 20942249, 21278453, 21606102, 21783870, 22167859, 22463049, 22907858, 23062662, 23279289, 24032897, 24570079, 24819382, 25728844, 26293669, 26790760, 27337776, 27688839, 27957297, 28558666, 29413455, 29893363, 30127034, 32224778, 32239231, 32250690, 32257743, 32271850, 32281551, 32281551, 32281551, 32353727, 32468503, 32515259, 32657943, 32748404, 32790464, 33062351, 33089821, 33106243, 33343382, 33356688, 33389302, 33494830, 33610559, 33669548, 33749316, 33848913, 33970905, 34105183, 34300811, 34387061, 34483605, 34548712, 34603296, 34605615, 34714758, 34714833, 34795272, 34870590, 34937848, 35028591, 35298069, 35313809, 35383145, 35498664, 35596228, 35680923, 35819901, 35930501, 35992240, 36052348, 36066801, 36072095, 36072095, 36072398, 36072454, 36073931, 36074492, 36119561, 36232241, 36260623, 36421717, 36499989, 36531379, 36714915, 36815341, 36815919, 36816298, 36935628, 36937231, 36938112, 36938699, 36939425, 36939539, 37005534, 37111638, 37212113, 37326767, 37481843, 37600407, 37680708, 37843334, 37940274, 37999854, 38066139, 38191768, 38281587, 38391963, 38481136, 38495589, 38638608, 38667514, 38791459, 38887654, 38967830, 39193978, 39274513, 39274513, 39418930, 39418930, 39418930, 39475831, 39491960, 39901100, 39901100, 39901100, 39901100, 39901100, 39901305, 39901305, 39901305, 39912909, 39956609, 39986914, 40209629, 40257592, 40362797, 40411839, 40436814, 40469229, 40666543, 40763099, 40766777, 40831323, 40839970, 40868187, 40936442, 40970040, 40983430, 40998736, 41019705, 41052934, 41087101, 41185858, 41234413, 41266403, 41321153, 41407349, 41465340, 41517534, 41568991, 41615662, 41650319, 41658659, 41658664, 41665632, 41669113, 41690386, 41691021, 41691025, 41691028, 41691034, 41691039, 41691042, 41691042, 41691042, 41696832, 41756348, 41795985, 41849105, 41911651, 41954531, 42034972, 42190615, 42275107, 42281929, 42293883, 42345473, 42494470, 42536960, 42730788, 42959119, 43202690, 43283122, 43477594, 43583940, 43732984, 44136957, 44174410, 44192857, 44293178, 44482605, 44586368, 44791557, 44842613, 44908901, 45052298, 45059852, 45458308, 45464624, 45488183, 45491341, 45560822, 45629397, 45691162, 45931139, 46098625, 46106698, 46347381, 46482085, 46609388, 46848526, 46900963, 47002459, 47117296, 47253122, 47331157, 47435038, 47674065, 47775076, 47869741, 47990074, 48073430, 48153592, 48272307, 48342043, 48545025, 48589604, 48666526, 48845918, 49025896, 49210635, 49310973, 49404984, 49504516, 49748107, 49829853, 49983507, 50091104, 50273773, 50397070, 50520286, 50610990, 50658022, 50734157, 50838513, 50904833, 50980637, 51055275, 51131850, 51197015, 51342398, 51472890, 51547033, 51868533, 51910644, 51997323, 52076256, 52234278, 52366607, 52467906, 52601924, 52653055, 52769371, 52799419, 52880625, 52971172, 53054836, 53227641, 53348622, 53454819, 53490384, 53529272, 53704612, 53799101, 53865496, 54046075, 54134899, 54210124, 54290671, 54482634, 54559179, 54649281, 54810480, 54884527, 54899123, 54953084, 54960639, 54968917, 54980352, 55021966, 55029523, 55090077, 55194424, 55262553, 55296737, 55391910, 55561863, 55603331, 55785024, 55922679, 55966951, 56110366, 56262724, 56366792, 56651818, 56845166, 56939426, 57089097, 57202442, 57376873, 57434420, 57662959, 57732344, 57826044, 57988534, 58075489, 58172736, 58219154, 58283593, 58428266, 58527262, 58589941, 58674836, 58751396, 58860345, 58914542, 58981602, 59137063, 59266688, 59382279, 59446562, 59676670, 59776009, 59783048, 59798570, 59811451, 59819212, 59922789, 60016433, 60105157, 60135173, 60270944, 60302023, 60407074, 60540212, 60553035, 60712229, 60900172, 60956084, 61023400, 61220778, 61306191, 61410909, 61445507, 61530787, 61643382, 61761470, 61886524, 61969294, 62093934, 62286867, 62714735, 62787884, 62871058, 62986475, 63196012, 63356858, 63449334, 63547051, 63585408, 63662157, 63769857, 63969546, 64141893, 64174519, 64294464, 64505520, 64615425, 64657303, 64834048, 64942876, 64985898, 65003702, 65021507, 65046764, 65061245, 65075133, 65075133, 65075133, 65114194, 65207408, 65276264, 65296952, 65411187, 65533090, 65672681, 65722621, 65873041, 66061172, 66160795, 66251949, 66360896, 66508017, 66619098, 66829270, 66965849, 67027116, 67126122, 67175785, 67184495, 67248185, 67339580, 67455690, 67586316, 67689403, 67746896, 67930572, 68096381, 68241962, 68278088, 68374456, 68483337, 68546279, 68663920, 68870538, 68953874, 69036257, 69231127, 69386959, 69491844, 69667721, 69735866, 69823644, 70049304, 70147126, 70193892, 70328956, 70409675, 70498820, 70614751, 70697270, 70795784, 70971998, 71167166, 71223660, 71404764, 71586298, 71726390, 71786539, 71892802, 71966893, 72006766, 72171437, 72202317, 72330572, 72484970, 72522726, 72635420, 72820512, 72857630, 72953513, 73085592, 73153749, 73335118, 73494045, 73568305, 73745873, 73745873, 73745873, 73745873, 73745873, 73745873, 73745873, 73745873, 73745873, 73745873, 73745873, 73805361, 73809783, 73859658, 74264762, 74355159, 74488833, 74553307, 74726725, 74794738, 74916252, 75159476, 75303121, 75481878, 75705216, 75824624, 75910476, 76095428, 76233936, 76307586, 76391089, 76430330, 76541281, 76588662, 76635060, 76704298, 76842808, 76881818, 77011807, 77064283, 77218252, 77298457, 77361594, 77443911, 77561281, 77641047, 78012489, 78125613, 78140423, 78161708, 78300557, 78511812, 78524133, 78722702, 78821539, 78831219, 78838256, 78841036, 78846595, 78849374, 78890115, 79014522, 79100506, 79211095, 79293655, 79362143, 79461674, 79635649, 79661895, 79756446, 79889873, 79942701, 80005142, 80098779, 80282898, 80408376, 80472457, 80604905, 80633923, 80657530, 80743839, 80752632, 81014095, 81126318, 81174829, 81283315, 81557772, 81615389, 81792264, 81895274, 82053032, 82124283, 82172919, 82333804, 82466089, 82548745, 82718944, 83075601, 83277505, 83389835, 83568384, 83725976, 83829115, 83981622, 84159938, 84287307, ["name"] = "Thyminde"} end F()
F = nil
|
-- Model: resnet1.def.lua
-- Description: ResNet model for face recognition with OpenFace, v1.
-- Input size: 3x96x96
-- Number of Parameters from net:getParameters() with embSize=128: TODO
-- Components: Mostly `nn`
-- Devices: CPU and CUDA
--
-- Brandon Amos <http://bamos.github.io>
-- 2016-06-19
--
-- Copyright 2016 Carnegie Mellon University
--
-- 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.
--
-- Modified from:
-- https://github.com/facebook/fb.resnet.torch/blob/master/models/resnet.lua
-- Portions from here are BSD licensed.
imgDim = 96
local nn = require 'nn'
local Convolution = nn.SpatialConvolutionMM
-- local Avg = nn.SpatialAveragePooling
local ReLU = nn.ReLU
local Max = nn.SpatialMaxPooling
local SBatchNorm = nn.SpatialBatchNormalization
function createModel()
local depth = 18
local shortcutType = 'B'
local iChannels
-- The shortcut layer is either identity or 1x1 convolution
local function shortcut(nInputPlane, nOutputPlane, stride)
local useConv = shortcutType == 'C' or
(shortcutType == 'B' and nInputPlane ~= nOutputPlane)
if useConv then
-- 1x1 convolution
return nn.Sequential()
:add(Convolution(nInputPlane, nOutputPlane, 1, 1, stride, stride))
:add(SBatchNorm(nOutputPlane))
elseif nInputPlane ~= nOutputPlane then
-- Strided, zero-padded identity shortcut
return nn.Sequential()
:add(nn.SpatialAveragePooling(1, 1, stride, stride))
:add(nn.Concat(2)
:add(nn.Identity())
:add(nn.MulConstant(0)))
else
return nn.Identity()
end
end
-- The basic residual layer block for 18 and 34 layer network, and the
-- CIFAR networks
local function basicblock(n, stride)
local nInputPlane = iChannels
iChannels = n
local s = nn.Sequential()
s:add(Convolution(nInputPlane,n,3,3,stride,stride,1,1))
s:add(SBatchNorm(n))
s:add(ReLU(true))
s:add(Convolution(n,n,3,3,1,1,1,1))
s:add(SBatchNorm(n))
return nn.Sequential()
:add(nn.ConcatTable()
:add(s)
:add(shortcut(nInputPlane, n, stride)))
:add(nn.CAddTable(true))
:add(ReLU(true))
end
-- The bottleneck residual layer for 50, 101, and 152 layer networks
-- local function bottleneck(n, stride)
-- local nInputPlane = iChannels
-- iChannels = n * 4
-- local s = nn.Sequential()
-- s:add(Convolution(nInputPlane,n,1,1,1,1,0,0))
-- s:add(SBatchNorm(n))
-- s:add(ReLU(true))
-- s:add(Convolution(n,n,3,3,stride,stride,1,1))
-- s:add(SBatchNorm(n))
-- s:add(ReLU(true))
-- s:add(Convolution(n,n*4,1,1,1,1,0,0))
-- s:add(SBatchNorm(n * 4))
-- return nn.Sequential()
-- :add(nn.ConcatTable()
-- :add(s)
-- :add(shortcut(nInputPlane, n * 4, stride)))
-- :add(nn.CAddTable(true))
-- :add(ReLU(true))
-- end
-- Creates count residual blocks with specified number of features
local function layer(block, features, count, stride)
local s = nn.Sequential()
for i=1,count do
s:add(block(features, i == 1 and stride or 1))
end
return s
end
-- Configurations for ResNet:
-- num. residual blocks, num features, residual block function
local cfg = {
[18] = {{2, 2, 2, 2}, 4608, basicblock},
-- [34] = {{3, 4, 6, 3}, 512, basicblock},
-- [50] = {{3, 4, 6, 3}, 2048, bottleneck},
-- [101] = {{3, 4, 23, 3}, 2048, bottleneck},
-- [152] = {{3, 8, 36, 3}, 2048, bottleneck},
}
assert(cfg[depth], 'Invalid depth: ' .. tostring(depth))
local def, nLinear, block = table.unpack(cfg[depth])
iChannels = 64
-- The ResNet ImageNet model
local model = nn.Sequential()
model:add(Convolution(3,64,7,7,2,2,3,3))
model:add(SBatchNorm(64))
model:add(ReLU(true))
model:add(Max(3,3,2,2,1,1))
model:add(layer(block, 64, def[1]))
model:add(layer(block, 128, def[2], 2))
model:add(layer(block, 256, def[3], 2))
model:add(layer(block, 512, def[4], 2))
-- TODO: Add back?
-- model:add(Avg(7, 7, 1, 1))
model:add(nn.View(nLinear))
model:add(nn.Linear(nLinear, opt.embSize))
model:add(nn.Normalize(2))
local function ConvInit(name)
for _,v in pairs(model:findModules(name)) do
local n = v.kW*v.kH*v.nOutputPlane
v.weight:normal(0,math.sqrt(2/n))
if cudnn.version >= 4000 then
v.bias = nil
v.gradBias = nil
else
v.bias:zero()
end
end
end
local function BNInit(name)
for _,v in pairs(model:findModules(name)) do
v.weight:fill(1)
v.bias:zero()
end
end
ConvInit('nn.SpatialConvolutionMM')
BNInit('nn.SpatialBatchNormalization')
for _,v in pairs(model:findModules('nn.Linear')) do
v.bias:zero()
end
return model
end
|
--- Simple Input Patterns (SIP).
-- SIP patterns start with '$', then a
-- one-letter type, and then an optional variable in curly braces.
--
-- sip.match('$v=$q','name="dolly"',res)
-- ==> res=={'name','dolly'}
-- sip.match('($q{first},$q{second})','("john","smith")',res)
-- ==> res=={second='smith',first='john'}
--
-- ''Type names''
--
-- v identifier
-- i integer
-- f floating-point
-- q quoted string
-- ([{< match up to closing bracket
--
-- See @{08-additional.md.Simple_Input_Patterns|the Guide}
--
-- @module pl.sip
local loadstring = rawget(_G,'loadstring') or load
local unpack = rawget(_G,'unpack') or rawget(table,'unpack')
local append,concat = table.insert,table.concat
local ipairs,loadstring,type,unpack = ipairs,loadstring,type,unpack
local io,_G = io,_G
local print,rawget = print,rawget
local patterns = {
FLOAT = '[%+%-%d]%d*%.?%d*[eE]?[%+%-]?%d*',
INTEGER = '[+%-%d]%d*',
IDEN = '[%a_][%w_]*',
FILE = '[%a%.\\][:%][%w%._%-\\]*',
OPTION = '[%a_][%w_%-]*',
}
local function assert_arg(idx,val,tp)
if type(val) ~= tp then
error("argument "..idx.." must be "..tp, 2)
end
end
--[[
module ('pl.sip',utils._module)
]]
local sip = {}
local brackets = {['<'] = '>', ['('] = ')', ['{'] = '}', ['['] = ']' }
local stdclasses = {a=1,c=0,d=1,l=1,p=0,u=1,w=1,x=1,s=0}
local _patterns = {}
local function group(s)
return '('..s..')'
end
-- escape all magic characters except $, which has special meaning
-- Also, un-escape any characters after $, so $( passes through as is.
local function escape (spec)
--_G.print('spec',spec)
local res = spec:gsub('[%-%.%+%[%]%(%)%^%%%?%*]','%%%1'):gsub('%$%%(%S)','$%1')
--_G.print('res',res)
return res
end
local function imcompressible (s)
return s:gsub('%s+','\001')
end
-- [handling of spaces in patterns]
-- spaces may be 'compressed' (i.e will match zero or more spaces)
-- unless this occurs within a number or an identifier. So we mark
-- the four possible imcompressible patterns first and then replace.
-- The possible alnum patterns are v,f,a,d,x,l and u.
local function compress_spaces (s)
s = s:gsub('%$[vifadxlu]%s+%$[vfadxlu]',imcompressible)
s = s:gsub('[%w_]%s+[%w_]',imcompressible)
s = s:gsub('[%w_]%s+%$[vfadxlu]',imcompressible)
s = s:gsub('%$[vfadxlu]%s+[%w_]',imcompressible)
s = s:gsub('%s+','%%s*')
s = s:gsub('\001',' ')
return s
end
local pattern_map = {
v = group(patterns.IDEN),
i = group(patterns.INTEGER),
f = group(patterns.FLOAT),
o = group(patterns.OPTION),
r = '(%S.*)',
p = '([%a]?[:]?[\\/%.%w_]+)'
}
function sip.custom_pattern(flag,patt)
pattern_map[flag] = patt
end
--- convert a SIP pattern into the equivalent Lua string pattern.
-- @param spec a SIP pattern
-- @param options a table; only the <code>at_start</code> field is
-- currently meaningful and esures that the pattern is anchored
-- at the start of the string.
-- @return a Lua string pattern.
function sip.create_pattern (spec,options)
assert_arg(1,spec,'string')
local fieldnames,fieldtypes = {},{}
if type(spec) == 'string' then
spec = escape(spec)
else
local res = {}
for i,s in ipairs(spec) do
res[i] = escape(s)
end
spec = concat(res,'.-')
end
local kount = 1
local function addfield (name,type)
if not name then name = kount end
if fieldnames then append(fieldnames,name) end
if fieldtypes then fieldtypes[name] = type end
kount = kount + 1
end
local named_vars, pattern
named_vars = spec:find('{%a+}')
pattern = '%$%S'
if options and options.at_start then
spec = '^'..spec
end
if spec:sub(-1,-1) == '$' then
spec = spec:sub(1,-2)..'$r'
if named_vars then spec = spec..'{rest}' end
end
local names
if named_vars then
names = {}
spec = spec:gsub('{(%a+)}',function(name)
append(names,name)
return ''
end)
end
spec = compress_spaces(spec)
local k = 1
local err
local r = (spec:gsub(pattern,function(s)
local type,name
type = s:sub(2,2)
if names then name = names[k]; k=k+1 end
-- this kludge is necessary because %q generates two matches, and
-- we want to ignore the first. Not a problem for named captures.
if not names and type == 'q' then
addfield(nil,'Q')
else
addfield(name,type)
end
local res
if pattern_map[type] then
res = pattern_map[type]
elseif type == 'q' then
-- some Lua pattern matching voodoo; we want to match '...' as
-- well as "...", and can use the fact that %n will match a
-- previous capture. Adding the extra field above comes from needing
-- to accomodate the extra spurious match (which is either ' or ")
addfield(name,type)
res = '(["\'])(.-)%'..(kount-2)
else
local endbracket = brackets[type]
if endbracket then
res = '(%b'..type..endbracket..')'
elseif stdclasses[type] or stdclasses[type:lower()] then
res = '(%'..type..'+)'
else
err = "unknown format type or character class"
end
end
return res
end))
--print(r,err)
if err then
return nil,err
else
return r,fieldnames,fieldtypes
end
end
local function tnumber (s)
return s == 'd' or s == 'i' or s == 'f'
end
function sip.create_spec_fun(spec,options)
local fieldtypes,fieldnames
local ls = {}
spec,fieldnames,fieldtypes = sip.create_pattern(spec,options)
if not spec then return spec,fieldnames end
local named_vars = type(fieldnames[1]) == 'string'
for i = 1,#fieldnames do
append(ls,'mm'..i)
end
local fun = ('return (function(s,res)\n\tlocal %s = s:match(%q)\n'):format(concat(ls,','),spec)
fun = fun..'\tif not mm1 then return false end\n'
local k=1
for i,f in ipairs(fieldnames) do
if f ~= '_' then
local var = 'mm'..i
if tnumber(fieldtypes[f]) then
var = 'tonumber('..var..')'
elseif brackets[fieldtypes[f]] then
var = var..':sub(2,-2)'
end
if named_vars then
fun = ('%s\tres.%s = %s\n'):format(fun,f,var)
else
if fieldtypes[f] ~= 'Q' then -- we skip the string-delim capture
fun = ('%s\tres[%d] = %s\n'):format(fun,k,var)
k = k + 1
end
end
end
end
return fun..'\treturn true\nend)\n', named_vars
end
--- convert a SIP pattern into a matching function.
-- The returned function takes two arguments, the line and an empty table.
-- If the line matched the pattern, then this function return true
-- and the table is filled with field-value pairs.
-- @param spec a SIP pattern
-- @param options optional table; {anywhere=true} will stop pattern anchoring at start
-- @return a function if successful, or nil,<error>
function sip.compile(spec,options)
assert_arg(1,spec,'string')
local fun,names = sip.create_spec_fun(spec,options)
if not fun then return nil,names end
if rawget(_G,'_DEBUG') then print(fun) end
local chunk,err = loadstring(fun,'tmp')
if err then return nil,err end
return chunk(),names
end
local cache = {}
--- match a SIP pattern against a string.
-- @param spec a SIP pattern
-- @param line a string
-- @param res a table to receive values
-- @param options (optional) option table
-- @return true or false
function sip.match (spec,line,res,options)
assert_arg(1,spec,'string')
assert_arg(2,line,'string')
assert_arg(3,res,'table')
if not cache[spec] then
cache[spec] = sip.compile(spec,options)
end
return cache[spec](line,res)
end
--- match a SIP pattern against the start of a string.
-- @param spec a SIP pattern
-- @param line a string
-- @param res a table to receive values
-- @return true or false
function sip.match_at_start (spec,line,res)
return sip.match(spec,line,res,{at_start=true})
end
--- given a pattern and a file object, return an iterator over the results
-- @param spec a SIP pattern
-- @param f a file - use standard input if not specified.
function sip.fields (spec,f)
assert_arg(1,spec,'string')
f = f or io.stdin
local fun,err = sip.compile(spec)
if not fun then return nil,err end
local res = {}
return function()
while true do
local line = f:read()
if not line then return end
if fun(line,res) then
local values = res
res = {}
return unpack(values)
end
end
end
end
--- register a match which will be used in the read function.
-- @param spec a SIP pattern
-- @param fun a function to be called with the results of the match
-- @see read
function sip.pattern (spec,fun)
assert_arg(1,spec,'string')
local pat,named = sip.compile(spec)
append(_patterns,{pat=pat,named=named,callback=fun or false})
end
--- enter a loop which applies all registered matches to the input file.
-- @param f a file object; if nil, then io.stdin is assumed.
function sip.read (f)
local owned,err
f = f or io.stdin
if type(f) == 'string' then
f,err = io.open(f)
if not f then return nil,err end
owned = true
end
local res = {}
for line in f:lines() do
for _,item in ipairs(_patterns) do
if item.pat(line,res) then
if item.callback then
if item.named then
item.callback(res)
else
item.callback(unpack(res))
end
end
res = {}
break
end
end
end
if owned then f:close() end
end
return sip
|
-- Profile.lua
-- by David Lannan
-- copyright 2012
--
-- Profile.lua provides the API for users to log in using a number of internet based profile systems.
-- Supported:
-- Twitter, Facebook, OpenID, GoogleID (same as OpenID), MSN / Hotmail, ICQ
-- Profile information can be shared.
-- Each profile must provide a content window where data must be entered
local profileData =
{
projectInfo =
{
name = "Default",
thumbnail = "",
datafolders = {
"byt3d/data"
}
},
projectConfig =
{
windows7 = {
},
osx = {
},
ios = {
},
android = {
},
blackberry = {
},
linux = {
}
}
}
return profileData
|
--[[
Name: LibJSON-1.0
Author(s): ckknight (ckknight@gmail.com)
Website: http://www.wowace.com/projects/libjson-1-0/
Description: A library to convert between Lua objects and serialized JSON objects
License: MIT
]]
local LibJSON = LibStub:NewLibrary("LibJSON-1.0", 1)
if not LibJSON then
return
end
LibJSON.NULL = LibJSON.NULL or newproxy()
local NULL = LibJSON.NULL
--- Return a proxy object that will serialize to null.
-- @usage LibJSON.Serialize(LibJSON.Null()) == "null"
-- @usage LibJSON.Serialize({1, LibJSON.Null(), 3}) == "[1,null,3]"
-- @return a proxy object
function LibJSON.Null()
return NULL
end
local serialize
--- Serialize an object to LibJSON
-- This will error if a function, userdata, or thread is passed in.
-- This will also error if a non-UTF-8 string is passed in.
-- @param value a serialized JSON object
-- @usage LibJSON.Serialize(1234) == "1234"
-- @usage LibJSON.Serialize(1234e50) == "1.234e+53"
-- @usage LibJSON.Serialize("Hello, friend") == '"Hello, friend"'
-- @usage LibJSON.Serialize({ 1, 2, 3 }) == "[1,2,3]"
-- @usage LibJSON.Serialize({ one = 1, two = 2 }) == '{"one":1,"two":2}'
-- @usage LibJSON.Serialize("\195\156berfantastisch") == '"\u00DCberfantastisch"'
-- @usage LibJSON.Serialize(nil) == 'null'
-- @usage LibJSON.Serialize(true) == 'true'
-- @usage LibJSON.Serialize() == 'false'
-- @usage LibJSON.Serialize({[4] = "Hello"}) == '[null,null,null,"Hello"]'
-- @return a string with the serialized data in it
function LibJSON.Serialize(value)
local buffer = {}
serialize(value, buffer)
return table.concat(buffer)
end
local deserialize, skipWhitespace
--- Deserialize a JSON object into a lua object
-- This will error if the JSON object is malformed.
-- @param value a string, number, boolean, or nil (or LibJSON.Null()), or a table consisting of those
-- @usage LibJSON.Deserialize("1234") == 1234
-- @usage LibJSON.Deserialize("1.234e+53") == 1234e50
-- @usage LibJSON.Deserialize('"Hello, friend"') == "Hello, friend"
-- @usage LibJSON.Deserialize('[1, 2, 3]') => { 1, 2, 3 }
-- @usage LibJSON.Deserialize('[1, null, 3]') => { [1] = 1, [3] = 3 }
-- @usage LibJSON.Deserialize('{"one":"two"}') => { one = "two" }
-- @usage LibJSON.Deserialize('"\u00DCberfantastisch"') => "\195\156berfantastisch"
-- @usage LibJSON.Deserialize('[1, /* a comment */ 2]') => { 1, 2 }
-- @usage LibJSON.Deserialize('true') => true
-- @usage LibJSON.Deserialize('false') => false
-- @usage LibJSON.Deserialize('null') => nil
-- @return a lua object, either a table, string, number, boolean, or nil
function LibJSON.Deserialize(value)
if type(value) ~= "string" then
error("Cannot deserialize a non-string")
end
local result, position = deserialize(value, 1)
position = skipWhitespace(value, position)
if position <= value:len() then
error(("Unused trailing characters: %q"):format(value))
end
return result
end
do
local serializers = {}
-- serialize a value, appending to the given buffer
function serialize(value, buffer)
if value == NULL then
-- NULL is special, for embedding nils into lists
value = nil
end
local serializer = serializers[type(value)]
if not serializer then
error(("Serializing of type %s is unsupported"):format(type(value)))
end
serializer(value, buffer)
end
local backslashed_bytes = {
[('"'):byte()] = '\\"',
[('\\'):byte()] = '\\\\',
[('/'):byte()] = '\\/',
[('\b'):byte()] = '\\b',
[('\f'):byte()] = '\\f',
[('\n'):byte()] = '\\n',
[('\r'):byte()] = '\\r',
[('\t'):byte()] = '\\t',
}
function serializers:string(buffer)
buffer[#buffer+1] = '"'
local i = 1
local length = #self
while i <= length do
local byte = self:byte(i)
i = i + 1
if backslashed_bytes[byte] then
-- one of the standard backslashed characters
buffer[#buffer+1] = backslashed_bytes[byte]
elseif byte < 32 then
-- control character, not visible normally
buffer[#buffer+1] = "\\u00"
buffer[#buffer+1] = ("%02X"):format(byte)
elseif byte < 128 then
-- normal character
buffer[#buffer+1] = string.char(byte)
elseif byte < 194 or byte > 244 then
error("String is not proper UTF-8: %q"):format(self)
elseif byte < 224 then
-- unicode fun, this handles U+0080 to U+07FF
-- see http://en.wikipedia.org/wiki/UTF-8
local byte1, byte2 = self:byte(i), byte
i = i + 1
local nibble1 = byte1 % 16
local nibble2 = ((byte1 - nibble1) % 64) / 16 + (byte2 % 4) * 4
local nibble3 = math.floor(byte2 / 4) % 8
buffer[#buffer+1] = "\\u"
buffer[#buffer+1] = ("%04X"):format(nibble1 + nibble2 * 16 + nibble3 * 256)
elseif byte < 240 then
-- even more unicode fun, handles U+0800 to U+FFFF
local byte1, byte2, byte3 = self:byte(i+1), self:byte(i), byte
i = i + 2
local nibble1 = byte1 % 16
local nibble2 = ((byte1 - nibble1) % 64) / 16 + (byte2 % 4) * 4
local nibble3 = math.floor(byte2 / 4) % 16
local nibble4 = byte3 % 16
buffer[#buffer+1] = "\\u"
buffer[#buffer+1] = ("%04X"):format(nibble1 + nibble2 * 16 + nibble3 * 256 + nibble4 * 4096)
else
error("Cannot serialize unicode greater than U+FFFF: %q"):format(self)
end
end
buffer[#buffer+1] = '"'
end
function serializers:number(buffer)
-- lua's and LibJSON's numbers are the same
buffer[#buffer+1] = tostring(self)
end
function serializers:boolean(buffer)
-- lua's and LibJSON's booleans are the same
buffer[#buffer+1] = tostring(self)
end
-- see if the table provided is a list, if so, return the list's length
-- This does handle lists with embedded nils, e.g. {1, nil, 3}
-- This could theoretically be an issue if you pass in {[10000]="Hello"}
local function isList(list)
local length = 0
for k, v in pairs(list) do
if type(k) ~= "number" or k < 1 or math.floor(k) ~= k then
return false
end
if length < k then
length = k
end
end
return length
end
function serializers:table(buffer)
local listLength = isList(self)
if listLength then
buffer[#buffer+1] = "["
for i = 1, listLength do
if i > 1 then
buffer[#buffer+1] = ","
end
serialize(self[i], buffer)
end
buffer[#buffer+1] = "]"
else
buffer[#buffer+1] = "{"
local first = true
for k, v in pairs(self) do
if first then
first = false
else
buffer[#buffer+1] = ","
end
-- we're going to just coerce all keys to string
serialize(tostring(k), buffer)
buffer[#buffer+1] = ":"
serialize(v, buffer)
end
buffer[#buffer+1] = "}"
end
end
serializers['nil'] = function(self, buffer)
buffer[#buffer+1] = "null"
end
end
do
local solidus = ("/"):byte()
local reverseSolidus = ("\\"):byte()
local asterix = ("*"):byte()
local openBrace = ("{"):byte()
local closeBrace = ("}"):byte()
local openBracket = ("["):byte()
local closeBracket = ("]"):byte()
local comma = (","):byte()
local colon = (":"):byte()
local doubleQuote = ('"'):byte()
local minus = ("-"):byte()
local plus = ("+"):byte()
local letterT = ("t"):byte()
local letterF = ("f"):byte()
local letterN = ("n"):byte()
local letterU = ("u"):byte()
local digit0 = ("0"):byte()
local digit1 = ("1"):byte()
local digit9 = ("9"):byte()
local fullStop = ("."):byte()
local letterE = ("e"):byte()
local letterUpperE = ("E"):byte()
local whitespace = {
[(" "):byte()] = true,
[("\t"):byte()] = true,
[("\r"):byte()] = true,
[("\n"):byte()] = true,
}
local newlines = {
[("\r"):byte()] = true,
[("\n"):byte()] = true,
}
local numbers = {}
for i = 0, 9 do
numbers[i + ('0'):byte()] = i
end
local escapes = {
[('"'):byte()] = ('"'):byte(),
[('\\'):byte()] = ('\\'):byte(),
[('/'):byte()] = ('/'):byte(),
[('b'):byte()] = ('\b'):byte(),
[('f'):byte()] = ('\f'):byte(),
[('n'):byte()] = ('\n'):byte(),
[('r'):byte()] = ('\r'):byte(),
[('t'):byte()] = ('\t'):byte(),
}
-- this jumps the position ahead to past the first newline
local function skipCommentSingleLine(value, position)
local byte
repeat
byte = value:byte(position)
position = position + 1
until not byte or newlines[byte]
return skipWhitespace(value, position)
end
-- this searches for */ and stops
local function skipCommentBlock(value, position)
local lastByte, byte
repeat
lastByte, byte = byte, value:byte(position)
position = position + 1
if lastByte == solidus and byte == asterix then
-- /* blah /* */ is illegal
error(("Invalid comment found: %q"):format(value))
end
until not byte or (lastByte == asterix and byte == solidus)
if not byte then
-- ran out of text before finishing the comment
error(("Invalid comment found: %q"):format(value))
end
return skipWhitespace(value, position)
end
local function skipComment(value, position)
assert(value:byte(position) == solidus)
local byte = value:byte(position + 1)
if byte == solidus then
-- // text until newline
return skipCommentSingleLine(value, position+2)
elseif byte == asterix then
-- /* text until */
return skipCommentBlock(value, position+2)
else
-- can't have a random slash hanging around
error(("Invalid comment found: %q"):format(value))
end
end
-- skip all whitespace and comments
function skipWhitespace(value, position)
local byte = value:byte(position)
if whitespace[byte] then
return skipWhitespace(value, position+1)
end
if byte == solidus then
return skipComment(value, position)
end
return position
end
local tmp = {}
-- read in a string
local function readString(value, position)
assert(value:byte(position) == doubleQuote)
position = position + 1
for k in pairs(tmp) do
-- this is in case there was an error while figuring the string last time
tmp[k] = nil
end
while true do
local byte = value:byte(position)
position = position + 1
if not byte then
error(("String ended early: %q"):format(value))
elseif byte == doubleQuote then
-- end of the string
break
elseif byte == reverseSolidus then
byte = value:byte(position)
position = position + 1
if not byte then
error(("String ended early: %q"):format(value))
elseif byte == letterU then
-- unicode fun
-- see http://en.wikipedia.org/wiki/UTF-8
local hexDigits = value:sub(position, position+3)
if hexDigits:len() ~= 4 then
error(("String ended early: %q"):format(value))
end
position = position + 4
local codepoint = tonumber(hexDigits, 16)
if not codepoint then
error(("Invalid string found: %q"):format(value))
end
if codepoint < 0x0080 then
tmp[#tmp+1] = string.char(codepoint)
elseif codepoint < 0x0800 then
tmp[#tmp+1] = string.char(math.floor(codepoint / 0x0040) + 0xC0)
tmp[#tmp+1] = string.char((codepoint % 0x0040) + 0x80)
else
tmp[#tmp+1] = string.char(math.floor(codepoint / 0x1000) + 0xE0)
tmp[#tmp+1] = string.char(math.floor((codepoint % 0x1000) / 0x0040) + 0x80)
tmp[#tmp+1] = string.char((codepoint % 0x0040) + 0x80)
end
else
tmp[#tmp+1] = string.char(escapes[byte] or byte)
end
else
tmp[#tmp+1] = string.char(byte)
end
end
local result = table.concat(tmp)
for k in pairs(tmp) do
tmp[k] = nil
end
return result, position
end
-- read in a number
local function readNumber(value, position)
local start = position
local byte = value:byte(position)
position = position + 1
if byte == minus then
byte = value:byte(position)
position = position + 1
end
local number = numbers[byte]
if not number then
error(("Number ended early: %q"):format(value))
end
if number ~= 0 then
while true do
byte = value:byte(position)
position = position + 1
local digit = numbers[byte]
if not digit then
break
end
end
else
byte = value:byte(position)
position = position + 1
end
if byte == fullStop then
local first = true
local exponent = 0
while true do
byte = value:byte(position)
position = position + 1
if not numbers[byte] then
if first then
error(("Number ended early: %q"):format(value))
end
break
end
first = false
end
end
if byte == letterE or byte == letterUpperE then
byte = value:byte(position)
position = position + 1
if byte == plus then
-- nothing to do
elseif byte == minus then
-- also nothing to do
else
position = position - 1
end
byte = value:byte(position)
position = position + 1
if not numbers[byte] then
error(("Invalid number: %q"):format(value))
end
repeat
byte = value:byte(position)
position = position + 1
until not numbers[byte]
else
position = position - 1
end
-- we're gonna use number because it's typically faster and more accurate than adding and multiplying ourselves
local number = tonumber(value:sub(start, position-1))
assert(number)
return number, position
end
-- read in true
local function readTrue(value, position)
local string = value:sub(position, position+3)
if string ~= "true" then
error(("Error reading true: %q"):format(value))
end
return true, position+4
end
-- read in false
local function readFalse(value, position)
local string = value:sub(position, position+4)
if string ~= "false" then
error(("Error reading false: %q"):format(value))
end
return false, position+5
end
-- read in null (becomes nil)
local function readNull(value, position)
local string = value:sub(position, position+3)
if string ~= "null" then
error(("Error reading null: %q"):format(value))
end
return nil, position+4
end
-- read in a list
local function readList(value, position)
assert(value:byte(position) == openBracket)
position = position + 1
if value:byte(position) == closeBracket then
return {}, position+1
end
local list = {}
-- track list position rather than #list+1 because of embedded nulls
local listPosition = 1
while true do
-- when the great division comes, there will be no pain, no
-- suffering, for we shall be the mother and father to a million
-- civilizations
local atom
atom, position = deserialize(value, position)
list[listPosition] = atom
listPosition = listPosition + 1
position = skipWhitespace(value, position)
local byte = value:byte(position)
position = position + 1
if byte == closeBracket then
return list, position
elseif not byte then
error(("Invalid list: %q, ended early"):format(value))
elseif byte ~= comma then
error(("Invalid list: %q, because of %q"):format(value, string.char(byte)))
end
end
end
-- read in a dictionary
local function readDictionary(value, position)
assert(value:byte(position) == openBrace)
position = position + 1
if value:byte(position) == closeBrace then
return {}, position+1
end
local dictionary = {}
while true do
-- get the key first
local key
key, position = deserialize(value, position)
if type(key) ~= "string" then
error(("Found non-string dictionary key: %s"):format(tostring(key)))
end
position = skipWhitespace(value, position)
local byte = value:byte(position)
position = position+1
if not byte then
error(("Invalid dictionary: %q, ended early"):format(value))
elseif byte ~= colon then
error(("Invalid dictionary: %q, because of %q"):format(value, string.char(byte)))
end
position = skipWhitespace(value, position)
-- now the value
local val
val, position = deserialize(value, position)
dictionary[key] = val
position = skipWhitespace(value, position)
local byte = value:byte(position)
position = position + 1
if byte == closeBrace then
return dictionary, position
elseif not byte then
error(("Invalid dictionary: %q, ended early"):format(value))
elseif byte ~= comma then
error(("Invalid dictionary: %q, because of %q"):format(value, string.char(byte)))
end
end
end
-- deserialize the object for the given value at the given position
function deserialize(value, position)
position = skipWhitespace(value, position)
local nextByte = value:byte(position)
if not nextByte then
error(("Premature end: %q"):format(value))
end
if nextByte == openBrace then
return readDictionary(value, position)
elseif nextByte == openBracket then
return readList(value, position)
elseif nextByte == doubleQuote then
return readString(value, position)
elseif nextByte == solidus then
position = skipComment(value, position)
return deserialize(value, position)
elseif nextByte == minus or numbers[nextByte] then
return readNumber(value, position)
elseif nextByte == letterT then
return readTrue(value, position)
elseif nextByte == letterF then
return readFalse(value, position)
elseif nextByte == letterN then
return readNull(value, position)
else
error(("Invalid input: %q"):format(value))
end
end
end
|
---
-- The 'TexturePacker' class specifies a texture packer.
-- A texture packer is a large image which contains many smaller sub-images.
--
-- Using TexturePacker tools to export packer files.
-- http://www.codeandweb.com/texturepacker
--
-- @module TexturePacker
local M = Class()
---
-- Creates a new 'TexturePacker' object.
--
-- @function [parent=#TexturePacker] new
-- @param packer (string) The path of packer file that was generated by texturepacker.
-- @return #TexturePacker
function M:init(packer)
self.packer = require(packer)
self.texture = Texture.new(self.packer.texture)
self.caches = {}
end
---
-- Returns the texture of texture packer.
--
-- @function [parent=#TexturePacker] getTexture
-- @param self
-- @param name (string)
-- @return 'Texture' object that specifies name within the texture pack.
function M:getTexture(name)
if not name then
return nil
end
if not self.caches[name] then
local frame = self.packer.frames[name]
if frame then
self.caches[name] = self.texture:region(frame.x, frame.y, frame.width, frame.height)
end
end
return self.caches[name]
end
return M
|
return import(".uiloader").new()
|
--[[
GD50
Pokemon
Author: Colton Ogden
cogden@cs50.harvard.edu
Few franchises have achieved the degree of fame as Pokemon, short for "Pocket Monsters",
a Japanese monster-catching phenomenon that took the world by storm in the late 90s. Even
to this day, Pokemon is hugely successful, with games, movies, and various other forms of
merchandise selling like crazy. The game formula itself is an addicting take on the JRPG,
where the player can not only fight random creatures in the wild but also recruit them to
be in his or her party at all times, where they can level up, learn new abilities, and even
evolve.
This proof of concept demonstrates basic GUI usage, random encounters, creatures that the
player can fight and catch with their own creatures, and basic NPC interaction in the form of
very simple dialogue.
Credit for art:
Buch - https://opengameart.org/users/buch (tile sprites)
Monster sprites:
http://creativecommons.org/licenses/by-sa/4.0/
Aardart - Magic-Purple-Hermit
https://wiki.tuxemon.org/index.php?title=Magic-Purple-Hermit
Agnite - Leo, Sanglorian, and extyrannomon
https://wiki.tuxemon.org/index.php?title=Leo
https://wiki.tuxemon.org/index.php?title=Sanglorian
https://wiki.tuxemon.org/index.php?title=Extyrannomon&action=edit&redlink=1
Anoleaf - Spalding004
https://wiki.tuxemon.org/index.php?title=Spalding004
Bamboon - Mike Bramson
mnbramson@gmail.com
Cardiwing - Spalding004
https://wiki.tuxemon.org/index.php?title=Spalding004
Credit for music:
Field: https://freesound.org/people/Mrthenoronha/sounds/371843/
Battle: https://freesound.org/people/Sirkoto51/sounds/414214/
]]
require 'src/Dependencies'
require 'conf'
function love.load()
love.window.setTitle('Poke50')
love.graphics.setDefaultFilter('nearest', 'nearest')
math.randomseed(os.time())
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
fullscreen = false,
vsync = true,
resizable = true
})
-- this time, we are using a stack for all of our states, where the field state is the
-- foundational state; it will have its behavior preserved between state changes because
-- it is essentially being placed "behind" other running states as needed (like the battle
-- state)
gStateStack = StateStack()
gStateStack:push(StartState())
love.keyboard.keysPressed = {}
end
function love.resize(w, h)
push:resize(w, h)
end
function love.keypressed(key)
if key == 'escape' then
love.event.quit()
end
love.keyboard.keysPressed[key] = true
end
function love.keyboard.wasPressed(key)
return love.keyboard.keysPressed[key]
end
function love.update(dt)
Timer.update(dt)
gStateStack:update(dt)
love.keyboard.keysPressed = {}
end
function love.draw()
push:start()
gStateStack:render()
push:finish()
end
|
module(..., package.seeall)
local s = stat
local mean, std = s.mean , s.std
local meanm = s.meanm
local corr, cov = s.corr , s.cov
local corrm, covm = s.corrm, s.covm
local zscore = s.zscore
local lda, pca = s.lda, s.pca
function setup()
X = matrix{1,2,3,4,5}
X2 = matrix{5,4,6,7,8}
Y = matrix{6,7,8,9,10}
Y2 = Y * (-1)
X3 = matrix{
{-2.1, -1, 4.3},
{3, 1.1, 0.12}
}
L1 = matrix{ {2, 50}, {3, 10}, {2, 40}, {3, 80}, {2, 30}, {3, 100}, {2, 20} }
L2 = matrix{ 1, 2, 1, 2, 1, 2, 1 }
end
function test_mean()
assert_equal( 3, mean(X ), tol )
assert_equal( 6, mean(X2), tol )
assert_equal( 8, mean(Y) , tol )
assert_equal((4.3+0.12)/2, mean(X3:col(3)), tol )
end
function test_meanm()
local m = meanm(X3)
assert_equal( mean(X3:col(1)), m[1], tol )
assert_equal( mean(X3:col(2)), m[2], tol )
assert_equal( mean(X3:col(3)), m[3], tol )
end
function test_corr()
assert_equal( 1, corr(X, Y ), tol )
assert_equal( 1, corr(X, Y, 0), tol )
assert_equal(-1, corr(X, Y2 ), tol )
assert_equal(-1, corr(X, Y2, 0), tol)
assert_gt(0, corr(X2, Y, 0), 0)
assert_lt(0, corr(X2, Y2, 0), 0)
assert_gt(0, corr(X2, Y, 1), 0)
assert_lt(0, corr(X2, Y2, 1), 0)
end
function test_corrm()
local C = corrm(X3)
assert_equal(C[1][1], corr(X3:col(1), X3:col(1) ), tol )
assert_equal(C[1][2], corr(X3:col(1), X3:col(2) ), tol )
assert_equal(C[2][1], corr(X3:col(2), X3:col(1) ), tol )
assert_equal(C[2][2], corr(X3:col(2), X3:col(2) ), tol )
end
function test_covm()
local C = covm(X3)
assert_equal(C[1][1], cov(X3:col(1), X3:col(1) ), tol )
assert_equal(C[1][2], cov(X3:col(1), X3:col(2) ), tol )
assert_equal(C[2][1], cov(X3:col(2), X3:col(1) ), tol )
assert_equal(C[2][2], cov(X3:col(2), X3:col(2) ), tol )
end
function test_zscore()
local Z = zscore(Y)
assert_equal( mean(Z), 0, tol )
assert_equal( std(Z) , 1, tol )
end
function test_pca()
local s, V, mu = pca(L1)
local r, c = V:shape()
assert_equal(r, 2)
assert_equal(c, 2)
assert_equal(2, #s)
assert_true( (V[2][1] / V[1][1]) > 100 )
end
function test_lda()
local s, V, mu = lda(L1, L2)
local r, c = V:shape()
assert_equal(r, 2)
assert_equal(c, 2)
assert_equal(2, #s)
assert_true( (V[1][1] / V[2][1]) < 1 )
end
|
Player = game:GetService("Players").chrismash
Name = "Ball"
Gui = Instance.new("ScreenGui")
Gui.Name = "Ball"
TextLabel = Instance.new("TextLabel")
TextLabel.Size = UDim2.new(0, 100, 0, 20)
TextLabel.Position = UDim2.new(0, 500, 0, -20)
TextLabel.BackgroundTransparency = 0.4
TextLabel.BackgroundColor3 = Color3.new(150 / 255, 150 / 255, 150 / 255)
TextLabel.Text = "Mode: Character"
TextLabel.TextWrap = false
TextLabel.TextXAlignment = "Left"
TextLabel.TextYAlignment = "Center"
TextLabel.TextColor3 = Color3.new(75 / 255, 75 / 255, 75 / 255)
TextLabel.FontSize = "Size10"
TextLabel.BorderSizePixel = 0
TextLabel.Parent = Gui
IsBall = false
Moving = false
Jumping = false
Bombing = false
DetBombs = {}
function onSelected(mouse)
Gui.Parent = Player.PlayerGui
mouse.Button1Down:connect(function()
if IsBall == true then
Moving = true
TextLabel.Text = "Mode: Roll"
while Moving == true and IsBall == true do
if Ball:FindFirstChild("BodyForce") ~= nil then
local force = (CFrame.new(Ball.Position, mouse.Hit.p).lookVector * 2500)
Ball.BodyForce.force = Vector3.new(force.x, 0, force.z)
end
wait()
end
if Ball:FindFirstChild("BodyForce") ~= nil then Ball.BodyForce.force = Vector3.new(0, 0, 0) end
TextLabel.Text = "Mode: Ball"
end
end)
mouse.Button1Up:connect(function()
Moving = false
end)
mouse.Move:connect(function()
end)
mouse.Idle:connect(function()
end)
mouse.KeyDown:connect(function(key)
key = key:lower()
if key == "q" then
if IsBall == false then
TextLabel.Text = "Mode: Ball"
Ball = Instance.new("Part")
Ball.Name = "Ball"
Ball.FormFactor = "Custom"
Ball.Shape = "Ball"
Ball.Size = Vector3.new(3, 3, 3)
Ball.CFrame = Player.Character.Torso.CFrame
Ball.BrickColor = BrickColor.new("Bright orange")
Ball.TopSurface = "Smooth"
Ball.BottomSurface = "Smooth"
Ball.Elasticity = 1
Ball.Friction = 1
Ball.Parent = Player.Character
Ball.Velocity = Player.Character.Torso.Velocity
Ball.Touched:connect(function(hit)
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=10209859"
Sound.Volume = (math.abs(Ball.Velocity.x) + math.abs(Ball.Velocity.y) + math.abs(Ball.Velocity.z)) / 1000
Sound.Pitch = 2
Sound.Parent = Ball
Sound:Play()
if hit:IsDescendantOf(Player.Character) ~= true and hit.Anchored == false and math.abs(Ball.Velocity.x) + math.abs(Ball.Velocity.y) + math.abs(Ball.Velocity.z) >= 50 then
hit:BreakJoints()
end
end)
local Force = Instance.new("BodyForce")
Force.Parent = Ball
local Weld = Instance.new("Weld")
Weld.Part0 = Player.Character.Head
Weld.Part1 = Ball
Weld.Parent = Player.Character.Head
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=22917014"
Sound.Volume = 1
Sound.Looped = true
Sound.Parent = Ball
Sound:Play()
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
Mesh.Scale = Vector3.new(1.2, 1.2, 1.2)
Mesh.Parent = Ball
local C0 = {}
local C1 = {}
local Names = {}
for _, Motor in pairs(Player.Character.Torso:GetChildren()) do
if Motor.ClassName == "Motor6D" or Motor.ClassName == "Motor" then
table.insert(C0, Motor.C0)
table.insert(C1, Motor.C1)
table.insert(Names, Motor.Name)
Motor.C0 = CFrame.new()
Motor.C1 = CFrame.new()
end
end
Instance.new("ForceField", Player.Character)
Player.Character.Humanoid.Sit = true
local Jumping = false
IsBall = true
while IsBall == true do
Sound.Pitch = (math.abs(Ball.RotVelocity.x) + math.abs(Ball.RotVelocity.y) + math.abs(Ball.RotVelocity.z)) / 100
Sound.Volume = (math.abs(Ball.Velocity.x) + math.abs(Ball.Velocity.y) + math.abs(Ball.Velocity.z)) / 100
if Player.Character.Humanoid.Jump == true or Player.Character.Humanoid.Sit ~= true then
Player.Character.Humanoid.Sit = true
if Jumping == false then
Jumping = true
coroutine.resume(coroutine.create(function()
local Velocity = Instance.new("BodyVelocity", Ball)
Velocity.maxForce = Vector3.new(0, math.huge, 0)
Velocity.P = 1
Velocity.velocity = Vector3.new(0, 500, 0)
wait(0.1)
Velocity:Remove()
wait(1)
Jumping = false
end))
local Sound = Instance.new("Sound")
Sound.SoundId = "rbxasset://sounds\\swoosh.wav"
Sound.Volume = 1
Sound.Parent = Ball
Sound:Play()
end
end
wait()
end
for _, Motor in pairs(Player.Character.Torso:GetChildren()) do
for i = 1, #Names do
if Motor.Name == Names[i] then
Motor.C0 = C0[i]
Motor.C1 = C1[i]
end
end
end
if Player.Character:FindFirstChild("ForceField") ~= nil then
Player.Character.ForceField:Remove()
end
Player.Character.Humanoid.Sit = false
else
IsBall = false
if Ball:FindFirstChild("Sound") ~= nil then
Ball.Sound:Stop()
wait(0.1)
end
if Ball:FindFirstChild("ForceField") ~= nil then
Ball.ForceField:Remove()
end
if Ball:FindFirstChild("BodyForce") ~= nil then
Ball.BodyForce:Remove()
end
Ball:Remove()
Ball = nil
TextLabel.Text = "Mode: Character"
end
end
if key == "e" then
if IsBall == true and Ball ~= nil then
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=22920633"
Sound.Volume = (math.abs(Ball.Velocity.x) + math.abs(Ball.Velocity.y) + math.abs(Ball.Velocity.z)) / 100
Sound.Parent = Ball
Sound:Play()
local Velocity = Instance.new("BodyVelocity", Ball)
Velocity.maxForce = Vector3.new(math.huge, 0, math.huge)
Velocity.P = 10
Velocity.velocity = Vector3.new(0, 0, 0)
end
end
if key == "z" then
if IsBall == true and Ball ~= nil and Bombing == false then
Bombing = true
local Bomb = Instance.new("Part")
Bomb.Name = "Bomb"
Bomb.FormFactor = "Custom"
Bomb.Shape = "Ball"
Bomb.Size = Vector3.new(1, 1, 1)
Bomb.CFrame = Player.Character.Torso.CFrame
Bomb.BrickColor = BrickColor.new("Really black")
Bomb.TopSurface = "Smooth"
Bomb.BottomSurface = "Smooth"
Bomb.Elasticity = 0
Bomb.Friction = 0
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=15666462"
Sound.Volume = 0.1
Sound.Pitch = 2
Sound.Looped = true
Sound.Parent = Bomb
Sound:Play()
Player.Character.Humanoid.Jump = true
wait(0.2)
Bomb.Parent = Workspace
delay(1.5, function() Bombing = false end)
coroutine.resume(coroutine.create(function()
local Part = Instance.new("Part")
Part.Name = "Bomb Flash"
Part.FormFactor = "Custom"
Part.Size = Vector3.new(1, 1, 1)
Part.CanCollide = false
Part.CFrame = CFrame.new(Bomb.Position)
Part.BrickColor = BrickColor.new("Really red")
Part.TopSurface = "Smooth"
Part.BottomSurface = "Smooth"
Part.Parent = Bomb
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
Mesh.Parent = Part
local Weld = Instance.new("Weld")
Weld.Part0 = Bomb
Weld.Part1 = Part
Weld.Parent = Bomb
Bomb.ChildRemoved:connect(function()
if Bomb:FindFirstChild("Weld") == nil then
local Weld = Instance.new("Weld")
Weld.Part0 = Bomb
Weld.Part1 = Part
Weld.Parent = Bomb
end
end)
for i = 1, math.huge, 0.1 do
if Bomb == nil and Part.Parent == nil then break end
Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
Part.Transparency = math.sin(i)
Bomb.Sound.Pitch = Bomb.Sound.Pitch + 0.05
wait()
end
Part:Remove()
end))
wait(3)
if Bomb ~= nil then
Bomb.Sound:Stop()
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=2101148"
Sound.Volume = 1
Sound.Pitch = 1
Sound.Parent = Bomb
Sound:Play()
local e = Instance.new("Explosion")
e.Position = Bomb.Position
e.BlastPressure = 1000000
e.BlastRadius = 25
e.Parent = Workspace
coroutine.resume(coroutine.create(function()
local Part = Instance.new("Part")
Part.Name = "Explosion Ball"
Part.FormFactor = "Custom"
Part.Size = Vector3.new(1, 1, 1)
Part.Anchored = true
Part.CanCollide = false
Part.CFrame = CFrame.new(Bomb.Position)
Part.BrickColor = BrickColor.new("Institutional white")
Part.TopSurface = "Smooth"
Part.BottomSurface = "Smooth"
Part.Parent = Workspace
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
Mesh.Parent = Part
Bomb:Remove()
for i = 0, 1, 0.05 do
Mesh.Scale = Vector3.new(i, i, i) * 100
Part.Transparency = i
wait()
end
Part:Remove()
end))
end
end
end
if key == "x" then
if IsBall == true and Ball ~= nil and Bombing == false then
Bombing = true
local Bomb = Instance.new("Part")
Bomb.Name = "Bomb"
Bomb.FormFactor = "Custom"
Bomb.Shape = "Ball"
Bomb.Size = Vector3.new(1, 1, 1)
Bomb.CFrame = Player.Character.Torso.CFrame
Bomb.BrickColor = BrickColor.new("Really black")
Bomb.TopSurface = "Smooth"
Bomb.BottomSurface = "Smooth"
Bomb.Elasticity = 0
Bomb.Friction = 0
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=15666462"
Sound.Volume = 0.1
Sound.Pitch = 2
Sound.Looped = true
Sound.Parent = Bomb
Sound:Play()
Player.Character.Humanoid.Jump = true
wait(0.2)
Bomb.Parent = Workspace
table.insert(DetBombs, Bomb)
delay(3, function() Bombing = false end)
coroutine.resume(coroutine.create(function()
local Part = Instance.new("Part")
Part.Name = "Bomb Flash"
Part.FormFactor = "Custom"
Part.Size = Vector3.new(1, 1, 1)
Part.CanCollide = false
Part.CFrame = CFrame.new(Bomb.Position)
Part.BrickColor = BrickColor.new("Bright yellow")
Part.TopSurface = "Smooth"
Part.BottomSurface = "Smooth"
Part.Parent = Bomb
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
Mesh.Parent = Part
local Weld = Instance.new("Weld")
Weld.Part0 = Bomb
Weld.Part1 = Part
Weld.Parent = Bomb
Bomb.ChildRemoved:connect(function()
if Bomb:FindFirstChild("Weld") == nil then
local Weld = Instance.new("Weld")
Weld.Part0 = Bomb
Weld.Part1 = Part
Weld.Parent = Bomb
end
end)
for i = 1, math.huge, 0.1 do
if Bomb == nil and Part.Parent == nil then break end
Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
Part.Transparency = math.sin(i)
wait()
end
Part:Remove()
end))
end
end
if key == "c" then
if IsBall == true and Ball ~= nil and Bombing == false and #DetBombs > 0 then
Bombing = true
for i = 1, #DetBombs do
if DetBombs[i].Parent ~= nil then
coroutine.resume(coroutine.create(function(Bomb)
for x = 2, 5, 0.1 do
Bomb.Sound.Pitch = x
wait()
end
Bomb.Sound:Stop()
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=2101148"
Sound.Volume = 1
Sound.Pitch = 1
Sound.Parent = Bomb
Sound:Play()
local e = Instance.new("Explosion")
e.Position = Bomb.Position
e.BlastPressure = 1000000
e.BlastRadius = 25
e.Parent = Workspace
coroutine.resume(coroutine.create(function()
local Part = Instance.new("Part")
Part.Name = "Explosion Ball"
Part.FormFactor = "Custom"
Part.Size = Vector3.new(1, 1, 1)
Part.Anchored = true
Part.CanCollide = false
Part.CFrame = CFrame.new(Bomb.Position)
Part.BrickColor = BrickColor.new("Institutional white")
Part.TopSurface = "Smooth"
Part.BottomSurface = "Smooth"
Part.Parent = Workspace
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
Mesh.Parent = Part
Bomb:Remove()
for x = 0, 1, 0.05 do
Mesh.Scale = Vector3.new(x, x, x) * 100
Part.Transparency = x
wait()
end
Part:Remove()
end))
end), DetBombs[i])
end
wait(math.random(10, 50) / 100)
end
DetBombs = {}
Bombing = false
end
end
if key == "v" then
if IsBall == true and Ball ~= nil and Bombing == false then
Bombing = true
local Bomb = Instance.new("Part")
Bomb.Name = "Bomb"
Bomb.FormFactor = "Custom"
Bomb.Shape = "Ball"
Bomb.Size = Vector3.new(1, 1, 1)
Bomb.CFrame = Player.Character.Torso.CFrame
Bomb.Anchored = true
Bomb.CanCollide = false
Bomb.BrickColor = BrickColor.new("Really black")
Bomb.Transparency = 0.95
Bomb.TopSurface = "Smooth"
Bomb.BottomSurface = "Smooth"
Bomb.Elasticity = 0
Bomb.Friction = 0
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=15666462"
Sound.Volume = 0.05
Sound.Pitch = 0.5
Sound.Looped = true
Sound.Parent = Bomb
Sound:Play()
Player.Character.Humanoid.Jump = true
wait(0.2)
Bomb.Parent = Workspace
delay(1.5, function() Bombing = false end)
coroutine.resume(coroutine.create(function()
local Part = Instance.new("Part")
Part.Name = "Bomb Flash"
Part.FormFactor = "Custom"
Part.Size = Vector3.new(1, 1, 1)
Part.CanCollide = false
Part.CFrame = CFrame.new(Bomb.Position)
Part.BrickColor = BrickColor.new("Really blue")
Part.Transparency = 0.95
Part.TopSurface = "Smooth"
Part.BottomSurface = "Smooth"
Part.Parent = Bomb
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
Mesh.Parent = Part
local Weld = Instance.new("Weld")
Weld.Part0 = Bomb
Weld.Part1 = Part
Weld.Parent = Bomb
Bomb.ChildRemoved:connect(function()
if Bomb:FindFirstChild("Weld") == nil then
local Weld = Instance.new("Weld")
Weld.Part0 = Bomb
Weld.Part1 = Part
Weld.Parent = Bomb
end
end)
for i = 1, math.huge, 0.1 do
if Bomb == nil and Part.Parent == nil then break end
Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
wait()
end
Part:Remove()
end))
local Continue = false
while Continue == false do
for _, Players in pairs(game:GetService("Players"):GetChildren()) do
if Players.Character ~= nil and Players ~= Player then
if Players.Character:FindFirstChild("Torso") ~= nil then
if (Players.Character.Torso.Position - Bomb.Position).magnitude <= 10 then
Continue = true
end
end
end
end
wait()
end
if Bomb ~= nil then
Bomb.Sound:Stop()
local Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/Asset/?id=2101148"
Sound.Volume = 1
Sound.Pitch = 1
Sound.Parent = Bomb
Sound:Play()
local e = Instance.new("Explosion")
e.Position = Bomb.Position
e.BlastPressure = 1000000
e.BlastRadius = 25
e.Parent = Workspace
coroutine.resume(coroutine.create(function()
local Part = Instance.new("Part")
Part.Name = "Explosion Ball"
Part.FormFactor = "Custom"
Part.Size = Vector3.new(1, 1, 1)
Part.Anchored = true
Part.CanCollide = false
Part.CFrame = CFrame.new(Bomb.Position)
Part.BrickColor = BrickColor.new("Institutional white")
Part.TopSurface = "Smooth"
Part.BottomSurface = "Smooth"
Part.Parent = Workspace
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"
Mesh.Parent = Part
Bomb:Remove()
for i = 0, 1, 0.05 do
Mesh.Scale = Vector3.new(i, i, i) * 100
Part.Transparency = i
wait()
end
Part:Remove()
end))
end
end
end
if key == "b" then
if IsBall == true and Ball ~= nil then
local Rope = Instance.new("Part")
Rope.Name = "Rope"
Rope.BrickColor = BrickColor.new("Reddish brown")
Rope.TopSurface = 0
Rope.BottomSurface = 0
Rope.FormFactor = 0
Rope.Size = Vector3.new(1, 1, 1)
Rope.Transparency = 0
Rope.Anchored = false
Rope.CanCollide = false
Rope.CFrame = CFrame.new((Ball.Position + mouse.Hit.p) / 2, mouse.Hit.p)
Rope.Parent = Workspace
local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Brick"
Mesh.Scale = Vector3.new(0.25, 0.25, (Ball.Position - mouse.Hit.p).magnitude)
Mesh.Parent = Rope
local Joint = Instance.new("Glue")
Joint.Part0 = Ball
Joint.Part1 = Rope
Joint.C0 = CFrame.new(0, 0, -(Ball.Position - mouse.Hit.p).magnitude)
--Joint.C1 = CFrame.new(0, 0, (Ball.Position - mouse.Hit.p).magnitude / 2)
Joint.Parent = Ball
--Rope.Anchored = true
--Ball.Anchored = true
--p = Instance.new("Part", Workspace)
--p.CFrame = CFrame.new(Ball.Position) + Joint.C0.p
--p = Instance.new("Part", Workspace)
--p.CFrame = CFrame.new(Ball.Position) + Joint.C1.p
end
end
end)
mouse.KeyUp:connect(function(key)
key = key:lower()
if key == "e" then
if IsBall == true and Ball ~= nil then
for _, part in pairs(Ball:GetChildren()) do
if part.ClassName == "BodyVelocity" then
part:Remove()
end
end
end
end
end)
end
function onDeselected()
Gui.Parent = nil
end
if script.Parent.ClassName ~= "HopperBin" then
if Player == nil then print("Error: Player not found!") return end
Tool = Instance.new("HopperBin")
Tool.Name = Name
Tool.Parent = Player.Backpack
script.Name = "Main"
script.Parent = Tool
elseif script.Parent.ClassName == "HopperBin" then
while script.Parent.Parent.ClassName ~= "Backpack" do
wait()
end
Player = script.Parent.Parent.Parent
Tool = script.Parent
script.Parent.Selected:connect(onSelected)
script.Parent.Deselected:connect(onDeselected)
end
|
-- Copyright (c) 2021 Kirazy
-- Part of Artisanal Reskins: Bob's Mods
--
-- See LICENSE in the project directory for license information.
-- Check to see if reskinning needs to be done.
if not (reskins.bobs and reskins.bobs.triggers.ores.items) then return end
-- Setup inputs
local inputs = {
mod = "bobs",
group = "ores",
make_icon_pictures = false,
flat_icon = true,
}
-- Setup input defaults
reskins.lib.parse_inputs(inputs)
local intermediates = {}
-- Items and recipes shared with other mods within Bob's suite
if not mods["bobplates"] then
-- Intermediates
intermediates["lithia-water"] = {type = "fluid", group = "plates", subgroup = "fluids", defer_to_data_updates = true} -- Angels
end
reskins.lib.create_icons_from_list(intermediates, inputs)
|
awful.rules.rules = {
-- All clients will match this rule.
{
rule = { },
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
keys = config.keys.client,
buttons = config.buttons.client,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
},
{
rule = { class = "URxvt" },
properties = { tag = "term" }
},
{
rule_any = { class = { "Chromium", "Firefox" } },
properties = { tag = "web" }
},
{
rule_any = { role = { "pop-up" } },
properties = { tag = "web", floating = true }
},
{
rule = { class = "Vlc" },
properties = { tag = "media" }
}
}
|
local cmotan = require "cmotan"
local _M = {
_VERSION = "0.1.0"
}
local _serialize = function(params)
if #params == 0 and params[0] ~= nil then
return nil, nil
end
local stat, result = pcall(cmotan.simple_serialize, params)
if not stat then
return nil, result
end
return result, nil
end
function _M.serialize(params)
return _serialize({params})
end
function _M.serialize_multi(params)
return _serialize(params)
end
function _M.deserialize(data)
local stat, result = pcall(cmotan.simple_deserialize, data)
if not stat then
return nil, result
end
if result == nil or #result == 0 then
return nil, nil
end
return result[1], nil -- index from 1
end
function _M.deserialize_multi(data, args_num)
local stat, result = pcall(cmotan.simple_deserialize, data)
if not stat then
return nil, result
end
return result, nil
end
return _M
|
-- Minetest 0.4.7 mod: technic
-- namespace: technic
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
technic = technic or {}
technic.tube_inject_item = pipeworks.tube_inject_item or function (pos, start_pos, velocity, item)
local tubed = pipeworks.tube_item(vector.new(pos), item)
tubed:get_luaentity().start_pos = vector.new(start_pos)
tubed:setvelocity(velocity)
tubed:setacceleration(vector.new(0, 0, 0))
end
local load_start = os.clock()
local modpath = minetest.get_modpath("technic")
technic.modpath = modpath
local intllib = nil
-- Boilerplate to support intllib
if intllib then
technic.getter = intllib.Getter()
else
technic.getter = function(s) return s end
end
local S = technic.getter
-- Read configuration file
dofile(modpath.."/config.lua")
-- Helper functions
dofile(modpath.."/helpers.lua")
-- Items
dofile(modpath.."/items.lua")
-- Craft recipes for items
dofile(modpath.."/crafts.lua")
-- Register functions
dofile(modpath.."/register.lua")
-- Machines
dofile(modpath.."/machines/init.lua")
-- Tools
dofile(modpath.."/tools/init.lua")
-- Aliases for legacy node/item names
dofile(modpath.."/legacy.lua")
if minetest.setting_getbool("log_mods") then
print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start))
end
|
---
-- A collection of objects that are passed in the menu populate hooks.
-- @author Mineotopia
-- @module menuDataHandler
menuDataHandler = {}
local HELP_MENU_DATA = {}
local HELP_MENU_DATA_OBJECT = {}
local HELP_SUB_MENU_DATA = {}
local HELP_SUB_MENU_DATA_OBJECT = {}
---
-- Registers and returns a new help menu data object
-- @return HELP_MENU_DATA A new instance of help menu data
-- @realm client
-- @internal
function menuDataHandler.CreateNewHelpMenu()
return table.Copy(HELP_MENU_DATA)
end
---
-- Registers and returns a new help sub menu data object
-- @return HELP_MENU_DATA A new instance of help sub menu data
-- @realm client
-- @internal
function menuDataHandler.CreateNewHelpSubMenu()
return table.Copy(HELP_SUB_MENU_DATA)
end
---
-- @class HELP_MENU_DATA
---
-- Binds data table to the @{HELP_MENU_DATA} object
-- @param table data The data table with all submenues
-- @return HELP_MENU_DATA The object to be used in the hook to populate the menu
-- @internal
-- @realm client
function HELP_MENU_DATA:BindData(menuTbl)
self.menuTbl = menuTbl or {}
end
---
-- Creates a new submenu in the main menu
-- @param string id The unique ID of the submenu
-- @return table A reference to the new table
-- @realm client
function HELP_MENU_DATA:RegisterSubMenu(id)
if self:Exists(id) then return end
local pos = #self.menuTbl + 1
self.menuTbl[pos] = table.Copy(HELP_MENU_DATA_OBJECT)
self.menuTbl[pos].id = id
return self.menuTbl[pos]
end
---
-- Checks if a menu with the given ID is already registered
-- @param string id The unique menu identifier
-- @return boolean Return true if the identifier is already used
-- @realm client
function HELP_MENU_DATA:Exists(id)
for i = 1, #self.menuTbl do
if self.menuTbl[i].id == id then
return true
end
end
return false
end
---
-- Returns a list of all registered menues that are not admin only and
-- whose should show function does not return false
-- @return table A table of all menues
-- @internal
-- @realm client
function HELP_MENU_DATA:GetVisibleNormalMenues()
local menuTbl = {}
for i = 1, #self.menuTbl do
local menu = self.menuTbl[i]
-- do not show if it is admin only
if menu.adminOnly then continue end
-- do not show if the shouldShow function returns false
if isfunction(menu.shouldShowFn) and menu.shouldShowFn() == false then continue end
menuTbl[#menuTbl + 1] = menu
end
return menuTbl
end
---
-- Returns a list of all registered menues that are admin only as
-- long as the local player is an admin himself and whose should show
-- function does not return false
-- @return table A table of all menues
-- @internal
-- @realm client
function HELP_MENU_DATA:GetVisibleAdminMenues()
local client = LocalPlayer()
local menuTbl = {}
for i = 1, #self.menuTbl do
local menu = self.menuTbl[i]
-- do not show if it is no admin menu
if not menu.adminOnly then continue end
-- do not show if the player is no admin
if not client:IsAdmin() then continue end
-- do not show if the shouldShow function returns false
if isfunction(menu.shouldShowFn) and menu.shouldShowFn() == false then continue end
menuTbl[#menuTbl + 1] = menu
end
return menuTbl
end
---
-- @class HELP_MENU_DATA_OBJECT
---
-- Sets the title of a menu element
-- @param string title The name, can be a language identifier
-- @realm client
function HELP_MENU_DATA_OBJECT:SetTitle(title)
self.title = title
end
---
-- Sets the description of a menu element
-- @param string description The description, can be a language identifier
-- @realm client
function HELP_MENU_DATA_OBJECT:SetDescription(description)
self.description = description
end
---
-- Sets the icon material of a menu element
-- @param Material iconMat The material of the icon
-- @realm client
function HELP_MENU_DATA_OBJECT:SetIcon(iconMat)
self.iconMat = iconMat
end
---
-- Sets the admin only state of a menu element
-- @param [default=true] boolean adminOnly Set true to show this menu only to admins
-- @realm client
function HELP_MENU_DATA_OBJECT:AdminOnly(adminOnly)
self.adminOnly = adminOnly == nil and true or adminOnly
end
---
-- Sets a callback function that is called to check
-- if a menu should be shown
-- @param function fn The callback function
-- @realm client
function HELP_MENU_DATA_OBJECT:RegisterShouldShowCallback(fn)
self.shouldShowFn = fn
end
---
-- Sets a callback function that is called when the menu button
-- is clicked
-- @param function fn The callback function
-- @realm client
function HELP_MENU_DATA_OBJECT:RegisterOnClickCallback(fn)
self.onClickFn = fn
end
---
-- @class HELP_SUB_MENU_DATA
---
-- Binds data table to the @{HELP_SUB_MENU_DATA} object
-- @param table data The data table with all navigation points
-- @return @{HELP_SUB_MENU_DATA} The object to be used in the hook
-- @internal
-- @realm client
function HELP_SUB_MENU_DATA:BindData(menuTbl)
self.menuTbl = menuTbl or {}
end
---
-- Populates a given submenu with navigation points
-- @param string id The unique ID of the navigation point
-- @return table A reference to the new table
-- @realm client
function HELP_SUB_MENU_DATA:PopulateSubMenu(id)
if self:Exists(id) then return end
local pos = #self.menuTbl + 1
self.menuTbl[pos] = table.Copy(HELP_SUB_MENU_DATA_OBJECT)
self.menuTbl[pos].id = id
return self.menuTbl[pos]
end
---
-- Checks if a submenu with the given ID is already registered
-- @param string id The unique submenu identifier
-- @return boolean Return true if the identifier is already used
-- @realm client
function HELP_SUB_MENU_DATA:Exists(id)
for i = 1, #self.menuTbl do
if self.menuTbl[i].id == id then
return true
end
end
return false
end
---
-- @class HELP_SUB_MENU_DATA_OBJECT
---
-- Sets the title of a submenu element
-- @param string title The name, can be a language identifier
-- @realm client
function HELP_SUB_MENU_DATA_OBJECT:SetTitle(title)
self.title = title
end
---
-- Sets the admin only state of a submenu element
-- @param [default=true] boolean adminOnly Set true to show this menu only to admins
-- @realm client
function HELP_SUB_MENU_DATA_OBJECT:AdminOnly(adminOnly)
self.adminOnly = adminOnly == nil and true or adminOnly
end
---
-- Callback function that is used to call code to populate
-- the main panel of a submenu
-- @param function fn The callback function
-- @realm client
function HELP_SUB_MENU_DATA_OBJECT:PopulatePanel(fn)
self.populateFn = fn
end
---
-- Callback function that is used to call code to populate
-- the button panel of a submenu
-- @note The mentioned panel is only created if this callback function is set
-- @param function fn The callback function
-- @realm client
function HELP_SUB_MENU_DATA_OBJECT:PopulateButtonPanel(fn)
self.populateButtonFn = fn
end
---
-- Sets a callback function that is called to check
-- if a submenu should be shown
-- @param function fn The callback function
-- @realm client
function HELP_SUB_MENU_DATA_OBJECT:RegisterShouldShowCallback(fn)
self.shouldShowFn = fn
end
---
-- Sets a callback function that is called when the submenu button
-- is clicked
-- @param function fn The callback function
-- @realm client
function HELP_SUB_MENU_DATA_OBJECT:RegisterOnClickCallback(fn)
self.onClickFn = fn
end
|
local ok,e = pcall(dofile,"config.lua")
if not ok then
-- handle error; e has the error message
print ("ERROR loading config " .. e)
end
function wifi_start()
wifi.setmode(wifi.STATION)
wifi.sta.config(station_cfg)
wifi.sta.connect()
print("Connecting to " .. station_cfg.ssid .. " ...")
--config.SSID = nil -- can save memory
tmr.alarm(1, 2500, 1, wifi_wait_ip)
end
function wifi_wait_ip()
if wifi.sta.getip()== nil then
print("IP unavailable, Waiting...")
else
tmr.stop(1)
print("\n====================================")
print("ESP8266 mode is: " .. wifi.getmode())
print("MAC address is: " .. wifi.ap.getmac())
print("IP is "..wifi.sta.getip())
print("====================================")
mqtt_start()
end
end
function mqtt_start()
-- init mqtt client with logins, keepalive timer 120sec
m = mqtt.Client(mqtt_config.clientid, 120, mqtt_config.user, mqtt_config.pwd)
-- register message callback beforehand
-- Calling subscribe/publish only makes sense once the connection
-- was successfully established. You can do that either here in the
-- 'connect' callback or you need to otherwise make sure the
-- connection was established (e.g. tracking connection status or in
-- m:on("connect", function)).
m:on("connect", handle_connect)
m:on("offline", handle_offline)
m:on("message", handle_message)
-- Connect to broker
m:connect(mqtt_config.host, mqtt_config.port, 0, nil,
function(client, reason)
print("failed reason: " .. reason)
end)
end
function handle_connect(client)
print("Connected to broker")
-- subscribe topic with qos = 0
client:subscribe(mqtt_config.endpoint .. "action",0,function(client) print("Successfully subscribed to topic") end)
client:subscribe(mqtt_config.endpoint .. "state",0,function(client) print("Successfully subscribed to topic") end)
end
local function publish_state(client)
if gpio.read(blue_led) == 0 then
client:publish(mqtt_config.endpoint .. "state","pin_state = ON",0,0,function(client) print("state sent") end )
else
client:publish(mqtt_config.endpoint .. "state","pin_state = OFF",0,0,function(client) print("state sent") end )
end
end
function handle_offline(client)
print ("offline")
end
function handle_message(client, topic, data)
if data ~= nil then
print(topic .. ": " .. data)
if topic == mqtt_config.endpoint .. "action" then
set_pin_state(data)
publish_state(client)
end
end
end
function set_pin_state(state)
if state == "ON" then
gpio.write(blue_led, gpio.LOW)
else
if state == "OFF" then
gpio.write(blue_led, gpio.HIGH)
else
print("Unrecognize state value=" .. state)
end
end
end
function main()
gpio.mode(blue_led, gpio.OUTPUT) -- Initialise the pin
gpio.write(blue_led, gpio.LOW)
wifi_start()
end
--MAIN
main()
|
giant_decay_mite_sentry = Creature:new {
objectName = "@mob/creature_names:giant_decay_mite_sentry",
socialGroup = "mite",
faction = "",
level = 18,
chanceHit = 0.31,
damageMin = 160,
damageMax = 170,
baseXp = 1257,
baseHAM = 3200,
baseHAMmax = 3200,
armor = 0,
resists = {120,120,-1,5,5,-1,-1,-1,-1},
meatType = "meat_insect",
meatAmount = 15,
hideType = "hide_scaley",
hideAmount = 14,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0.25,
ferocity = 0,
pvpBitmask = AGGRESSIVE + ATTACKABLE + ENEMY,
creatureBitmask = PACK,
optionsBitmask = AIENABLED,
diet = CARNIVORE,
templates = {"object/mobile/decay_mite.iff"},
scale = 1.8,
lootGroups = {},
weapons = {"creature_spit_small_yellow"},
conversationTemplate = "",
attacks = {
{"knockdownattack",""},
{"mediumdisease",""}
}
}
CreatureTemplates:addCreatureTemplate(giant_decay_mite_sentry, "giant_decay_mite_sentry")
|
AddEvent("OnKeyPress", function(key)
if key == "E" then
local x, y, z = GetPlayerLocation()
-- Object interaction
local objects = GetStreamedObjects()
for key, object in pairs(objects) do
local action = GetObjectPropertyValue(object, "action")
if action ~= nil then
local px,py,pz = GetObjectLocation(object)
if GetDistance3D(x, y, z, px, py, pz) <= 250 then
CallRemoteEvent("RPNotify:ObjectInteract_" .. action, object)
end
end
end
-- NPC Interaction
for key,npc in pairs(GetStreamedNPC()) do
local action = GetNPCPropertyValue(npc, "action")
if action ~= nil then
local px,py,pz = GetNPCLocation(npc)
if GetDistance3D(x, y, z, px, py, pz) <= 250 then
CallRemoteEvent("RPNotify:ObjectInteract_" .. action, object)
end
end
end
end
end)
|
-- devent_activate()
-- Handles activating all dynamic events during on_load
function devent_activate()
if not global.dynamic_events then
return
end
for k, v in pairs(global.dynamic_events) do
if v.enabled == true then
if k == "gui_selected_tab_changed" then
script.on_event(v.def, tnp_handle_gui_tab)
elseif k == "gui_switch_state_changed" then
script.on_event(v.def, tnp_handle_gui_switch)
elseif k == "player_cursor_stack_changed" then
script.on_event(v.def, tnp_handle_player_cursor_stack_changed)
end
end
end
end
-- devent_disable(name)
-- Disables a given event
function devent_disable(name)
if global.dynamic_events[name] and global.dynamic_events[name].enabled == true then
global.dynamic_events[name].enabled = false
script.on_event(global.dynamic_events[name].def, nil)
end
end
-- devent_enable(name)
-- Enables a given event
function devent_enable(name)
if global.dynamic_events[name] and global.dynamic_events[name].enabled == false then
global.dynamic_events[name].enabled = true
if name == "gui_selected_tab_changed" then
script.on_event(global.dynamic_events[name].def, tnp_handle_gui_tab)
elseif name == "gui_switch_state_changed" then
script.on_event(global.dynamic_events[name].def, tnp_handle_gui_switch)
elseif name == "player_cursor_stack_changed" then
script.on_event(global.dynamic_events[name].def, tnp_handle_player_cursor_stack_changed)
end
end
end
-- devent_populate()
-- Populates the dynamic event handling table during first load or upgrades
function devent_populate()
local devents = {
gui_switch_state_changed = defines.events.on_gui_switch_state_changed,
gui_selected_tab_changed = defines.events.on_gui_selected_tab_changed,
player_cursor_stack_changed = defines.events.on_player_cursor_stack_changed
}
if not global.dynamic_events then
global.dynamic_events = {}
end
for k, v in pairs(devents) do
if not global.dynamic_events[k] then
global.dynamic_events[k] = {
def = v,
enabled = false
}
else
global.dynamic_events[k].def = v
end
end
end
|
local StateMachine = require "scripts/common/StateMachine"
local utilities = require "scripts/common/utilities"
local AnimParamUpdateFlags = require "scripts/Jack/AnimParamUpdateFlags"
local util =
{
LerpAimingAnim = function(weaponcontroller, timeLeft, targetValue, deltaTime)
local targetDiff = targetValue - weaponcontroller.shootingParamValue;
if(deltaTime >= timeLeft) then
deltaTime = timeLeft;
end
local timeFrac = deltaTime / timeLeft;
weaponcontroller.shootingParamValue = weaponcontroller.shootingParamValue + (timeFrac * targetDiff);
return timeLeft - deltaTime;
end
}
local weaponcontroller =
{
Properties =
{
UIMessages =
{
SetWeaponStatusMessage = { default = "SetWeaponStatusEvent", description = "set the visible crosshair type" },
},
Events =
{
ControlsEnabled = { default = "EnableControlsEvent", description = "If passed '1.0' it will enable controls, oherwise it will disable them." },
},
-- The weapons to be used.
Weapons =
{
GenericEvents =
{
Fire = "EventFire";
Reload = "EventReload";
UseWeaponForwardForAiming = "EventUseWeaponForwardForAiming";
OwnerDied = "HealthEmpty";
},
-- The bone that the weapons will attach to.
-- This may need to become weapon-specific if we end up having weird weapons (e.g. shoulder-mounted).
AimDelay = { default = 2.5, description = "Time that the player should keep aiming after firing" },
BeginAimingLerpTime = {default = 0.1, description = "Time that the character takes to start aiming at target after pressing fire" },
EndAimingLerpTime = {default = 0.3, description = "Time that the character takes to holster the waapon after AimDelay elapses" },
MaxUpAimAngle = {default = 55, description = "Maximum angle that the character can aim upwards in degrees."},
MaxDownAimAngle = {default = 35, description = "Maximum angle that the character can aim downwards in degrees."},
MaxHorizontalAimAngle = {default = 155, description = "Maximum angle in degrees that the player can aim behind them relative to the forward direction."},
},
InitialState = "Down",
DebugStateMachine = false,
},
States =
{
-- Weapon is down
Down =
{
OnEnter = function(self, sm)
sm.UserData.shootingParamValue = 0.0;
sm.UserData.animParamUpdateFlags:reset();
sm.UserData.isAiming = false;
end,
OnExit = function(self, sm)
sm.UserData.isAiming = true;
end,
OnUpdate = function(self, sm, deltaTime)
end,
Transitions =
{
Rising =
{
Evaluate = function(state, sm)
return sm.UserData.WantsToShoot;
end
},
Dead =
{
Evaluate = function(state, sm)
return sm.UserData.IsOwnerDead;
end
}
},
},
-- Weapon is coming up after fire was pressed
Rising =
{
OnEnter = function(self, sm)
self.aimTimer = sm.UserData.Properties.Weapons.AimDelay;
self.aimLerpTime = sm.UserData.Properties.Weapons.BeginAimingLerpTime;
sm.UserData.animParamUpdateFlags:reset();
GameplayNotificationBus.Event.OnEventBegin(GameplayNotificationId(sm.UserData.entityId, "OnStartAiming", "float"), 0);
self.aimLerpTarget = 1.0;
self.aimTimer = 0.0;
end,
OnExit = function(self, sm)
end,
OnUpdate = function(self, sm, deltaTime)
if(self.aimLerpTime > 0) then
self.aimLerpTime = util.LerpAimingAnim(sm.UserData, self.aimLerpTime, self.aimLerpTarget, deltaTime, nil);
end
end,
Transitions =
{
RisingInBuffer =
{
Evaluate = function(state, sm)
return state.aimLerpTime == 0;
end
},
Dead =
{
Evaluate = function(state, sm)
return sm.UserData.IsOwnerDead;
end
},
Down =
{
Priority = 1,
Evaluate = function(state, sm)
return sm.UserData.canFire == false;
end
}
},
},
-- Small buffer after raising gun
RisingInBuffer =
{
OnEnter = function(self, sm)
self.bufferTimeLeft = 0.1;
sm.UserData.animParamUpdateFlags:reset();
end,
OnExit = function(self, sm)
sm.UserData:TellWeaponToFire();
end,
OnUpdate = function(self, sm, deltaTime)
self.bufferTimeLeft = self.bufferTimeLeft - deltaTime;
end,
Transitions =
{
UpFireRequested =
{
Evaluate = function(state, sm)
return state.bufferTimeLeft <= 0 and sm.UserData.WantsToShoot == true;
end
},
UpFireNotRequested =
{
Evaluate = function(state, sm)
return state.bufferTimeLeft <= 0 and sm.UserData.WantsToShoot == false;
end
},
Dead =
{
Priority = 2,
Evaluate = function(state, sm)
return sm.UserData.IsOwnerDead;
end
},
Down =
{
Priority = 1,
Evaluate = function(state, sm)
return sm.UserData.canFire == false;
end
}
},
},
-- Weapon up and ready to fire
UpFireRequested =
{
OnEnter = function(self, sm)
sm.UserData.animParamUpdateFlags:reset();
end,
OnExit = function(self, sm)
end,
OnUpdate = function(self, sm, deltaTime)
sm.UserData:TellWeaponToFire();
end,
Transitions =
{
UpFireNotRequested =
{
Evaluate = function(state, sm)
return sm.UserData.WantsToShoot == false;
end
},
Dead =
{
Priority = 2,
Evaluate = function(state, sm)
return sm.UserData.IsOwnerDead;
end
},
Down =
{
Priority = 1,
Evaluate = function(state, sm)
return sm.UserData.canFire == false;
end
}
},
},
-- Weapon up and ready to fire
UpFireNotRequested =
{
OnEnter = function(self, sm)
self.aimTimeLeft = sm.UserData.Properties.Weapons.AimDelay;
sm.UserData.animParamUpdateFlags:reset();
end,
OnExit = function(self, sm)
end,
OnUpdate = function(self, sm, deltaTime)
self.aimTimeLeft = self.aimTimeLeft - deltaTime;
end,
Transitions =
{
UpFireRequested =
{
Evaluate = function(state, sm)
return sm.UserData.WantsToShoot == true;
end
},
Lowering =
{
Evaluate = function(state, sm)
return state.aimTimeLeft <= 0;
end
},
Dead =
{
Priority = 2,
Evaluate = function(state, sm)
return sm.UserData.IsOwnerDead;
end
},
Down =
{
Priority = 1,
Evaluate = function(state, sm)
return sm.UserData.canFire == false;
end
}
},
},
-- Weapon is lowering
Lowering =
{
OnEnter = function(self, sm)
self.aimLerpTime = sm.UserData.Properties.Weapons.EndAimingLerpTime;
self.aimLerpTarget = 0;
self.aimLerpComplete = nil;
sm.UserData.isAiming = false;
sm.UserData.animParamUpdateFlags:reset();
end,
OnExit = function(self, sm)
end,
OnUpdate = function(self, sm, deltaTime)
if(self.aimLerpTime > 0) then
self.aimLerpTime = util.LerpAimingAnim(sm.UserData, self.aimLerpTime, self.aimLerpTarget, deltaTime, self.aimLerpComplete);
end
end,
Transitions =
{
Down =
{
Priority = 1,
Evaluate = function(state, sm)
return state.aimLerpTime == 0 or sm.UserData.canFire == false;
end
},
Dead =
{
Priority = 2,
Evaluate = function(state, sm)
return sm.UserData.IsOwnerDead;
end
}
},
},
Dead =
{
OnAnimationEvent = function(self, evName, startTime)
if(evName == "SwitchRagdoll") then
self.switchRagdoll = true;
end
end,
OnEnter = function(self, sm)
self.switchRagdoll = false;
sm.UserData.animParamUpdateFlags:reset();
sm.UserData.WantsToShoot = false;
self.weaponTransform = TransformBus.Event.GetWorldTM(sm.UserData.weapon);
-- Stop aiming
self.aimLerpTime = sm.UserData.Properties.Weapons.EndAimingLerpTime;
self.aimLerpTarget = 0;
self.aimLerpComplete = nil;
sm.UserData.isAiming = false;
end,
OnUpdate = function(self, sm, deltaTime)
if(self.switchRagdoll == true) then
self.switchRagdoll = false;
AttachmentComponentRequestBus.Event.Detach(sm.UserData.weapon);
local currentWeaponTransform = TransformBus.Event.GetWorldTM(sm.UserData.weapon);
local prevRotation = Quaternion.CreateFromTransform(self.weaponTransform);
local currRotation = Quaternion.CreateFromTransform(currentWeaponTransform);
local prevPosition = self.weaponTransform:GetTranslation();
local currPosition = currentWeaponTransform:GetTranslation();
local offset = currPosition - prevPosition;
local velocity = offset / deltaTime;
PhysicsComponentRequestBus.Event.EnablePhysics(sm.UserData.weapon);
PhysicsComponentRequestBus.Event.SetVelocity(sm.UserData.weapon, velocity);
end
if(self.aimLerpTime > 0) then
self.aimLerpTime = util.LerpAimingAnim(sm.UserData, self.aimLerpTime, self.aimLerpTarget, deltaTime, self.aimLerpComplete);
end
self.weaponTransform = TransformBus.Event.GetWorldTM(sm.UserData.weapon);
end,
Transitions =
{
},
},
},
MaxAimRange = 1000.0, -- Range to do ray cast when detecting aim location
}
--------------------------------------------------
-- Component behavior
--------------------------------------------------
function weaponcontroller:OnActivate()
self.animParamUpdateFlags = AnimParamUpdateFlags:create();
AudioTriggerComponentRequestBus.Event.Play(self.entityId);
-- Enable and disable events
self.enableEventId = GameplayNotificationId(self.entityId, "Enable", "float");
self.enableHandler = GameplayNotificationBus.Connect(self, self.enableEventId);
self.disableEventId = GameplayNotificationId(self.entityId, "Disable", "float");
self.disableHandler = GameplayNotificationBus.Connect(self, self.disableEventId);
self.enableFiringEventId = GameplayNotificationId(self.entityId, "EnableFiring", "float");
self.enableFiringHandler = GameplayNotificationBus.Connect(self, self.enableFiringEventId);
self.disableFiringEventId = GameplayNotificationId(self.entityId, "DisableFiring", "float");
self.disableFiringHandler = GameplayNotificationBus.Connect(self, self.disableFiringEventId);
self.canFire = true;
self.startedShootingWhenDisabled = false;
-- Input listeners (weapon).
self.weaponFirePressedEventId = GameplayNotificationId(self.entityId, "WeaponFirePressed", "float");
self.weaponFirePressedHandler = GameplayNotificationBus.Connect(self, self.weaponFirePressedEventId);
self.weaponFireReleasedEventId = GameplayNotificationId(self.entityId, "WeaponFireReleased", "float");
self.weaponFireReleasedHandler = GameplayNotificationBus.Connect(self, self.weaponFireReleasedEventId);
self.ownerDiedEventId = GameplayNotificationId(self.entityId, self.Properties.Weapons.GenericEvents.OwnerDied, "float");
self.ownerDiedHandler = GameplayNotificationBus.Connect(self, self.ownerDiedEventId);
-- Tick needed to detect aim timeout
self.tickBusHandler = TickBus.Connect(self);
self.performedFirstUpdate = false;
self.setupComplete = false;
self.WantsToShoot = false;
self.IsTargetingEnemy = false;
self.isAiming = false;
self.IsOwnerDead = false;
self.EnergyRegenTimer = 0;
self.minHorizontalAimDot = Math.Cos(Math.DegToRad(self.Properties.Weapons.MaxHorizontalAimAngle));
self.maxVerticalAimDot = Math.Sin(Math.DegToRad(self.Properties.Weapons.MaxUpAimAngle));
self.minVerticalAimDot = -Math.Sin(Math.DegToRad(self.Properties.Weapons.MaxDownAimAngle));
-- weapon response listeners.
self.weaponFireSuccessEventId = GameplayNotificationId(self.entityId, "WeaponFireSuccess", "float");
self.weaponFireSuccessHandler = GameplayNotificationBus.Connect(self, self.weaponFireSuccessEventId);
self.weaponFireFailEventId = GameplayNotificationId(self.entityId, "WeaponFireFail", "float");
self.weaponFireFailHandler = GameplayNotificationBus.Connect(self, self.weaponFireFailEventId);
self.onSetupNewWeaponEventId = GameplayNotificationId(self.entityId, "OnSetupNewWeapon", "float");
self.onSetupNewWeaponHandler = GameplayNotificationBus.Connect(self, self.onSetupNewWeaponEventId);
self.shootingParamValue = 0;
-- Create and start our state machine.
self.StateMachine = {}
setmetatable(self.StateMachine, StateMachine);
self.StateMachine:Start("Weapon", self.entityId, self, self.States, false, self.Properties.InitialState, self.Properties.DebugStateMachine)
-- Direction from aim origin to do raycast to find aim target
self.aimDirection = Vector3(0.0, 0.0, 1.0);
-- Origin of raycast to find aim target
self.aimOrigin = Vector3(0,0,0);
self.setAimDirectionEventId = GameplayNotificationId(self.entityId, "SetAimDirection", "float");
self.setAimDirectionHandler = GameplayNotificationBus.Connect(self, self.setAimDirectionEventId);
self.setAimOriginEventId = GameplayNotificationId(self.entityId, "SetAimOrigin", "float");
self.setAimOriginHandler = GameplayNotificationBus.Connect(self, self.setAimOriginEventId);
self.controlsDisabledCount = 0;
self.controlsEnabled = true;
self.controlsEnabledEventId = GameplayNotificationId(self.entityId, self.Properties.Events.ControlsEnabled, "float");
self.controlsEnabledHandler = GameplayNotificationBus.Connect(self, self.controlsEnabledEventId);
self.requestAimUpdateEventId = GameplayNotificationId(self.entityId, "RequestAimUpdate", "float");
self.debugFireMessage = false;
self.debugFireMessageEventId = GameplayNotificationId(self.entityId, "DebugFireMessage", "float");
self.debugFireMessageHandler = GameplayNotificationBus.Connect(self, self.debugFireMessageEventId);
self.previousShot = false;
self.shot = false;
-- Pitch angle and target vector
self.pitchAngle = 0.0;
AnimGraphComponentRequestBus.Event.SetNamedParameterFloat(self.entityId, "TargetPitchAngle", self.pitchAngle);
self.targetVector = Vector3(0,0,0);
-- Notify calculated target position
self.setTargetPosId = GameplayNotificationId(self.entityId, "SetTargetPos", "float");
end
function weaponcontroller:OnDeactivate()
self.weaponFirePressedHandler:Disconnect();
self.weaponFirePressedHandler = nil;
self.weaponFireReleasedHandler:Disconnect();
self.weaponFireReleasedHandler = nil;
self.onSetupNewWeaponHandler:Disconnect();
self.onSetupNewWeaponHandler = nil;
self.tickBusHandler:Disconnect();
self.tickBusHandler = nil;
if (self.disableFiringHandler ~= nil) then
self.disableFiringHandler:Disconnect();
self.disableFiringHandler = nil;
end
if (self.enableFiringHandler ~= nil) then
self.enableFiringHandler:Disconnect();
self.enableFiringHandler = nil;
end
if (self.disableHandler ~= nil) then
self.disableHandler:Disconnect();
self.disableHandler = nil;
end
if (self.enableHandler ~= nil) then
self.enableHandler:Disconnect();
self.enableHandler = nil;
end
end
function weaponcontroller:CheckCanHitTarget(target)
if(self.weapon == nil) then
return false;
else
local weaponTm = TransformBus.Event.GetWorldTM(self.weapon);
local weaponForward = weaponTm:GetColumn(2):GetNormalized();
local canHitTargetVertical = (weaponForward.z <= self.maxVerticalAimDot) and (weaponForward.z >= self.minVerticalAimDot);
local tm = TransformBus.Event.GetWorldTM(self.entityId);
weaponForward.z = 0;
weaponForward:Normalize();
local facing = tm:GetColumn(1):GetNormalized();
local dot = facing:Dot(weaponForward);
local canHitTargetHorizontal = dot > self.minHorizontalAimDot;
return canHitTargetHorizontal and canHitTargetVertical;
end
end
function weaponcontroller:UpdateAim()
if (self.setupComplete) then
local rayCastConfig = RayCastConfiguration();
rayCastConfig.origin = self.aimOrigin;
rayCastConfig.origin.z = 0;
rayCastConfig.direction = self.aimDirection;
--if(self.isPlayerWeapon == false) then
--Debug.Log("RCD: "..rayCastConfig.direction.x..", "..rayCastConfig.direction.y..", "..rayCastConfig.direction.z);
--Debug.Log("AO: "..rayCastConfig.origin.x..", "..rayCastConfig.origin.y..", "..rayCastConfig.origin.z);
--end
rayCastConfig.maxDistance = self.MaxAimRange;
rayCastConfig.maxHits = 10;
rayCastConfig.physicalEntityTypes = PhysicalEntityTypes.All;
rayCastConfig.piercesSurfacesGreaterThan = 13;
local hits = PhysicsSystemRequestBus.Broadcast.RayCast(rayCastConfig);
local target;
local targetingEnemy = false;
if(hits:HasBlockingHit()) then
local hit = hits:GetBlockingHit();
if (hit.entityId == self.entityId) then
target = self.aimOrigin + self.aimDirection * self.MaxAimRange;
else
target = hit.position;
end
-- if im looking at an enemy, then i need to change the cursor
if (hit.entityId:IsValid() and StarterGameEntityUtility.EntityHasTag(hit.entityId, "AICharacter")) then
--Debug.Log("Looking At enemy");
targetingEnemy = true;
if (self.debugFireMessage) then
GameplayNotificationBus.Event.OnEventBegin(GameplayNotificationId(hit.entityId, "ShouldLog"), 0, "float");
end
end
else
target = self.aimOrigin + self.aimDirection * self.MaxAimRange;
end
--if(self.IsTargetingEnemy ~= targetingEnemy) then
self.IsTargetingEnemy = targetingEnemy;
--Debug.Log("TargetChanged : " .. tostring(targetingEnemy));
local value = Vector2(0, 0);
if (targetingEnemy) then
local distToTarget = (target - self.aimOrigin):GetLength();
value = Vector2(1, distToTarget);
end
GameplayNotificationBus.Event.OnEventBegin(self.SetWeaponStatusEventId, value);
--end
if(self.animParamUpdateFlags.TargetPos.update == true) then
AnimGraphComponentRequestBus.Event.SetNamedParameterVector3(self.entityId, "TargetPos", target);
GameplayNotificationBus.Event.OnEventBegin(self.setTargetPosId, target);
-- Calculate the pitch angle based on the target position
local playerTm = TransformBus.Event.GetWorldTM(self.entityId);
local targetPlayerSpace = playerTm:GetInverseFull()*target;
targetPlayerSpace.z = 0;
targetPlayerSpace:Normalize();
local shoulderPostion = Vector3(0,0,1.5);
targetPlayerSpace = playerTm:GetInverseFull()*target;
local shoulderToTarget = targetPlayerSpace - shoulderPostion;
shoulderToTarget.x = 0;
shoulderToTarget:Normalize();
pitchAngle = Math.RadToDeg(Math.ArcCos(Vector3(0,1,0):Dot(shoulderToTarget)))
pitchAngle = pitchAngle * Math.Sign(shoulderToTarget.z);
AnimGraphComponentRequestBus.Event.SetNamedParameterFloat(self.entityId, "TargetPitchAngle", pitchAngle);
end
-- player always fires directly at reticule
local canHitTarget = self.isPlayerWeapon or self:CheckCanHitTarget(target);
local useWeaponForwardForAiming = 1.0;
if(canHitTarget == true) then
useWeaponForwardForAiming = 0.0;
end
GameplayNotificationBus.Event.OnEventBegin(self.activeWeaponUseWeaponForwardForAimingEventId, useWeaponForwardForAiming);
end
end
function weaponcontroller:OnSetupNewWeapon(weapon)
self.weapon = weapon;
self.activeWeaponFireEventId = GameplayNotificationId(weapon, self.Properties.Weapons.GenericEvents.Fire, "float");
self.activeWeaponUseWeaponForwardForAimingEventId = GameplayNotificationId(weapon, self.Properties.Weapons.GenericEvents.UseWeaponForwardForAiming, "float");
local isLegacyCharacterEventId = GameplayNotificationId(weapon, "IsLegacyCharacter", "float");
GameplayNotificationBus.Event.OnEventBegin(isLegacyCharacterEventId, 0.0);
self.activeWeaponReloadEventId = GameplayNotificationId(weapon, self.Properties.Weapons.GenericEvents.Reload, "float");
self.SetWeaponStatusEventId = GameplayNotificationId(weapon, self.Properties.UIMessages.SetWeaponStatusMessage, "float");
self.setupComplete = true;
end
function weaponcontroller:TellWeaponToFire()
GameplayNotificationBus.Event.OnEventBegin(self.activeWeaponFireEventId, 0);
end
function weaponcontroller:WeaponFireSuccess(value)
self.FirstShotFired = true;
self.shot = true;
end
function weaponcontroller:WeaponFireFail(value)
self.FirstShotFired = true;
-- FOR SOUND - depleated
AudioTriggerComponentRequestBus.Event.ExecuteTrigger(self.entityId, "Play_HUD_energy_depleted");
end
function weaponcontroller:UpdateAiming(deltaTime)
-- The player needs to update aiming every frame (for the crosshair) but A.I. only need
-- to update when they want to shoot.
if (self.isAiming or self.isPlayerWeapon) then
self:UpdateAim();
end
if(self.animParamUpdateFlags.Aiming.update == true) then
AnimGraphComponentRequestBus.Event.SetNamedParameterFloat(self.entityId, "Aiming", self.shootingParamValue);
end
end
function weaponcontroller:OnTick(deltaTime, timePoint)
if (not self.performedFirstUpdate) then
local playerId = TagGlobalRequestBus.Event.RequestTaggedEntities(Crc32("PlayerCharacter"));
self.isPlayerWeapon = (self.entityId == playerId);
-- Make sure we don't do this 'first update' again.
self.performedFirstUpdate = true;
end
GameplayNotificationBus.Event.OnEventBegin(self.requestAimUpdateEventId, nil);
self:UpdateAiming(deltaTime);
self.debugFireMessage = false;
if(self.previousShot == true and self.shot == true) then
self.shot = false;
end
if(self.animParamUpdateFlags.Shot.update == true) then
AnimGraphComponentRequestBus.Event.SetNamedParameterBool(self.entityId, "Shot", self.shot);
end
self.previousShot = self.shot;
end
function weaponcontroller:OnEnable()
self.StateMachine:Resume();
self.tickBusHandler = TickBus.Connect(self);
end
function weaponcontroller:OnDisable()
self.StateMachine:Stop();
self.tickBusHandler:Disconnect();
end
function weaponcontroller:SetControlsEnabled(newControlsEnabled)
self.controlsEnabled = newControlsEnabled;
if(not newControlsEnabled) then
self.WantsToShoot = false;
self.startedShootingWhenDisabled = false;
end
end
function weaponcontroller:OnEventBegin(value)
--Debug.Log("weaponcontroller:OnEventBegin " .. tostring(GameplayNotificationBus.GetCurrentBusId()) .. " " .. tostring(value));
if (GameplayNotificationBus.GetCurrentBusId() == self.controlsEnabledEventId) then
--Debug.Log("weaponcontroller:controlsEnabledEventId " .. tostring(value));
if (value == 1.0) then
self.controlsDisabledCount = self.controlsDisabledCount - 1;
else
self.controlsDisabledCount = self.controlsDisabledCount + 1;
end
if (self.controlsDisabledCount < 0) then
Debug.Log("[Warning] WeaponController: controls disabled ref count is less than 0. Probable enable/disable mismatch.");
self.controlsDisabledCount = 0;
end
local newEnabled = self.controlsDisabledCount == 0;
if (self.controlsEnabled ~= newEnabled) then
self:SetControlsEnabled(newEnabled);
end
end
if(self.controlsEnabled)then
if (GameplayNotificationBus.GetCurrentBusId() == self.weaponFirePressedEventId) and self:IsDead() == false then
if (self.canFire) then
self.WantsToShoot = true;
else
self.startedShootingWhenDisabled = true;
end
elseif (GameplayNotificationBus.GetCurrentBusId() == self.weaponFireReleasedEventId) and self:IsDead() == false then
self.WantsToShoot = false;
self.startedShootingWhenDisabled = false;
end
end
if (GameplayNotificationBus.GetCurrentBusId() == self.onSetupNewWeaponEventId) then
self:OnSetupNewWeapon(value);
elseif (GameplayNotificationBus.GetCurrentBusId() == self.setAimDirectionEventId) then
self.aimDirection = value;
elseif (GameplayNotificationBus.GetCurrentBusId() == self.setAimOriginEventId) then
self.aimOrigin = value;
end
if (GameplayNotificationBus.GetCurrentBusId() == self.weaponFireSuccessEventId) then
self:WeaponFireSuccess(value);
elseif (GameplayNotificationBus.GetCurrentBusId() == self.weaponFireFailEventId) then
self:WeaponFireFail(value);
end
if (GameplayNotificationBus.GetCurrentBusId() == self.enableEventId) then
self:OnEnable();
elseif (GameplayNotificationBus.GetCurrentBusId() == self.disableEventId) then
self:OnDisable();
end
if (GameplayNotificationBus.GetCurrentBusId() == self.enableFiringEventId) then
if(self.canFire == false) then
self.canFire = true;
self.WantsToShoot = self.startedShootingWhenDisabled;
end
elseif (GameplayNotificationBus.GetCurrentBusId() == self.disableFiringEventId) then
if(self.canFire == true) then
self.canFire = false;
self.startedShootingWhenDisabled = self.WantsToShoot;
self.WantsToShoot = false;
end
end
if (GameplayNotificationBus.GetCurrentBusId() == self.ownerDiedEventId) then
self.IsOwnerDead = true;
end
if (GameplayNotificationBus.GetCurrentBusId() == self.debugFireMessageEventId) then
self.debugFireMessage = true;
end
end
function weaponcontroller:IsDead()
local isDead = self.StateMachine.CurrentState == self.States.Dead;
return isDead;
end
return weaponcontroller;
|
return function(class)
local fields = {}
local o = setmetatable({}, {
__tostring = function()
return class.name .. ' instance'
end
})
o.is_object = true
o.get = function(name)
if fields[name.lexeme] then return fields[name.lexeme] end
local method = class.find_method(o, name.lexeme)
if method then return method end
error({
token = name,
message = "Undefined property '" .. name.lexeme .. "'."
})
end
o.set = function(name, value)
fields[name.lexeme] = value
end
return o
end
|
/*
* @package : rlib
* @author : Richard [http://steamcommunity.com/profiles/76561198135875727]
* @copyright : (C) 2018 - 2020
* @since : 1.0.0
* @website : https://rlib.io
* @docs : https://docs.rlib.io
*
* MIT License
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* standard tables and localization
*/
rlib = rlib or { }
local base = rlib
local cfg = base.settings
local mf = base.manifest
local helper = base.h
local design = base.d
local ui = base.i
/*
* Localized translation func
*/
local function lang( ... )
return base:lang( ... )
end
/*
* prefix ids
*/
local function pref( str, suffix )
local state = ( isstring( suffix ) and suffix ) or ( base and mf.prefix ) or false
return rlib.get:pref( str, state )
end
/*
* panel
*/
local PANEL = { }
/*
* StructureMsg
*/
function PANEL:StructureMsg( str )
if not isstring( str ) then return '' end
str = str:Replace( '[VERSION]', rlib.get:ver2str( mf.version ) )
str = str:Replace( '[LIB]', mf.name )
str = str:upper( )
return str
end
/*
* Init
*/
function PANEL:Init( )
/*
* localizations
*/
local expire, exists, create = timex.expire, timex.exists, timex.create
local rand = math.random
local count = table.Count
local msgs = cfg.welcome.ticker.msgs
local delay = cfg.welcome.ticker.delay
local clr = cfg.welcome.ticker.clr
local speed = cfg.welcome.ticker.speed
/*
* parent
*/
self:Dock ( FILL )
/*
* declarations
*/
self.bInitialized = false
self.results = rand( count( msgs ) )
self.selected = msgs[ self.results ]
local entry = self:StructureMsg( self.selected )
/*
* ticker
*/
self.ticker = ui.new( 'lbl', self )
:static ( TOP )
:margin ( 0, 0, 0 )
:textadv ( clr, pref( 'welcome_ticker' ), entry, true )
:think( function( s )
if not self.bInitialized then
expire( 'rlib_ticker' )
end
if exists( 'rlib_ticker' ) then return end
self.bInitialized = true
create( 'rlib_ticker', delay or 10, 0, function( )
if not self.results then return end
self.results = ( isnumber( self.results ) and self.results + 1 ) or 1
if ( self.results > count( msgs ) ) then self.results = 1 end
if not ui:valid( self ) or not ui:valid( s ) then return end
local lbl = msgs[ self.results ]
lbl = self:StructureMsg( lbl )
s:AlphaTo( 0, speed, 0, function( )
s:Dock ( TOP )
s:DockMargin ( 0, 0, 0, 0 )
s:SetText ( lbl )
s:SetFont ( pref( 'welcome_ticker' ) )
s:SizeToContents ( )
s:SetColor ( clr )
s:AlphaTo ( 255, speed, 0, function( ) end )
end )
end )
end )
end
/*
* Paint
*
* @param : int w
* @param : int h
*/
function PANEL:Paint( w, h ) end
/*
* DefineControl
*/
derma.DefineControl( 'rlib.ui.ticker', 'rlib ticker', PANEL, 'EditablePanel' )
|
---
-- curl -X POST http://kong:8001/services/<service-name-or-id>/plugins \
-- -d "name=my-custom-plugin" \
-- -d "config.environment=development" \
-- -d "config.server.host=http://localhost"
---
local require = require
local kong = kong
local BasePlugin = require "kong.plugins.base_plugin"
local CaesarHelloHandler = BasePlugin:extend()
CaesarHelloHandler.VERSION = "0.0.1"
CaesarHelloHandler.PRIORITY = 100
function CaesarHelloHandler:init_worker()
-- Implement logic for the init_worker phase here (http/stream)
kong.log("init_worker: CaesarHelloHandler!")
end
function CaesarHelloHandler:access(conf)
CaesarHelloHandler.super.access(self)
kong.log.inspect(conf.environment) -- "development"
kong.log.inspect(conf.server.host) -- "http://localhost"
kong.log.inspect(conf.server.port) -- 80
end
return CaesarHelloHandler
|
local app = app
app.logInfo("Setup global namespace...")
local unitInputNames = {
["In1"] = 0,
["In2"] = 1,
["In3"] = 2,
["In4"] = 3
}
local function connectUnitInput(unit, inputName, toObject, toPortName)
local channel = unitInputNames[inputName]
if channel == nil then
app.logError("connect: Unit(%s) has no input named %s", unit:name(),
inputName)
elseif not unit:addInput(channel, toObject, toPortName) then
app.logError("connect: Object(%s) has no port named '%s'.", toObject:name(),
toPortName)
end
end
local unitOutputNames = {
["Out1"] = 0,
["Out2"] = 1,
["Out3"] = 2,
["Out4"] = 3
}
local function connectUnitOutput(fromObject, fromPortName, unit, outputName)
local channel = unitOutputNames[outputName]
if channel == nil then
app.logError("connect: Unit(%s) has no output named %s", unit:name(),
outputName)
elseif not unit:setOutput(channel, fromObject, fromPortName) then
app.logError("connect: Object(%s) has no port named '%s'.",
fromObject:name(), fromPortName)
end
end
local function connectObjects(fromObject, fromPortName, toObject, toPortName)
if not app.connect(fromObject, fromPortName, toObject, toPortName) then
app.logError("connect: Failed to connect %s(%s) to %s(%s)",
fromObject:name(), fromPortName, toObject:name(), toPortName)
end
end
function connect(fromObject, fromPortName, toObject, toPortName)
-- app.logInfo("connect: [%s].%s to [%s].%s", swig_type(fromObject),
-- fromPortName, swig_type(toObject), toPortName)
if fromObject.pUnit then
connectUnitInput(fromObject.pUnit, fromPortName, toObject, toPortName)
elseif toObject.pUnit then
connectUnitOutput(fromObject, fromPortName, toObject.pUnit, toPortName)
else
connectObjects(fromObject, fromPortName, toObject, toPortName)
end
end
-- tying parameters
local function tieExpression(slaveObj, slaveParamName, expression, ...)
local slave = slaveObj:getParameter(slaveParamName) or
slaveObj:getOption(slaveParamName)
if slave == nil then
app.logError("tie: Object(%s) has no parameter/option named '%s'.",
slaveObj:name(), slaveParamName)
return
end
local E = app.Expression()
if not E:setFunction(expression) then
app.logError("Invalid expression: %s", expression)
return
end
local args = {
...
}
for i = 1, #args, 2 do
local obj = args[i]
local name = args[i + 1]
local param = obj:getParameter(name)
if param == nil then
app.logError("tie: Object(%s) has no parameter/option named '%s'.",
obj:name(), name)
return
end
E:addParameter(param)
end
E:compile()
slave:tie(E)
end
local function tieParameter(slaveObj, slaveParamName, masterObj, masterParamName)
-- app.logInfo("tie: [%s].%s to [%s].%s", swig_type(slaveObj), slaveParamName,
-- swig_type(masterObj), masterParamName)
local slave = slaveObj:getParameter(slaveParamName) or
slaveObj:getOption(slaveParamName)
local master = masterObj:getParameter(masterParamName) or
masterObj:getOption(masterParamName)
if master == nil then
app.logError("tie: Object(%s) has no parameter/option named '%s'.",
masterObj:name(), masterParamName)
return
end
if slave == nil then
app.logError("tie: Object(%s) has no parameter/option named '%s'.",
slaveObj:name(), slaveParamName)
return
end
slave:tie(master)
end
function tie(slaveObj, slaveParamName, ...)
local args = {
...
}
if type(args[1]) == "string" then
tieExpression(slaveObj, slaveParamName, ...)
else
tieParameter(slaveObj, slaveParamName, ...)
end
end
|
AddCSLuaFile()
local gballoon_pob = baseclass.Get("gballoon_path_object_base") -- internally sets ENT.Base and ENT.Type too
ENT.PrintName = "#rotgb.gballoon_target"
ENT.Category = "#rotgb.category.miscellaneous"
ENT.ScriptedEntityType = "entity"
ENT.Author = "Piengineer12"
ENT.Contact = "http://steamcommunity.com/id/Piengineer12/"
ENT.Purpose = "#rotgb.gballoon_target.purpose"
ENT.Instructions = ""
ENT.Spawnable = false
ENT.AdminOnly = false
ENT.Editable = true
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.DisableDuplicator = false
if SERVER then
util.AddNetworkString("rotgb_target_received_damage")
end
function ENT:SetupDataTables()
self:NetworkVar("Bool",0,"GBOnly",{KeyName="gballoon_damage_only",Edit={title="#rotgb.gballoon_target.properties.gballoon_damage_only",type="Boolean"}})
self:NetworkVar("Bool",1,"IsBeacon",{KeyName="is_beacon",Edit={title="#rotgb.gballoon_target.properties.is_beacon",type="Boolean"}})
self:NetworkVar("Bool",2,"Teleport",{KeyName="teleport_to",Edit={title="#rotgb.gballoon_target.properties.teleport_to",type="Boolean"}})
self:NetworkVar("Bool",3,"UnSpectatable")
self:NetworkVar("Bool",4,"NonVital")
self:NetworkVar("Bool",5,"HideHealth")
self:NetworkVar("Int",0,"Weight",{KeyName="weight",Edit={title="#rotgb.gballoon_target.properties.weight",type="Int",min=0,max=100}})
self:NetworkVar("Int",1,"GoldenHealth",{KeyName="golden_health",Edit={title="#rotgb.gballoon_target.properties.golden_health",type="Int",min=0,max=100}})
self:NetworkVar("Int",2,"OSPs",{KeyName="fatal_damage_negations",Edit={title="#rotgb.gballoon_target.properties.fatal_damage_negations",type="Int",min=0,max=100}})
self:NetworkVar("Int",4,"PerWaveShield")
self:NetworkVar("Float",0,"NaturalHealthMultiplier")
self:NetworkVar("Float",1,"PerWaveShieldPercent",{KeyName="per_wave_shield_percent",Edit={title="#rotgb.gballoon_target.properties.per_wave_shield_percent",type="Float",min=0,max=100}})
self:NetworkVar("Entity",0,"NextTarget1")
self:NetworkVar("Entity",1,"NextTarget2")
self:NetworkVar("Entity",2,"NextTarget3")
self:NetworkVar("Entity",3,"NextTarget4")
self:NetworkVar("Entity",4,"NextTarget5")
self:NetworkVar("Entity",5,"NextTarget6")
self:NetworkVar("Entity",6,"NextTarget7")
self:NetworkVar("Entity",7,"NextTarget8")
self:NetworkVar("Entity",8,"NextTarget9")
self:NetworkVar("Entity",9,"NextTarget10")
self:NetworkVar("Entity",10,"NextTarget11")
self:NetworkVar("Entity",11,"NextTarget12")
self:NetworkVar("Entity",12,"NextTarget13")
self:NetworkVar("Entity",13,"NextTarget14")
self:NetworkVar("Entity",14,"NextTarget15")
self:NetworkVar("Entity",15,"NextTarget16")
self:NetworkVar("Entity",16,"NextBlimpTarget1")
self:NetworkVar("Entity",17,"NextBlimpTarget2")
self:NetworkVar("Entity",18,"NextBlimpTarget3")
self:NetworkVar("Entity",19,"NextBlimpTarget4")
self:NetworkVar("Entity",20,"NextBlimpTarget5")
self:NetworkVar("Entity",21,"NextBlimpTarget6")
self:NetworkVar("Entity",22,"NextBlimpTarget7")
self:NetworkVar("Entity",23,"NextBlimpTarget8")
self:NetworkVar("Entity",24,"NextBlimpTarget9")
self:NetworkVar("Entity",25,"NextBlimpTarget10")
self:NetworkVar("Entity",26,"NextBlimpTarget11")
self:NetworkVar("Entity",27,"NextBlimpTarget12")
self:NetworkVar("Entity",28,"NextBlimpTarget13")
self:NetworkVar("Entity",29,"NextBlimpTarget14")
self:NetworkVar("Entity",30,"NextBlimpTarget15")
self:NetworkVar("Entity",31,"NextBlimpTarget16")
end
function ENT:KeyValue(key,value)
local lkey = key:lower()
if lkey=="natural_health_multiplier" then
self:SetNaturalHealthMultiplier(tonumber(value) or 0)
elseif lkey=="gballoon_damage_only" then
self:SetGBOnly(tobool(value))
elseif lkey=="hide_health" then
self:SetHideHealth(tobool(value))
elseif lkey=="non_vital" then
self:SetNonVital(tobool(value))
elseif lkey=="is_waypoint" then
self:SetIsBeacon(tobool(value))
elseif lkey=="teleport_to" then
self:SetTeleport(tobool(value))
elseif lkey=="weight" then
self:SetWeight(tonumber(value) or 0)
elseif lkey=="onbreak" then
self:StoreOutput(key,value)
elseif lkey=="onhealthchanged" then
self:StoreOutput(key,value)
elseif lkey=="onmaxhealthchanged" then
self:StoreOutput(key,value)
elseif lkey=="onkilled" then
self:StoreOutput(key,value)
elseif lkey=="ontakedamage" then
self:StoreOutput(key,value)
elseif lkey=="onwaypointed" then
self:StoreOutput(key,value)
elseif lkey=="onwaypointedblimp" then
self:StoreOutput(key,value)
elseif lkey=="onwaypointednonblimp" then
self:StoreOutput(key,value)
elseif lkey=="health" or lkey=="max_health" then
if (tonumber(value) or 0) <= 0 then return true end
end
return gballoon_pob.KeyValue(self,lkey,value)
end
function ENT:AcceptInput(input,activator,caller,data)
input = input:lower()
if input=="setnaturalhealthmultiplier" then
local newMul = tonumber(data) or 0
if self:GetNaturalHealthMultiplier() == 0 then
local naturalHealth = ROTGB_GetConVarValue("rotgb_target_natural_health") * newMul
self:SetMaxHealth(naturalHealth)
self:SetHealth(naturalHealth)
else
local multiplier = newMul / self:GetNaturalHealthMultiplier()
self:SetMaxHealth(self:GetMaxHealth() * multiplier)
self:SetHealth(self:Health() * multiplier)
end
self:SetNaturalHealthMultiplier(newMul)
elseif input=="setweight" then
self:SetWeight(tonumber(data) or 0)
elseif input=="sethealth" then
self:SetHealth(tonumber(data) or 0)
self:TriggerOnHealthChanged()
if self:Health()<=0 then
self:TriggerOutput("OnBreak",activator)
self:Input("Kill",activator,self,data)
end
elseif input=="addhealth" then
self:SetHealth(self:Health()+(tonumber(data) or 0))
self:TriggerOnHealthChanged()
elseif input=="removehealth" then
self:SetHealth(self:Health()-(tonumber(data) or 0))
self:TriggerOnHealthChanged()
if self:Health()<=0 then
self:TriggerOutput("OnBreak",activator)
self:Input("Kill",activator,self,data)
end
elseif input=="healhealth" then
self:SetHealth(math.min(self:Health()+(tonumber(data) or 0), self:GetMaxHealth()))
self:TriggerOnHealthChanged()
elseif input=="setmaxhealth" then
self:SetMaxHealth(tonumber(data) or 0)
self:TriggerOnMaxHealthChanged()
elseif input=="addmaxhealth" then
self:SetMaxHealth(self:GetMaxHealth()+(tonumber(data) or 0))
self:TriggerOnMaxHealthChanged()
elseif input=="removemaxhealth" then
self:SetMaxHealth(self:GetMaxHealth()-(tonumber(data) or 0))
self:TriggerOnMaxHealthChanged()
elseif input=="healmaxhealth" then
self:SetHealth(math.min(self:Health()+(tonumber(data) or 1)*self:GetMaxHealth(), self:GetMaxHealth()))
self:TriggerOnHealthChanged()
elseif input=="break" then
self:SetHealth(0)
self:TriggerOnHealthChanged()
self:TriggerOutput("OnBreak",activator)
self:Input("Kill",activator,self,data)
end
self:CheckBoolEDTInput(input, "balloondamageonly", "GBOnly")
self:CheckBoolEDTInput(input, "nonvitality", "NonVital")
self:CheckBoolEDTInput(input, "hidehealth", "HideHealth")
self:CheckBoolEDTInput(input, "waypointing", "IsBeacon")
self:CheckBoolEDTInput(input, "teleporting", "Teleport")
return gballoon_pob.AcceptInput(self,input,activator,caller,data)
end
function ENT:SpawnFunction(ply,trace,classname)
if not trace.Hit then return end
local ent = ents.Create(classname)
ent:SetPos(trace.HitPos+trace.HitNormal*5)
ent:Spawn()
ent:Activate()
return ent
end
function ENT:Initialize()
if SERVER then
local healthOverride = ROTGB_GetConVarValue("rotgb_target_health_override")
if healthOverride > 0 then
self:SetHealth(healthOverride)
self:SetMaxHealth(healthOverride)
elseif self.CurHealth then
self:SetHealth(self.CurHealth)
self:SetMaxHealth(self.CurMaxHealth)
elseif self:GetNaturalHealthMultiplier() ~= 0 then
local naturalHealth = ROTGB_GetConVarValue("rotgb_target_natural_health") * self:GetNaturalHealthMultiplier()
self.notYetCorrectedNaturalHealth = naturalHealth
self:SetHealth(naturalHealth)
self:SetMaxHealth(naturalHealth)
end
gballoon_pob.Initialize(self)
end
end
function ENT:Think()
self.oldHealth = self.oldHealth or self:Health()
self.oldMaxHealth = self.oldMaxHealth or self:GetMaxHealth()
if self.notYetCorrectedNaturalHealth then
local naturalHealth = hook.Run("gBalloonTargetHealthAdjust", self, self.notYetCorrectedNaturalHealth)
if naturalHealth then
self:SetHealth(naturalHealth)
self:SetMaxHealth(naturalHealth)
end
self.notYetCorrectedNaturalHealth = nil
end
self:TriggerOnHealthChanged()
self:TriggerOnMaxHealthChanged()
end
function ENT:PreEntityCopy()
self.CurHealth = self:Health()
self.CurMaxHealth = self:GetMaxHealth()
end
function ENT:PostEntityPaste(ply,ent,tab)
if self.CurHealth then
self:SetHealth(self.CurHealth)
end
if self.CurMaxHealth then
self:SetMaxHealth(self.CurMaxHealth)
end
gballoon_pob.PostEntityPaste(self,ply,ent,tab)
end
function ENT:TriggerOnHealthChanged()
if self:Health()~=self.oldHealth then
if SERVER then
self:TriggerOutput("OnHealthChanged",activator,self:Health()/self:GetMaxHealth())
--[[net.Start("rotgb_target_received_damage")
net.WriteEntity(self)
net.WriteInt(self:Health(), 32)
net.WriteInt(self:GetGoldenHealth(), 32)
net.WriteUInt(3, 8)
net.Broadcast()]]
end
self.oldHealth = self:Health()
end
end
function ENT:TriggerOnMaxHealthChanged(oldMaxHealth)
if self:GetMaxHealth()~=self.oldMaxHealth then
if SERVER then
self:TriggerOutput("OnMaxHealthChanged",activator,self:GetMaxHealth())
--[[net.Start("rotgb_target_received_damage")
net.WriteEntity(self)
net.WriteInt(self:GetMaxHealth(), 32)
net.WriteInt(self:GetGoldenHealth(), 32)
net.WriteUInt(7, 8)
net.Broadcast()]]
end
self.oldMaxHealth = self:GetMaxHealth()
end
end
function ENT:OnTakeDamage(dmginfo)
if not self:GetGBOnly() or (IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():GetClass()=="gballoon_base") then
self:TriggerOutput("OnTakeDamage",dmginfo:GetAttacker(),dmginfo:GetDamage())
self:EmitSound("physics/metal/metal_box_break"..math.random(1,2)..".wav",60)
local oldNonGoldenHealth = self:Health()
local oldHealth = oldNonGoldenHealth+self:GetGoldenHealth()+self:GetPerWaveShield()
hook.Run("gballoonTargetTakeDamage", self, dmginfo)
local shieldReduction = math.ceil(math.min(self:GetPerWaveShield(), dmginfo:GetDamage()))
self:SetPerWaveShield(self:GetPerWaveShield()-shieldReduction)
dmginfo:SubtractDamage(shieldReduction)
if self:GetOSPs() > 0 and math.ceil(dmginfo:GetDamage()) >= oldHealth then
dmginfo:SetDamage(0)
self:SetOSPs(self:GetOSPs()-1)
end
local goldenHealthReduction = math.ceil(math.min(self:GetGoldenHealth(), dmginfo:GetDamage()))
self:SetGoldenHealth(self:GetGoldenHealth()-goldenHealthReduction)
ROTGB_AddCash(goldenHealthReduction*ROTGB_GetConVarValue("rotgb_cash_mul"))
dmginfo:SubtractDamage(goldenHealthReduction)
self:SetHealth(oldNonGoldenHealth-dmginfo:GetDamage())
self.oldHealth = self:Health()
dmginfo:SetDamage(0)
local attacker = dmginfo:GetAttacker()
local flags = bit.bor(
IsValid(attacker) and attacker:GetClass()=="gballoon_base" and 1 or 0,
attacker:IsPlayer() and 2 or 0
)
if bit.band(flags, 1)==1 then
flags = bit.bor(
flags,
attacker:GetBalloonProperty("BalloonFast") and 4 or 0,
attacker:GetBalloonProperty("BalloonHidden") and 8 or 0,
attacker:GetBalloonProperty("BalloonRegen") and 16 or 0,
attacker:GetBalloonProperty("BalloonShielded") and 32 or 0
)
end
hook.Run("PostgballoonTargetTakeDamage", self, dmginfo)
local label = bit.band(flags, 2)==2 and attacker:UserID() or bit.band(flags, 1)==1 and attacker:GetBalloonProperty("BalloonType") or IsValid(attacker) and attacker:GetClass() or "<unknown>"
net.Start("rotgb_target_received_damage", true)
net.WriteEntity(self)
--net.WriteInt(self:Health(), 32)
--net.WriteInt(self:GetGoldenHealth(), 32)
net.WriteUInt(flags, 8)
net.WriteString(label)
net.WriteInt(oldHealth-self:Health()-self:GetGoldenHealth()-self:GetPerWaveShield(), 32)
net.Broadcast()
if oldNonGoldenHealth~=self:Health() then
self:TriggerOutput("OnHealthChanged",dmginfo:GetAttacker(),self:Health()/self:GetMaxHealth())
end
if self:Health()<=0 then
self:TriggerOutput("OnBreak",dmginfo:GetAttacker())
self:Input("Kill",dmginfo:GetAttacker(),dmginfo:GetInflictor())
end
end
end
function ENT:OnRemove()
if SERVER then
hook.Run("gBalloonTargetRemoved", self)
self:TriggerOutput("OnKilled")
end
end
function ENT:DrawTranslucent()
--self:Draw()
if not (self:GetIsBeacon() or self:GetHideHealth()) then
--self:DrawModel()
local actualHealth = --[[self.rotgb_ActualHealth or]] self:Health()
local actualMaxHealth = --[[self.rotgb_ActualMaxHealth or]] self:GetMaxHealth()
local text1 = ROTGB_LocalizeString("rotgb.gballoon_target.health", actualHealth)
surface.SetFont("DermaLarge")
local t1x,t1y = surface.GetTextSize(text1)
local reqang = (self:GetPos()-LocalPlayer():GetShootPos()):Angle()
reqang.p = 0
reqang.y = reqang.y-90
reqang.r = 90
cam.Start3D2D(self:GetPos()+Vector(0,0,ROTGB_GetConVarValue("rotgb_hoverover_distance")+t1y*0.1+self:OBBMaxs().z),reqang,0.2)
surface.SetDrawColor(0,0,0,127)
surface.DrawRect(t1x/-2,t1y/-2,t1x,t1y)
surface.SetTextColor(HSVToColor(math.Clamp(actualHealth/actualMaxHealth*120,0,120),1,1))
surface.SetTextPos(t1x/-2,t1y/-2)
surface.DrawText(text1)
cam.End3D2D()
end
end
if engine.ActiveGamemode() == "rotgb" then
hook.Add("gBalloonSpawnerWaveEnded", "ROTGB_TARGET", function(target, endedWave)
if hook.Run("GetSkillAmount", "targetRegeneration") > 0 then
for k,v in pairs(ents.FindByClass("gballoon_target")) do
v:SetPerWaveShield(v:GetMaxHealth()*v:GetPerWaveShieldPercent()/100)
local healing = math.max(math.min(v:GetMaxHealth()-v:Health(), math.floor(hook.Run("GetSkillAmount", "targetRegeneration"))), 0)
v:SetHealth(v:Health()+healing)
if healing > 0 then
net.Start("rotgb_target_received_damage")
net.WriteEntity(v)
--net.WriteInt(v:Health(), 32)
--net.WriteInt(v:GetGoldenHealth(), 32)
net.WriteUInt(0, 8)
net.WriteString("rotgb_tg.skills.names.regeneration")
net.WriteInt(-healing, 32)
net.Broadcast()
end
end
end
end)
end
local function CreateHealthManipulationOption(amt,subOperation,ent)
return function()
if IsValid(ent) then
net.Start("rotgb_generic")
net.WriteUInt(ROTGB_OPERATION_HEALTH_EDIT,8)
net.WriteEntity(ent)
net.WriteUInt(subOperation, 4)
net.WriteInt(amt, 32)
net.SendToServer()
end
end
end
local function PopulateHealthMenu(menu,data,ent)
menu:AddOption("1", CreateHealthManipulationOption(1,data,ent))
menu:AddOption("2", CreateHealthManipulationOption(2,data,ent))
menu:AddOption("5", CreateHealthManipulationOption(5,data,ent))
menu:AddOption("10", CreateHealthManipulationOption(10,data,ent))
menu:AddOption("20", CreateHealthManipulationOption(20,data,ent))
menu:AddOption("50", CreateHealthManipulationOption(50,data,ent))
menu:AddOption("100", CreateHealthManipulationOption(100,data,ent))
menu:AddOption("150", CreateHealthManipulationOption(150,data,ent))
menu:AddOption("200", CreateHealthManipulationOption(200,data,ent))
menu:AddOption("500", CreateHealthManipulationOption(500,data,ent))
menu:AddOption("999,999,999", CreateHealthManipulationOption(999999999,data,ent))
end
properties.Add("rotgb_modhealth", {
MenuLabel = "#rotgb.gballoon_target.health.modify",
StructureField = 3000,
Filter = function(tab,ent) return ent:GetClass()=="gballoon_target" and LocalPlayer():IsAdmin() end,
MenuOpen = function(tab,menuOpt,ent,trace)
local modOpt = menuOpt:AddSubMenu()
PopulateHealthMenu(modOpt:AddSubMenu("#rotgb.gballoon_target.health.set"), ROTGB_HEALTH_SET, ent)
PopulateHealthMenu(modOpt:AddSubMenu("#rotgb.gballoon_target.health.heal"), ROTGB_HEALTH_HEAL, ent)
PopulateHealthMenu(modOpt:AddSubMenu("#rotgb.gballoon_target.health.add"), ROTGB_HEALTH_ADD, ent)
PopulateHealthMenu(modOpt:AddSubMenu("#rotgb.gballoon_target.health.sub"), ROTGB_HEALTH_SUB, ent)
end
})
properties.Add("rotgb_modmaxhealth", {
MenuLabel = "#rotgb.gballoon_target.max_health.modify",
StructureField = 3001,
Filter = function(tab,ent) return ent:GetClass()=="gballoon_target" and LocalPlayer():IsAdmin() end,
MenuOpen = function(tab,menuOpt,ent,trace)
local modOpt = menuOpt:AddSubMenu()
PopulateHealthMenu(modOpt:AddSubMenu("#rotgb.gballoon_target.max_health.set"), ROTGB_MAXHEALTH_SET, ent)
PopulateHealthMenu(modOpt:AddSubMenu("#rotgb.gballoon_target.max_health.add"), ROTGB_MAXHEALTH_ADD, ent)
PopulateHealthMenu(modOpt:AddSubMenu("#rotgb.gballoon_target.max_health.sub"), ROTGB_MAXHEALTH_SUB, ent)
end
})
list.Set("NPC","gballoon_target_100",{
Name = "#rotgb.gballoon_target",
Class = "gballoon_target",
Category = "#rotgb.category.miscellaneous",
KeyValues = {
natural_health_multiplier = "1"
}
})
list.Set("NPC","gballoon_target_op",{
Name = "#rotgb.gballoon_target.sandbox",
Class = "gballoon_target",
Category = "#rotgb.category.miscellaneous",
KeyValues = {
health = "999999999",
max_health = "999999999"
}
})
list.Set("SpawnableEntities","gballoon_target_100",{
PrintName = "#rotgb.gballoon_target",
ClassName = "gballoon_target",
Category = "#rotgb.category.miscellaneous",
KeyValues = {
natural_health_multiplier = "1"
}
})
list.Set("SpawnableEntities","gballoon_target_op",{
PrintName = "#rotgb.gballoon_target.sandbox",
ClassName = "gballoon_target",
Category = "#rotgb.category.miscellaneous",
KeyValues = {
health = "999999999",
max_health = "999999999"
}
})
|
-- See LICENSE for terms
local r = const.ResourceScale
local pms = {
-- how much to mine each time
mine_amount = 1 * r,
-- how much to store in res pile (10*10 = 100)
max_res_amount_man = 90 * r,
-- how high we stack on the pile (10 per stack)
max_z_stack_man = 9,
-- amount in auto
max_z_stack_auto = 250,
max_res_amount_auto = 2500 * r,
-- ground paint
visual_cues = true,
mine_time_anim = {
Concrete = 1000,
Metals = 2000,
PreciousMetals = 10000,
},
mine_time_idle = {
Concrete = 1500,
Metals = 3000,
PreciousMetals = 15000,
},
}
local options
local mod_ShowRocket
-- fired when settings are changed
local function ModOptions()
pms.mine_amount = options:GetProperty("mine_amount") * r
pms.max_res_amount_man = options:GetProperty("max_res_amount_man") * r
pms.max_z_stack_man = options:GetProperty("max_res_amount_man") / 10
pms.max_res_amount_auto = options:GetProperty("max_res_amount_auto") * r
pms.max_z_stack_auto = options:GetProperty("max_res_amount_auto") / 10
pms.mine_time_anim.Concrete = options:GetProperty("mine_time_animConcrete")
pms.mine_time_idle.Concrete = options:GetProperty("mine_time_idleConcrete")
pms.mine_time_anim.Metals = options:GetProperty("mine_time_animMetals")
pms.mine_time_idle.Metals = options:GetProperty("mine_time_idleMetals")
pms.mine_time_anim.PreciousMetals = options:GetProperty("mine_time_animPreciousMetals")
pms.mine_time_idle.PreciousMetals = options:GetProperty("mine_time_idlePreciousMetals")
pms.visual_cues = options:GetProperty("visual_cues")
mod_ShowRocket = options:GetProperty("ShowRocket")
end
-- load default/saved settings
function OnMsg.ModsReloaded()
options = CurrentModOptions
ModOptions()
end
-- fired when option is changed
function OnMsg.ApplyModOptions(id)
if id ~= CurrentModId then
return
end
ModOptions()
end
local function StartupCode()
-- reset the prod count (for overview or something)
local miners = UICity.labels.PortableMiner or ""
for i = 1, #miners do
local miner = miners[i]
miner.city = UICity
miner:SpawnThumper()
if miner.lifetime_table then
break
end
miner.lifetime_table = {
All = 0,
Concrete = 0,
Metals = 0,
PreciousMetals = 0,
-- lukes
Radioactive = 0,
Hydrocarbon = 0,
Crystals = 0,
}
end
end
OnMsg.CityStart = StartupCode
OnMsg.LoadGame = StartupCode
-- for painting the ground
local concrete_paint = table.find(TerrainTextures, "name", "Dig")
local metal_paint = table.find(TerrainTextures, "name", "SandFrozen")
--~ local name = T(302535920011207, [[RC Miner]])
--~ local name_pl = T(302535920011208, [[RC Miners]])
--~ local description =
--~ local display_icon = CurrentModPath .. "UI/rover_combat.png"
--~ local entity = "CombatRover"
DefineClass.PortableMiner = {
__parents = {
"BaseRover",
"ComponentAttach",
-- needed for concrete
"TerrainDepositExtractor",
-- not needed for metals, but to show prod info...
"BuildingDepositExploiterComponent",
},
-- these are all set above
--~ name = T(302535920011207, [[RC Miner]]),
--~ display_name = T(302535920011207, [[RC Miner]]),
description = T(302535920011209, [[Will slowly (okay maybe a little quickly) mine Metal or Concrete into a resource pile.]]),
--~ display_icon = display_icon,
entity = "CombatRover",
default_anim = "attackIdle",
default_anim_idle = "idle",
-- how close to the resource icon do we need to be
mine_dist = 1500,
-- area around it to mine for concrete. this gets called everytime you mine, so we just get the default shape once and use that instead of this func
mine_area = RegolithExtractor.GetExtractionShape(),
-- what spot on the entity to use as placement for the stockpile
pooper_shooter = "Droneentrance",
-- we store each type of res in here, and just use lifetime_production as something to update from this. That way we can show each type in hint
lifetime_table = false,
lifetime_production = 0,
production_per_day = 0,
has_auto_mode = true,
malfunction_start_state = "malfunction",
malfunction_idle_state = "malfunctionIdle",
malfunction_end_state = "malfunctionEnd",
-- stops error when adding signs (Missing spot 'Top'), it doesn't have a Top spot, but Rocket is slightly higher then Origin
sign_spot = "Rocket",
concrete_paint = concrete_paint,
metal_paint = metal_paint,
-- erm... something?
last_serviced_time = 0,
-- probably doesn't need a default res, but it may stop some error in the log?
resource = "Metals",
-- nearby_deposits name is needed for metal extractor func
nearby_deposits = false,
accumulate_dust = true,
-- changed below
notworking_sign = false,
-- refund res
on_demolish_resource_refund = { Metals = 20 * const.ResourceScale, MachineParts = 20 * const.ResourceScale , Electronics = 10 * const.ResourceScale },
mineable = {
"TerrainDepositConcrete",
-- metals
"SubsurfaceDepositPreciousMetals", "SubsurfaceDepositMetals",
-- LukeH's Resources
"SubsurfaceDepositCrystals", "SubsurfaceDepositRadioactive", --[["SubsurfaceDepositHydrocarbon",]]
},
-- living just enough for the city
city = false,
-- show the pin info
pin_rollover = T(51, "<ui_command>"),
-- add a missile to "grows" while mining
thumper = false,
}
DefineClass.PortableMinerBuilding = {
__parents = {"BaseRoverBuilding"},
rover_class = "PortableMiner",
}
DefineClass.PortableStockpile = {
__parents = {"ResourceStockpile"},
}
function PortableMiner:GameInit()
self.city = UICity
self.nearby_deposits = {}
self.lifetime_table = {
All = 0,
Concrete = 0,
Metals = 0,
PreciousMetals = 0,
-- lukes
Radioactive = 0,
Hydrocarbon = 0,
Crystals = 0,
}
-- select sounds
self.fx_actor_class = "AttackRover"
-- Colour #, Colour, Roughness, Metallic (r/m go from -128 to 127)
-- middle area
self:SetColorizationMaterial(1, -10592674, -128, 120)
-- body
self:SetColorizationMaterial(2, -5987164, 120, 20)
-- color of bands
self:SetColorizationMaterial(3, -13031651, -128, 48)
-- show the pin info
self.producers = {self}
self:SpawnThumper()
end
-- retrieves prod info
function PortableMiner:BuildProdInfo(info, res_name)
if self.resource ~= res_name then
info[#info+1] = T{476, "Lifetime production<right><resource(LifetimeProduction, resource)>",
resource = res_name, LifetimeProduction = self.lifetime_table[res_name], self}
end
end
function PortableMiner:Getui_command()
local info = {}
-- add life time info from the not selected reses
self:BuildProdInfo(info, "Metals")
self:BuildProdInfo(info, "PreciousMetals")
self:BuildProdInfo(info, "Concrete")
-- change lifetime to lifetime of that res
self.lifetime_production = self.lifetime_table[self.resource]
info[#info+1] = ResourceProducer.GetUISectionResourceProducerRollover(self)
self.lifetime_production = self.lifetime_table.All
return table.concat(info, "<newline><left>")
end
-- fake it till you make it (needed by GetUISectionResourceProducerRollover)
function PortableMiner:GetAmountStored()
return self.stockpile and self.stockpile:GetStoredAmount() or 0
end
function PortableMiner:GetResourceProduced()
return self.resource
end
function PortableMiner:GetPredictedDailyProduction()
return self.production_per_day
end
-- needs this for the auto button to show up
PortableMiner.ToggleAutoMode_Update = RCTransport.ToggleAutoMode_Update
function PortableMiner:Done()
if IsValid(self.thumper) then
DoneObject(self.thumper)
end
end
function PortableMiner:SpawnThumper()
if IsValid(self.thumper) then
return
end
local thumper = MeteorInterceptParabolicRocket:new()
--~ local spot = self:GetSpotBeginIndex("Rocket")
--~ self:Attach(thumper, spot)
--~ local pos = self:GetSpotLoc(spot)
--~ thumper:SetPos(pos)
thumper:SetScale(150)
thumper:SetVisible(false)
thumper:SetColorModifier(-16777216)
self.thumper = thumper
end
function PortableMiner:Goto(...)
self.thumper:SetVisible(false)
return Unit.Goto(self, ...)
end
-- for auto mode
function PortableMiner:ProcAutomation()
local unreachable_objects = self:GetUnreachableObjectsTable()
local deposit = MapFindNearest(self, "map", "SubsurfaceDeposit", "TerrainDeposit", --[["SurfaceDeposit", ]] function(d)
if d:IsKindOf("TerrainDepositConcrete") and d:GetDepositMarker() or
(d:IsKindOfClasses(self.mineable) and
(d.depth_layer < 2 or self.city:IsTechResearched("DeepMetalExtraction"))) then
return not unreachable_objects[d]
end
end)
if deposit then
local deposit_pos = GetPassablePointNearby(deposit:GetPos())
if self:HasPath(deposit_pos, "Origin") then
-- if leaving an empty site then this sign should be turned off
self:ShowNotWorkingSign(false)
self:SetCommand("Goto", deposit_pos)
else
unreachable_objects[deposit] = true
end
else
-- turn off auto for all miners if no deposits
local miners = self.city.labels.PortableMiner or ""
for i = 1, #miners do
local miner = miners[i]
miner.auto_mode_on = false
miner:ShowNotWorkingSign(true)
miner:SetCommand("Idle")
end
end
Sleep(2500)
end
-- if we're in auto-mode then make the stockpile take more
function PortableMiner:ToggleAutoMode(broadcast)
-- if it's on it's about to be turned off
if IsValid(self.stockpile) then
self.stockpile.max_z = self.auto_mode_on and pms.max_z_stack_man or pms.max_z_stack_auto
end
return BaseRover.ToggleAutoMode(self, broadcast)
end
function PortableMiner:Idle()
-- if there's one near then mine that bugger
if self:DepositNearby() then
self:ShowNotWorkingSign(false)
-- get to work
self:SetCommand("Load")
-- we in auto-mode?
elseif g_RoverAIResearched and self.auto_mode_on then
self:ProcAutomation()
-- check if stockpile is existing and full
elseif not self.notworking_sign and IsValid(self.stockpile)
and (self:GetVisualDist(self.stockpile) >= 5000 or
self.stockpile:GetStoredAmount() < (self.auto_mode_on
and pms.max_res_amount_auto or pms.max_res_amount_man)) then
self:ShowNotWorkingSign(false)
end
--~ Sleep(type(delay) == "number" or 2500)
self:Gossip("Idle")
self:SetState("idle")
-- kill off thread if we're in one
Halt()
end
function PortableMiner:DepositNearby()
local d = MapFindNearest(self, "map", "SubsurfaceDeposit", "TerrainDeposit", --[["SurfaceDeposit", ]] function(o)
return self:GetVisualDist(o) < self.mine_dist
end)
-- if it's concrete and there's a marker then we're good, if it's sub then check depth + tech researched
if d and (d:IsKindOf("TerrainDepositConcrete") and d:GetDepositMarker() or
(d:IsKindOfClasses(self.mineable) and
(d.depth_layer < 2 or self.city:IsTechResearched("DeepMetalExtraction")))) then
-- let miner know what kind we're mining
self.resource = d.resource
-- we need to store res as [1] to use the built-in metal extract func
self.nearby_deposits[1] = d
-- untouched concrete starts off with false for the amount...
d.amount = d.amount or d.max_amount
return true
end
-- nadda
table.iclear(self.nearby_deposits)
return false
end
function PortableMiner:ShowNotWorkingSign(work)
if work then
self.notworking_sign = true
self:AttachSign(self.notworking_sign, "SignNotWorking")
else
self.notworking_sign = false
self:AttachSign(self.notworking_sign, "SignNotWorking")
end
end
-- get rid of it showing up in the buildings not working OnScreenNotificationPreset
function PortableMiner:SetWorking(work)
work = not not work
local old_working = self.working
self.working = work
if self.working == old_working then
return
end
self:OnSetWorking(work)
end
-- called it Load so it uses the load resource icon in pins
function PortableMiner:Load()
local rocket_pos
if mod_ShowRocket then
-- get pos of where the "rocket" moves
local spot = self:GetSpotBeginIndex("Rocket")
rocket_pos = self:GetSpotLoc(spot)
self.thumper:SetPos(rocket_pos)
end
local skip_end
if #self.nearby_deposits > 0 then
-- remove removed stockpile
if not IsValid(self.stockpile) then
self.stockpile = false
end
-- check if a stockpile is in dist, and if it's the correct res, and not another miner's pile
if not self.stockpile or self:GetVisualDist(self.stockpile) > 5000 or
self.stockpile and (self.stockpile.resource ~= self.resource or self.stockpile.miner_handle ~= self.handle) then
-- try to get one close by
local stockpile = MapFindNearest(self, "map", "PortableStockpile", function(o)
return self:GetVisualDist(o) < 5000
end)
-- add new stockpile if none
if not stockpile or stockpile and (stockpile.resource ~= self.resource or stockpile.miner_handle ~= self.handle) then
-- plunk down a new res stockpile
stockpile = PortableStockpile:new()
stockpile:SetPos(MovePointAway(self:GetDestination(), self:GetSpotLoc(self:GetSpotBeginIndex(self.pooper_shooter)), -800))
stockpile:SetAngle(self:GetAngle())
stockpile.resource = self.resource
stockpile.destroy_when_empty = true
end
stockpile.miner_handle = self.handle
stockpile.max_z = self.auto_mode_on and pms.max_z_stack_auto or pms.max_z_stack_man
-- assign it to the miner
self.stockpile = stockpile
end
-- stop at max_res_amount per stockpile
if self.stockpile:GetStoredAmount() < (self.auto_mode_on and pms.max_res_amount_auto or pms.max_res_amount_man) then
-- remove the sign
self:ShowNotWorkingSign(false)
-- up n down n up n down
self:SetStateText(self.default_anim)
local time = pms.mine_time_anim[self.resource] or self:TimeToAnimEnd()
-- feel that rocket slide
if mod_ShowRocket then
self.thumper:SetVisible(true)
--~ self.thumper:SetPos(rocket_pos+point(0,0,300), time)
self.thumper:SetPos(rocket_pos:AddZ(300), time)
end
Sleep(time)
-- mine some loot
local mined = self:DigErUp()
if mined then
-- if it gets deleted by somebody mid mine :)
if IsValid(self.stockpile) then
-- update stockpile
self.stockpile:AddResourceAmount(mined)
else
skip_end = true
self.stockpile = false
end
local infoamount = ResourceOverviewObj.data[self.resource]
infoamount = infoamount + 1
-- per res
self.lifetime_table[self.resource] = self.lifetime_table[self.resource] + mined
-- combined
self.lifetime_table.All = self.lifetime_table.All + mined
-- probably need to do this for infobar?
self.lifetime_production = self.lifetime_table.All
-- daily reset
self.production_per_day = self.production_per_day + mined
-- update selection info panel
if SelectedObj == self then
ObjModified(self)
end
end
else
-- no need to keep on re-showing sign (assuming there isn't a check for this, but an if bool is quicker then whatever it does)
if not self.notworking_sign then
self:ShowNotWorkingSign(true)
end
end
end
if not skip_end then
local time = pms.mine_time_idle[self.resource] or self:TimeToAnimEnd()
-- if not idle state then make idle state (the raise up motion of the mining)
if self:GetState() ~= 0 then
self:SetStateText(self.default_anim_idle)
if mod_ShowRocket then
--~ self.thumper:SetPos(rocket_pos+point(0,0,-300), time)
self.thumper:SetPos(rocket_pos:AddZ(-300), time)
end
end
Sleep(time)
self.thumper:SetVisible(false)
end
end
function OnMsg.NewDay() -- NewSol...
-- reset the prod count (for overview or something)
local miners = UICity.labels.PortableMiner or ""
for i = 1, #miners do
miners[i].production_per_day = 0
end
end
-- called when the mine is gone/empty (returns nil to skip the add res amount stuff)
function PortableMiner:MineIsEmpty()
-- it's done so remove our ref to it
table.iclear(self.nearby_deposits)
-- needed to mine other concrete
self.found_deposit = false
-- if there's a mine nearby then off we go
if self:DepositNearby() then
self:SetCommand("Load")
return
end
-- omg it's isn't doing anythings @!@!#!?
table.insert_unique(g_IdleExtractors, self)
-- hey look at me!
self:ShowNotWorkingSign(true)
end
function PortableMiner:DigErUp()
local d = self.nearby_deposits[1]
if not IsValid(d) then
return self:MineIsEmpty()
end
--[[
-- stupid surface deposits
if self.nearby_deposits[1]:IsKindOfClasses{"SurfaceDepositGroup", "SurfaceDepositMetals", "SurfaceDepositConcrete", "SurfaceDepositPolymers"} then
local res = self.nearby_deposits[1]
res = res.group and res.group[1] or res
-- get one with amounts
while true do
if res.transport_request:GetActualAmount() == 0 then
table.remove(self.nearby_deposits[1].group, 1)
res = self.nearby_deposits[1]
res = res.group and res.group[1] or res
else
break
end
end
-- remove what we need
if res.transport_request:GetActualAmount() >= amount then
res.transport_request:SetAmount(amount * -1)
end
else
amount = self.nearby_deposits[1]:TakeAmount(amount)
end
]]
local amount = pms.mine_amount
-- if there isn't much left get what's left
if amount > d.amount then
amount = d.amount
end
local extracted, paint
if self.resource == "Concrete" then
extracted = TerrainDepositExtractor.ExtractResource(self, amount)
paint = self.concrete_paint or concrete_paint
else
extracted = BuildingDepositExploiterComponent.ExtractResource(self, amount)
paint = self.metal_paint or metal_paint
end
-- if it's empty ExtractResource will delete it
if extracted == 0 or not IsValid(d) then
return self:MineIsEmpty()
end
-- visual cues
if pms.visual_cues then
terrain.SetTypeCircle(GetRandomPassableAround(self, 5000), guim, paint)
end
return extracted
end
function PortableMiner:CanExploit()
-- I don't need to check for tech here, since we check before we add it
return IsValid(self.nearby_deposits[1])
end
function PortableMiner:OnSelected()
self:AttachSign(false, "SignNotWorking")
table.remove_entry(g_IdleExtractors, self)
end
-- needed for Concrete
function PortableMiner:GetExtractionShape()
return self.mine_area
end
function OnMsg.ClassesPostprocess()
if not BuildingTemplates.PortableMinerBuilding then
PlaceObj("BuildingTemplate", {
"Id", "PortableMinerBuilding",
"template_class", "PortableMinerBuilding",
-- pricey?
"construction_cost_Metals", 40000,
"construction_cost_MachineParts", 40000,
"construction_cost_Electronics", 20000,
-- add a bit of pallor to the skeleton
"palettes", AttackRover.palette,
"dome_forbidden", true,
"display_name", T(302535920011207, [[RC Miner]]),
"display_name_pl", T(302535920011208, [[RC Miners]]),
"description", T(302535920011209, [[Will slowly (okay maybe a little quickly) mine Metal or Concrete into a resource pile.]]),
"build_category", "ChoGGi",
"Group", "ChoGGi",
"display_icon", CurrentModPath .. "UI/rover_combat.png",
"encyclopedia_exclude", true,
"count_as_building", false,
"prio_button", false,
"on_off_button", false,
"entity", "CombatRover",
})
end
end
|
require('rentziass.utils.keymaps')
NMap('<C-n>', ':NvimTreeToggle<CR>')
NMap('<Leader>n', ':NvimTreeFindFile<CR>')
NMap('<Leader>r', ':NvimTreeRefresh<CR>')
require('nvim-tree').setup()
|
local data_dir = vim.fn.stdpath('data')
local languageServerPath = data_dir .. "/lspinstall/angular"
local lsp = require('modules.lsp')
local tsProbeLoc = data_dir .. "/lspinstall/typescript/node_modules"
local cmd = {
"node",
languageServerPath .. "/node_modules/@angular/language-server/index.js",
"--stdio", "--tsProbeLocations", tsProbeLoc, "--ngProbeLocations",
languageServerPath
}
require'lspconfig'.angularls.setup {
cmd = cmd,
on_attach = lsp.enhance_attach,
capabilities = lsp.capabilities,
on_new_config = function(new_config, new_root_dir) new_config.cmd = cmd end
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.