content
stringlengths 5
1.05M
|
|---|
local LRN, parent = torch.class('cudnn.SpatialCrossMapLRN', 'nn.Module')
local ffi = require 'ffi'
local errcheck = cudnn.errcheck
function LRN:__init(size, alpha, beta, k)
parent.__init(self)
self.size = size or 5
self.alpha = alpha or 1e-4
self.beta = beta or 0.75
self.k = k or 1.0
assert(self.size >= 1 and self.size <= 16, "size has to be between 1 and 16")
assert(self.k >= 1e-5, "k has to be greater than 1e-5")
assert(self.beta >= 0.01, "Beta has to be > 0.01")
end
function LRN:resetDescriptors()
-- create LRN descriptor
self.LRNDesc = ffi.new('struct cudnnLRNStruct*[1]')
errcheck('cudnnCreateLRNDescriptor', self.LRNDesc)
errcheck('cudnnSetLRNDescriptor', self.LRNDesc[0], self.size,
self.alpha, self.beta, self.k);
local function destroyDesc(d)
errcheck('cudnnDestroyLRNDescriptor', d[0]);
end
ffi.gc(self.LRNDesc, destroyDesc)
end
function LRN:createIODescriptors(input)
local batch = true
if input:dim() == 3 then
input = input:view(1, input:size(1), input:size(2), input:size(3))
batch = false
end
assert(input:dim() == 4 and input:isContiguous());
if not self.iDesc or
input:size(1) ~= self.iSize[1] or input:size(2) ~= self.iSize[2]
or input:size(3) ~= self.iSize[3] or input:size(4) ~= self.iSize[4] then
self.iSize = input:size()
self.output:resizeAs(input)
-- create input/output descriptor
self.iDesc = cudnn.toDescriptor(input)
if not batch then
self.output = self.output:view(self.output:size(2),
self.output:size(3),
self.output:size(4))
end
end
end
function LRN:updateOutput(input)
if self.K then self.k, self.K = self.K, nil end
if not self.LRNDesc then self:resetDescriptors() end
self:createIODescriptors(input)
errcheck('cudnnLRNCrossChannelForward', cudnn.getHandle(),
self.LRNDesc[0],
'CUDNN_LRN_CROSS_CHANNEL_DIM1',
cudnn.scalar(input, 1),
self.iDesc[0], input:data(),
cudnn.scalar(input, 0),
self.iDesc[0], self.output:data());
return self.output
end
function LRN:updateGradInput(input, gradOutput)
if not self.gradInput then return end
self.gradInput:resizeAs(input)
assert(gradOutput:dim() == 3 or gradOutput:dim() == 4);
if not gradOutput:isContiguous() then
self._gradOutput = self._gradOutput or gradOutput.new()
self._gradOutput:resizeAs(gradOutput):copy(gradOutput)
gradOutput = self._gradOutput
end
if not self.LRNDesc then self:resetDescriptors() end
self:createIODescriptors(input)
errcheck('cudnnLRNCrossChannelBackward',
cudnn.getHandle(), self.LRNDesc[0],
'CUDNN_LRN_CROSS_CHANNEL_DIM1',
cudnn.scalar(input, 1),
self.iDesc[0], self.output:data(),
self.iDesc[0], gradOutput:data(),
self.iDesc[0], input:data(),
cudnn.scalar(input, 0),
self.iDesc[0], self.gradInput:data());
return self.gradInput
end
function LRN:clearDesc()
self.LRNDesc = nil
self.iDesc = nil
end
function LRN:write(f)
self:clearDesc()
local var = {}
for k,v in pairs(self) do
var[k] = v
end
f:writeObject(var)
end
function LRN:clearState()
self:clearDesc()
nn.utils.clear(self, '_gradOutput')
return nn.Module.clearState(self)
end
|
--***********************************************************
--** ROBERT JOHNSON **
--***********************************************************
require "TimedActions/ISBaseTimedAction"
---@class ISDestroyStuffAction : ISBaseTimedAction
ISDestroyStuffAction = ISBaseTimedAction:derive("ISDestroyStuffAction");
function ISDestroyStuffAction:isValid()
local sledgehammer = self.character:getInventory():getBestCondition("Sledgehammer")
if not sledgehammer then
sledgehammer = self.character:getInventory():getBestCondition("Sledgehammer2")
end
if not sledgehammer or sledgehammer:isBroken() then return false end
return self.item:getObjectIndex() ~= -1;
end
function ISDestroyStuffAction:waitToStart()
self.character:faceThisObject(self.item)
return self.character:shouldBeTurning()
end
function ISDestroyStuffAction:update()
self.character:faceThisObject(self.item);
-- if self.spriteFrame < 5 and self.character:getSpriteDef():getFrame() >= 5 then
-- getSoundManager():PlayWorldSound("breakdoor", false, self.item:getSquare(), 1, 20, 1, false)
-- self.item:getSquare():playSound("HitObjectWithSledgehammer");
-- addSound(self.character, self.character:getX(), self.character:getY(), self.character:getZ(), 20, 10)
-- end
self.spriteFrame = self.character:getSpriteDef():getFrame();
self.character:setMetabolicTarget(Metabolics.HeavyWork);
end
function ISDestroyStuffAction:start()
if not self.sledge then
self.sledge = self.character:getPrimaryHandItem();
end
self:setActionAnim(CharacterActionAnims.Destroy)
-- getSoundManager():PlaySound("breakdoor", false, 1);
-- add a sound to the list so zombie/npc can hear it
addSound(self.character, self.character:getX(),self.character:getY(),self.character:getZ(), 20, 10);
end
function ISDestroyStuffAction:stop()
ISBaseTimedAction.stop(self);
end
function ISDestroyStuffAction:perform()
-- we add the items contained inside the item we destroyed to put them randomly on the ground
for i=1,self.item:getContainerCount() do
local container = self.item:getContainerByIndex(i-1)
for j=1,container:getItems():size() do
self.item:getSquare():AddWorldInventoryItem(container:getItems():get(j-1), 0.0, 0.0, 0.0)
end
end
-- destroy window if wall is destroyed
if self.item:getSquare():getWall(false) == self.item or self.item:getSquare():getWall(true) == self.item then
for i=0,self.item:getSquare():getSpecialObjects():size()-1 do
local o = self.item:getSquare():getSpecialObjects():get(i)
if instanceof(o, 'IsoWindow') and (o:getNorth() == self.item:getProperties():Is(IsoFlagType.cutN)) then
self.item = o
break
end
end
end
-- destroy barricades if door or window is destroyed
if instanceof(self.item, 'IsoDoor') or (instanceof(self.item, 'IsoThumpable') and self.item:isDoor()) or
instanceof(self.item, 'IsoWindow') then
local barricade1 = self.item:getBarricadeOnSameSquare()
local barricade2 = self.item:getBarricadeOnOppositeSquare()
if barricade1 then
barricade1:getSquare():transmitRemoveItemFromSquare(barricade1)
barricade1:getSquare():RemoveTileObject(barricade1)
end
if barricade2 then
barricade2:getSquare():transmitRemoveItemFromSquare(barricade2)
barricade2:getSquare():RemoveTileObject(barricade2)
end
end
-- remove curtains if window is destroyed
if instanceof(self.item, 'IsoWindow') and self.item:HasCurtains() then
local curtains = self.item:HasCurtains()
curtains:getSquare():transmitRemoveItemFromSquare(curtains)
local sheet = InventoryItemFactory.CreateItem("Base.Sheet")
self.item:getSquare():AddWorldInventoryItem(sheet, 0, 0, 0)
end
-- remove sheet rope too
if instanceof(self.item, 'IsoWindow') or instanceof(self.item, 'IsoThumpable') then
self.item:removeSheetRope(nil);
end
if instanceof(self.item, 'IsoCurtain') and self.item:getSquare() then
local sheet = InventoryItemFactory.CreateItem("Base.Sheet")
self.item:getSquare():AddWorldInventoryItem(sheet, 0, 0, 0)
end
-- toggle off if it was a generator
if instanceof(self.item, 'IsoGenerator') then
self.item:setActivated(false);
end
-- Hack, should we do triggerEvent("OnDestroyIsoThumpable") here?
-- When you destroy with an axe, you get "need:XXX" materials back.
if isClient() then
local sq = self.item:getSquare()
local args = { x = sq:getX(), y = sq:getY(), z = sq:getZ(), index = self.item:getObjectIndex() }
sendClientCommand(self.character, 'object', 'OnDestroyIsoThumpable', args)
end
-- Destroy all 3 stair objects (and sometimes the floor at the top)
local stairObjects = buildUtil.getStairObjects(self.item)
-- Destroy all 4 double-door objects
local doubleDoorObjects = buildUtil.getDoubleDoorObjects(self.item)
local garageDoorObjects = buildUtil.getGarageDoorObjects(self.item)
local graveObjects = buildUtil.getGraveObjects(self.item)
if #stairObjects > 0 then
for i=1,#stairObjects do
if isClient() then
sledgeDestroy(stairObjects[i]);
else
stairObjects[i]:getSquare():transmitRemoveItemFromSquare(stairObjects[i])
end
end
elseif #doubleDoorObjects > 0 then
for i=1,#doubleDoorObjects do
if isClient() then
sledgeDestroy(doubleDoorObjects[i]);
else
doubleDoorObjects[i]:getSquare():transmitRemoveItemFromSquare(doubleDoorObjects[i])
end
end
elseif #garageDoorObjects > 0 then
for i=1,#garageDoorObjects do
local object = garageDoorObjects[i]
if isClient() then
sledgeDestroy(object)
else
object:getSquare():transmitRemoveItemFromSquare(object)
end
end
elseif #graveObjects > 0 then
for i=1,#graveObjects do
if isClient() then
sledgeDestroy(graveObjects[i]);
else
graveObjects[i]:getSquare():transmitRemoveItemFromSquare(graveObjects[i])
end
end
else
if isClient() then
sledgeDestroy(self.item);
else
self.item:getSquare():transmitRemoveItemFromSquare(self.item)
end
end
--~ local aboveGrid = getCell():getGridSquare(self.item:getSquare():getX(), self.item:getSquare():getY(), self.item:getSquare():getZ() + 1);
--~ if aboveGrid then
--~ print("grid exist");
--[[ do this only if the destroyed object was a lower crate; it doesn't handle carpentry crates
for i=0, self.item:getSquare():getObjects():size() - 1 do
local itemAbove = self.item:getSquare():getObjects():get(i);
if itemAbove:getSprite() then
if itemAbove:getSprite():getName() == "carpentry_01_17" then
itemAbove:setSprite(getSprite("carpentry_01_16"));
end
if itemAbove:getSprite():getName() == "carpentry_01_18" then
itemAbove:setSprite(getSprite("carpentry_01_17"));
end
end
end
--]]
--~ end
-- getSoundManager():PlaySound("breakdoor", false, 1);
-- add a sound to the list so zombie/npc can hear it
addSound(self.character, self.character:getX(),self.character:getY(),self.character:getZ(), 10, 10);
-- reduce the sledge condition
local sledge = self.character:getPrimaryHandItem();
if ZombRand(sledge:getConditionLowerChance() * 2) == 0 then
sledge:setCondition(sledge:getCondition() - 1);
ISWorldObjectContextMenu.checkWeapon(self.character);
end
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self);
end
function ISDestroyStuffAction:new(character, item)
local o = {}
setmetatable(o, self)
self.__index = self
o.character = character;
o.item = item;
o.stopOnWalk = true;
o.stopOnRun = true;
o.maxTime = 300 - (character:getPerkLevel(Perks.Strength) * 10);
if ISBuildMenu.cheat then o.maxTime = 1 end
if character:isTimedActionInstant() then
o.maxTime = 1;
end
o.spriteFrame = 0
o.caloriesModifier = 8;
return o;
end
|
--------------------------------------
-------------线上虚拟物品界面------------
--------------------------------------
local InfoWidgetBase = require("hall/backpack/widget/popWnd/InfoWidgetBase");
local InfoWidgetOnlineVirtual = class(InfoWidgetBase,false);
InfoWidgetOnlineVirtual.s_layerName = "case_onlineVirtual_use";
InfoWidgetOnlineVirtual.ctor = function(self,p_data)
self.m_data = p_data;
super(self,InfoWidgetOnlineVirtual.s_layerName);
end
InfoWidgetOnlineVirtual.dtor = function(self)
end
--初始化
InfoWidgetOnlineVirtual.init = function(self)
InfoWidgetBase.init(self);
local __commonFunction = require("hall/backpack/commonFunction/commonFunction");
local __timeString = __commonFunction.getTimeString(self.m_data.expiresSec);
self.mm_Text_numOrday:setText("有效期: "..__timeString);
self.mm_btnDescribe:setText("使用");
--是否显示警示框
if LoginDataInterface.getInstance():getLastUType() == LoginConstants.uType.Guest then
self.mm_btnDescribe:setText("绑定手机");
self.mm_Text__bindPhoneNumberTip:setVisible(true);
end
end
--关闭按钮绑定
InfoWidgetOnlineVirtual.onbutton_CloseClick = function(self)
InfoWidgetBase.onbutton_CloseClick(self);
end
--使用按钮绑定
InfoWidgetOnlineVirtual.onbutton_useClick = function(self)
if LoginDataInterface.getInstance():getLastUType() == LoginConstants.uType.Guest then
local RegisterAccountDialog = require("hall/login/widget/registerAccountDialog");
local function __call()
LayerManagerIsolater.getInstance():show("case_list_ui");
end
RegisterAccountDialog.show({closeCall = __call});
LayerManagerIsolater.getInstance():hide("case_list_ui");
delete(self);
return ;
end
local _instance = kCaseOperationInstance:getInterfaceByType(self.m_data.clientType);
if _instance then
_instance:showAndFillDetailInfo(self.m_data);
end
self:onbutton_CloseClick();
end
return InfoWidgetOnlineVirtual;
|
local lu = require 'luaunit'
local openssl = require 'openssl'
local algor = require'openssl'.x509.algor
TestX509Algor = {}
function TestX509Algor:testAll()
local alg1 = algor.new()
--FIXME
--assert(alg1:dup() == nil)
local alg2 = algor.new()
if alg1.equals then
assert(alg1:equals(alg2))
assert(alg1==alg2)
end
alg1:md('sha1')
alg2:md('sha256')
assert(alg1~=alg2)
local o1 = openssl.asn1.new_object('C')
alg1:set(o1)
local a, b = alg1:get()
print(tostring(a))
assert(tostring(a):match('openssl.asn1_object:'))
assert(b==nil)
local s = openssl.asn1.new_string('CN', openssl.asn1.UTF8STRING)
alg1:set(o1, s)
a, b = alg1:get()
assert(tostring(a):match('openssl.asn1_object'))
assert(o1==a)
assert(b==s)
local b = alg2:get()
assert(a~=b)
alg2 = assert(alg1:dup())
assert(alg2==alg1)
end
|
--; ============================================================
--; Lua Color (Minecraft)
--; ============================================================
colorSelect = {
["Mask"] = {
colorCode = "ExecuteBatch 1"
},
["Gradient 1"] = {
colorCode = "ExecuteBatch 2"
},
["Gradient 2"] = {
colorCode = "ExecuteBatch 3"
}
}
function setMinecraftColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinMinecraft" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
function setMinecraftDungeonsColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinMinecraftDungeons" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
function setBadlionColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinBadlion" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
function setBatmodColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinBatmod" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
function setCosmicColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinCosmic" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
function setLabyModColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinLabyMod" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
function setLunarColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinLunar" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
function setPvPLoungeColorManual(selectedCode)
SKIN:Bang('!CommandMeasure "MeterSkinPvPLounge" "' .. colorSelect[selectedCode]['colorCode'] .. '"')
end
--; ============================================================
--; ============================================================
--; Lua Mask (Minecraft)
--; ============================================================
maskMinecraftSelect = {
["Alter Celtic Knot"] = {
minecraftMaskMeter = "Image",
minecraftMaskStyle = "AlterCelticKnot",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Alter Chain"] = {
minecraftMaskMeter = "Image",
minecraftMaskStyle = "AlterChain",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Alter Circle"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "AlterCircle",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Alter Hexagon"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "AlterHexagon",
minecraftMaskShape = "Hexagon",
minecraftRegularHidden = "0"
},
["Alter Square"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "AlterSquare",
minecraftMaskShape = "Square",
minecraftRegularHidden = "0"
},
["Alter Circle V2"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "AlterCircleV2",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Alter Hexagon V2"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "AlterHexagonV2",
minecraftMaskShape = "Hexagon",
minecraftRegularHidden = "0"
},
["Alter Square V2"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "AlterSquareV2",
minecraftMaskShape = "Square",
minecraftRegularHidden = "0"
},
["Dashed Circle"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "DashedCircle",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Dashed Hexagon"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "DashedHexagon",
minecraftMaskShape = "Hexagon",
minecraftRegularHidden = "0"
},
["Inline Circle"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "InlineCircle",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Inline Hexagon"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "InlineHexagon",
minecraftMaskShape = "Hexagon",
minecraftRegularHidden = "0"
},
["Inline Square"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "InlineSquare",
minecraftMaskShape = "Square",
minecraftRegularHidden = "0"
},
["Regular Celtic Knot"] = {
minecraftMaskMeter = "Image",
minecraftMaskStyle = "CelticKnot",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Regular Chain"] = {
minecraftMaskMeter = "Image",
minecraftMaskStyle = "Chain",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Regular Circle"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "Blank",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "1"
},
["Regular Hexagon"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "Blank",
minecraftMaskShape = "Hexagon",
minecraftRegularHidden = "1"
},
["Regular Square"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "Blank",
minecraftMaskShape = "Square",
minecraftRegularHidden = "1"
},
["Split Circle"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "SplitCircle",
minecraftMaskShape = "Circle",
minecraftRegularHidden = "0"
},
["Split Hexagon"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "SplitHexagon",
minecraftMaskShape = "Hexagon",
minecraftRegularHidden = "0"
},
["Split Square"] = {
minecraftMaskMeter = "Shape",
minecraftMaskStyle = "SplitSquare",
minecraftMaskShape = "Square",
minecraftRegularHidden = "0"
}
}
function setMinecraftMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables MinecraftMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setMinecraftDungeonsMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables MinecraftDungeonsMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftDungeonsMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftDungeonsShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftDungeonsMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MinecraftDungeonsRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setBadlionMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables BadlionMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BadlionMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BadlionShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BadlionMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BadlionRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setBatmodMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables BatmodMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BatmodMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BatmodShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BatmodMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BatmodRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setBetterMinecraftMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables BetterMinecraftMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BetterMinecraftMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BetterMinecraftShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BetterMinecraftMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables BetterMinecraftRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setCosmicMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables CosmicMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables CosmicMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables CosmicShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables CosmicMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables CosmicRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setLabyModMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables LabyModMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LabyModMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LabyModShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LabyModMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LabyModRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setLunarMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables LunarMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LunarMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LunarShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LunarMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables LunarRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setMultiMCMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables MultiMCMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MultiMCMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MultiMCShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MultiMCMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables MultiMCRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setPixelmonMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables PixelmonMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PixelmonMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PixelmonShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PixelmonMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PixelmonRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setPvPLoungeMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables PvPLoungeMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PvPLoungeMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PvPLoungeShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PvPLoungeMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables PvPLoungeRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setRLCraftMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables RLCraftMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables RLCraftMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables RLCraftShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables RLCraftMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables RLCraftRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
function setValhelsiaMask(selectedMask)
SKIN:Bang('!WriteKeyValue Variables ValhelsiaMask "' .. selectedMask .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables ValhelsiaMaskMeter "' .. maskMinecraftSelect[selectedMask]['minecraftMaskMeter'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables ValhelsiaShape "' .. maskMinecraftSelect[selectedMask]['minecraftMaskShape'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables ValhelsiaMaskStyle "' .. maskMinecraftSelect[selectedMask]['minecraftMaskStyle'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!WriteKeyValue Variables ValhelsiaRegularHidden "' .. maskMinecraftSelect[selectedMask]['minecraftRegularHidden'] .. '" "#@#Plus\\Variables.inc" ')
SKIN:Bang('!UpdateGroup ShapeSettings')
SKIN:Bang('!RefreshGroup ShapeSettings')
end
--; ============================================================
hoverCategorySelect = {
["Over"] = {
colorApply = "255,215,0"
},
["Leave"] = {
colorApply = "255,255,255"
}
}
function setSkinApply(selectedHover)
SKIN:Bang('!SetOption MeterApplyButton FontColor "' .. hoverCategorySelect[selectedHover]['colorApply'] .. '"')
SKIN:Bang('!UpdateMeter *')
SKIN:Bang('!Redraw')
end
function setApply()
SKIN:Bang('!RefreshGroup SIMinecraft')
end
|
function data()
return {
info = {
minorVersion = 4,
severityAdd = "NONE",
severityRemove = "CRITICAL",
name = _("name"),
description = _("desc"),
authors = {
{
name = "Enzojz",
role = "CREATOR",
text = "Idea, Scripting, Modeling, Textures",
steamProfile = "enzojz",
tfnetId = 27218,
}
},
tags = {"Track Asset", "Asset"},
},
}
end
|
local ssl_fixtures = require "spec.fixtures.ssl"
local helpers = require "spec.helpers"
local cjson = require "cjson"
local function it_content_types(title, fn)
local test_form_encoded = fn("application/x-www-form-urlencoded")
local test_json = fn("application/json")
it(title.." with application/www-form-urlencoded", test_form_encoded)
it(title.." with application/json", test_json)
end
describe("Admin API", function()
local client
setup(function()
assert(helpers.start_kong())
client = assert(helpers.admin_client())
end)
teardown(function()
if client then client:close() end
helpers.stop_kong()
end)
describe("/certificates", function()
describe("POST", function()
before_each(function()
helpers.dao:truncate_tables()
end)
it_content_types("creates a certificate", function(content_type)
return function()
local res = assert(client:send {
method = "POST",
path = "/certificates",
body = {
cert = ssl_fixtures.cert,
key = ssl_fixtures.key,
snis = "foo.com,bar.com",
},
headers = { ["Content-Type"] = content_type },
})
local body = assert.res_status(201, res)
local json = cjson.decode(body)
assert.is_string(json.cert)
assert.is_string(json.key)
assert.same({ "foo.com", "bar.com" }, json.snis)
end
end)
end)
describe("GET", function()
it("retrieves all certificates", function()
local res = assert(client:send {
method = "GET",
path = "/certificates",
})
local body = assert.res_status(200, res)
local json = cjson.decode(body)
assert.equal(1, #json)
assert.is_string(json[1].cert)
assert.is_string(json[1].key)
assert.same({ "foo.com", "bar.com" }, json[1].snis)
end)
end)
describe("/certificates/:sni_or_uuid", function()
describe("GET", function()
it("retrieves a certificate by SNI", function()
local res1 = assert(client:send {
method = "GET",
path = "/certificates/foo.com",
})
local body1 = assert.res_status(200, res1)
local json1 = cjson.decode(body1)
local res2 = assert(client:send {
method = "GET",
path = "/certificates/bar.com",
})
local body2 = assert.res_status(200, res2)
local json2 = cjson.decode(body2)
assert.is_string(json1.cert)
assert.is_string(json1.key)
assert.same({ "foo.com", "bar.com" }, json1.snis)
assert.same(json1, json2)
end)
end)
describe("PATCH", function()
it_content_types("updates a certificate by SNI", function(content_type)
return function()
local res = assert(client:send {
method = "PATCH",
path = "/certificates/foo.com",
body = {
cert = content_type
},
headers = { ["Content-Type"] = content_type }
})
local body = assert.res_status(200, res)
local json = cjson.decode(body)
assert.equal(content_type, json.cert)
end
end)
end)
describe("DELETE", function()
it("deletes a certificate and all related SNIs", function()
local res = assert(client:send {
method = "DELETE",
path = "/certificates/foo.com",
})
assert.res_status(204, res)
res = assert(client:send {
method = "GET",
path = "/certificates/foo.com",
})
assert.res_status(404, res)
res = assert(client:send {
method = "GET",
path = "/certificates/bar.com",
})
assert.res_status(404, res)
end)
it("deletes a certificate by id", function()
local res = assert(client:send {
method = "POST",
path = "/certificates",
body = {
cert = "foo",
key = "bar",
},
headers = { ["Content-Type"] = "application/json" }
})
local body = assert.res_status(201, res)
local json = cjson.decode(body)
res = assert(client:send {
method = "DELETE",
path = "/certificates/" .. json.id,
})
assert.res_status(204, res)
end)
end)
end)
end)
describe("/snis", function()
local ssl_certificate
describe("POST", function()
before_each(function()
helpers.dao:truncate_tables()
ssl_certificate = assert(helpers.dao.ssl_certificates:insert {
cert = ssl_fixtures.cert,
key = ssl_fixtures.key,
})
end)
describe("errors", function()
it("certificate doesn't exist", function()
local res = assert(client:send {
method = "POST",
path = "/snis",
body = {
name = "bar.com",
ssl_certificate_id = "585e4c16-c656-11e6-8db9-5f512d8a12cd",
},
headers = { ["Content-Type"] = "application/json" },
})
local body = assert.res_status(404, res)
assert.equal([[{"ssl_certificate_id":"does not exist with value ]]
.. [['585e4c16-c656-11e6-8db9-5f512d8a12cd'"}]], body)
end)
end)
it_content_types("creates a SNI", function(content_type)
return function()
local res = assert(client:send {
method = "POST",
path = "/snis",
body = {
name = "foo.com",
ssl_certificate_id = ssl_certificate.id,
},
headers = { ["Content-Type"] = content_type },
})
local body = assert.res_status(201, res)
local json = cjson.decode(body)
assert.equal("foo.com", json.name)
assert.equal(ssl_certificate.id, json.ssl_certificate_id)
end
end)
end)
describe("GET", function()
it("retrieves a SNI", function()
local res = assert(client:send {
method = "GET",
path = "/snis",
})
local body = assert.res_status(200, res)
local json = cjson.decode(body)
assert.equal(1, #json.data)
assert.equal(1, json.total)
assert.equal("foo.com", json.data[1].name)
assert.equal(ssl_certificate.id, json.data[1].ssl_certificate_id)
end)
end)
describe("/snis/:name", function()
describe("GET", function()
it("retrieves a SNI", function()
local res = assert(client:send {
mathod = "GET",
path = "/snis/foo.com",
})
local body = assert.res_status(200, res)
local json = cjson.decode(body)
assert.equal("foo.com", json.name)
assert.equal(ssl_certificate.id, json.ssl_certificate_id)
end)
end)
describe("PATCH", function()
local ssl_certificate_2
setup(function()
ssl_certificate_2 = assert(helpers.dao.ssl_certificates:insert {
cert = "foo",
key = "bar",
})
end)
it("updates a SNI", function()
local res = assert(client:send {
method = "PATCH",
path = "/snis/foo.com",
body = {
ssl_certificate_id = ssl_certificate_2.id,
},
headers = { ["Content-Type"] = "application/json" },
})
local body = assert.res_status(200, res)
local json = cjson.decode(body)
assert.equal(ssl_certificate_2.id, json.ssl_certificate_id)
end)
end)
describe("DELETE", function()
it("deletes a SNI", function()
local res = assert(client:send {
method = "DELETE",
path = "/snis/foo.com",
})
assert.res_status(204, res)
end)
end)
end)
end)
end)
|
--=========== Copyright © 2018, Planimeter, All rights reserved. ===========--
--
-- Purpose: Label class
--
--==========================================================================--
class "gui.label" ( "gui.panel" )
local label = gui.label
function label:label( parent, name, text )
gui.panel.panel( self, parent, name )
self:setScheme( "Default" )
self.font = self:getScheme( "font" )
self.width = love.window.toPixels( 216 )
self.height = self.font:getHeight()
self.text = text or "Label"
end
function label:draw()
love.graphics.setColor( self:getScheme( "label.textColor" ) )
local font = self:getFont()
love.graphics.setFont( font )
local text = self:getText()
local limit = self:getWidth()
local align = self:getTextAlign()
love.graphics.printf( text, 0, 0, limit, align )
gui.panel.draw( self )
end
accessor( label, "font" )
accessor( label, "text" )
accessor( label, "textAlign" )
function label:setFont( font )
self.font = font
self:invalidate()
end
function label:setText( text )
self.text = text
self:invalidate()
end
function label:setTextAlign( textAlign )
self.textAlign = textAlign
self:invalidate()
end
|
local L, this = ...
this.title = "PAAPI Reference Filesystem Implementation"
this.version = "0.1"
this.status = "prototype"
this.desc = "A no-op module providing a reference API"
local lcore = L.lcore
local utable = lcore.utility.table
local ref_fs
local fs_nop = function(name, ...)
local arg = {...}
local called
return function()
if (not called) then
called = true
print("Method 'filesystem." .. tostring(name) .. "' is not implemented.")
end
return unpack(arg)
end
end
ref_fs = {
derive = function(self, target)
return utable:copymerge(self, target)
end,
read = fs_nop("read", "[reference implementation]"),
write = fs_nop("write", true),
list = fs_nop("list", {}),
is_file = fs_nop("is_file", false),
is_directory = fs_nop("is_directory", false)
}
return ref_fs
|
-- Buildat: extension/__menu/init.lua
-- http://www.apache.org/licenses/LICENSE-2.0
-- Copyright 2014 Perttu Ahola <celeron55@gmail.com>
local log = buildat.Logger("extension/__menu")
local dump = buildat.dump
local magic = require("buildat/extension/urho3d").safe
local uistack = require("buildat/extension/uistack")
local ui_utils = require("buildat/extension/ui_utils").safe
local M = {safe = nil}
local function show_error(message)
ui_utils.show_message_dialog(message)
end
local function show_connect_to_server()
local root = uistack.main:push({desc="connect_to_server"})
local style = magic.cache:GetResource("XMLFile", "__menu/res/main_style.xml")
root.defaultStyle = style
local window = root:CreateChild("Window")
window:SetStyleAuto()
window:SetName("connect_to_server window")
window:SetLayout(LM_VERTICAL, 10, magic.IntRect(10, 10, 10, 10))
window:SetAlignment(HA_LEFT, VA_CENTER)
local line_edit = window:CreateChild("LineEdit")
line_edit:SetStyleAuto()
line_edit:SetName("connect_to_server line_edit")
line_edit.minHeight = 24
line_edit.minWidth = 300
line_edit:SetText("localhost:20000")
line_edit:SetFocus(true)
local connect_button = window:CreateChild("Button")
connect_button:SetStyleAuto()
connect_button:SetName("Button")
connect_button:SetLayout(LM_VERTICAL, 10, magic.IntRect(0, 0, 0, 0))
connect_button.minHeight = 20
local connect_button_text = connect_button:CreateChild("Text")
connect_button_text:SetName("ButtonText")
connect_button_text:SetStyleAuto()
connect_button_text.text = "Connect"
connect_button_text:SetTextAlignment(HA_CENTER)
function connect_or_show_error(address)
local ok, err = buildat.connect_server(line_edit:GetText())
if ok then
log:info("buildat.connect_server() returned true")
local root = uistack.main:push({desc="empty (game is running)"})
magic.ui:SetFocusElement(nil)
else
log:info("buildat.connect_server() returned false")
show_error(err)
end
end
magic.SubscribeToEvent(connect_button, "Released",
function(self, event_type, event_data)
log:info("connect_button: Released")
connect_or_show_error(line_edit:GetText())
end)
magic.SubscribeToEvent(line_edit, "TextFinished",
function(self, event_type, event_data)
log:info("line_edit: TextFinished")
connect_or_show_error(line_edit:GetText())
end)
root:SubscribeToStackEvent("KeyDown", function(event_type, event_data)
local key = event_data:GetInt("Key")
if key == KEY_ESC then
log:info("KEY_ESC pressed at connect_to_server level")
uistack.main:pop(root)
end
end)
end
function M.boot()
local root = uistack.main:push("boot")
local style = magic.cache:GetResource("XMLFile", "__menu/res/boot_style.xml")
root.defaultStyle = style
local layout = root:CreateChild("Window")
layout:SetStyleAuto()
layout:SetName("Layout")
layout:SetLayout(LM_HORIZONTAL, 20, magic.IntRect(0, 0, 0, 0))
layout:SetAlignment(HA_LEFT, VA_CENTER)
local button = layout:CreateChild("Button")
button:SetStyleAuto()
button:SetName("Button")
button:SetLayout(LM_VERTICAL, 10, magic.IntRect(0, 0, 0, 0))
local button_image = button:CreateChild("Sprite")
button_image:SetName("ButtonImage")
button_image:SetTexture(
magic.cache:GetResource("Texture2D", "__menu/res/icon_network.png"))
button_image.color = magic.Color(.3, .3, .3)
button_image:SetFixedSize(200, 200)
local button_text = button:CreateChild("Text")
button_text:SetName("ButtonText")
button_text:SetStyleAuto()
button_text.text = "Connect to server"
button_text.color = magic.Color(.3, .3, .3)
button_text:SetAlignment(HA_CENTER, VA_TOP)
button_text:SetTextAlignment(HA_CENTER)
magic.SubscribeToEvent(button, "HoverBegin",
function(self, event_type, event_data)
self:GetChild("ButtonImage").color = magic.Color(1, 1, 1)
self:GetChild("ButtonText").color = magic.Color(1, 1, 1)
end)
magic.SubscribeToEvent(button, "HoverEnd",
function(self, event_type, event_data)
self:GetChild("ButtonImage").color = magic.Color(.3, .3, .3)
self:GetChild("ButtonText").color = magic.Color(.3, .3, .3)
end)
magic.SubscribeToEvent(button, "Released",
function(self, event_type, event_data)
log:info("Button clicked: \"Connect to server\"")
show_connect_to_server()
end)
root:SubscribeToStackEvent("KeyDown", function(event_type, event_data)
local key = event_data:GetInt("Key")
if key == KEY_ESC then
log:info("KEY_ESC pressed at top level")
engine:Exit()
end
if key == KEY_RETURN then
log:info("RETURN pressed at top level")
show_connect_to_server()
end
end)
end
return M
-- vim: set noet ts=4 sw=4:
|
package.path = "src/?.lua;" .. package.path
require("busted.runner")()
local AdapterProperties = require("exasolvs.AdapterProperties")
describe("adapter_properties", function()
describe("validates property rule:", function()
local tests = {
{
properties = {EXCLUDED_CAPABILITIES = "a;b;c"},
expected = "Invalid character(s) in EXCLUDED_CAPABILITIES property"
},
{
properties = {LOG_LEVEL = "INVALID"},
expected = "Unknown log level 'INVALID' in LOG_LEVEL property"
},
{
properties = {DEBUG_ADDRESS = "host:not-a-number"},
expected = "Expected log address in DEBUG_ADDRESS to look like '<ip>|<host>[:<port>]'"
.. ", but got 'host:not-a-number' instead"
}
}
for _, test in ipairs(tests) do
it(test.expected, function()
local properties = AdapterProperties.create(test.properties)
assert.error_matches(function () properties:validate() end, test.expected, 1, true)
end)
end
end)
describe("gets the DEBUG_ADDRESS property", function()
local parameters = {
{"192.168.0.1:4000", "192.168.0.1", 4000, "with IP address and port"},
{"the_host:5000", "the_host", 5000, "with host and port"},
{"another_host", "another_host", 3000, "with host and default port"}
}
for _, parameter in ipairs(parameters) do
local input, expected_host, expected_port, variant = table.unpack(parameter)
it(variant, function()
local host, port = AdapterProperties.create({DEBUG_ADDRESS = input}):get_debug_address()
assert.is.equal(expected_host, host, "host")
assert.is.equal(expected_port, port, port)
end)
end
end)
it("gets the LOG_LEVEL property", function()
assert.are.same("DEBUG", AdapterProperties.create({LOG_LEVEL = "DEBUG"}):get_log_level())
end)
it("gets the EXCLUDED_CAPABILITIES property", function()
assert.are.same({"a", "b", "c"},
AdapterProperties.create({EXCLUDED_CAPABILITIES = "a,b, c"}):get_excluded_capabilities())
end)
it("checks if a property is present", function()
assert.is_true(AdapterProperties.create({FOO = "bar"}):is_property_set("FOO"))
end)
it("checks if a property is not present", function()
assert.is_false(AdapterProperties.create({FOO = "bar"}):is_property_set("BAR"))
end)
it("checks if a property is empty", function()
assert.is_true(AdapterProperties.create({foo = ""}):is_empty("foo"))
end)
it("checks if a property is not declared empty when nil", function()
assert.is_false(AdapterProperties.create({foo = nil}):is_empty("foo"))
end)
it("checks if a property is not empty", function()
assert.is_false(AdapterProperties.create({foo = "content"}):is_empty("foo"))
end)
it("says that the property has a value", function()
assert.is_true(AdapterProperties.create({a = "b"}):has_value("a"))
end)
it("says that the property has a value no value when empty", function()
assert.is_false(AdapterProperties.create({a = ""}):has_value("a"))
end)
it("says that the property has a value no value when nil", function()
assert.is_false(AdapterProperties.create({a = nil}):has_value("a"))
end)
end)
|
local PriorityQueue = {}
PriorityQueue.__index = PriorityQueue
function PriorityQueue.new()
return setmetatable({
_items = {};
_counts = setmetatable({}, { __index = function() return 0 end });
_first = 0;
Count = 0;
}, PriorityQueue)
end
function PriorityQueue:Enqueue(item, priority)
local index = 1
for existingPriority, count in pairs(self._counts) do
if existingPriority <= priority then
index = index + count
end
end
table.insert(self._items, index, item)
self._counts[priority] = self._counts[priority] + 1
self.Count = self.Count + 1
if self._first > priority then
self._first = priority
end
end
function PriorityQueue:Peek()
return self._items[1]
end
function PriorityQueue:DequeueFirst()
if #self._items > 0 then
local item = self:Peek()
local itemPriority = self._first
self._counts[itemPriority] = self._counts[itemPriority] - 1
self.Count = self.Count - 1
table.remove(self._items, 1)
return item
end
end
return PriorityQueue
|
-- Enable highligting for folders and both file icons and names
vim.g.nvim_tree_highlight_opened_files = 3
-- Main setup
require'nvim-tree'.setup {
auto_close = true,
disable_netrw = false,
diagnostics = {
enable = true,
},
-- Do not show hidden files by default (can be toggled by `H`)
filters = {
dotfiles = true,
},
view = {
auto_resize = true,
},
}
-- Mappings
vim.api.nvim_set_keymap('n', '<F1>', ':NvimTreeToggle<CR>', {
noremap = true,
silent = true
})
vim.api.nvim_set_keymap('n', '<Leader><F1>', ':NvimTreeFindFile<CR>', {
noremap = true,
silent = true
})
|
script.Parent.Parent.Close.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
end)
script.Parent.Parent.Show.OnClientEvent:Connect(function()
script.Parent.Parent.Visible = true
end)
local Minimal = game:GetService("ReplicatedStorage"):WaitForChild("Minimal")
local DragModule = require(Minimal:WaitForChild("Modules"):WaitForChild("DraggableObject"))
ListFrameDrag = DragModule.new(script.Parent.Parent)
ListFrameDrag:Enable()
|
local class = require("pl.class")
---@class MobManager
local M = class()
function M:_init() self.mobs = {} end
function M:addMob(mob) self.mobs[mob] = true end
function M:removeMob(mob)
mob.effects:clear()
local room = mob.room
if room then
room.area:removeNpc(mob)
room:removeNpc(mob, true)
end
mob.__pruned = true
mob:removeAllListeners()
self.mobs[mob] = nil
end
return M
|
config = {
type = 'Ez',
unit = 'mil',
frequency = Parameter{label='Frequency (Hz)', min=60e9, max=90e9, default=70e9},
mesh_edge_length = Parameter{label='Mesh edge length', min=4, max=50, default=30},
mesh_refines = 0,
excited_port = 1,
depth = 10000 -- Close to free space
}
ParameterDivider()
-- Basic parameters.
F = 100 -- Feed length
A = 1000 -- Distance to radiation boundary
B = Parameter{label='Feed width', min=50, max=1000, default=1000}
L = Parameter{label='Horn length', min=50, max=1000, default=1000}
W = Parameter{label='Horn width', min=50, max=1000, default=1000}
R = Parameter{label='Rotation', min=-180, max=180, default=0}
horn = Rectangle(0, -B/2, F, B/2) +
Shape():AddPoint(F, B/2):AddPoint(F, -B/2)
:AddPoint(F+L, -W/2):AddPoint(F+L, W/2)
horn = horn:Clone():Grow(20,'miter',2) - horn
horn = horn - Rectangle(F+L, -W/2, F+L+100, W/2)
horn:Port(horn:Select(0, 0), 1)
horn:Offset(-(F+L)/2,0)
rad = Rectangle(-A, -A, A, A);
rad:ABC(rad:SelectAll())
config.cd = rad - horn:Rotate(R)
-- Adjust boresight to compensate for the horn rotation.
config.boresight = R
|
local threadHandler = require('threadHandler')
local request = require('drive.file.request')
local lib = nil
local home = nil
function Run(input, output)
threadHandler.ReceiveMessages(input, output, ProcessRequest)
end
function ProcessRequest(req)
if req.type == request.INIT then
-- Lua's default io library for input/output can't open Unicode filenames on Windows,
-- which is why on Windows it's replaced by TES3MP's io2 (https://github.com/TES3MP/Lua-io2)
if req.content == 'Windows' then
lib = require('io2')
else
lib = io
end
home = req.path
return {
log = "Successfully initiated"
}
elseif req.type == request.SAVE then
local file = lib.open(home .. req.path, 'w+b')
if file then
file:write(req.content)
file:close()
return {
content = true
}
else
return {
content = false,
error = "Failed to save the file " .. req.path
}
end
elseif req.type == request.LOAD then
local file = lib.open(home .. req.path, 'r')
if file then
local content = file:read("*all")
file:close()
return {
content = content
}
else
return {
content = nil,
error = "Failed to load the file " .. req.path
}
end
end
end
return Run
|
TriggerEvent('es:addGroupCommand', 'tp', 'admin', function(source, args, user)
TriggerClientEvent("esx:teleport", source, {
x = tonumber(args[1]),
y = tonumber(args[2]),
z = tonumber(args[3])
})
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end)
TriggerEvent('es:addGroupCommand', 'setjob', 'jobmaster', function(source, args, user)
local xPlayer = ESX.GetPlayerFromId(args[1])
xPlayer.setJob(args[2], tonumber(args[3]))
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('setjob'), params = {{name = "id", help = _U('id_param')}, {name = "job", help = _U('setjob_param2')}, {name = "grade_id", help = _U('setjob_param3')}}})
TriggerEvent('es:addGroupCommand', 'loadipl', 'admin', function(source, args, user)
TriggerClientEvent('esx:loadIPL', -1, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('load_ipl')})
TriggerEvent('es:addGroupCommand', 'unloadipl', 'admin', function(source, args, user)
TriggerClientEvent('esx:unloadIPL', -1, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('unload_ipl')})
TriggerEvent('es:addGroupCommand', 'playanim', 'admin', function(source, args, user)
TriggerClientEvent('esx:playAnim', -1, args[1], args[3])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('play_anim')})
TriggerEvent('es:addGroupCommand', 'playemote', 'admin', function(source, args, user)
TriggerClientEvent('esx:playEmote', -1, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('play_emote')})
TriggerEvent('es:addGroupCommand', 'car', 'admin', function(source, args, user)
TriggerClientEvent('esx:spawnVehicle', source, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('spawn_car'), params = {{name = "car", help = _U('spawn_car_param')}}})
TriggerEvent('es:addGroupCommand', 'dv', 'admin', function(source, args, user)
TriggerClientEvent('esx:deleteVehicle', source)
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('delete_vehicle'), params = {{name = "car", help = _U('delete_veh_param')}}})
TriggerEvent('es:addGroupCommand', 'spawnped', 'admin', function(source, args, user)
TriggerClientEvent('esx:spawnPed', source, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('spawn_ped'), params = {{name = "name", help = _U('spawn_ped_param')}}})
TriggerEvent('es:addGroupCommand', 'spawnobject', 'admin', function(source, args, user)
TriggerClientEvent('esx:spawnObject', source, args[1])
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('spawn_object'), params = {{name = "name"}}})
TriggerEvent('es:addGroupCommand', 'givemoney', 'admin', function(source, args, user)
local _source = source
local xPlayer = ESX.GetPlayerFromId(args[1])
local amount = tonumber(args[2])
if amount ~= nil then
xPlayer.addMoney(amount)
else
TriggerClientEvent('esx:showNotification', _source, _U('amount_invalid'))
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('givemoney'), params = {{name = "id", help = _U('id_param')}, {name = "amount", help = _U('money_amount')}}})
TriggerEvent('es:addGroupCommand', 'giveaccountmoney', 'admin', function(source, args, user)
local _source = source
local xPlayer = ESX.GetPlayerFromId(args[1])
local account = args[2]
local amount = tonumber(args[3])
if amount ~= nil then
if xPlayer.getAccount(account) ~= nil then
xPlayer.addAccountMoney(account, amount)
else
TriggerClientEvent('esx:showNotification', _source, _U('invalid_account'))
end
else
TriggerClientEvent('esx:showNotification', _source, _U('amount_invalid'))
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('giveaccountmoney'), params = {{name = "id", help = _U('id_param')}, {name = "account", help = _U('account')}, {name = "amount", help = _U('money_amount')}}})
TriggerEvent('es:addGroupCommand', 'giveitem', 'admin', function(source, args, user)
local _source = source
local xPlayer = ESX.GetPlayerFromId(args[1])
local item = args[2]
local count = (args[3] == nil and 1 or tonumber(args[3]))
if count ~= nil then
if xPlayer.getInventoryItem(item) ~= nil then
xPlayer.addInventoryItem(item, count)
else
TriggerClientEvent('esx:showNotification', _source, _U('invalid_item'))
end
else
TriggerClientEvent('esx:showNotification', _source, _U('invalid_amount'))
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('giveitem'), params = {{name = "id", help = _U('id_param')}, {name = "item", help = _U('item')}, {name = "amount", help = _U('amount')}}})
TriggerEvent('es:addGroupCommand', 'giveweapon', 'admin', function(source, args, user)
local xPlayer = ESX.GetPlayerFromId(args[1])
local weaponName = string.upper(args[2])
xPlayer.addWeapon(weaponName, 1000)
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('giveweapon'), params = {{name = "id", help = _U('id_param')}, {name = "weapon", help = _U('weapon')}}})
|
local ane = {}
local pce = {
name = "shot",
path = "assets/spr/shot/enShot.png",
width = 32,
height = 32,
imgX = 16,
imgY = 16,
originX = 16,
originY = 16,
attachPoints =
{
center = {x = 16,y = 16}
},
animations = ane
}
return pce
|
--[[
Pixel Vision 8 - Debug Tool
Copyright (C) 2016, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman (@jessefreeman)
Please do not copy and distribute verbatim copies
of this license document, but modifications without
distributing is allowed.
]]--
-- Load in the editor framework script to access tool components
LoadScript("sb-sprites")
LoadScript("pixel-vision-os-v2")
local toolName = "System Settings"
-- List of all the valid keys
local keyCodeMap = {
{name = None, keyCode = 0, char = ""},
{name = Backspace, keyCode = 8, char = "!"},
{name = Tab, keyCode = 9, char = "@"},
{name = Enter, keyCode = 13, char = "#"},
{name = Space, keyCode = 32, char = "%"},
{name = Left, keyCode = 37, char = "^"},
{name = Up, keyCode = 38, char = "&"},
{name = Right, keyCode = 39, char = "*"},
{name = Down, keyCode = 40, char = "("},
{name = Delete, keyCode = 46, char = ")"},
{name = Alpha0, keyCode = 48, char = "0"},
{name = Alpha1, keyCode = 49, char = "1"},
{name = Alpha2, keyCode = 50, char = "2"},
{name = Alpha3, keyCode = 51, char = "3"},
{name = Alpha4, keyCode = 52, char = "4"},
{name = Alpha5, keyCode = 53, char = "5"},
{name = Alpha6, keyCode = 54, char = "6"},
{name = Alpha7, keyCode = 55, char = "7"},
{name = Alpha8, keyCode = 56, char = "8"},
{name = Alpha9, keyCode = 57, char = "9"},
{name = A, keyCode = 65, char = "A"},
{name = B, keyCode = 66, char = "B"},
{name = C, keyCode = 67, char = "C"},
{name = D, keyCode = 68, char = "D"},
{name = E, keyCode = 69, char = "E"},
{name = F, keyCode = 70, char = "F"},
{name = G, keyCode = 71, char = "G"},
{name = H, keyCode = 72, char = "H"},
{name = I, keyCode = 73, char = "I"},
{name = J, keyCode = 74, char = "J"},
{name = K, keyCode = 75, char = "K"},
{name = L, keyCode = 76, char = "L"},
{name = M, keyCode = 77, char = "M"},
{name = N, keyCode = 78, char = "N"},
{name = O, keyCode = 79, char = "O"},
{name = P, keyCode = 80, char = "P"},
{name = Q, keyCode = 81, char = "Q"},
{name = R, keyCode = 82, char = "R"},
{name = S, keyCode = 83, char = "S"},
{name = T, keyCode = 84, char = "T"},
{name = U, keyCode = 85, char = "U"},
{name = V, keyCode = 86, char = "V"},
{name = W, keyCode = 87, char = "W"},
{name = X, keyCode = 88, char = "X"},
{name = Y, keyCode = 89, char = "Y"},
{name = Z, keyCode = 90, char = "Z"},
{name = LeftShift, keyCode = 160, char = "}"},
{name = RightShift, keyCode = 161, char = "~"},
{name = Semicolon, keyCode = 186, char = ";"},
{name = Plus, keyCode = 187, char = "+"},
{name = Comma, keyCode = 188, char = ","},
{name = Minus, keyCode = 189, char = "-"},
{name = Period, keyCode = 190, char = "."},
{name = Question, keyCode = 191, char = "/"},
{name = Tilde, keyCode = 192, char = "`"},
{name = OpenBrackets, keyCode = 219, char = "["},
{name = Pipe, keyCode = 220, char = "\\"},
{name = CloseBrackets, keyCode = 221, char = "]"},
{name = Quotes, keyCode = 222, char = "'"},
}
local pixelVisionOS = nil
local editorUI = nil
local shortcutKeys = {
"RunGameKey",
"ScreenshotKey",
"RecordKey",
"RestartKey"
}
player1Keys = {
"Player1UpKey",
"Player1DownKey",
"Player1LeftKey",
"Player1RightKey",
"Player1SelectKey",
"Player1StartKey",
"Player1AKey",
"Player1BKey"
}
player2Keys = {
"Player2UpKey",
"Player2DownKey",
"Player2LeftKey",
"Player2RightKey",
"Player2SelectKey",
"Player2StartKey",
"Player2AKey",
"Player2BKey"
}
player1Buttons = {
"Player1UpButton",
"Player1DownButton",
"Player1LeftButton",
"Player1RightButton",
"Player1SelectButton",
"Player1StartButton",
"Player1AButton",
"Player1BButton"
}
player2Buttons = {
"Player2UpButton",
"Player2DownButton",
"Player2LeftButton",
"Player2RightButton",
"Player2SelectButton",
"Player2StartButton",
"Player2AButton",
"Player2BButton",
}
-- This this is an empty game, we will the following text. We combined two sets of fonts into
-- the default.font.png. Use uppercase for larger characters and lowercase for a smaller one.
local title = "EMPTY TOOL"
local messageTxt = "This is an empty tool template. Press Ctrl + 1 to open the editor or modify the files found in your workspace game folder."
-- Container for horizontal slider data
local hSliderData = nil
local vSliderData = nil
local backBtnData = nil
local nextBtnData = nil
-- local muteBtnData = nil
local paginationBtnData = nil
local volumeInputData = nil
local nameInputData = nil
local scaleInputData = nil
local playSound = false
local selectedInputID = 1
local DrawVersion, TuneVersion = "Pixel Vision 8 Draw", "Pixel Vision 8 Tune"
local runnerName = SystemName()
local buttonTypes = {
"Up",
"Down",
"Left",
"Right",
"A",
"B",
"Select",
"Start"
}
local buttonSpriteMap = {}
buttonSpriteMap["Up"] = {spriteData = dpadup, x = 96, y = 72}
buttonSpriteMap["Down"] = {spriteData = dpaddown, x = 96, y = 72}
buttonSpriteMap["Left"] = {spriteData = dpadleft, x = 96, y = 72}
buttonSpriteMap["Right"] = {spriteData = dpadright, x = 96, y = 72}
buttonSpriteMap["A"] = {spriteData = actionbtndown, x = 154, y = 82}
buttonSpriteMap["B"] = {spriteData = actionbtndown, x = 170, y = 82}
buttonSpriteMap["Select"] = {spriteData = startbtndown, x = 124, y = 90}
buttonSpriteMap["Start"] = {spriteData = startbtndown, x = 136, y = 90}
local totalButtons = #buttonTypes
local blinkTime = 0
local blinkDelay = .1
local blinkActive = false
local SaveShortcut = 6
function InvalidateData()
-- Only everything if it needs to be
if(invalid == true)then
return
end
pixelVisionOS:ChangeTitle(toolName .."*", "toolbaricontool")
invalid = true
pixelVisionOS:EnableMenuItem(SaveShortcut, true)
end
function ResetDataValidation()
-- Only everything if it needs to be
if(invalid == false)then
return
end
pixelVisionOS:ChangeTitle(toolName, "toolbaricontool")
invalid = false
pixelVisionOS:EnableMenuItem(SaveShortcut, false)
end
-- The Init() method is part of the game's lifecycle and called a game starts. We are going to
-- use this method to configure background color, ScreenBufferChip and draw a text box.
function Init()
BackgroundColor(5)
-- Disable the back key in this tool
EnableBackKey(false)
EnableAutoRun(false)
-- Create an instance of the Pixel Vision OS
pixelVisionOS = PixelVisionOS:Init()
-- Get a reference to the Editor UI
editorUI = pixelVisionOS.editorUI
local menuOptions =
{
-- About ID 1
{name = "About", action = function() pixelVisionOS:ShowAboutModal(toolName) end, toolTip = "Learn about PV8."},
{divider = true},
{name = "Sound Effects", action = ToggleSoundEffects, toolTip = "Toggle system sound."}, -- Reset all the values
{divider = true},
{name = "Save", action = OnSave, enabled = false, key = Keys.S, toolTip = "Save changes made to the controller mapping."}, -- Reset all the values
{name = "Reset", action = OnReset, key = Keys.R, toolTip = "Revert controller mapping to its default value."}, -- Reset all the values
{divider = true},
{name = "Quit", key = Keys.Q, action = OnQuit, toolTip = "Quit the current game."}, -- Quit the current game
}
if(PathExists(NewWorkspacePath("/PixelVisionOS/System/OSInstaller/"))) then
table.insert(menuOptions, 4, {name = "Install OS", action = function() LoadGame("/PixelVisionOS/System/OSInstaller/") end, toolTip = "Open OS Installer tool to reformat the Workspace."})
end
pixelVisionOS:CreateTitleBarMenu(menuOptions, "See menu options for this tool.")
-- Change the title
pixelVisionOS:ChangeTitle(toolName, "toolbaricontool")
volumeKnobData = editorUI:CreateKnob({x = 16, y = 192, w = 24, h = 24}, "knob", "Change the volume.")
volumeKnobData.onAction = OnVolumeChange
volumeKnobData.value = Volume() / 100
editorUI:Enable(volumeKnobData, not Mute())
brightnessKnobData = editorUI:CreateKnob({x = 40, y = 192, w = 24, h = 24}, "knob", "Change the brightness.")
brightnessKnobData.onAction = OnBrightnessChange
brightnessKnobData.value = (Brightness() - .5)
sharpnessKnobData = editorUI:CreateKnob({x = 64, y = 192, w = 24, h = 24}, "knob", "Change the sharpness.")
sharpnessKnobData.onAction = OnSharpnessChange
sharpnessKnobData.value = (((Sharpness() * - 1) / 6))
scaleInputData = editorUI:CreateInputField({x = 112, y = 200, w = 8}, Scale(), "This changes the scale of the window when not in fullscreen.", "number")
scaleInputData.min = 1
scaleInputData.max = 4
scaleInputData.onAction = OnChangeScale
-- Check boxes
checkboxGroupData = editorUI:CreateToggleGroup(7, false)
checkboxGroupData.onAction = OnCheckbox
local tmpCheckbox = editorUI:ToggleGroupButton(checkboxGroupData, {x = 128, y = 192, w = 8, h = 8}, "checkbox", "Toggle fullscreen mode.")
tmpCheckbox.hitRect = {x = 131, y = 192, w = 8, h = 8}
tmpCheckbox.selected = Fullscreen()
tmpCheckbox = editorUI:ToggleGroupButton(checkboxGroupData, {x = 128, y = 200, w = 8, h = 8}, "checkbox", "Enable the window to crop.")
tmpCheckbox.selected = CropScreen()
tmpCheckbox = editorUI:ToggleGroupButton(checkboxGroupData, {x = 128, y = 208, w = 8, h = 8}, "checkbox", "Stretch the display to fit the window.")
tmpCheckbox.selected = StretchScreen()
--
tmpCheckbox = editorUI:ToggleGroupButton(checkboxGroupData, {x = 128, y = 216, w = 8, h = 8}, "checkbox", "Toggle the CRT effect.")
OnToggleCRT(EnableCRT())
tmpCheckbox.selected = EnableCRT()
-- UpdateCheckBoxes()
playerButtonGroupData = editorUI:CreateToggleGroup(true)
playerButtonGroupData.onAction = OnPlayerSelection
editorUI:ToggleGroupButton(playerButtonGroupData, {x = 208, y = 24, w = 8, h = 8}, "radiobutton", "Select player 1's controller map.")
editorUI:ToggleGroupButton(playerButtonGroupData, {x = 208, y = 32, w = 8, h = 8}, "radiobutton", "Select player 2's controller map.")
inputButtonGroupData = editorUI:CreateToggleGroup(true)
inputButtonGroupData.onAction = OnInputSelection
editorUI:ToggleGroupButton(inputButtonGroupData, {x = 96, y = 152, w = 8, h = 8}, "radiobutton", "This is radio button 1.")
editorUI:ToggleGroupButton(inputButtonGroupData, {x = 144, y = 152, w = 8, h = 8}, "radiobutton", "This is radio button 2.")
shortcutFields = {
editorUI:CreateInputField({x = 176, y = 200, w = 8}, "", "ScreenShot"),
editorUI:CreateInputField({x = 200, y = 200, w = 8}, "", "Record"),
editorUI:CreateInputField({x = 224, y = 200, w = 8}, "", "Restart"),
}
usedShortcutKeys = {}
for i = 1, #shortcutFields do
local field = shortcutFields[i]
field.pattern = "number"
field.type = field.toolTip
-- Read the shortcut keys from the bios
local keyValue = tonumber(ReadBiosData(field.type .. "Key", tostring(49 + i)))
-- Test if the value is nill and set a default value
if(keyValue == nil) then
keyValue = 49 + i -- first value will be 50 which converts to key 2
end
editorUI:ChangeInputField(field, ConvertKeyCodeToChar(keyValue))
-- Save used keys
usedShortcutKeys[field.type] = keyValue
-- Create a new tooltip
field.toolTip = "Remap the " .. field.type .. " key."
field.captureInput = function()
-- Validate the input before returning it to the input field
return ValidateInput(field, usedShortcutKeys)
end
field.onAction = function(value)
-- Save the new key map value
RemapKey(field.type .. "Key", ConvertKeyToKeyCode(value))
-- Let the user know the key has been saved
pixelVisionOS:DisplayMessage("Setting '"..value.."' as the shortcut key.")
RefreshActionKeys()
end
end
if(runnerName ~= DrawVersion and runnerName ~= TuneVersion) then
inputFields = {
editorUI:CreateInputField({x = 56, y = 80, w = 8}, "", "Up"),
editorUI:CreateInputField({x = 56, y = 96, w = 8}, "", "Down"),
editorUI:CreateInputField({x = 56, y = 112, w = 8}, "", "Left"),
editorUI:CreateInputField({x = 56, y = 128, w = 8}, "", "Right"),
editorUI:CreateInputField({x = 120, y = 120, w = 8}, "", "Select"),
editorUI:CreateInputField({x = 144, y = 120, w = 8}, "", "Start"),
editorUI:CreateInputField({x = 184, y = 120, w = 8}, "", "A"),
editorUI:CreateInputField({x = 208, y = 120, w = 8}, "", "B")
}
-- We need to manually store values for all of the keys
usedControllerKeys = {}
-- Player 1 Keys
for i = 1, #player1Keys do
local key = player1Keys[i]
usedControllerKeys[key] = ConvertKeyCodeToChar(tonumber(ReadMetadata(key)))
end
-- Player 2 Keys
for i = 1, #player2Keys do
local key = player2Keys[i]
usedControllerKeys[key] = ConvertKeyCodeToChar(tonumber(ReadMetadata(key)))
end
-- TODO need to create a map for player 1 & 2 controller
usedControllerButtons = {}
for i = 1, #inputFields do
local field = inputFields[i]
field.type = field.toolTip
field.toolTip = "Remap the " .. field.type .. " key."
field.captureInput = function()
-- TODO need to see what mode we are in and pass the correct used keys
local usedKeys = usedControllerKeys
return ValidateInput(field, usedKeys, field.text)
end
field.onAction = function(value)
DrawInputSprite(field.type)
InvalidateData()
end
end
editorUI:SelectToggleButton(playerButtonGroupData, 1)
else
DrawRect(4, 16, 248, 156, BackgroundColor(), DrawMode.TilemapCache)
end
end
function RemapKey(keyName, keyCode)
-- Make sure that the key code is valid
if (keyCode == -1) then
return
end
-- Save the new mapped key to the bios
WriteBiosData(keyName, tostring(keyCode));
end
function DrawInputSprite(type)
local data = buttonSpriteMap[type]
if(data ~= nil) then
local spriteData = data.spriteData
DrawSprites(spriteData.spriteIDs, data.x, data.y, spriteData.width)
end
if(type == "Select" or type == "Start") then
DrawSprites(startinputon.spriteIDs, type == "Select" and 126 or 138, 99, startinputon.width)
else
DrawBlinkSprite()
end
end
function ValidateInput(field, useKeys, defaultValue)
local key = OnCaptureKey()
-- Check to see if the key is not empty
if(key ~= "") then
-- Look for douplicate keys
if(CheckActionKeyDoups(key, useKeys) == true) then
editorUI:EditInputArea(field, false)
editorUI:ChangeInputField(field, defaultValue, false)
-- TODO this used to show the key but it would require adding sprites to small font
pixelVisionOS:DisplayMessage("The key is already being used.", 2)
return ""
end
end
-- If the key is valid, save a local reference to it
useKeys[field.type] = key
-- Return the new key to the input field
return key
end
function CheckActionKeyDoups(key, keyMap)
local value = false
for k, v in pairs(keyMap) do
if(key == v) then
return true
end
end
return value
end
-- Converts a key code into a char character
function ConvertKeyCodeToChar(keyCode)
local value = -1
for i = 1, #keyCodeMap do
if(keyCodeMap[i].keyCode == keyCode) then
return keyCodeMap[i].char
end
end
return value
end
function ConvertKeyToKeyCode(key)
local keyCode = -1
for i = 1, #keyCodeMap do
if(keyCodeMap[i].char == key) then
return keyCodeMap[i].keyCode
end
end
return keyCode
end
function OnCaptureKey()
-- Show blinking light for controller
if(blinkActive) then
DrawBlinkSprite()
end
local total = #keyCodeMap
for i = 1, total do
-- TODO need to test to see if the keyCode is already assigned
local key = keyCodeMap[i]
if(Key(key.keyCode)) then
return key.char
end
end
return ""
end
function DrawBlinkSprite()
DrawSprites(inputbuttonon.spriteIDs, 154, 62, inputbuttonon.width)
end
function OnChangeScale(value)
Scale(tonumber(value))
WriteBiosData("Scale", value)
end
function OnVolumeFieldUpdate(text)
local value = tonumber(text / 100)
editorUI:ChangeKnob(volumeKnobData, value, false)
end
function OnVolumeChange(value)
local newValue = Volume(value * 100)
WriteBiosData("Volume", newValue)
pixelVisionOS:DisplayMessage("Volume is now set to " .. tostring(value * 100) .. "%.")
playSound = true
end
function OnCheckbox(id, value)
-- TODO need to disable some settings depending on which mode is set
if(id == 1) then
Fullscreen(value)
WriteBiosData("FullScreen", value == true and "True" or "False")
elseif(id == 2) then
CropScreen(value)
WriteBiosData("CropScreen", value == true and "True" or "False")
elseif(id == 3) then
StretchScreen(value)
WriteBiosData("StretchScreen", value == true and "True" or "False")
elseif(id == 4) then
OnToggleCRT(value)
WriteBiosData("CRT", value == true and "True" or "False")
end
end
function OnPlayerSelection(value)
if(invalid == true) then
pixelVisionOS:ShowMessageModal("Unsaved Changes", "You have not saved your changes for this controller. Do you want to save them before switching to a different player?", 160, true,
function()
if(pixelVisionOS.messageModal.selectionValue == true) then
-- Save changes
OnSave()
end
-- Quit the tool
TriggerPlayerSelection(value)
end
)
else
-- Quit the tool
TriggerPlayerSelection(value)
end
end
function TriggerPlayerSelection(value)
selectedPlayerID = value
local message = "Player " .. value .. " was selected."
-- Display the correct highlight state for the player label
for i = 1, 2 do
local spriteData = _G["player"..i..(i == value and "selected" or "up")]
DrawSprites(spriteData.spriteIDs, 27, 2 + i, spriteData.width, false, false, DrawMode.Tile)
end
-- Update the controller number
local spriteData = _G["controller"..value]
DrawSprites(spriteData.spriteIDs, 16, 7, spriteData.width, false, false, DrawMode.Tile)
-- Reset the input selection
editorUI:SelectToggleButton(inputButtonGroupData, selectedInputID, false)
-- Manually force the input selection to redraw all the input fields
OnInputSelection(selectedInputID)
end
function OnInputSelection(value)
if(invalid == true) then
pixelVisionOS:ShowMessageModal("Unsaved Changes", "You have not saved your changes for this controller. Do you want to save them before switching to a different input mode?", 160, true,
function()
if(pixelVisionOS.messageModal.selectionValue == true) then
-- Save changes
OnSave()
end
-- TODO looks like there may be a race condition when switching between players here and selection is not displayed correctly from tilemap cache
-- Quit the tool
TriggerInputSelection(value)
end
)
else
-- Quit the tool
TriggerInputSelection(value)
end
end
function TriggerInputSelection(value)
-- print("On Input Selected")
selectedInputID = value
local pos = {13, 19}
-- Display the correct highlight state for the player label
for i = 1, 2 do
local spriteName = i == 1 and "keyboard" or "controller"
local spriteData = _G[spriteName..(i == value and "selected" or "up")]
DrawSprites(spriteData.spriteIDs, pos[i], 19, spriteData.width, false, false, DrawMode.Tile)
end
local message = "Input mode " .. value .. " was selected."
local inputMap = _G["player"..selectedPlayerID.."Keys"]
for i = 1, #inputMap do
local field = inputFields[i]
-- print("Display Input Player " .. selectedPlayerID .. " map " .. inputMap[i] .. " value " .. ReadMetadata(inputMap[i]))
editorUI:ChangeInputField(field, ConvertKeyCodeToChar(tonumber(ReadMetadata(inputMap[i]))), false)
end
end
function OnMute(value)
Mute(value)
WriteBiosData("Mute", value == true and "True" or "False")
editorUI:Enable(volumeKnobData, not value)
end
function OnPage(value)
pixelVisionOS:DisplayMessage("Page " .. value .. " selected")
end
-- The Update() method is part of the game's life cycle. The engine calls Update() on every frame
-- before the Draw() method. It accepts one argument, timeDelta, which is the difference in
-- milliseconds since the last frame.
function Update(timeDelta)
-- Convert timeDelta to a float
timeDelta = timeDelta / 1000
-- This needs to be the first call to make sure all of the OS and editor UI is updated first
pixelVisionOS:Update(timeDelta)
-- Only update the tool's UI when the modal isn't active
if(pixelVisionOS:IsModalActive() == false) then
editorUI:UpdateKnob(volumeKnobData)
editorUI:UpdateKnob(brightnessKnobData)
editorUI:UpdateKnob(sharpnessKnobData)
-- Update toggle groups
editorUI:UpdateToggleGroup(checkboxGroupData)
editorUI:UpdateInputField(scaleInputData)
for i = 1, #shortcutFields do
editorUI:UpdateInputField(shortcutFields[i])
end
if(runnerName ~= DrawVersion and runnerName ~= TuneVersion) then
editorUI:UpdateToggleGroup(playerButtonGroupData)
editorUI:UpdateToggleGroup(inputButtonGroupData)
for i = 1, #inputFields do
editorUI:UpdateInputField(inputFields[i])
end
-- Loop through all of the inputs and see if a controller button should be pressed
-- See if we are in keyboard mode
if(selectedInputID == 1) then
-- Loop through each of the input fields
for i = 1, #inputFields do
-- Get the field and its value
local field = inputFields[i]
local value = field.text
-- Test if the input field's map value is down
if(Key(ConvertKeyToKeyCode(value), InputState.Down)) then
-- Update the sprite
DrawInputSprite(field.type)
end
end
-- If we are not in keyboard mode, it will switch to the controller mode
else
-- Loop through each of the buttons
for i = 1, totalButtons do
-- Go through each button and see if it is down for the selected player
if(Button(i - 1, InputState.Down, selectedPlayerID - 1)) then
-- Draw the correct sprite
DrawInputSprite(buttonTypes[i])
end
end
end
end
if(editorUI.collisionManager.mouseDown == false and playSound == true) then
PlayRawSound("0,1,,.2,,.2,.3,.1266,,,,,,,,,,,,,,,,,,1,,,,,,")
playSound = false
end
blinkTime = blinkTime + timeDelta
if(blinkTime > blinkDelay) then
blinkTime = 0
blinkActive = not blinkActive
end
-- Modify mute buttons if global value changes
local newMuteValue = Mute()
if(lastMuteValue ~= newMuteValue) then
lastMuteValue = newMuteValue
editorUI:Enable(volumeKnobData, not lastMuteValue)
-- editorUI:ToggleButton(muteBtnData, lastMuteValue, false)
editorUI:ChangeKnob(volumeKnobData, Volume() / 100, false)
end
end
end
-- The Draw() method is part of the game's life cycle. It is called after Update() and is where
-- all of our draw calls should go. We'll be using this to render sprites to the display.
function Draw()
-- We can use the RedrawDisplay() method to clear the screen and redraw the tilemap in a
-- single call.
RedrawDisplay()
-- The UI should be the last thing to draw after your own custom draw calls
pixelVisionOS:Draw()
end
function OnSave()
for i = 1, #inputFields do
local field = inputFields[i]
local value = field.text
RemapKey("Player" ..tostring(selectedPlayerID) .. field.type .. "Key", ConvertKeyToKeyCode(value))
end
ResetDataValidation()
end
function OnReset()
-- TODO Loop through all the keys and reset everything to the default values
end
function OnQuit()
if(invalid == true) then
pixelVisionOS:ShowMessageModal("Unsaved Changes", "You have unsaved changes. Do you want to save your work before you quit?", 160, true,
function()
if(pixelVisionOS.messageModal.selectionValue == true) then
-- Save changes
OnSave()
end
-- Quit the tool
QuitCurrentTool()
end
)
else
-- Quit the tool
QuitCurrentTool()
end
end
function OnBrightnessChange(value)
local newValue = (value * 1) + .5
Brightness(newValue)
end
function OnSharpnessChange(value)
local newValue = ((value * 4) + 2) * - 1
Sharpness(newValue)
end
function OnToggleCRT(value)
EnableCRT(value)
-- Update values of the knobs
sharpnessKnobData.value = (((Sharpness() * - 1) / 6))
brightnessKnobData.value = (Brightness() - .5)
editorUI:Enable(brightnessKnobData, value)
editorUI:Enable(sharpnessKnobData, value)
end
function ToggleSoundEffects()
local playSounds = ReadBiosData("PlaySystemSounds", "True") == "True"
WriteBiosData("PlaySystemSounds", playSounds and "False" or "True")
pixelVisionOS:DisplayMessage("Turning " .. (playSounds and "off" or "on") .. " system sound effects.", 5)
end
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
<link crossorigin="anonymous" media="all" integrity="sha512-3+HOqCwtQal5hOJQ+mdxiq5zmGOTjF6RhjDsPLxbKDYgGlLFeCwzoIanb7j5IiCuXKUqyC2q8FdkC4nmx2P2rA==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-a2fba223d5af91496cac70d4ec3624df.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-ToYPvgHzI4ZZjTr09MR/O0FiK6r1vcaXfXi7yF0ir1LVdERr1jqIKCVNJh3066M95krXIBXU8qr5l2KJJnltNA==" rel="stylesheet" href="https://github.githubassets.com/assets/github-f02fff83bc0e5f99f33bbeaab977075c.css" />
<meta name="viewport" content="width=device-width">
<title>big_freaking_dig/axes.lua at master · downad/big_freaking_dig</title>
<meta name="description" content="Repo containing the game for the Minetest Engine. Contribute to downad/big_freaking_dig development by creating an account on GitHub.">
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta name="twitter:image:src" content="https://avatars0.githubusercontent.com/u/32821433?s=400&v=4" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary" /><meta name="twitter:title" content="downad/big_freaking_dig" /><meta name="twitter:description" content="Repo containing the game for the Minetest Engine. Contribute to downad/big_freaking_dig development by creating an account on GitHub." />
<meta property="og:image" content="https://avatars0.githubusercontent.com/u/32821433?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="downad/big_freaking_dig" /><meta property="og:url" content="https://github.com/downad/big_freaking_dig" /><meta property="og:description" content="Repo containing the game for the Minetest Engine. Contribute to downad/big_freaking_dig development by creating an account on GitHub." />
<link rel="assets" href="https://github.githubassets.com/">
<link rel="web-socket" href="wss://live.github.com/_sockets/VjI6Mzk2ODE1NDcyOjM5NTY4M2YxYzU0ZWFjMDU3ZTI5M2YwMzdjYTg3NDE3NjQ3OWZlNGJjYzE4ODI1MDg3MDIzNjc3OGY2YTBiNTg=--b0dea0b4c791d9623dfcf4a19975d81a66938a2b">
<meta name="pjax-timeout" content="1000">
<link rel="sudo-modal" href="/sessions/sudo_modal">
<meta name="request-id" content="8EE2:25F21:3D7FD59:5DB6D46:5CE1B9FB" data-pjax-transient>
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
<meta name="octolytics-host" content="collector.githubapp.com" /><meta name="octolytics-app-id" content="github" /><meta name="octolytics-event-url" content="https://collector.githubapp.com/github-external/browser_event" /><meta name="octolytics-dimension-request_id" content="8EE2:25F21:3D7FD59:5DB6D46:5CE1B9FB" /><meta name="octolytics-dimension-region_edge" content="ams" /><meta name="octolytics-dimension-region_render" content="iad" /><meta name="octolytics-actor-id" content="32821433" /><meta name="octolytics-actor-login" content="downad" /><meta name="octolytics-actor-hash" content="73316ca773d08a7760be740eb7c65b10a99f385638a5002788c260bdaa81fa31" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/blob/show" data-pjax-transient="true" />
<meta name="google-analytics" content="UA-3769691-2">
<meta class="js-ga-set" name="userId" content="1bb81357131994a2b707f3e57a0014b9">
<meta class="js-ga-set" name="dimension1" content="Logged In">
<meta name="hostname" content="github.com">
<meta name="user-login" content="downad">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="M2QyYjUzNWUxZGUyMDcxMWE5OTVkNmY3YWQ0MzBhOWU4ZWJmYTdmOGNhYmUyMTliMWZjNzM1YTE4NzJmOWExY3x7InJlbW90ZV9hZGRyZXNzIjoiMi4yMDIuNjcuMTgxIiwicmVxdWVzdF9pZCI6IjhFRTI6MjVGMjE6M0Q3RkQ1OTo1REI2RDQ2OjVDRTFCOUZCIiwidGltZXN0YW1wIjoxNTU4Mjk3MTA0LCJob3N0IjoiZ2l0aHViLmNvbSJ9">
<meta name="enabled-features" content="UNIVERSE_BANNER,MARKETPLACE_INVOICED_BILLING,MARKETPLACE_SOCIAL_PROOF_CUSTOMERS,MARKETPLACE_TRENDING_SOCIAL_PROOF,MARKETPLACE_RECOMMENDATIONS,NOTIFY_ON_BLOCK,RELATED_ISSUES">
<meta name="html-safe-nonce" content="56e572dee746c7866ac8dfe89fc7d7e0c44121b5">
<meta http-equiv="x-pjax-version" content="a49517628624fdfca9cc4efeaf9ed22f">
<link href="https://github.com/downad/big_freaking_dig/commits/master.atom" rel="alternate" title="Recent Commits to big_freaking_dig:master" type="application/atom+xml">
<meta name="go-import" content="github.com/downad/big_freaking_dig git https://github.com/downad/big_freaking_dig.git">
<meta name="octolytics-dimension-user_id" content="32821433" /><meta name="octolytics-dimension-user_login" content="downad" /><meta name="octolytics-dimension-repository_id" content="187522932" /><meta name="octolytics-dimension-repository_nwo" content="downad/big_freaking_dig" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="true" /><meta name="octolytics-dimension-repository_parent_id" content="18592635" /><meta name="octolytics-dimension-repository_parent_nwo" content="Jordach/big_freaking_dig" /><meta name="octolytics-dimension-repository_network_root_id" content="18592635" /><meta name="octolytics-dimension-repository_network_root_nwo" content="Jordach/big_freaking_dig" /><meta name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" content="true" />
<link rel="canonical" href="https://github.com/downad/big_freaking_dig/blob/master/mods/gs_tools/axes.lua" data-pjax-transient>
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000">
<link rel="icon" type="image/x-icon" class="js-site-favicon" href="https://github.githubassets.com/favicon.ico">
<meta name="theme-color" content="#1e2327">
<meta name="u2f-enabled" content="true">
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-in env-production page-responsive page-blob">
<div class="position-relative js-header-wrapper ">
<a href="#start-of-content" tabindex="1" class="p-3 bg-blue text-white show-on-focus js-skip-to-content">Skip to content</a>
<div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
<header class="Header js-details-container Details flex-wrap flex-lg-nowrap p-responsive" role="banner">
<div class="Header-item d-none d-lg-flex">
<a class="Header-link" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
<svg class="octicon octicon-mark-github v-align-middle" height="32" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
</a>
</div>
<div class="Header-item d-lg-none">
<button class="Header-link btn-link js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false">
<svg height="24" class="octicon octicon-three-bars" viewBox="0 0 12 16" version="1.1" width="18" aria-hidden="true"><path fill-rule="evenodd" d="M11.41 9H.59C0 9 0 8.59 0 8c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zm0-4H.59C0 5 0 4.59 0 4c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zM.59 11H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1H.59C0 13 0 12.59 0 12c0-.59 0-1 .59-1z"/></svg>
</button>
</div>
<div class="Header-item Header-item--full flex-column flex-lg-row width-full flex-order-2 flex-lg-order-none mr-0 mr-lg-3 mt-3 mt-lg-0 Details-content--hidden">
<div class="header-search flex-self-stretch flex-lg-self-auto mr-0 mr-lg-3 mb-3 mb-lg-0 scoped-search site-scoped-search js-site-search position-relative js-jump-to"
role="combobox"
aria-owns="jump-to-results"
aria-label="Search or jump to"
aria-haspopup="listbox"
aria-expanded="false"
>
<div class="position-relative">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="187522932" data-scoped-search-url="/downad/big_freaking_dig/search" data-unscoped-search-url="/search" action="/downad/big_freaking_dig/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓" />
<label class="form-control input-sm header-search-wrapper p-0 header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center js-chromeless-input-container">
<input type="text"
class="form-control input-sm header-search-input jump-to-field js-jump-to-field js-site-search-focus js-site-search-field is-clearable"
data-hotkey="s,/"
name="q"
value=""
placeholder="Search or jump to…"
data-unscoped-placeholder="Search or jump to…"
data-scoped-placeholder="Search or jump to…"
autocapitalize="off"
aria-autocomplete="list"
aria-controls="jump-to-results"
aria-label="Search or jump to…"
data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations#csrf-token=pTevDYaMCoIpMQFTig5V/+yVeMje52o9fYWuM9/jcumTrwhCKDacH6gNoHJsFpuz/Tt7XvZex7Y0HUpJDoxlpg=="
spellcheck="false"
autocomplete="off"
>
<input type="hidden" class="js-site-search-type-field" name="type" >
<img src="https://github.githubassets.com/images/search-key-slash.svg" alt="" class="mr-2 header-search-key-slash">
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<ul class="d-none js-jump-to-suggestions-template-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-suggestion" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
</ul>
<ul class="d-none js-jump-to-no-results-template-container">
<li class="d-flex flex-justify-center flex-items-center f5 d-none js-jump-to-suggestion p-2">
<span class="text-gray">No suggested jump to results</span>
</li>
</ul>
<ul id="jump-to-results" role="listbox" class="p-0 m-0 js-navigation-container jump-to-suggestions-results-container js-jump-to-suggestions-results-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-scoped-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-global-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
<li class="d-flex flex-justify-center flex-items-center p-0 f5 js-jump-to-suggestion">
<img src="https://github.githubassets.com/images/spinners/octocat-spinner-128.gif" alt="Octocat Spinner Icon" class="m-2" width="28">
</li>
</ul>
</div>
</label>
</form> </div>
</div>
<nav class="d-flex flex-column flex-lg-row flex-self-stretch flex-lg-self-auto" aria-label="Global">
<a class="Header-link d-block d-lg-none py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:dashboard:user" aria-label="Dashboard" href="/dashboard">
Dashboard
</a>
<a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" data-hotkey="g p" data-ga-click="Header, click, Nav menu - item:pulls context:user" aria-label="Pull requests you created" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls" href="/pulls">
Pull requests
</a>
<a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" data-hotkey="g i" data-ga-click="Header, click, Nav menu - item:issues context:user" aria-label="Issues you created" data-selected-links="/issues /issues/assigned /issues/mentioned /issues" href="/issues">
Issues
</a>
<div>
<a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:marketplace context:user" data-octo-click="marketplace_click" data-octo-dimensions="location:nav_bar" data-selected-links=" /marketplace" href="/marketplace">
Marketplace
</a>
</div>
<a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship showcases showcases_search showcases_landing /explore" href="/explore">
Explore
</a>
<a class="Header-link d-block d-lg-none mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" aria-label="View profile and more" aria-expanded="false" aria-haspopup="false" href="https://github.com/downad">
<img class="avatar" src="https://avatars0.githubusercontent.com/u/32821433?s=40&v=4" width="20" height="20" alt="@downad" />
downad
</a>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form action="/logout" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="czq0Izkp0ALdJ55SM2cVLQ+Of4PntbQQJP0Rhqyr2gnLHEJSSAaAbsL347endzhVhHSEckzdoXlQVO0ST/5NwQ==" />
<button type="submit" class="Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15 d-lg-none btn-link d-block width-full text-left" data-ga-click="Header, sign out, icon:logout" style="padding-left: 2px;">
<svg class="octicon octicon-sign-out v-align-middle" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 9V7H8V5h4V3l4 3-4 3zm-2 3H6V3L2 1h8v3h1V1c0-.55-.45-1-1-1H1C.45 0 0 .45 0 1v11.38c0 .39.22.73.55.91L6 16.01V13h4c.55 0 1-.45 1-1V8h-1v4z"/></svg>
Sign out
</button>
</form></nav>
</div>
<div class="Header-item Header-item--full flex-justify-center d-lg-none position-relative">
<div class="css-truncate css-truncate-target width-fit position-absolute left-0 right-0 text-center">
<svg class="octicon octicon-repo-forked" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
<a class="Header-link" href="/downad">downad</a>
/
<a class="Header-link" href="/downad/big_freaking_dig">big_freaking_dig</a>
</div>
</div>
<div class="Header-item position-relative d-none d-lg-flex">
</div>
<div class="Header-item mr-0 mr-lg-3 flex-order-1 flex-lg-order-none">
<a aria-label="You have no unread notifications" class="Header-link notification-indicator position-relative tooltipped tooltipped-s js-socket-channel js-notification-indicator" data-hotkey="g n" data-ga-click="Header, go to notifications, icon:read" data-channel="notification-changed:32821433" href="/notifications">
<span class="mail-status "></span>
<svg class="octicon octicon-bell" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"/></svg>
</a>
</div>
<div class="Header-item position-relative d-none d-lg-flex">
<details class="details-overlay details-reset">
<summary class="Header-link"
aria-label="Create new…"
data-ga-click="Header, create new, icon:add">
<svg class="octicon octicon-plus" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 9H7v5H5V9H0V7h5V2h2v5h5v2z"/></svg> <span class="dropdown-caret"></span>
</summary>
<details-menu class="dropdown-menu dropdown-menu-sw">
<a role="menuitem" class="dropdown-item" href="/new" data-ga-click="Header, create new repository">
New repository
</a>
<a role="menuitem" class="dropdown-item" href="/new/import" data-ga-click="Header, import a repository">
Import repository
</a>
<a role="menuitem" class="dropdown-item" href="https://gist.github.com/" data-ga-click="Header, create new gist">
New gist
</a>
<a role="menuitem" class="dropdown-item" href="/organizations/new" data-ga-click="Header, create new organization">
New organization
</a>
<a role="menuitem" class="dropdown-item" href="/new/project" data-ga-click="Header, create new project">
New project
</a>
</details-menu>
</details>
</div>
<div class="Header-item position-relative mr-0 d-none d-lg-flex">
<details class="details-overlay details-reset">
<summary class="Header-link"
aria-label="View profile and more"
data-ga-click="Header, show menu, icon:avatar">
<img alt="@downad" class="avatar" src="https://avatars0.githubusercontent.com/u/32821433?s=40&v=4" height="20" width="20">
<span class="dropdown-caret"></span>
</summary>
<details-menu class="dropdown-menu dropdown-menu-sw mt-2" style="width: 180px">
<div class="header-nav-current-user css-truncate"><a role="menuitem" class="no-underline user-profile-link px-3 pt-2 pb-2 mb-n2 mt-n1 d-block" href="/downad" data-ga-click="Header, go to profile, text:Signed in as">Signed in as <strong class="css-truncate-target">downad</strong></a></div>
<div role="none" class="dropdown-divider"></div>
<div class="pl-3 pr-3 f6 user-status-container js-user-status-context pb-1" data-url="/users/status?compact=1&link_mentions=0&truncate=1">
<div class="js-user-status-container
user-status-compact rounded-1 px-2 py-1 mt-2
border
" data-team-hovercards-enabled>
<details class="js-user-status-details details-reset details-overlay details-overlay-dark">
<summary class="btn-link btn-block link-gray no-underline js-toggle-user-status-edit toggle-user-status-edit " aria-haspopup="dialog" role="menuitem" data-hydro-click="{"event_type":"user_profile.click","payload":{"profile_user_id":32821433,"target":"EDIT_USER_STATUS","user_id":32821433,"client_id":"726156918.1555960170","originating_request_id":"8EE2:25F21:3D7FD59:5DB6D46:5CE1B9FB","originating_url":"https://github.com/downad/big_freaking_dig/blob/master/mods/gs_tools/axes.lua","referrer":"https://github.com/downad/big_freaking_dig/tree/master/mods/gs_tools"}}" data-hydro-click-hmac="c1a2cbe432455a62246ca2c11478d6be8d2410b3fa780f247bd7ff40bc998e61">
<div class="d-flex">
<div class="f6 lh-condensed user-status-header
d-inline-block v-align-middle
user-status-emoji-only-header circle
pr-2
"
style="max-width: 29px"
>
<div class="user-status-emoji-container flex-shrink-0 mr-1 mt-1 lh-condensed-ultra v-align-bottom" style="">
<svg class="octicon octicon-smiley" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"/></svg>
</div>
</div>
<div class="
d-inline-block v-align-middle
css-truncate css-truncate-target
user-status-message-wrapper f6"
style="line-height: 20px;" >
<div class="d-inline-block text-gray-dark v-align-text-top text-left">
<span class="text-gray ml-2">Set status</span>
</div>
</div>
</div>
</summary> <details-dialog class="details-dialog rounded-1 anim-fade-in fast Box Box--overlay" role="dialog" tabindex="-1">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="position-relative flex-auto js-user-status-form" action="/users/status?compact=1&link_mentions=0&truncate=1" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="_method" value="put" /><input type="hidden" name="authenticity_token" value="VRAu4ZVOjrgbAmck23nuheUA19acT1ft/6wwt3iHfwhv9tQmY9qXe+i4GAwSf4NKzKm/g124Na06NITP1tqXOw==" />
<div class="Box-header bg-gray border-bottom p-3">
<button class="Box-btn-octicon js-toggle-user-status-edit btn-octicon float-right" type="reset" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
<h3 class="Box-title f5 text-bold text-gray-dark">Edit status</h3>
</div>
<input type="hidden" name="emoji" class="js-user-status-emoji-field" value="">
<input type="hidden" name="organization_id" class="js-user-status-org-id-field" value="">
<div class="px-3 py-2 text-gray-dark">
<div class="js-characters-remaining-container position-relative mt-2">
<div class="input-group d-table form-group my-0 js-user-status-form-group">
<span class="input-group-button d-table-cell v-align-middle" style="width: 1%">
<button type="button" aria-label="Choose an emoji" class="btn-outline btn js-toggle-user-status-emoji-picker btn-open-emoji-picker p-0">
<span class="js-user-status-original-emoji" hidden></span>
<span class="js-user-status-custom-emoji"></span>
<span class="js-user-status-no-emoji-icon" >
<svg class="octicon octicon-smiley" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"/></svg>
</span>
</button>
</span>
<input
type="text"
autocomplete="off"
data-suggest-emoji="/autocomplete/emoji"
data-suggest-mention="/autocomplete/user-suggestions"
data-no-org-url="/autocomplete/user-suggestions"
data-org-url="/suggestions?mention_suggester=1"
data-maxlength="80"
class="d-table-cell width-full form-control js-user-status-message-field js-characters-remaining-field"
placeholder="What's happening?"
name="message"
value=""
aria-label="What is your current status?">
<div class="error">Could not update your status, please try again.</div>
</div>
<div style="margin-left: 53px" class="my-1 text-small label-characters-remaining js-characters-remaining" data-suffix="remaining" hidden>
80 remaining
</div>
</div>
<include-fragment class="js-user-status-emoji-picker" data-url="/users/status/emoji"></include-fragment>
<div class="overflow-auto ml-n3 mr-n3 px-3 border-bottom" style="max-height: 33vh">
<div class="user-status-suggestions js-user-status-suggestions collapsed overflow-hidden">
<h4 class="f6 text-normal my-3">Suggestions:</h4>
<div class="mx-3 mt-2 clearfix">
<div class="float-left col-6">
<button type="button" value=":palm_tree:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="palm_tree" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f334.png">🌴</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
On vacation
</div>
</button>
<button type="button" value=":face_with_thermometer:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="face_with_thermometer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f912.png">🤒</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Out sick
</div>
</button>
</div>
<div class="float-left col-6">
<button type="button" value=":house:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="house" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3e0.png">🏠</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Working from home
</div>
</button>
<button type="button" value=":dart:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="dart" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3af.png">🎯</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Focusing
</div>
</button>
</div>
</div>
</div>
<div class="user-status-limited-availability-container">
<div class="form-checkbox my-0">
<input type="checkbox" name="limited_availability" value="1" class="js-user-status-limited-availability-checkbox" data-default-message="I may be slow to respond." aria-describedby="limited-availability-help-text-truncate-true" id="limited-availability-truncate-true">
<label class="d-block f5 text-gray-dark mb-1" for="limited-availability-truncate-true">
Busy
</label>
<p class="note" id="limited-availability-help-text-truncate-true">
When others mention you, assign you, or request your review,
GitHub will let them know that you have limited availability.
</p>
</div>
</div>
</div>
<div class="d-inline-block f5 mr-2 pt-3 pb-2" >
<div class="d-inline-block mr-1">
Clear status
</div>
<details class="js-user-status-expire-drop-down f6 dropdown details-reset details-overlay d-inline-block mr-2">
<summary class="f5 btn-link link-gray-dark border px-2 py-1 rounded-1" aria-haspopup="true">
<div class="js-user-status-expiration-interval-selected d-inline-block v-align-baseline">
Never
</div>
<div class="dropdown-caret"></div>
</summary>
<ul class="dropdown-menu dropdown-menu-se pl-0 overflow-auto" style="width: 220px; max-height: 15.5em">
<li>
<button type="button" class="btn-link dropdown-item js-user-status-expire-button ws-normal" title="Never">
<span class="d-inline-block text-bold mb-1">Never</span>
<div class="f6 lh-condensed">Keep this status until you clear your status or edit your status.</div>
</button>
</li>
<li class="dropdown-divider" role="none"></li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 30 minutes" value="2019-05-19T22:48:24+02:00">
in 30 minutes
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 1 hour" value="2019-05-19T23:18:24+02:00">
in 1 hour
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 4 hours" value="2019-05-20T02:18:24+02:00">
in 4 hours
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="today" value="2019-05-19T23:59:59+02:00">
today
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="this week" value="2019-05-19T23:59:59+02:00">
this week
</button>
</li>
</ul>
</details>
<input class="js-user-status-expiration-date-input" type="hidden" name="expires_at" value="">
</div>
<include-fragment class="js-user-status-org-picker" data-url="/users/status/organizations"></include-fragment>
</div>
<div class="d-flex flex-items-center flex-justify-between p-3 border-top">
<button type="submit" disabled class="width-full btn btn-primary mr-2 js-user-status-submit">
Set status
</button>
<button type="button" disabled class="width-full js-clear-user-status-button btn ml-2 ">
Clear status
</button>
</div>
</form> </details-dialog>
</details>
</div>
</div>
<div role="none" class="dropdown-divider"></div>
<a role="menuitem" class="dropdown-item" href="/downad" data-ga-click="Header, go to profile, text:your profile">Your profile</a>
<a role="menuitem" class="dropdown-item" href="/downad?tab=repositories" data-ga-click="Header, go to repositories, text:your repositories">Your repositories</a>
<a role="menuitem" class="dropdown-item" href="/downad?tab=projects" data-ga-click="Header, go to projects, text:your projects">Your projects</a>
<a role="menuitem" class="dropdown-item" href="/downad?tab=stars" data-ga-click="Header, go to starred repos, text:your stars">Your stars</a>
<a role="menuitem" class="dropdown-item" href="https://gist.github.com/" data-ga-click="Header, your gists, text:your gists">Your gists</a>
<div role="none" class="dropdown-divider"></div>
<a role="menuitem" class="dropdown-item" href="https://help.github.com" data-ga-click="Header, go to help, text:help">Help</a>
<a role="menuitem" class="dropdown-item" href="/settings/profile" data-ga-click="Header, go to settings, icon:settings">Settings</a>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="logout-form" action="/logout" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="52yumh0zyjBLvUQ2rWW9Zbj7MpQxaCf/k3/VhTh61mRfSljrbByaXFRtOdM5dZAdMwHJZZoAMpbn1ikR2y9BrA==" />
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout" role="menuitem">
Sign out
</button>
</form> </details-menu>
</details>
</div>
</header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container">
</div>
<div class="application-main " data-commit-hovercards-enabled>
<div itemscope itemtype="http://schema.org/SoftwareSourceCode" class="">
<main >
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav pt-0 pt-lg-4 ">
<div class="repohead-details-container clearfix container-lg p-responsive d-none d-lg-block">
<ul class="pagehead-actions">
<li>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="clearfix js-social-form js-social-container" action="/notifications/subscribe" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="l68XKveH9MyWqQC/Q9QyNvuQnbwgzt/AQ/nSWavoixYdAsydNYM+Mo433amodUuDhyUbXUUv5kFZo4/JFq6iLQ==" /> <input type="hidden" name="repository_id" value="187522932">
<details class="details-reset details-overlay select-menu float-left">
<summary class="select-menu-button float-left btn btn-sm btn-with-count" data-hydro-click="{"event_type":"repository.click","payload":{"target":"WATCH_BUTTON","repository_id":187522932,"client_id":"726156918.1555960170","originating_request_id":"8EE2:25F21:3D7FD59:5DB6D46:5CE1B9FB","originating_url":"https://github.com/downad/big_freaking_dig/blob/master/mods/gs_tools/axes.lua","referrer":"https://github.com/downad/big_freaking_dig/tree/master/mods/gs_tools","user_id":32821433}}" data-hydro-click-hmac="dbd6f6bb60191fab06da62c7232b10ad23f94a9286e71611a89861d8e7a2cf00" data-ga-click="Repository, click Watch settings, action:blob#show"> <span data-menu-button>
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Watch
</span>
</summary> <details-menu
class="select-menu-modal position-absolute mt-5"
style="z-index: 99;">
<div class="select-menu-header">
<span class="select-menu-title">Notifications</span>
</div>
<div class="select-menu-list">
<button type="submit" name="do" value="included" class="select-menu-item width-full" aria-checked="true" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Not watching</span>
<span class="description">Be notified only when participating or @mentioned.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Watch
</span>
</div>
</button>
<button type="submit" name="do" value="release_only" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Releases only</span>
<span class="description">Be notified of new releases, and when participating or @mentioned.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Unwatch releases
</span>
</div>
</button>
<button type="submit" name="do" value="subscribed" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Unwatch
</span>
</div>
</button>
<button type="submit" name="do" value="ignore" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-mute v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 2.81v10.38c0 .67-.81 1-1.28.53L3 10H1c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h2l3.72-3.72C7.19 1.81 8 2.14 8 2.81zm7.53 3.22l-1.06-1.06-1.97 1.97-1.97-1.97-1.06 1.06L11.44 8 9.47 9.97l1.06 1.06 1.97-1.97 1.97 1.97 1.06-1.06L13.56 8l1.97-1.97z"/></svg>
Stop ignoring
</span>
</div>
</button>
</div>
</details-menu>
</details>
<a class="social-count js-social-count"
href="/downad/big_freaking_dig/watchers"
aria-label="0 users are watching this repository">
0
</a>
</form>
</li>
<li>
<div class="js-toggler-container js-social-container starring-container ">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="starred js-social-form" action="/downad/big_freaking_dig/unstar" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="VueKvSTzSMTNUxEKiJrVLB8u/7QAIyjRoEPDTU4P0tVeIjiDj8IWK13j2CINaDptMhAZdVu1aD0fW/W/Uy+6dA==" />
<input type="hidden" name="context" value="repository"></input>
<button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this repository" title="Unstar downad/big_freaking_dig" data-hydro-click="{"event_type":"repository.click","payload":{"target":"UNSTAR_BUTTON","repository_id":187522932,"client_id":"726156918.1555960170","originating_request_id":"8EE2:25F21:3D7FD59:5DB6D46:5CE1B9FB","originating_url":"https://github.com/downad/big_freaking_dig/blob/master/mods/gs_tools/axes.lua","referrer":"https://github.com/downad/big_freaking_dig/tree/master/mods/gs_tools","user_id":32821433}}" data-hydro-click-hmac="55a6baa91c1569975d26af966c4143b93990333b4ae88dc68394e58433731db6" data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar"> <svg class="octicon octicon-star v-align-text-bottom" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"/></svg>
Unstar
</button> <a class="social-count js-social-count" href="/downad/big_freaking_dig/stargazers"
aria-label="0 users starred this repository">
0
</a>
</form>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="unstarred js-social-form" action="/downad/big_freaking_dig/star" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="gBFudyQO6ndJ+OOaw/mOlxCTyhkQgiczLrMCKatnQtOyi6X3SM4rQKLSPnG4NIz11WnKXP5awKrmpPVxfZ2AZg==" />
<input type="hidden" name="context" value="repository"></input>
<button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this repository" title="Star downad/big_freaking_dig" data-hydro-click="{"event_type":"repository.click","payload":{"target":"STAR_BUTTON","repository_id":187522932,"client_id":"726156918.1555960170","originating_request_id":"8EE2:25F21:3D7FD59:5DB6D46:5CE1B9FB","originating_url":"https://github.com/downad/big_freaking_dig/blob/master/mods/gs_tools/axes.lua","referrer":"https://github.com/downad/big_freaking_dig/tree/master/mods/gs_tools","user_id":32821433}}" data-hydro-click-hmac="542c049361524dc0adc104dc742b1c12a635c022b80f55c848ccef3cb20c912c" data-ga-click="Repository, click star button, action:blob#show; text:Star"> <svg class="octicon octicon-star v-align-text-bottom" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"/></svg>
Star
</button> <a class="social-count js-social-count" href="/downad/big_freaking_dig/stargazers"
aria-label="0 users starred this repository">
0
</a>
</form> </div>
</li>
<li>
<span class="btn btn-sm btn-with-count disabled tooltipped tooltipped-sw" aria-label="Cannot fork because you own this repository and are not a member of any organizations.">
<svg class="octicon octicon-repo-forked v-align-text-bottom" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
Fork
</span>
<a href="/downad/big_freaking_dig/network/members" class="social-count"
aria-label="4 users forked this repository">
4
</a>
</li>
</ul>
<h1 class="public ">
<svg class="octicon octicon-repo-forked" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
<span class="author" itemprop="author"><a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=32821433" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/downad">downad</a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name"><a data-pjax="#js-repo-pjax-container" href="/downad/big_freaking_dig">big_freaking_dig</a></strong>
<span class="fork-flag" data-repository-hovercards-enabled>
<span class="text">forked from <a data-hovercard-type="repository" data-hovercard-url="/Jordach/big_freaking_dig/hovercard" href="/Jordach/big_freaking_dig">Jordach/big_freaking_dig</a></span>
</span>
</h1>
</div>
<nav class="reponav js-repo-nav js-sidenav-container-pjax container-lg p-responsive d-none d-lg-block"
itemscope
itemtype="http://schema.org/BreadcrumbList"
aria-label="Repository"
data-pjax="#js-repo-pjax-container">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a class="js-selected-navigation-item selected reponav-item" itemprop="url" data-hotkey="g c" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages /downad/big_freaking_dig" href="/downad/big_freaking_dig">
<svg class="octicon octicon-code" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a data-hotkey="g p" itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_pulls checks /downad/big_freaking_dig/pulls" href="/downad/big_freaking_dig/pulls">
<svg class="octicon octicon-git-pull-request" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
<span itemprop="name">Pull requests</span>
<span class="Counter">0</span>
<meta itemprop="position" content="3">
</a> </span>
<a data-hotkey="g b" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /downad/big_freaking_dig/projects" href="/downad/big_freaking_dig/projects">
<svg class="octicon octicon-project" viewBox="0 0 15 16" version="1.1" width="15" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
Projects
<span class="Counter" >0</span>
</a>
<a class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /downad/big_freaking_dig/wiki" href="/downad/big_freaking_dig/wiki">
<svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"/></svg>
Wiki
</a>
<a class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors dependency_graph pulse people alerts /downad/big_freaking_dig/pulse" href="/downad/big_freaking_dig/pulse">
<svg class="octicon octicon-graph" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg>
Insights
</a>
<a class="js-selected-navigation-item reponav-item" data-selected-links="repo_settings repo_branch_settings hooks integration_installations repo_keys_settings issue_template_editor /downad/big_freaking_dig/settings" href="/downad/big_freaking_dig/settings">
<svg class="octicon octicon-gear" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 8.77v-1.6l-1.94-.64-.45-1.09.88-1.84-1.13-1.13-1.81.91-1.09-.45-.69-1.92h-1.6l-.63 1.94-1.11.45-1.84-.88-1.13 1.13.91 1.81-.45 1.09L0 7.23v1.59l1.94.64.45 1.09-.88 1.84 1.13 1.13 1.81-.91 1.09.45.69 1.92h1.59l.63-1.94 1.11-.45 1.84.88 1.13-1.13-.92-1.81.47-1.09L14 8.75v.02zM7 11c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"/></svg>
Settings
</a>
</nav>
<div class="reponav-wrapper reponav-small d-lg-none">
<nav class="reponav js-reponav text-center no-wrap"
itemscope
itemtype="http://schema.org/BreadcrumbList">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a class="js-selected-navigation-item selected reponav-item" itemprop="url" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages /downad/big_freaking_dig" href="/downad/big_freaking_dig">
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_pulls checks /downad/big_freaking_dig/pulls" href="/downad/big_freaking_dig/pulls">
<span itemprop="name">Pull requests</span>
<span class="Counter">0</span>
<meta itemprop="position" content="3">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /downad/big_freaking_dig/projects" href="/downad/big_freaking_dig/projects">
<span itemprop="name">Projects</span>
<span class="Counter">0</span>
<meta itemprop="position" content="4">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_wiki /downad/big_freaking_dig/wiki" href="/downad/big_freaking_dig/wiki">
<span itemprop="name">Wiki</span>
<meta itemprop="position" content="5">
</a> </span>
<a class="js-selected-navigation-item reponav-item" data-selected-links="pulse /downad/big_freaking_dig/pulse" href="/downad/big_freaking_dig/pulse">
Pulse
</a>
</nav>
</div>
</div>
<div class="container-lg new-discussion-timeline experiment-repo-nav p-responsive">
<div class="repository-content ">
<a class="d-none js-permalink-shortcut" data-hotkey="y" href="/downad/big_freaking_dig/blob/0f9eeac150e330726446ee055a3755cd5edc19ef/mods/gs_tools/axes.lua">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:2dede9412915c20e96ef290917cf5b99 -->
<div class="d-flex flex-items-start mb-3 flex-column flex-md-row">
<span class="d-flex flex-justify-between width-full width-md-auto">
<details class="details-reset details-overlay select-menu branch-select-menu hx_rsm" id="branch-select-menu">
<summary class="btn btn-sm select-menu-button css-truncate"
data-hotkey="w"
title="Switch branches or tags">
<i>Branch:</i>
<span class="css-truncate-target">master</span>
</summary>
<details-menu class="select-menu-modal hx_rsm-modal position-absolute" style="z-index: 99;" src="/downad/big_freaking_dig/ref-list/master/mods/gs_tools/axes.lua?source_action=show&source_controller=blob" preload>
<include-fragment class="select-menu-loading-overlay anim-pulse">
<svg height="32" class="octicon octicon-octoface" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M14.7 5.34c.13-.32.55-1.59-.13-3.31 0 0-1.05-.33-3.44 1.3-1-.28-2.07-.32-3.13-.32s-2.13.04-3.13.32c-2.39-1.64-3.44-1.3-3.44-1.3-.68 1.72-.26 2.99-.13 3.31C.49 6.21 0 7.33 0 8.69 0 13.84 3.33 15 7.98 15S16 13.84 16 8.69c0-1.36-.49-2.48-1.3-3.35zM8 14.02c-3.3 0-5.98-.15-5.98-3.35 0-.76.38-1.48 1.02-2.07 1.07-.98 2.9-.46 4.96-.46 2.07 0 3.88-.52 4.96.46.65.59 1.02 1.3 1.02 2.07 0 3.19-2.68 3.35-5.98 3.35zM5.49 9.01c-.66 0-1.2.8-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.54-1.78-1.2-1.78zm5.02 0c-.66 0-1.2.79-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.53-1.78-1.2-1.78z"/></svg>
</include-fragment>
</details-menu>
</details>
<div class="BtnGroup flex-shrink-0 d-md-none">
<a href="/downad/big_freaking_dig/find/master"
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
data-pjax
data-hotkey="t">
Find file
</a>
<clipboard-copy value="mods/gs_tools/axes.lua" class="btn btn-sm BtnGroup-item">
Copy path
</clipboard-copy>
</div>
</span>
<h2 id="blob-path" class="breadcrumb flex-auto min-width-0 text-normal flex-md-self-center ml-md-2 mr-md-3 my-2 my-md-0">
<span class="js-repo-root text-bold"><span class="js-path-segment"><a data-pjax="true" href="/downad/big_freaking_dig"><span>big_freaking_dig</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a data-pjax="true" href="/downad/big_freaking_dig/tree/master/mods"><span>mods</span></a></span><span class="separator">/</span><span class="js-path-segment"><a data-pjax="true" href="/downad/big_freaking_dig/tree/master/mods/gs_tools"><span>gs_tools</span></a></span><span class="separator">/</span><strong class="final-path">axes.lua</strong>
</h2>
<div class="BtnGroup flex-shrink-0 d-none d-md-inline-block">
<a href="/downad/big_freaking_dig/find/master"
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
data-pjax
data-hotkey="t">
Find file
</a>
<clipboard-copy value="mods/gs_tools/axes.lua" class="btn btn-sm BtnGroup-item">
Copy path
</clipboard-copy>
</div>
</div>
<include-fragment src="/downad/big_freaking_dig/contributors/master/mods/gs_tools/axes.lua" class="Box Box--condensed commit-loader">
<div class="Box-body bg-blue-light f6">
Fetching contributors…
</div>
<div class="Box-body d-flex flex-items-center" >
<img alt="" class="loader-loading mr-2" src="https://github.githubassets.com/images/spinners/octocat-spinner-32-EAF2F5.gif" width="16" height="16" />
<span class="text-red h6 loader-error">Cannot retrieve contributors at this time</span>
</div>
</include-fragment>
<div class="Box mt-3 position-relative">
<div class="Box-header py-2 d-flex flex-column flex-shrink-0 flex-md-row flex-md-items-center">
<div class="text-mono f6 flex-auto pr-3 flex-order-2 flex-md-order-1 mt-2 mt-md-0">
25 lines (17 sloc)
<span class="file-info-divider"></span>
634 Bytes
</div>
<div class="d-flex py-1 py-md-0 flex-auto flex-order-1 flex-md-order-2 flex-sm-grow-0 flex-justify-between">
<div class="BtnGroup">
<a id="raw-url" class="btn btn-sm BtnGroup-item" href="/downad/big_freaking_dig/raw/master/mods/gs_tools/axes.lua">Raw</a>
<a class="btn btn-sm js-update-url-with-hash BtnGroup-item" data-hotkey="b" href="/downad/big_freaking_dig/blame/master/mods/gs_tools/axes.lua">Blame</a>
<a rel="nofollow" class="btn btn-sm BtnGroup-item" href="/downad/big_freaking_dig/commits/master/mods/gs_tools/axes.lua">History</a>
</div>
<div>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form js-update-url-with-hash" action="/downad/big_freaking_dig/edit/master/mods/gs_tools/axes.lua" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="pCpc3uuypzOngxh9Un/9lF+xewd6f+2QDaREMcnDTLzScVY8y81fslWGXP2ZqUYEZNLWniEI4ndoVhelyKTWVA==" />
<button class="btn-octicon tooltipped tooltipped-nw" type="submit"
aria-label="Edit this file" data-hotkey="e" data-disable-with>
<svg class="octicon octicon-pencil" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"/></svg>
</button>
</form>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form" action="/downad/big_freaking_dig/delete/master/mods/gs_tools/axes.lua" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="oOcoeEUHe6zENA+cug+gsZ3kWQDWhKFYFCjZ/ULnG/V+oMYnivtrOgpRHgES0htVdMd3/HYkJ5ADrJbVD2IV7w==" />
<button class="btn-octicon btn-octicon-danger tooltipped tooltipped-nw" type="submit"
aria-label="Delete this file" data-disable-with>
<svg class="octicon octicon-trashcan" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"/></svg>
</button>
</form> </div>
</div>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper data type-lua ">
<table class="highlight tab-size js-file-line-container" data-tab-size="8">
<tr>
<td id="L1" class="blob-num js-line-number" data-line-number="1"></td>
<td id="LC1" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">--</span> tool mods, by gsmanners</span></td>
</tr>
<tr>
<td id="L2" class="blob-num js-line-number" data-line-number="2"></td>
<td id="LC2" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">--</span> license: WTFPL</span></td>
</tr>
<tr>
<td id="L3" class="blob-num js-line-number" data-line-number="3"></td>
<td id="LC3" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L4" class="blob-num js-line-number" data-line-number="4"></td>
<td id="LC4" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">--</span>------------------------------------------------</span></td>
</tr>
<tr>
<td id="L5" class="blob-num js-line-number" data-line-number="5"></td>
<td id="LC5" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L6" class="blob-num js-line-number" data-line-number="6"></td>
<td id="LC6" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">--</span> axes: lumber axes are designed to take down trees</span></td>
</tr>
<tr>
<td id="L7" class="blob-num js-line-number" data-line-number="7"></td>
<td id="LC7" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">--</span> the lumber axe can drop a tree with just a few hits</span></td>
</tr>
<tr>
<td id="L8" class="blob-num js-line-number" data-line-number="8"></td>
<td id="LC8" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L9" class="blob-num js-line-number" data-line-number="9"></td>
<td id="LC9" class="blob-code blob-code-inner js-file-line"><span class="pl-k">function</span> <span class="pl-en">gs_tools.after_axe</span>(<span class="pl-smi">pos</span>, <span class="pl-smi">oldnode</span>, <span class="pl-smi">digger</span>)</td>
</tr>
<tr>
<td id="L10" class="blob-num js-line-number" data-line-number="10"></td>
<td id="LC10" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> digger <span class="pl-k">then</span></td>
</tr>
<tr>
<td id="L11" class="blob-num js-line-number" data-line-number="11"></td>
<td id="LC11" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">local</span> wielded <span class="pl-k">=</span> digger:<span class="pl-c1">get_wielded_item</span>()</td>
</tr>
<tr>
<td id="L12" class="blob-num js-line-number" data-line-number="12"></td>
<td id="LC12" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">local</span> rank <span class="pl-k">=</span> minetest.<span class="pl-c1">get_item_group</span>(wielded:<span class="pl-c1">get_name</span>(), <span class="pl-s"><span class="pl-pds">"</span>lumberaxe<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L13" class="blob-num js-line-number" data-line-number="13"></td>
<td id="LC13" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> rank <span class="pl-k">></span> <span class="pl-c1">0</span> <span class="pl-k">then</span> </td>
</tr>
<tr>
<td id="L14" class="blob-num js-line-number" data-line-number="14"></td>
<td id="LC14" class="blob-code blob-code-inner js-file-line"> gs_tools.<span class="pl-c1">get_chopped</span>(pos, <span class="pl-s"><span class="pl-pds">"</span>snappy<span class="pl-pds">"</span></span>, digger)</td>
</tr>
<tr>
<td id="L15" class="blob-num js-line-number" data-line-number="15"></td>
<td id="LC15" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">end</span></td>
</tr>
<tr>
<td id="L16" class="blob-num js-line-number" data-line-number="16"></td>
<td id="LC16" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">end</span></td>
</tr>
<tr>
<td id="L17" class="blob-num js-line-number" data-line-number="17"></td>
<td id="LC17" class="blob-code blob-code-inner js-file-line"><span class="pl-k">end</span></td>
</tr>
<tr>
<td id="L18" class="blob-num js-line-number" data-line-number="18"></td>
<td id="LC18" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L19" class="blob-num js-line-number" data-line-number="19"></td>
<td id="LC19" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">--</span> register_on_dignode is used here because after_use does not provide position</span></td>
</tr>
<tr>
<td id="L20" class="blob-num js-line-number" data-line-number="20"></td>
<td id="LC20" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">--</span> which is somewhat annoying</span></td>
</tr>
<tr>
<td id="L21" class="blob-num js-line-number" data-line-number="21"></td>
<td id="LC21" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L22" class="blob-num js-line-number" data-line-number="22"></td>
<td id="LC22" class="blob-code blob-code-inner js-file-line">minetest.<span class="pl-c1">register_on_dignode</span>(gs_tools.<span class="pl-smi">after_axe</span>)</td>
</tr>
<tr>
<td id="L23" class="blob-num js-line-number" data-line-number="23"></td>
<td id="LC23" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L24" class="blob-num js-line-number" data-line-number="24"></td>
<td id="LC24" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
</table>
<details class="details-reset details-overlay BlobToolbar position-absolute js-file-line-actions dropdown d-none" aria-hidden="true">
<summary class="btn-octicon ml-0 px-2 p-0 bg-white border border-gray-dark rounded-1" aria-label="Inline file action toolbar">
<svg class="octicon octicon-kebab-horizontal" viewBox="0 0 13 16" version="1.1" width="13" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM13 7.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>
</summary>
<details-menu>
<ul class="BlobToolbar-dropdown dropdown-menu dropdown-menu-se mt-2" style="width:185px">
<li><clipboard-copy role="menuitem" class="dropdown-item" id="js-copy-lines" style="cursor:pointer;" data-original-text="Copy lines">Copy lines</clipboard-copy></li>
<li><clipboard-copy role="menuitem" class="dropdown-item" id="js-copy-permalink" style="cursor:pointer;" data-original-text="Copy permalink">Copy permalink</clipboard-copy></li>
<li><a class="dropdown-item js-update-url-with-hash" id="js-view-git-blame" role="menuitem" href="/downad/big_freaking_dig/blame/0f9eeac150e330726446ee055a3755cd5edc19ef/mods/gs_tools/axes.lua">View git blame</a></li>
</ul>
</details-menu>
</details>
</div>
</div>
<details class="details-reset details-overlay details-overlay-dark">
<summary data-hotkey="l" aria-label="Jump to line"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast linejump" aria-label="Jump to line">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓" />
<input class="form-control flex-auto mr-3 linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" aria-label="Jump to line" autofocus>
<button type="submit" class="btn" data-close-dialog>Go</button>
</form> </details-dialog>
</details>
</div>
<div class="modal-backdrop js-touch-events"></div>
</div>
</main>
</div>
</div>
<div class="footer container-lg width-full p-responsive" role="contentinfo">
<div class="position-relative d-flex flex-row-reverse flex-lg-row flex-wrap flex-lg-nowrap flex-justify-center flex-lg-justify-between pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light ">
<ul class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0">© 2019 <span title="0.30719s from unicorn-67c76ddc8b-trvws">GitHub</span>, Inc.</li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to terms, text:terms" href="https://github.com/site/terms">Terms</a></li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to privacy, text:privacy" href="https://github.com/site/privacy">Privacy</a></li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to security, text:security" href="https://github.com/security">Security</a></li>
<li class="mr-3 mr-lg-0"><a href="https://githubstatus.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a data-ga-click="Footer, go to help, text:help" href="https://help.github.com">Help</a></li>
</ul>
<a aria-label="Homepage" title="GitHub" class="footer-octicon d-none d-lg-block mx-lg-4" href="https://github.com">
<svg height="24" class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
</a>
<ul class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to contact, text:contact" href="https://github.com/contact">Contact GitHub</a></li>
<li class="mr-3 mr-lg-0"><a href="https://github.com/pricing" data-ga-click="Footer, go to Pricing, text:Pricing">Pricing</a></li>
<li class="mr-3 mr-lg-0"><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li class="mr-3 mr-lg-0"><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li class="mr-3 mr-lg-0"><a href="https://github.blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a data-ga-click="Footer, go to about, text:about" href="https://github.com/about">About</a></li>
</ul>
</div>
<div class="d-flex flex-justify-center pb-6">
<span class="f6 text-gray-light"></span>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg>
<button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
You can’t perform that action at this time.
</div>
<script crossorigin="anonymous" integrity="sha512-EPrD+nddbyhpiLL8l3M8VfJpZr4J2EWQLaPXZ+6A3VDJKzS5HeZ3dkMVieHSdvIPHsMbWPyVlY42SWKoS4XTfA==" type="application/javascript" src="https://github.githubassets.com/assets/compat-bootstrap-831f12d4.js"></script>
<script crossorigin="anonymous" integrity="sha512-mFJGqO63IzrRUe/3CpI2x1TacUM1edYB56po0/mrnmI+7ntIf2oo9LZAMT0bW41GpH9NycR6OW2S9vvouQDHWQ==" type="application/javascript" src="https://github.githubassets.com/assets/frameworks-1d50b418.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-rl2LAKXoYsX7wIUvF1H9KIXxp+8zQIl+zBu/DiZxsp7Hva72bD3KSWq2kdGBfIolNTSWHindqtG5KGuI6B60aQ==" type="application/javascript" src="https://github.githubassets.com/assets/github-bootstrap-e8bc289d.js"></script>
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner" hidden
>
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg>
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<template id="site-details-dialog">
<details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark" open>
<summary aria-haspopup="dialog" aria-label="Close dialog"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast">
<button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
<div class="octocat-spinner my-6 js-details-dialog-spinner"></div>
</details-dialog>
</details>
</template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0">
<div class="Popover-message Popover-message--bottom-left Popover-message--large Box box-shadow-large" style="width:360px;">
</div>
</div>
<div aria-live="polite" class="js-global-screen-reader-notice sr-only"></div>
</body>
</html>
|
-----------------------------------
--
-- Zone: RuLude_Gardens (243)
--
-----------------------------------
local ID = require("scripts/zones/RuLude_Gardens/IDs")
require("scripts/globals/conquest")
require("scripts/globals/missions")
require("scripts/globals/quests")
-----------------------------------
function onInitialize(zone)
zone:registerRegion(1, -4, -2, 40, 4, 3, 50)
end
function onZoneIn(player, prevZone)
local cs = -1
if player:getCurrentMission(COP) == tpz.mission.id.cop.FOR_WHOM_THE_VERSE_IS_SUNG and player:getCharVar("PromathiaStatus") == 2 then
cs = 10047
end
-- MOG HOUSE EXIT
if player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0 then
position = math.random(1, 5) + 45
player:setPos(position, 10, -73, 192)
end
return cs
end
function onConquestUpdate(zone, updatetype)
tpz.conq.onConquestUpdate(zone, updatetype)
end
function onRegionEnter(player, region)
local regionID = region:GetRegionID()
-- printf("regionID: %u", regionID)
if regionID == 1 then
if player:getCurrentMission(COP) == tpz.mission.id.cop.A_VESSEL_WITHOUT_A_CAPTAIN and player:getCharVar("PromathiaStatus") == 1 then
player:startEvent(65, player:getNation())
elseif player:getCurrentMission(COP) == tpz.mission.id.cop.A_PLACE_TO_RETURN and player:getCharVar("PromathiaStatus") == 0 then
player:startEvent(10048)
elseif player:getCurrentMission(COP) == tpz.mission.id.cop.FLAMES_IN_THE_DARKNESS and player:getCharVar("PromathiaStatus") == 2 then
player:startEvent(10051)
elseif player:getCurrentMission(TOAU) == tpz.mission.id.toau.EASTERLY_WINDS and player:getCharVar("AhtUrganStatus") == 1 then
player:startEvent(10094)
elseif player:getCurrentMission(TOAU) == tpz.mission.id.toau.ALLIED_RUMBLINGS then
player:startEvent(10097)
elseif player:getCurrentMission(COP) == tpz.mission.id.cop.DAWN then
if player:getCharVar("COP_3-taru_story") == 2 and player:getCharVar("COP_shikarees_story") == 1 and player:getCharVar("COP_louverance_story") == 3
and player:getCharVar("COP_tenzen_story") == 1 and player:getCharVar("COP_jabbos_story") == 1 then
player:startEvent(122)
elseif player:getCharVar("PromathiaStatus") == 7 then
if player:getQuestStatus(JEUNO, tpz.quest.id.jeuno.STORMS_OF_FATE) == QUEST_AVAILABLE then
player:startEvent(142)
elseif player:getQuestStatus(JEUNO, tpz.quest.id.jeuno.STORMS_OF_FATE) == QUEST_ACCEPTED and player:getCharVar('StormsOfFate') == 3 then
player:startEvent(143)
end
end
end
end
end
function onRegionLeave(player, region)
end
function onEventUpdate(player, csid, option)
end
function onEventFinish(player, csid, option)
if csid == 65 then
player:setCharVar("PromathiaStatus", 0)
player:completeMission(COP, tpz.mission.id.cop.A_VESSEL_WITHOUT_A_CAPTAIN)
player:addMission(COP, tpz.mission.id.cop.THE_ROAD_FORKS) -- THE_ROAD_FORKS -- global mission 3.3
-- We can't have more than 1 current mission at the time, so we keep The road forks as current mission
-- progress are recorded in the following two variables
player:setCharVar("MEMORIES_OF_A_MAIDEN_Status", 1) -- MEMORIES_OF_A_MAIDEN--3-3B: Windurst Road
player:setCharVar("EMERALD_WATERS_Status", 1) -- EMERALD_WATERS-- 3-3A: San d'Oria Road
elseif csid == 10047 then
player:setCharVar("PromathiaStatus", 0)
player:completeMission(COP, tpz.mission.id.cop.FOR_WHOM_THE_VERSE_IS_SUNG)
player:addMission(COP, tpz.mission.id.cop.A_PLACE_TO_RETURN)
elseif csid == 10048 then
player:setCharVar("PromathiaStatus", 1)
elseif csid == 10051 then
player:setCharVar("PromathiaStatus", 3)
elseif csid == 122 then
player:setCharVar("PromathiaStatus", 4)
player:setCharVar("COP_3-taru_story", 0)
player:setCharVar("COP_shikarees_story", 0)
player:setCharVar("COP_louverance_story", 0)
player:setCharVar("COP_tenzen_story", 0)
player:setCharVar("COP_jabbos_story", 0)
elseif csid == 10094 then
if option == 1 then
if player:getFreeSlotsCount() == 0 then
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, 2184)
else
player:completeMission(TOAU, tpz.mission.id.toau.EASTERLY_WINDS)
player:addMission(TOAU, tpz.mission.id.toau.WESTERLY_WINDS)
player:setCharVar("AhtUrganStatus", 0)
player:addItem(2184, 10)
player:messageSpecial(ID.text.ITEM_OBTAINED, 2184)
end
else
player:completeMission(TOAU, tpz.mission.id.toau.EASTERLY_WINDS)
player:addMission(TOAU, tpz.mission.id.toau.WESTERLY_WINDS)
player:setCharVar("AhtUrganStatus", 0)
end
elseif csid == 10097 then
player:completeMission(TOAU, tpz.mission.id.toau.ALLIED_RUMBLINGS)
player:needToZone(true)
player:setCharVar("TOAUM40_STARTDAY", VanadielDayOfTheYear())
player:addMission(TOAU, tpz.mission.id.toau.UNRAVELING_REASON)
elseif csid == 142 then
player:addQuest(JEUNO, tpz.quest.id.jeuno.STORMS_OF_FATE)
elseif csid == 143 then
player:completeQuest(JEUNO, tpz.quest.id.jeuno.STORMS_OF_FATE)
player:setCharVar('StormsOfFate', 0)
end
end
|
return function(RealObject)
local wrapped, Custom;
local Childs = setmetatable({}, {
__index = function(t, k)
--print("__index of Childs:", t, k)
local stat, val = pcall(function() return RealObject[k] end)
if stat then
if type(val) == "function" then
-- return a wrapper
return function(a, ...)
if a == wrapped and k:lower() == "remove" or k:lower() == "destroy" then
AddChild(nil, wrapped, Custom)
end
RealObject[k](RealObject, ...)
end
else
return RealObject[k]
end
else
return RealObject[k] -- this will error, but we want it to
end
end,
__newindex = function() error("This table is read-only") end
})
Custom = setmetatable({
Children = Childs,
Parent = "nil"
}, {
__index = Childs,
__call = function() return RealObject end,
__metatable = "The metatable is locked"
})
wrapped = setmetatable({}, {
__index = function(t, k)
if k == "FindFirstChild" then
return FindFirstChild
elseif k == "GetChildren" then
return GetChildren
else
return Custom[k]
end
end,
__call = function() return RealObject end,
__tostring = function() return tostring(RealObject) end,
__newindex = function(t, k, v)
if k == "Parent" then
AddChild(v, t, Custom)
return
end
local stat = pcall(function() return RealObject[k] end)
if stat then
-- Property exists in real object
-- if name, change name in Childs table
if k == "Name" then
if t.Parent ~= "nil" then
rawset(t.Parent.Children, v, t)
-- print("Changed entry [", v, "] to", t)
rawset(t.Parent.Children, tostring(t), nil)
-- print("Changed entry [", tostring(t), "] to nil")
-- for _, v in pairs(t.Parent.Children) do
-- print(_)
-- end
end
end
RealObject[k] = v
-- print("Changed name to", RealObject.Name)
-- print("Verification (raw):", rawget(Childs, v))
-- print("Varification (std):", Childs[v])
else
-- Property is not real. Add to custom props
Custom[k] = v
end
end,
__metatable = "The metatable is locked",
})
return wrapped
end
|
-- ... clojure.lua
|
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by shuieryin.
--- DateTime: 12/01/2018 9:14 PM
---
function learningCurve(X, y, Xval, yval, lambda)
--LEARNINGCURVE Generates the train and cross validation set errors needed
--to plot a learning curve
-- [error_train, error_val] = ...
-- LEARNINGCURVE(X, y, Xval, yval, lambda) returns the train and
-- cross validation set errors for a learning curve. In particular,
-- it returns two vectors of the same length - error_train and
-- error_val. Then, error_train(i) contains the training error for
-- i examples (and similarly for error_val(i)).
--
-- In this function, you will compute the train and test errors for
-- dataset sizes from 1 up to m. In practice, when working with larger
-- datasets, you might want to do this in larger intervals.
-- Number of training examples
local m = X:size(1)
-- You need to return these values correctly
local error_train = torch.zeros(m, 1)
local error_val = torch.zeros(m, 1)
-- ====================== YOUR CODE HERE ======================
-- Instructions: Fill in this function to return training errors in
-- error_train and the cross validation errors in error_val.
-- i.e., error_train(i) and
-- error_val(i) should give you the errors
-- obtained after training on i examples.
--
-- Note: You should evaluate the training error on the first i training
-- examples (i.e., X(1:i, :) and y(1:i)).
--
-- For the cross-validation error, you should instead evaluate on
-- the _entire_ cross validation set (Xval and yval).
--
-- Note: If you are using your cost function (linearRegCostFunction)
-- to compute the training and cross validation error, you should
-- call the function with the lambda argument set to 0.
-- Do note that you will still need to use lambda when running
-- the training to obtain the theta parameters.
--
-- Hint: You can loop over the examples with the following:
--
-- for i = 1:m
-- % Compute train/cross validation errors using training examples
-- % X(1:i, :) and y(1:i), storing the result in
-- % error_train(i) and error_val(i)
-- ....
--
-- end
-- =========================================================================
return error_train, error_val
end
|
return function(_, players)
for _, player in pairs(players) do
if player.Character then
player:LoadCharacter()
end
end
return ("Respawned %d players."):format(#players)
end
|
-- magiczockerOS - Copyright by Julian Kriete 2016-2021
-- My ComputerCraft-Forum account:
-- http://www.computercraft.info/forums2/index.php?showuser=57180
local term, peripheral, fs = term or nil, peripheral, fs
local to_complete = {"isDir", "isReadOnly", "getSize", "getFreeSpace", "getDrive"}
local to_complete_ = {"copy", "move"}
local _peri_names = peripheral and peripheral.getNames
local _peri_type = peripheral and peripheral.getType
local _peri_call = peripheral and peripheral.call
local path_to_listen = {}
local event_active = true
local write_modes = {w = true, wb = true, ab = true, a = true}
local function call_func(remote, is_remote, id, func, ...)
if is_remote and id and remote then
return remote(id, func, ...)
else
return fs[func](...)
end
end
function find_in_string(str, data) -- string.find in older cc versions is broken :/
local datalength = #data
for i = 1, #str - datalength + 1 do
if str:sub(i, i + datalength - 1) == data then
return i, i + datalength - 1
end
end
return nil
end
function get_path(path)
path = (path or ""):gsub("\\", "/"):gsub("^/+", ""):gsub("/+$", "") .. "/"
local cur_path = {}
for k in path:gmatch("[^/]+") do
local tmp = k:gsub("^%s+", ""):gsub("%s+$", "")
if tmp == "." then
elseif (tmp:match("%.+") or "") == tmp then
cur_path[#cur_path] = nil
elseif #tmp > 0 then
cur_path[#cur_path + 1] = tmp
end
end
return table.concat(cur_path, "/")
end
local function remove_root_path(rp, paths)
rp = rp:gsub("/+", "/"):gsub("^/+", ""):gsub("/+$", "") .. "/"
for i = 1, #paths do
paths[i] = paths[i]:gsub("/+", "/"):gsub("^/+", "")
if paths[i]:sub(1, #rp) == rp then
paths[i] = paths[i]:sub(#rp + 1)
end
end
return paths
end
local function getDrives()
local drives = {}
if _peri_names and _peri_type and _peri_call then
local names = _peri_names()
for i = 1, #names do
if _peri_type(names[i]) == "drive" and _peri_call(names[i], "isDiskPresent") then
drives[#drives + 1] = names[i]
end
end
end
return drives
end
local function addMissingFolders(path, normalPath, remote, is_remote, server_id)
local items = call_func(remote, is_remote, server_id, "isDir", path) and call_func(remote, is_remote, server_id, "list", path) or {}
if term then
for i = 1, #items do
if items[i] == "rom" then
return items
end
end
end
if normalPath and normalPath == "" then
if term then
items[#items + 1] = "rom"
end
local drives = getDrives()
for i = 1, #drives do
items[#items + 1] = _peri_call(drives[i], "getMountPath")
end
table.sort(items)
end
return items
end
function rom_checking(path)
local driveList = getDrives()
local path_ = path or ""
path_ = path_:gsub("\\", "/"):gsub("^/+", ""):gsub("/+$", "") .. "/"
if term and path_:sub(1, 4) == "rom/" then
return true
end
for i = 1, #driveList do
local mount_path = _peri_call(driveList[i], "getMountPath") .. "/"
if path_:sub(1, #mount_path) == mount_path then
return true
end
end
return false
end
function add_listener(path, methods)
if path and methods then
path_to_listen[path] = {}
local tmp = path_to_listen[path]
for k in next, methods do
tmp[k] = true
end
end
end
function remove_listener(path)
path_to_listen[path] = nil
end
local function send_event(path, method)
if event_active then
local folder = find_in_string(path:reverse(), "/")
folder = folder and path:sub(1, #path - folder) or ""
local tmp = path_to_listen[folder]
if tmp and tmp[method] then
os.queueEvent("filesystem_changed", method, folder)
end
end
end
function create(root_path, is_remote, server_id)
local filesystem = {}
local remote
local is_remote = server_id and is_remote or false
local function call(is_remote, ...)
return call_func(remote, is_remote, server_id, ...)
end
if not call(is_remote, "exists", root_path) then
call(is_remote, "makeDir", root_path)
end
function filesystem.set_server(id)
server_id = id
end
function filesystem.set_remote(data)
remote = data
end
function filesystem.is_online(var)
is_remote = var
end
function filesystem.set_root_path(path)
root_path = path
end
function filesystem.get_root_path()
return root_path
end
filesystem.exists = fs.exists and function(path)
local path = get_path(path)
local rc = rom_checking(path)
local tmp = (not rc and root_path .. "/" or "") .. path
send_event(tmp, "exists")
return call(not rc and is_remote, "exists", tmp)
end
filesystem.list = fs.list and function(path)
local path = event_active and get_path(path) or path
local rc = rom_checking(path)
local tmp = (not rc and root_path .. "/" or "") .. path
send_event(tmp, "list")
return addMissingFolders(tmp, path, remote, not rc and is_remote, server_id)
end
filesystem.delete = fs.delete and function(path)
local path = get_path(path)
local rc = rom_checking(path)
path = rc and path or root_path .. "/" .. path
if path == root_path .. "/desktop" then -- added for magiczockerOS
return nil
end
send_event(path, "delete")
return call(not rc and is_remote, "exists", path) and call(not rc and is_remote, "delete", path)
end
-- gsub-filter from https://github.com/JasonTheKitten/Mimic/blob/gh-pages/lua/pre-bios.lua
filesystem.find = function(wildcard)
event_active = false
local to_return = {}
wildcard = "^" .. get_path(wildcard):gsub("^/+", ""):gsub("/+", "/"):gsub("*", "[^/]-") .. "$"
local fts = {""} -- FoldersToSearch
for _, v in next, fts do
local files = filesystem.list(v)
for j = 1, #files do
local tmp = v .. "/" .. files[j]
tmp = tmp:gsub("^/+", ""):gsub("/+$", ""):gsub("/+", "/")
if filesystem.isDir(tmp) then
fts[#fts + 1] = tmp
end
if tmp:find(wildcard) then
to_return[#to_return + 1] = tmp
end
end
end
event_active = true
return to_return
end
filesystem.combine = function(a, b)
return get_path((a or "") .. (a and b and "/" or "") .. (b or ""))
end
filesystem.getDir = function(str)
local tmp = get_path(str):gsub("/+$", "")
local _found = find_in_string(tmp:reverse(), "/")
return _found and tmp:sub(1, #tmp - _found) or ""
end
filesystem.getName = function(str)
local tmp = "/" .. get_path(str):gsub("/+$", "")
local _found = find_in_string(tmp:reverse(), "/")
tmp = _found and tmp:sub(-_found + 1) or ""
return #tmp == 0 and "root" or tmp
end
filesystem.isDriveRoot = fs and fs.isDriveRoot and function(path) -- added for support for CC-Tweaked 1.15.2
local path = get_path(path)
local rc = rom_checking(path)
return call(not rc and is_remote, "isDriveRoot", rc and path or root_path .. "/" .. path)
end or nil
filesystem.makeDir = fs.makeDir and function(path)
local path = get_path(path)
local rc = rom_checking(path)
local to_add = (rc and "" or root_path) .. "/"
local tmp = ""
for k in path:gmatch("[^/]+") do
if not call(not rc and is_remote, "exists", to_add .. tmp .. k) then
call(not rc and is_remote, "makeDir", to_add .. tmp .. k)
send_event(to_add .. tmp .. k, "delete")
end
tmp = tmp .. k .. "/"
end
end or nil
filesystem.open = fs.open and function(path, mode)
local path = get_path(path)
local rc = rom_checking(path)
local tmp = rc and path or root_path .. "/" .. path
local file
if not rc and is_remote then
local content = (mode == "r" or mode == "rb" or mode == "a" or mode == "ab") and call(true, "get_file", path) or (mode == "w" or mode == "wb") and "" or nil
local cursor = 1
local is_open = true
local function check_open()
if not is_open then
return error("File closed!", 0)
end
end
file = content and {
close = function()
check_open()
if write_modes[mode] then
call(true, "send_file", path, content)
end
for k in next, file do
file[k] = nil
end
is_open = false
end,
flush = write_modes[mode] and function()
check_open()
call(true, "send_file", path, content)
end,
read = (mode == "r" or mode == "rb") and function()
check_open()
local tmp = content:sub(cursor, cursor)
cursor = cursor + 1
return mode == "rb" and tmp:byte() or tmp
end,
readAll = (mode == "r" or mode == "rb") and function()
check_open()
local tmp = content
content = ""
return tmp
end,
readLine = (mode == "r" or mode == "rb") and function()
check_open()
local tmp1 = content:find("\n")
if tmp1 then
local tmp = content:sub(1, tmp1 - 1)
content = content:sub(tmp1 + 2)
return tmp
elseif #content > 0 then
local tmp = content
content = ""
return tmp
end
end,
write = write_modes[mode] and function(txt)
check_open()
if (mode == "wb" or mode == "ab") and type(txt) == "number" then
txt = txt:char()
end
content = content .. txt
end,
writeLine = (mode == "w" or mode == "a") and function(txt)
check_open()
content = content .. (#content > 0 and "\n" or "") .. txt
end,
}
elseif write_modes[mode] or fs.exists(tmp) then
if write_modes[mode] then
local tmpdir = filesystem.getDir(path)
filesystem.makeDir(tmpdir)
end
file = fs.open(tmp, mode)
if file then
local org_close = file.close
if write_modes[mode] then
file.close = function() send_event(tmp, "open") org_close() end
end
else
return false
end
else
return false
end
return file
end or nil
filesystem.complete = function(file, parent_path, include_files, include_slashes)
local to_return = {}
local include_rom
local file_table = {}
local file = file or ""
for k in (file .. ":"):gmatch("[^/]+") do
file_table[#file_table + 1] = k
end
if file:sub(1, 1) == "/" then
parent_path = ""
end
file_table[#file_table] = file_table[#file_table]:sub(1, -2)
if #file_table > 1 then
file = file:sub(1, -find_in_string(file:reverse(), "/") - 1)
else
file = ""
end
include_files = include_files == nil or include_files
include_slashes = include_slashes == nil or include_slashes
local tmp = file_table[#file_table]
if parent_path ~= "" and (not tmp or tmp == "" or tmp == ".") then
if include_slashes then
to_return[#to_return + 1] = "."
end
to_return[#to_return + 1] = ".." .. (include_slashes and "" or "/")
end
local rc = rom_checking(get_path(parent_path .. "/" .. file))
if not rc then
local path = get_path(parent_path)
parent_path = root_path .. "/" .. path
include_rom = get_path(file) == ""
end
local _list = call(not rc and is_remote, "exists", parent_path .. "/" .. file) and call(not rc and is_remote, "isDir", parent_path .. "/" .. file) and call(not rc and is_remote, "list", parent_path .. "/" .. file) or {}
if include_rom and term then
_list[#_list + 1] = "rom"
local drives = getDrives()
for i = 1, #drives do
_list[#_list + 1] = _peri_call(drives[i], "getMountPath")
end
end
local tmp1 = file_table[#file_table]
local _length = #tmp1
local _temp
for i = 1, #_list do
_temp = include_rom and term and _list[i] == "rom" or call(not rc and is_remote, "isDir", parent_path .. "/" .. file .. "/" .. _list[i])
if include_files or _temp then
if #_list[i] >= _length and _list[i]:sub(1, _length) == tmp1 then
tmp = _list[i]:sub(_length + 1)
to_return[#to_return + 1] = tmp .. (_temp and "/" or "")
if _temp and include_slashes then
to_return[#to_return + 1] = tmp
end
end
end
end
return to_return
end
for i = 1, #to_complete_ do -- copy / move
local tmp = to_complete_[i]
filesystem[tmp] = function(path1, path2)
local file1 = filesystem.open(path1, "r")
local file2 = filesystem.open(path2, "w")
file2.write(file1.readAll())
file1.close()
file2.close()
if tmp == "move" then
filesystem.delete(path1)
end
return true
end
end
for i = 1, #to_complete do
if fs[to_complete[i]] then
local tmp = to_complete[i]
filesystem[tmp] = function(path)
local path = event_active and get_path(path) or path
local rc = rom_checking(path)
path = rc and path or root_path .. "/" .. path
send_event(path, tmp)
return call(not rc and is_remote, tmp, path)
end
end
end
return filesystem
end
|
local m, s, o
local openclash = "openclash"
local uci = luci.model.uci.cursor()
local fs = require "luci.openclash"
font_red = [[<b style=color:red>]]
font_off = [[</b>]]
bold_on = [[<strong>]]
bold_off = [[</strong>]]
m = Map(openclash, translate("Servers manage and Config create"))
m.pageaction = false
s = m:section(TypedSection, "openclash")
s.anonymous = true
o = s:option(Flag, "create_config", translate("Create Config"))
o.description = font_red .. bold_on .. translate("Create Config By One-Click Only Need Proxies") .. bold_off .. font_off
o.default = 0
o = s:option(ListValue, "rule_sources", translate("Choose Template For Create Config"))
o.description = translate("Use Other Rules To Create Config")
o:depends("create_config", 1)
o:value("lhie1", translate("lhie1 Rules"))
o:value("ConnersHua", translate("ConnersHua(Provider-type) Rules"))
o:value("ConnersHua_return", translate("ConnersHua Return Rules"))
o = s:option(Flag, "mix_proxies", translate("Mix Proxies"))
o.description = font_red .. bold_on .. translate("Mix This Page's Proxies") .. bold_off .. font_off
o:depends("create_config", 1)
o.default = 0
o = s:option(Flag, "servers_update", translate("Keep Settings"))
o.description = font_red .. bold_on .. translate("Only Update Servers Below When Subscription") .. bold_off .. font_off
o.default = 0
o = s:option(DynamicList, "new_servers_group", translate("New Servers Group"))
o.description = translate("Set The New Subscribe Server's Default Proxy Groups")
o.rmempty = true
o:depends("servers_update", 1)
o:value("all", translate("All Groups"))
m.uci:foreach("openclash", "groups",
function(s)
o:value(s.name)
end)
-- [[ Groups Manage ]]--
s = m:section(TypedSection, "groups", translate("Proxy Groups(No Need Set when Config Create)"))
s.anonymous = true
s.addremove = true
s.sortable = true
s.template = "cbi/tblsection"
s.extedit = luci.dispatcher.build_url("admin/services/openclash/groups-config/%s")
function s.create(...)
local sid = TypedSection.create(...)
if sid then
luci.http.redirect(s.extedit % sid)
return
end
end
o = s:option(DummyValue, "config", translate("Config File"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("all")
end
o = s:option(DummyValue, "type", translate("Group Type"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = s:option(DummyValue, "name", translate("Group Name"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
-- [[ Proxy-Provider Manage ]]--
s = m:section(TypedSection, "proxy-provider", translate("Proxy-Provider"))
s.anonymous = true
s.addremove = true
s.sortable = true
s.template = "cbi/tblsection"
s.extedit = luci.dispatcher.build_url("admin/services/openclash/proxy-provider-config/%s")
function s.create(...)
local sid = TypedSection.create(...)
if sid then
luci.http.redirect(s.extedit % sid)
return
end
end
o = s:option(Flag, "enabled", translate("Enable"))
o.rmempty = false
o.default = o.enabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "1"
end
o = s:option(DummyValue, "config", translate("Config File"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("all")
end
o = s:option(DummyValue, "type", translate("Provider Type"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = s:option(DummyValue, "name", translate("Provider Name"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
-- [[ Servers Manage ]]--
s = m:section(TypedSection, "servers", translate("Proxies"))
s.anonymous = true
s.addremove = true
s.sortable = true
s.template = "cbi/tblsection"
s.extedit = luci.dispatcher.build_url("admin/services/openclash/servers-config/%s")
function s.create(...)
local sid = TypedSection.create(...)
if sid then
luci.http.redirect(s.extedit % sid)
return
end
end
---- enable flag
o = s:option(Flag, "enabled", translate("Enable"))
o.rmempty = false
o.default = o.enabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "1"
end
o = s:option(DummyValue, "config", translate("Config File"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("all")
end
o = s:option(DummyValue, "type", translate("Type"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = s:option(DummyValue, "name", translate("Server Alias"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = s:option(DummyValue, "server", translate("Server Address"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = s:option(DummyValue, "port", translate("Server Port"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = s:option(DummyValue, "udp", translate("UDP Support"))
function o.cfgvalue(...)
if Value.cfgvalue(...) == "true" then
return translate("Enable")
elseif Value.cfgvalue(...) == "false" then
return translate("Disable")
else
return translate("None")
end
end
o = s:option(DummyValue,"server",translate("Ping Latency"))
o.template="openclash/ping"
o.width="10%"
local tt = {
{Delete_Unused_Servers, Delete_Servers, Delete_Proxy_Provider, Delete_Groups}
}
b = m:section(Table, tt)
o = b:option(Button,"Delete_Unused_Servers", " ")
o.inputtitle = translate("Delete Unused Servers")
o.inputstyle = "reset"
o.write = function()
m.uci:set("openclash", "config", "enable", 0)
m.uci:commit("openclash")
luci.sys.call("sh /usr/share/openclash/cfg_unused_servers_del.sh 2>/dev/null")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers"))
end
o = b:option(Button,"Delete_Servers", " ")
o.inputtitle = translate("Delete Servers")
o.inputstyle = "reset"
o.write = function()
m.uci:set("openclash", "config", "enable", 0)
m.uci:delete_all("openclash", "servers", function(s) return true end)
m.uci:commit("openclash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers"))
end
o = b:option(Button,"Delete_Proxy_Provider", " ")
o.inputtitle = translate("Delete Proxy Providers")
o.inputstyle = "reset"
o.write = function()
m.uci:set("openclash", "config", "enable", 0)
m.uci:delete_all("openclash", "proxy-provider", function(s) return true end)
m.uci:commit("openclash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers"))
end
o = b:option(Button,"Delete_Groups", " ")
o.inputtitle = translate("Delete Groups")
o.inputstyle = "reset"
o.write = function()
m.uci:set("openclash", "config", "enable", 0)
m.uci:delete_all("openclash", "groups", function(s) return true end)
m.uci:commit("openclash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers"))
end
local t = {
{Load_Config, Commit, Apply}
}
a = m:section(Table, t)
o = a:option(Button,"Load_Config", " ")
o.inputtitle = translate("Read Config")
o.inputstyle = "apply"
o.write = function()
m.uci:set("openclash", "config", "enable", 0)
m.uci:commit("openclash")
luci.sys.call("/usr/share/openclash/yml_groups_get.sh 2>/dev/null &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash"))
end
o = a:option(Button, "Commit", " ")
o.inputtitle = translate("Commit Settings")
o.inputstyle = "apply"
o.write = function()
fs.unlink("/tmp/Proxy_Group")
m.uci:set("openclash", "config", "enable", 0)
m.uci:commit("openclash")
end
o = a:option(Button, "Apply", " ")
o.inputtitle = translate("Apply Settings")
o.inputstyle = "apply"
o.write = function()
fs.unlink("/tmp/Proxy_Group")
m.uci:set("openclash", "config", "enable", 0)
m.uci:commit("openclash")
luci.sys.call("/usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash"))
end
m:append(Template("openclash/server_list"))
m:append(Template("openclash/toolbar_show"))
return m
|
-- schema.lua
local challenges = require "kong.plugins.caesar-challenge.challenges"
local typedefs = require "kong.db.schema.typedefs"
return {
name = "caesar-challenge",
fields = {
{
config = {
type = "record",
fields = {
{ challenge = {
type = "string",
one_of = challenges.CHALLENGE_TYPES,
required = true,
}},
{ js = {
type = "record",
fields = {
{ dictionary_name = {
type = "string",
required = false,
default = "kong_db_cache",
}},
},
}},
{ cookie = {
type = "record",
fields = {
{ dictionary_name = {
type = "string",
required = false,
default = "kong_db_cache",
}},
},
}},
{ puzzle = {
type = "record",
fields = {
{ dictionary_name = {
type = "string",
required = false,
default = "kong_db_cache",
}},
},
}},
},
},
},
},
}
|
--[[
Opisy pojazdów
]]--
veh_desc = {}
veh_desc[400] = "Już w latach 80 amerykańska myśl techniczna poszła o krok dalej i stworzyła wóz który będzie nadawał się idealnie fanów jazdy offroad jak i pojemnej rodzinki z przedmieść. Landstalker to Jeep o stosunkowo małych wymiarach oraz małych osiągach, jego silnik ledwo co napędza sam pojazd. Jeśli szukasz przeciętnego auta dla przeciętnego człowieka to myślę że dobrze trafiłeś."
veh_desc[401] = "Konstruktorzy projektując ten wóz chcieli stworzyć sportową maszyne na chudą kieszeń, lecz jednocześnie tym samym sami polecieli po kosztach i takim oto sposobem została stworzona Bravura - brzydkie kaczątko wśród tanich wozów sportowych. Skoro mówimy o wozach sportowych, to nie oczekujcie zawrotnej prędkości, bo przydomek sportowy został tylko na kartce papieru w fazie projektowania."
veh_desc[402] = "Agersywny, ostry, głośny, drogi, duży - typowy amerykański wóz sportowy. Buffalo stał się ikoną amerykańskich pościgów z lat 90. Wóz został zaprojektowany na platformie F-Body z rodziny prawdziwych amerykańskich wozów sportowych. Pod jego maską znajduje się turbodoładowana jednostka V6 zdolna rozpędzić pojazd do prędkości przy której kierowca wylatuje za szybę. Jeśli więc masz pieniądze, chęć i jaja to ten wóz jest dla ciebie. "
veh_desc[403] = "Tego pojazdu nie trzeba opisywać, typowy ciągnik siodłowy który został wyprodukowany w fabrykach Texas'u."
veh_desc[404] = "[[ Tutaj jakiś autystyczny opis był ]]"
veh_desc[405] = "Widok tej czarnej limuzyny w nocy pod oknem potrafi wywołać ciarki na plecach, sentinel stał się ulubionym wozem europejskich mafiozów jak i też przesiąkniętych korupcją polityków. Jeśli masz pieniądze i zadatki na taką personę to możesz śmiało kupić tą europejską limuzyne."
veh_desc[406] = "Dumper to gigantycznych rozmiarów wywrotka wykorzystywana w kamieniołomach."
veh_desc[407] = "Amerykański wóz strażacki z gigantycznymi amerykańskimi zderzakami."
veh_desc[408] = "Nie chcesz jeździć tym wozem, zaufaj mi."
veh_desc[409] = "Ulubiony wóz pimpów w różowych garniturach oraz bananowych dzieciaków z bogatych rodzin... ale każdy ma jakieś marzenia."
veh_desc[410] = "Ten amerykański kompaktowy szkrab zasilany jednostką R4 do dziś jest zagadką dla samych producentów... dlaczego został wyprodukowany?"
veh_desc[411] = "Infernus to demon prędkości zaprojektowany i wyprodukowany przez amerykański oddział japońskiego koncernu motoryzacyjnego. Jego prosty kształt i dość pozornie niegroźna sylwetka jest tylko pozorem grzecznego sportowego samochodu dla średniej klasy społecznej. Infernus jest zasilany potężną jednostką V12 dzięki której wóz jest w stanie prześcignąć więszkość supersamochodów jakie wyszły na rynek. Jeśli nie jesteś miliarderem albo nie okradłeś banku to nawet nie myśl o tym samochodzie."
veh_desc[412] = "Kupując egzemplarz voodoo prawdopodobnie w środku zastaniesz zapach kubańskich cygar i rozsypaną kokaine, to właśnie ten wóz stał się ulubionym wozem kubańczyków i haitańczyków z florydy w latach 80. Jego niepozorny wygląd kryje pod maską potężny silnik, a konstrukcja zawieszenia zapewnia niesamowitą przyczepność. Dziś jest już tylko starym gratem, lecz jego dusza ciągle żyje."
veh_desc[413] = "Ulubiony VAN federalnych, ta furgonetka może się popisać niesamowitą pojemnością ładowniczą, między innymi sprzętu do podsłuchiwania... i w sumie tyle."
veh_desc[414] = "Osioł... brzydki, głupi i wolny - takimi słowami można opisać tą furgonetkę, a nazwa nie jest przypadkowa."
veh_desc[415] = "Wiele osób uwielbia go za kształt, inni za moc, a jeszcze inni za cene. Cheetah jest jednym z niewielu sportowych wozów który nie odstrasza ceną a oferuje ciekawego... siebie. Dobry wóz dla dobrze zarabiających."
veh_desc[416] = "Ambulans amerykańskiego koncernu motoryzacyjnego, kawał amerykańskiej kultury."
veh_desc[417] = "Śmigłowiec transportowy zdolny lądować na wodzie."
veh_desc[418] = "Jeśli masz wielką rodzinę i masz gdzieś opinie innych... kupuj go śmiało. Niczym cie nie zachwyci, no może jedynie tym że nikt ci go nie ukradnie."
veh_desc[419] = "Kiedyś amerykański pancernik, teraz rdzewiejący grat - choć jego blask był mocny to dziś już całkowicie wygasł. Za kilka dolarów mogę ci go sprzedać dorzucając do tego choinkę zapachową w kolorach szachownicy."
veh_desc[420] = "Masowo produkowany premier z wzmocnionymi zderzakami."
-- znowu czesc
veh_desc[481] = "Wyczynowy rower stworzony głównie dla młodszych osób, które lubią aktywnie spędzać czas."
-- czesc
veh_desc[574] = "Mała budka żelaza z szczotkami pod podwoziem. Denerwująca zwłaszcza gdy masz zielone światło a wyjeżdża Ci zamiatarka przed maske."
veh_desc[575] = "Stary samochód który nie zaskakuje niczym poza wyglądem. Jest duży, ociężały i brakuje mu mocy. Najlepsza zabawka alfonsów."
veh_desc[576] = "Jeden z amerykańskich klasyków. Do dziś jest rozpoznawany oraz chwalony przez użytkowników. Mniejsza część z nich zamienia go na kolorowe Low-Low."
veh_desc[577] = "Samolot pasażerski który oferuje jedynie loty pierwszą klasą. Dzięki wygodzie oraz swobodzie podczas lotu pasażerowie są zadowoleni."
veh_desc[578] = "Laweta dzięki której nie musisz się martwić o transport swojego wraku z autostrady gdy zabraknie Ci paliwa."
veh_desc[579] = "Niby pojazd terenowy lecz używany jest na drogach asfaltowych. Najczęściej widywany wśród przestępczej społeczności."
veh_desc[580] = "Samochód chociaż ciężko tak na prawdę go nazwać ze względu na luksus jaki nam oferuje. Został stworzony dla osób wyższych sfer którzy wymagają wiele od swojego samochodu."
veh_desc[581] = "Motocykl który mimo agresywnego wyglądu nie zaskakuje swoją mocą oraz osiągami. Używany przez amatorów jazdy na dwóch kolach."
veh_desc[582] = "Van przystosowany dla dziennikarzy. W środku znajdziemy jeden z najlepszych sprzętów stacjonarnych oraz najszybsze łącza bezprzewodowe."
veh_desc[583] = "Mały pojazd lotniskowy służący do podstawiania schodów do samolotów oraz przewozu bagażu na przyczepkach."
veh_desc[584] = "Cysterna służąca do przewozu paliwa na całym stanie San Andreas."
veh_desc[585] = "Średniej klasy sedan który jest dość popularny. Dzięki swoim gabarytom zapełnił sobie miejsce w ścisłej czołówce niepraktycznych pojazdów."
veh_desc[586] = "Motocykl dla pasjonatów. Używany jest do długich podróży po stanie. Dzięki swojej wielkości zaskakuje wygodą oraz komfortem jazdy."
veh_desc[587] = "Sportowe auto z europy, niby zaskakuje wyglądem lecz osiągami nie zachwyca."
veh_desc[588] = "Van dość specyficzny, wyróżnia się w tłumie swoją wielką parówką na dachu. Kontrowersyjne jest to że jeżdżą nim afro amerykanie."
veh_desc[589] = "Mały hatchback z europy używany przez rodziny z niższych sfer ze względu na cenę oraz dostępność części."
veh_desc[590] = "Wagon pociągu w którym przewożone są przeróżne rzeczy. Głównie jest używany przez imigrantów by przekroczyć granice."
veh_desc[591] = "Chłodnia w której jedne z najsilniejszych maszyn lądowych przewożą świeże mięso do naszych sklepów."
veh_desc[592] = "Samolot pasażerski latający po stanie San Andreas. Oby tylko nie spadł."
veh_desc[593] = "Mały samolot używany przez amatorów lotnictwa którzy zaczynają swoja przygodę."
veh_desc[594] = "Doniczka."
veh_desc[595] = "Łódź używana do przemieszczania się z punktu A do punktu B. Wyróżnia się działem maszynowym na końcu."
veh_desc[596] = "Radiowóz używany na terenie Los Santos i okolic. Jedyna różnica między tym a radiowozem z San Fierro jest oznaczenie na drzwiach."
veh_desc[597] = "Radiowóz używany przez departament policji. Dzięki zmodyfikowanemu silnikowi oraz mocnej bazie nadwozia może pozwolić sobie na brawurowe pościgi."
veh_desc[598] = "Starego typu radiowóz używany na terenach miasta Las Venturas. Tylko dlaczego tak bogate miasto ma tak stare radiowozy?"
veh_desc[599] = "Terenowy pojazd używany przez departament policji do jazdy po zboczach oraz miejscach w których nie dotrze zwykła jednostka."
veh_desc[600] = "Amerykański pickup który swoją sławę zdobył przez jednostkę V8 HEMi pracująca pod maską."
veh_desc[601] = "Opancerzony pojazd, tryskający wodą używany przez jednostki S.W.A.T w sytuacjach wyjątkowych."
veh_desc[602] = "Pojazd zza oceanu produkowany na masową skale jako super samochód. Ale czy na prawdę nim jest?"
veh_desc[603] = "Sportowy pojazd z mocną jednostką V8 pod maską. Dzięki swojej sylwetce wspaniale trzyma się drogi."
veh_desc[604] = "Krążownik szos, niegdyś pożądanie wielu rodzin. Dziś rdzewieje na złomowiskach."
veh_desc[605] = "Mały, ociężały pickup używany przez farmerów. Ale dlaczego go nie naprawili?"
veh_desc[606] = "Przyczepka używana do przewozu mniejszego bagażu na terenie lotniska."
veh_desc[607] = "Przyczepka używana do przewozu większych bagaży na terenie lotniska."
veh_desc[608] = "Schody przeznaczone do wejścia na pokład samolotu."
veh_desc[609] = "Starego typu samochód dostawczy, duży oraz pakowny. Często używany ze względu na tanią eksploatacje."
veh_desc[610] = "Maszyna rolnicza używana do przesiewania gleby."
veh_desc[611] = "Mała przyczepka służąca do przewozu niewielkiego bagażu."
|
--[[
Stores global variables for current server.
You can access variable to different script!
======================================================================
USAGE EXAMPLE:
local JavaScript = require(path to this module); -- You can fill with asset id of main module
local process = JavaScript.process;
process.env.currentTime = os.time()
print(process.env) -- Return table
]]
local Variables = {
}
return Variables
|
-- This file is generated by proto-gen-lua. DO NOT EDIT.
-- The protoc version is 'v3.19.2'
-- The proto-gen-lua version is 'Develop'
return {
name = [[google/protobuf/api.proto]],
package = [[google.protobuf]],
dependency = {
[[google/protobuf/source_context.proto]],
[[google/protobuf/type.proto]],
},
message_type = {
{
name = [[Api]],
field = {
{
name = [[name]],
number = 1,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_STRING]],
json_name = [[name]],
},
{
name = [[methods]],
number = 2,
label = [[LABEL_REPEATED]],
type = [[TYPE_MESSAGE]],
type_name = [[.google.protobuf.Method]],
json_name = [[methods]],
},
{
name = [[options]],
number = 3,
label = [[LABEL_REPEATED]],
type = [[TYPE_MESSAGE]],
type_name = [[.google.protobuf.Option]],
json_name = [[options]],
},
{
name = [[version]],
number = 4,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_STRING]],
json_name = [[version]],
},
{
name = [[source_context]],
number = 5,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_MESSAGE]],
type_name = [[.google.protobuf.SourceContext]],
json_name = [[sourceContext]],
},
{
name = [[mixins]],
number = 6,
label = [[LABEL_REPEATED]],
type = [[TYPE_MESSAGE]],
type_name = [[.google.protobuf.Mixin]],
json_name = [[mixins]],
},
{
name = [[syntax]],
number = 7,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_ENUM]],
type_name = [[.google.protobuf.Syntax]],
json_name = [[syntax]],
},
},
},
{
name = [[Method]],
field = {
{
name = [[name]],
number = 1,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_STRING]],
json_name = [[name]],
},
{
name = [[request_type_url]],
number = 2,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_STRING]],
json_name = [[requestTypeUrl]],
},
{
name = [[request_streaming]],
number = 3,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_BOOL]],
json_name = [[requestStreaming]],
},
{
name = [[response_type_url]],
number = 4,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_STRING]],
json_name = [[responseTypeUrl]],
},
{
name = [[response_streaming]],
number = 5,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_BOOL]],
json_name = [[responseStreaming]],
},
{
name = [[options]],
number = 6,
label = [[LABEL_REPEATED]],
type = [[TYPE_MESSAGE]],
type_name = [[.google.protobuf.Option]],
json_name = [[options]],
},
{
name = [[syntax]],
number = 7,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_ENUM]],
type_name = [[.google.protobuf.Syntax]],
json_name = [[syntax]],
},
},
},
{
name = [[Mixin]],
field = {
{
name = [[name]],
number = 1,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_STRING]],
json_name = [[name]],
},
{
name = [[root]],
number = 2,
label = [[LABEL_OPTIONAL]],
type = [[TYPE_STRING]],
json_name = [[root]],
},
},
},
},
options = {
java_package = [[com.google.protobuf]],
java_outer_classname = [[ApiProto]],
java_multiple_files = true,
go_package = [[google.golang.org/protobuf/types/known/apipb]],
objc_class_prefix = [[GPB]],
csharp_namespace = [[Google.Protobuf.WellKnownTypes]],
},
syntax = [[proto3]],
}
|
local Socket , Address =
require"t.net".sck, require"t.net".adr
local Protocol , Type =
require"t.Net.Socket.Protocol", require"t.Net.Socket.Type"
local Family =
require"t.Net.Family"
local t_type , t_assert , type, s_lower , s_format , type =
require't'.type, require't'.assert, type, string.lower, string.format, type
local sck_mt = debug.getregistry( )[ "T.Net.Socket" ]
local Sck_mt = getmetatable( Socket )
local sck_listener = sck_mt.listener
local sck_binder = sck_mt.binder
local sck_connecter = sck_mt.connecter
local sck_shutdowner = sck_mt.shutdowner
local Socket_new = Socket.new
-- remove helper functions from socket metatable table
sck_mt.listener = nil
sck_mt.binder = nil
sck_mt.connecter = nil
sck_mt.shutdowner = nil
Socket.new = nil
-- multi function to negotiate arguments
local getAddressArgs = function( host, port, bl, default )
if "T.Net.Address" == t_type( host ) then
if "number" == type( port ) then
return host, port -- host is adr, port is bl
else
return host -- host is adr, no bl given
end
elseif "string" == type( host ) then
if "number" == type( port ) then
return Address( host, port ), bl
else
return Address( host ), bl
end
elseif "number" == type( host ) then
if 'number' == type( port ) then
return Address( host ), port
else
return default, host -- host is bl
end
else
return default
end
end
local getAddress = function( host, port )
if "T.Net.Address" == t_type( host ) then
return host
elseif nil == port and "number" == type( host ) then
return Address( host )
elseif "number" ==type( port ) then
return Address( host, port )
else
return Address( )
end
end
local validateSocket = function( sck, command )
t_assert( "T.Net.Socket" == t_type( sck ),
"bad argument #1 to `" ..command.. "` (expected `t.Net.Socket`, got `%s`)", t_type( sck ) )
return sck
end
-- sck,adr = Socket.listen( ) -- Sck IPv4(TCP); Adr 0.0.0.0:xxxxx
-- sck,adr = Socket.listen( bl ) -- Sck IPv4(TCP); Adr 0.0.0.0:xxxxx
-- sck,adr = Socket.listen( adr ) -- Sck IPv4(TCP)
-- sck,adr = Socket.listen( adr, bl ) -- Sck IPv4(TCP)
-- sck,adr = Socket.listen( host ) -- Sck IPv4(TCP); Adr host:(0)
-- sck,adr = Socket.listen( host, port ) -- Sck IPv4(TCP); Adr host:port
-- sck,adr = Socket.listen( host, port, bl ) -- Sck IPv4(TCP); Adr host:port
Socket.listen = function( host, port, bl )
local adr, backlog = getAddressArgs( host, port, bl, Address( ) )
local sck = Socket( Socket.IPPROTO_TCP, adr.family )
local t,e = sck:bind( adr )
--print(sck, adr, t, e )
if not t then return t, e end -- false, errMsg
sck_listener( sck, backlog )
if 0==adr.port then adr.port = sck:getsockname( ).port end
return sck, adr
end
-- adr = sck:listen( ) -- just listen; assume bound socket
-- adr = sck:listen( bl ) -- just listen; assume bound socket
-- adr = sck:listen( adr ) -- perform bind and listen
-- adr = sck:listen( adr, bl ) -- perform bind and listen
-- adr = sck:listen( host ) -- Adr host:xxxxx
-- adr = sck:listen( host, port ) -- Adr host:port
-- adr = sck:listen( host, port, bl ) -- Adr host:port
sck_mt.listen = function( sck, host, port, bl )
sck = validateSocket( sck, "listen" )
local adr, backlog = getAddressArgs( host, port, bl, nil )
if adr then sck:bind( adr ) else adr = sck:getsockname( ) end
sck_listener( sck, backlog )
if 0==adr.port then adr.port = sck:getsockname( ).port end
return adr and adr or sck:getsockname( )
end
-- sck, adr = Socket.bind() --> creates TCP IPv4 Socket and 0.0.0.0:0 address
-- sck, adr = Socket.bind(port) --> creates TCP IPv4 Socket and 0.0.0.0:port address
-- sck, adr = Socket.bind(host,port) --> creates TCP IPv4 Socket and address
-- sck, adr = Socket.bind(address) --> creates TCP IPv4 Socket but no address
-- sck, adr = Socket.bind(address) --> returning socket is bound; getsockname()
Socket.bind = function( host, port )
local adr = getAddress( host, port )
local sck = Socket( Socket.IPPROTO_TCP, adr.family )
local t,e = sck_binder( sck, adr )
--print(sck, adr, t, e )
if t then return sck,adr else return t,e end
end
-- adr = s:bind() --> creates a 0.0.0.0:0 address
-- adr = s:bind(port) --> creates 0.0.0.0:port address
-- adr = s:bind(host,port) --> creates address
-- adr = s:bind(address) --> return `address` and does bind
sck_mt.bind = function( sck, host, port )
sck = validateSocket( sck, "bind" )
local adr = getAddress( host, port )
local t,e = sck_binder( sck, adr )
--print( sck, adr, t, e )
if t then return adr else return t,e end
end
Socket.connect = function( host, port )
local adr = getAddress( host, port )
local sck = Socket( 'TCP', adr.family )
local t,e = sck_connecter( sck, adr )
--print(sck, adr, t, e )
if t then return sck,adr else return t,e end
end
sck_mt.connect = function( sck, host, port )
sck = validateSocket( sck, "connect" )
local adr = getAddress( host, port )
local t,e = sck_connecter( sck, adr )
--print( sck, adr, t, e )
if t then return adr else return t,e end
end
-- lookup shutdown-mode and make sure it's callimg with number
sck_mt.shutdown = function( sck, mode )
local mode_nr = "number"==type( mode )
and mode
or Socket[ mode ]
assert( Socket[ mode_nr ], s_format( "Shutdown mode `%s` does not exist.", mode ) )
sck_shutdowner( sck, mode_nr )
end
-- Socket( ) Creates a new socket
-- \param protocol string/number: 'TCP', 'udp', 'IPPROTO_IPV6' ...
-- \param family string/number: 'ip4', 'AF_INET6', 'raw' ...
-- \param type string: 'stream', 'datagram' ...
-- \usage Net.Socket( ) -> create TCP IPv4 Socket
-- Net.Socket( 'TCP' ) -> create TCP IPv4 Socket
-- Net.Socket( 'tcp', 'ip4' ) -> create TCP IPv4 Socket
-- Net.Socket( 'Udp', 'ip4' ) -> create UDP IPv4 Socket
-- Net.Socket( 'UDP', 'ip6' ) -> create UDP IPv6 Socket
Sck_mt.__call = function( Sck, protocol, family, typ )
local p = protocol or Protocol.IPPROTO_TCP -- sane default
p = ( 'string' == type( p ) ) and Protocol[ p ] or p -- lookup name
assert( Protocol[ p ] and 'number' == type( p ), s_format( "Can't find protocol `%s`", protocol ))
local f = family or Family.AF_INET -- sane default
f = ( 'string' == type( f ) ) and Family[ f ] or f -- lookup name
assert( Family[ f ] and 'number' == type( f ), s_format( "Can't find family `%s`", family ))
local t = typ or ((Protocol.IPPROTO_TCP == p ) and 'SOCK_STREAM') -- sane default
or ((Protocol.IPPROTO_UDP == p ) and 'SOCK_DGRAM')
or 'SOCK_RAW'
t = ( 'string' == type( t ) ) and Type[ t ] or t -- lookup name
assert( Type[ t ] and 'number' == type( t ), s_format( "Can't find socket type `%s`", typ ))
return Socket_new( p, f, t )
end
-- set up aliases for the Read/Write shutdown directions
if Socket.SHUT_RD then
Socket.r,Socket.rd,Socket.read = Socket.SHUT_RD,Socket.SHUT_RD,Socket.SHUT_RD
end
if Socket.SHUT_WR then
Socket.w,Socket.wr,Socket.write = Socket.SHUT_WR,Socket.SHUT_WR,Socket.SHUT_WR
end
if Socket.SHUT_RDWR then
Socket.rw, Socket.rdwr, Socket.readwrite = Socket.SHUT_RDWR,Socket.SHUT_RDWR,Socket.SHUT_RDWR
end
return Socket
|
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(83)
--!./tcltestrunner.lua
-- 2008 Feb 6
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others.
-- May you share freely, never taking more than you give.
--
-------------------------------------------------------------------------
--
-- This file is to test that ticket #2927 is fixed.
--
-- $Id: tkt2927.test,v 1.4 2008/08/04 03:51:24 danielk1977 Exp $
--
-- ["set","testdir",[["file","dirname",["argv0"]]]]
-- ["source",[["testdir"],"\/tester.tcl"]]
-- Create a database.
--
test:do_test(
"tkt2927-1.1",
function()
return test:execsql [[
CREATE TABLE t1(a INT primary key, b INT );
INSERT INTO t1 VALUES(1,11);
INSERT INTO t1 VALUES(2,22);
INSERT INTO t1 VALUES(3,33);
INSERT INTO t1 VALUES(4,44);
INSERT INTO t1 VALUES(5,55);
SELECT * FROM t1;
]]
end, {
-- <tkt2927-1.1>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-1.1>
})
test:do_test(
"tkt2927-2.1",
function()
return test:execsql [[
SELECT a, b FROM t1
UNION ALL
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-2.1>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.1>
})
test:do_test(
"tkt2927-2.2",
function()
--set sql_addop_trace 1
return test:execsql [[
SELECT a, b FROM t1
UNION ALL
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-2.2>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.2>
})
test:do_test(
"tkt2927-2.3",
function()
return test:execsql [[
SELECT a, b FROM t1
UNION ALL
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-2.3>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.3>
})
test:do_test(
"tkt2927-2.4",
function()
return test:execsql [[
SELECT a, b FROM t1
UNION ALL
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-2.4>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.4>
})
test:do_test(
"tkt2927-2.5",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION ALL
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-2.5>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.5>
})
test:do_test(
"tkt2927-2.6",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION ALL
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-2.6>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.6>
})
test:do_test(
"tkt2927-2.7",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION ALL
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-2.7>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.7>
})
test:do_test(
"tkt2927-2.8",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION ALL
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-2.8>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.8>
})
test:do_test(
"tkt2927-2.9",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION ALL
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-2.9>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.9>
})
test:do_test(
"tkt2927-2.10",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION ALL
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-2.10>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.10>
})
test:do_test(
"tkt2927-2.11",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION ALL
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-2.11>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.11>
})
test:do_test(
"tkt2927-2.12",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION ALL
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-2.12>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.12>
})
test:do_test(
"tkt2927-2.13",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION ALL
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-2.13>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.13>
})
test:do_test(
"tkt2927-2.14",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION ALL
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-2.14>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.14>
})
test:do_test(
"tkt2927-2.15",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION ALL
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-2.15>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.15>
})
test:do_test(
"tkt2927-2.16",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION ALL
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-2.16>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55, 1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-2.16>
})
test:do_test(
"tkt2927-3.1",
function()
return test:execsql [[
SELECT a, b FROM t1
UNION
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.1>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.1>
})
test:do_test(
"tkt2927-3.2",
function()
return test:execsql [[
SELECT a, b FROM t1
UNION
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.2>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.2>
})
test:do_test(
"tkt2927-3.3",
function()
return test:execsql [[
SELECT a, b FROM t1
UNION
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.3>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.3>
})
test:do_test(
"tkt2927-3.4",
function()
return test:execsql [[
SELECT a, b FROM t1
UNION
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.4>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.4>
})
test:do_test(
"tkt2927-3.5",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.5>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.5>
})
test:do_test(
"tkt2927-3.6",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.6>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.6>
})
test:do_test(
"tkt2927-3.7",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.7>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.7>
})
test:do_test(
"tkt2927-3.8",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
UNION
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.8>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.8>
})
test:do_test(
"tkt2927-3.9",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.9>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.9>
})
test:do_test(
"tkt2927-3.10",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.10>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.10>
})
test:do_test(
"tkt2927-3.11",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.11>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.11>
})
test:do_test(
"tkt2927-3.12",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
UNION
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.12>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.12>
})
test:do_test(
"tkt2927-3.13",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.13>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.13>
})
test:do_test(
"tkt2927-3.14",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.14>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.14>
})
test:do_test(
"tkt2927-3.15",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.15>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.15>
})
test:do_test(
"tkt2927-3.16",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
UNION
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-3.16>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-3.16>
})
test:do_test(
"tkt2927-4.1",
function()
return test:execsql [[
SELECT a+b, a-b, a, b FROM t1
UNION ALL
SELECT a+b, a-b, a, b FROM t1
]]
end, {
-- <tkt2927-4.1>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.1>
})
test:do_test(
"tkt2927-4.2",
function()
return test:execsql [[
SELECT a+b, a-b, a, b FROM t1
UNION ALL
SELECT a+b, a-b, a, abs(b) FROM t1
]]
end, {
-- <tkt2927-4.2>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.2>
})
test:do_test(
"tkt2927-4.3",
function()
return test:execsql [[
SELECT a+b, a-b, a, b FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), b FROM t1
]]
end, {
-- <tkt2927-4.3>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.3>
})
test:do_test(
"tkt2927-4.4",
function()
return test:execsql [[
SELECT a+b, a-b, a, b FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-4.4>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.4>
})
test:do_test(
"tkt2927-4.5",
function()
return test:execsql [[
SELECT a+b, a-b, a, abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, a, b FROM t1
]]
end, {
-- <tkt2927-4.5>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.5>
})
test:do_test(
"tkt2927-4.6",
function()
return test:execsql [[
SELECT a+b, a-b, a, abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, a, abs(b) FROM t1
]]
end, {
-- <tkt2927-4.6>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.6>
})
test:do_test(
"tkt2927-4.7",
function()
return test:execsql [[
SELECT a+b, a-b, a, abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), b FROM t1
]]
end, {
-- <tkt2927-4.7>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.7>
})
test:do_test(
"tkt2927-4.8",
function()
return test:execsql [[
SELECT a+b, a-b, a, abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-4.8>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.8>
})
test:do_test(
"tkt2927-4.9",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), b FROM t1
UNION ALL
SELECT a+b, a-b, a, b FROM t1
]]
end, {
-- <tkt2927-4.9>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.9>
})
test:do_test(
"tkt2927-4.10",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), b FROM t1
UNION ALL
SELECT a+b, a-b, a, abs(b) FROM t1
]]
end, {
-- <tkt2927-4.10>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.10>
})
test:do_test(
"tkt2927-4.11",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), b FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), b FROM t1
]]
end, {
-- <tkt2927-4.11>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.11>
})
test:do_test(
"tkt2927-4.12",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), b FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-4.12>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.12>
})
test:do_test(
"tkt2927-4.13",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, a, b FROM t1
]]
end, {
-- <tkt2927-4.13>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.13>
})
test:do_test(
"tkt2927-4.14",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, a, abs(b) FROM t1
]]
end, {
-- <tkt2927-4.14>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.14>
})
test:do_test(
"tkt2927-4.15",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), b FROM t1
]]
end, {
-- <tkt2927-4.15>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.15>
})
test:do_test(
"tkt2927-4.16",
function()
return test:execsql [[
SELECT a+b, a-b, abs(a), abs(b) FROM t1
UNION ALL
SELECT a+b, a-b, abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-4.16>
12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55, 12, -10, 1, 11, 24, -20, 2, 22, 36, -30, 3, 33, 48, -40, 4, 44, 60, -50, 5, 55
-- </tkt2927-4.16>
})
test:do_test(
"tkt2927-5.1",
function()
return test:execsql [[
SELECT a, b FROM t1
EXCEPT
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-5.1>
-- </tkt2927-5.1>
})
test:do_test(
"tkt2927-5.2",
function()
return test:execsql [[
SELECT a, b FROM t1
EXCEPT
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-5.2>
-- </tkt2927-5.2>
})
test:do_test(
"tkt2927-5.3",
function()
return test:execsql [[
SELECT a, b FROM t1
EXCEPT
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-5.3>
-- </tkt2927-5.3>
})
test:do_test(
"tkt2927-5.4",
function()
return test:execsql [[
SELECT a, b FROM t1
EXCEPT
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-5.4>
-- </tkt2927-5.4>
})
test:do_test(
"tkt2927-5.5",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
EXCEPT
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-5.5>
-- </tkt2927-5.5>
})
test:do_test(
"tkt2927-5.6",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
EXCEPT
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-5.6>
-- </tkt2927-5.6>
})
test:do_test(
"tkt2927-5.7",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
EXCEPT
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-5.7>
-- </tkt2927-5.7>
})
test:do_test(
"tkt2927-5.8",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
EXCEPT
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-5.8>
-- </tkt2927-5.8>
})
test:do_test(
"tkt2927-5.9",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
EXCEPT
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-5.9>
-- </tkt2927-5.9>
})
test:do_test(
"tkt2927-5.10",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
EXCEPT
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-5.10>
-- </tkt2927-5.10>
})
test:do_test(
"tkt2927-5.11",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
EXCEPT
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-5.11>
-- </tkt2927-5.11>
})
test:do_test(
"tkt2927-5.12",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
EXCEPT
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-5.12>
-- </tkt2927-5.12>
})
test:do_test(
"tkt2927-5.13",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
EXCEPT
SELECT a, b FROM t1
]]
end, {
-- <tkt2927-5.13>
-- </tkt2927-5.13>
})
test:do_test(
"tkt2927-5.14",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
EXCEPT
SELECT a, abs(b) FROM t1
]]
end, {
-- <tkt2927-5.14>
-- </tkt2927-5.14>
})
test:do_test(
"tkt2927-5.15",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
EXCEPT
SELECT abs(a), b FROM t1
]]
end, {
-- <tkt2927-5.15>
-- </tkt2927-5.15>
})
test:do_test(
"tkt2927-5.16",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
EXCEPT
SELECT abs(a), abs(b) FROM t1
]]
end, {
-- <tkt2927-5.16>
-- </tkt2927-5.16>
})
test:do_test(
"tkt2927-6.1",
function()
return test:execsql [[
SELECT a, b FROM t1
INTERSECT
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.1>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.1>
})
test:do_test(
"tkt2927-6.2",
function()
return test:execsql [[
SELECT a, b FROM t1
INTERSECT
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.2>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.2>
})
test:do_test(
"tkt2927-6.3",
function()
return test:execsql [[
SELECT a, b FROM t1
INTERSECT
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.3>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.3>
})
test:do_test(
"tkt2927-6.4",
function()
return test:execsql [[
SELECT a, b FROM t1
INTERSECT
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.4>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.4>
})
test:do_test(
"tkt2927-6.5",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
INTERSECT
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.5>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.5>
})
test:do_test(
"tkt2927-6.6",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
INTERSECT
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.6>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.6>
})
test:do_test(
"tkt2927-6.7",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
INTERSECT
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.7>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.7>
})
test:do_test(
"tkt2927-6.8",
function()
return test:execsql [[
SELECT a, abs(b) FROM t1
INTERSECT
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.8>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.8>
})
test:do_test(
"tkt2927-6.9",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
INTERSECT
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.9>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.9>
})
test:do_test(
"tkt2927-6.10",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
INTERSECT
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.10>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.10>
})
test:do_test(
"tkt2927-6.11",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
INTERSECT
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.11>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.11>
})
test:do_test(
"tkt2927-6.12",
function()
return test:execsql [[
SELECT abs(a), b FROM t1
INTERSECT
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.12>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.12>
})
test:do_test(
"tkt2927-6.13",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
INTERSECT
SELECT a, b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.13>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.13>
})
test:do_test(
"tkt2927-6.14",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
INTERSECT
SELECT a, abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.14>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.14>
})
test:do_test(
"tkt2927-6.15",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
INTERSECT
SELECT abs(a), b FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.15>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.15>
})
test:do_test(
"tkt2927-6.16",
function()
return test:execsql [[
SELECT abs(a), abs(b) FROM t1
INTERSECT
SELECT abs(a), abs(b) FROM t1
ORDER BY 1
]]
end, {
-- <tkt2927-6.16>
1, 11, 2, 22, 3, 33, 4, 44, 5, 55
-- </tkt2927-6.16>
})
-- Ticket #3092 is the same bug. But another test case never hurts.
--
test:do_test(
"tkt2927-7.1",
function()
return test:execsql [[
CREATE TABLE host (
hostname text not null primary key,
consoleHost text,
consolePort int
);
INSERT INTO host VALUES('aald04','aalp03',4);
INSERT INTO host VALUES('aald17','aalp01',1);
CREATE VIEW consolemap1a as
select hostname, consolehost, '/dev/cuaD0.' || cast(consoleport-1 as text) consoleport
from host where consolehost='aalp01';
CREATE VIEW consolemap1b as
select hostname hostname, consolehost consolehost, '/dev/cuaD' ||
substr('01',1+((consoleport-1)/16),1) ||
substr('0123456789abcdef',1+((consoleport-1)%16),1) consoleport
from host where consolehost='aalp03';
CREATE VIEW consolemap1 as
select * from consolemap1a
union
select * from consolemap1b;
SELECT * from consolemap1b;
]]
end, {
-- <tkt2927-7.1>
"aald04", "aalp03", "/dev/cuaD03"
-- </tkt2927-7.1>
})
test:do_test(
"tkt2927-7.2",
function()
return test:execsql [[
SELECT * FROM consolemap1
]]
end, {
-- <tkt2927-7.2>
"aald04", "aalp03", "/dev/cuaD03", "aald17", "aalp01", "/dev/cuaD0.0"
-- </tkt2927-7.2>
})
test:finish_test()
|
require('areas')
local creature = require('creature')
-- The caravan has no fixed location, appearing instead on one of the
-- outer island tiles.
local caravan_locs = {{6, 53}, {8, 53}, {7, 52}, {7, 54}}
local coords = caravan_locs[RNG_range(1, #caravan_locs)]
local creatures_csv = ""
local creature_list = {{"caravan_guard", 7, 10},
{"fae_traveller", 6, 9},
{"fae_musician", 5, 7},
{"caravan_master"}}
local creatures_csv = creature.to_csv(creature_list)
local fae_caravan = Area:new(coords[1], coords[2])
-- Field-based random generators by default don't preserve permanence,
-- so turn the flag on in this case. Also set the map ID ("fae_caravan")
-- so that the Cithriel custom map can link back to the permanent,
-- generated map.
fae_caravan:set_permanence(true)
fae_caravan:set_extra_description_sid("TILE_EXTRA_DESCRIPTION_FAE_CARAVAN")
fae_caravan:set_additional_properties({["MAP_PROPERTIES_INITIAL_CREATURES"] = creatures_csv, ["MAP_PROPERTIES_GENERATED_MAP_ID"] = "fae_caravan"})
fae_caravan:insert()
|
AddCSLuaFile()
local DbgPrint = GetLogging("MapScript")
local MAPSCRIPT = {}
MAPSCRIPT.PlayersLocked = false
MAPSCRIPT.DefaultLoadout =
{
Weapons =
{
"weapon_physcannon",
},
Ammo =
{
},
Armor = 60,
HEV = true,
}
MAPSCRIPT.InputFilters =
{
["pod_ready_counter"] = { "Kill" },
["relay_playerpod_resume"] = { "Kill" },
["counter_pod_alive"] = { "Subtract" },
}
MAPSCRIPT.EntityFilterByClass =
{
--["env_global"] = true,
["env_fade"] = true,
}
MAPSCRIPT.EntityFilterByName =
{
["global_newgame_template_ammo"] = true,
["global_newgame_template_local_items"] = true,
["global_newgame_template_base_items"] = true,
["playerpod1_train"] = true,
["playerpod2_train"] = true,
["playerpod3_train"] = true,
["playerpod4_train"] = true,
["playerpod5_train"] = true,
["playerpod6_train"] = true,
["playerpod7_train"] = true,
["playerpod1_vehicle"] = true,
["playerpod2_vehicle"] = true,
["playerpod3_vehicle"] = true,
["playerpod4_vehicle"] = true,
["playerpod5_vehicle"] = true,
["playerpod6_vehicle"] = true,
["playerpod7_vehicle"] = true,
["playerpod1_rotator"] = true,
["playerpod2_rotator"] = true,
["playerpod3_rotator"] = true,
["playerpod4_rotator"] = true,
["playerpod5_rotator"] = true,
["playerpod6_rotator"] = true,
["playerpod7_rotator"] = true,
["playerpod1_constraint"] = true,
["playerpod2_constraint"] = true,
["playerpod3_constraint"] = true,
["playerpod4_constraint"] = true,
["playerpod5_constraint"] = true,
["playerpod6_constraint"] = true,
["playerpod7_constraint"] = true,
}
MAPSCRIPT.GlobalStates =
{
["super_phys_gun"] = GLOBAL_ON,
}
function MAPSCRIPT:Init()
end
POD_COUNTER = POD_COUNTER or 0
function CreatePOD(bayname)
POD_COUNTER = POD_COUNTER + 1
local trainName = "lambda_pod_train_" .. POD_COUNTER
local rotatorName = "lambda_pod_rotator_" .. POD_COUNTER
local podName = "lambda_pod_" .. POD_COUNTER
local func_tracktrain = ents.Create("func_tracktrain")
func_tracktrain:SetKeyValue("target", bayname)
func_tracktrain:SetKeyValue("model", "*31")
func_tracktrain:SetKeyValue("bank", "0")
func_tracktrain:SetKeyValue("stopsound", "d3_citadel.playerpod_stop")
func_tracktrain:SetKeyValue("movesound", "d3_citadel.playerpod_move")
func_tracktrain:SetKeyValue("startspeed", "1000")
func_tracktrain:SetKeyValue("speed", "100")
func_tracktrain:SetKeyValue("spawnflags", "11")
func_tracktrain:SetKeyValue("volume", "3")
func_tracktrain:SetKeyValue("height", "4")
func_tracktrain:SetKeyValue("velocitytype", "1")
func_tracktrain:SetKeyValue("orientationtype", "3")
func_tracktrain:SetKeyValue("origin", "-133 546 -2873")
func_tracktrain:SetKeyValue("targetname", trainName)
func_tracktrain:SetKeyValue("wheels", "0")
--func_tracktrain:SetNotSolid(true)
func_tracktrain:Fire("AddOutput", "onuser1 " .. rotatorName .. ",Open,,0,-1")
func_tracktrain:Fire("AddOutput", "onuser1 " .. podName .. ",Open,,1,-1")
func_tracktrain:Fire("AddOutput", "onuser1 " .. podName .. ",Close,,4,-1")
func_tracktrain:Fire("AddOutput", "onuser1 " .. rotatorName .. ",Close,,5,-1")
func_tracktrain:Spawn()
func_tracktrain:Activate()
local arm = ents.Create("prop_dynamic")
arm:SetKeyValue("model", "models/vehicles/Inner_pod_arm.mdl")
arm:SetKeyValue("origin", "-138 537 -2891")
arm:SetKeyValue("angles", "0 270 0")
arm:SetKeyValue("parentname", trainName)
arm:SetParent(func_tracktrain)
arm:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
arm:Spawn()
arm:Activate()
local func_door_rotating = ents.Create("func_door_rotating")
func_door_rotating:SetKeyValue("speed", "100")
func_door_rotating:SetKeyValue("spawnflags", "34")
func_door_rotating:SetKeyValue("distance", "90")
func_door_rotating:SetKeyValue("wait", "-1")
func_door_rotating:SetKeyValue("spawnpos", "0")
func_door_rotating:SetKeyValue("lip", "0")
func_door_rotating:SetKeyValue("spawnpos", "0")
func_door_rotating:SetKeyValue("angles", "0 0 0")
func_door_rotating:SetKeyValue("origin", "-141.39 529.67 -2879")
func_door_rotating:SetKeyValue("targetname", rotatorName)
func_door_rotating:SetKeyValue("model", "*62")
func_door_rotating:SetKeyValue("parentname", trainName)
func_door_rotating:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
func_door_rotating:SetParent(func_tracktrain)
func_door_rotating:Spawn()
func_door_rotating:Activate()
local rotator = ents.Create("prop_dynamic")
rotator:SetKeyValue("angles", "0 270 0")
rotator:SetKeyValue("model", "models/vehicles/Inner_pod_rotator.mdl")
rotator:SetKeyValue("origin", "-138 537 -2890.91")
rotator:SetKeyValue("parentname", rotatorName)
rotator:SetParent(func_door_rotating)
rotator:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
rotator:Spawn()
local pod = ents.Create("prop_vehicle_prisoner_pod")
pod:SetKeyValue("model", "models/vehicles/prisoner_pod_inner.mdl")
pod:SetKeyValue("origin", "-159 530 -2965")
pod:SetKeyValue("vehiclescript", "scripts/vehicles/prisoner_pod.txt")
pod:SetKeyValue("angles", "15 0 0")
pod:SetKeyValue("targetname", podName)
pod:Spawn()
pod:Activate()
local podConstraint = ents.Create("phys_ragdollconstraint")
podConstraint:SetKeyValue("xfriction", "0.8")
podConstraint:SetKeyValue("xmax", "0.0")
podConstraint:SetKeyValue("xmin", "0.0")
podConstraint:SetKeyValue("yfriction", "0.8")
podConstraint:SetKeyValue("ymax", "20")
podConstraint:SetKeyValue("ymin", "-20")
podConstraint:SetKeyValue("zfriction", "0.8")
podConstraint:SetKeyValue("zmax", "0.0")
podConstraint:SetKeyValue("zmin", "0.0")
podConstraint:SetKeyValue("spawnflags", "1")
podConstraint:SetKeyValue("origin", "-138 529 -2889")
podConstraint:SetKeyValue("attach2", rotatorName)
podConstraint:SetKeyValue("attach1", podName)
podConstraint:SetParent(rotator)
podConstraint:Spawn()
podConstraint:Activate()
ents.WaitForEntityByName(bayname, function(ent)
func_tracktrain:SetPos(ent:GetPos())
end)
return func_tracktrain
end
function MAPSCRIPT:PostInit()
if SERVER then
CreatePOD("pod_bay_track1")
CreatePOD("pod_bay_track2")
CreatePOD("pod_bay_track3")
CreatePOD("pod_bay_track4")
CreatePOD("pod_bay_track5")
CreatePOD("pod_bay_track8")
CreatePOD("pod_bay_track9")
local podCreateTrigger = ents.Create("trigger_multiple")
podCreateTrigger:SetName("lambda_pod_create")
podCreateTrigger:SetupTrigger(
Vector(1005.086487, -512.151855, -3000.966553),
Angle(0, 0, 0),
Vector(-20, -50, 0),
Vector(20, 50, 200)
)
podCreateTrigger:SetKeyValue("spawnflags", "8")
podCreateTrigger:SetKeyValue("wait", "4")
podCreateTrigger.OnTrigger = function(_, ent)
CreatePOD("pod_bay_track1")
ent:SetNotSolid(true)
end
ents.WaitForEntityByName("path_pod_ok_4", function(ent)
ent:Fire("AddOutput", "OnPass lambda_pod_create,Trigger,,0.0,-1")
end)
ents.WaitForEntityByName("pod_02_track0", function(ent)
ent:Fire("AddOutput", "OnPass pod_02_track_inspection,DisableAlternatePath,,0.0")
end)
ents.WaitForEntityByName("cit05_to_breen01_changelevel", function(ent)
ent:SetKeyValue("teamwait", "1")
end)
ents.WaitForEntityByName("relay_playerpod_resume", function(ent)
ent:Fire("AddOutput", "OnTrigger lambda_pod_train*,Resume,, 0.1, -1")
end)
ents.WaitForEntityByName("path_pod_ok_4", function(ent)
ent:Fire("AddOutput", "OnPass relay_playerpod_resume,Resume,,0.1,-1")
end)
for _,v in pairs(ents.FindByPos(Vector(936.5, -512, -2902), "trigger_once")) do
v:Remove()
end
local cameraTrigger = ents.Create("trigger_multiple")
cameraTrigger:SetupTrigger(
Vector(936.5, -512, -3002),
Angle(0, 0, 0),
Vector(-10, -50, 0),
Vector(10, 50, 200)
)
cameraTrigger:SetName("lambda_camera_trigger")
cameraTrigger:Fire("AddOutput", "OnStartTouch pod_02_track_inspection,EnableAlternatePath,,0.0,-1")
cameraTrigger:Fire("AddOutput", "OnStartTouch pen_camera_1,SetAngry,,0.5,-1")
end
end
function MAPSCRIPT:PostPlayerSpawn(ply)
--DbgPrint("PostPlayerSpawn")
end
return MAPSCRIPT
|
-- Copyright 2016 krunkathos
--
-- 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.
local player = {}
local levels = require("levels")
local ropes = require("ropes")
local enemies = require("enemies")
-- constants --
player.COL_DX1 = 0
player.COL_DY1 = 4
player.COL_DX2 = -4
player.COL_DY2 = -1
player.WLK_SPEED = 32
player.PLY_ANIMMAX = 0.08
player.CLB_DELAYMAX = 0.2
player.JMP_ACCEL = 70
-- our player --
player.x = -1
player.y = -1
player.y_accel = 0
player.climb_delay = player.CLB_DELAYMAX
player.jumping = false
player.falling = false
player.rope_grip = ""
player.rope_thread = -1
player.rope_point = -1
player.images = {}
player.image_flip = -1
player.image_count = -1
player.image_animcount = 0
player.death = false
-- resources --
player.sound_music = nil
player.sound_jump = nil
player.sound_hurt = nil
player.sound_death = nil
player.sound_complete = nil
function player.load()
table.insert(player.images, love.graphics.newImage("gfx/player/6.png"))
table.insert(player.images, love.graphics.newImage("gfx/player/1.png"))
table.insert(player.images, love.graphics.newImage("gfx/player/2.png"))
table.insert(player.images, love.graphics.newImage("gfx/player/3.png"))
table.insert(player.images, love.graphics.newImage("gfx/player/4.png"))
table.insert(player.images, love.graphics.newImage("gfx/player/5.png"))
player.sound_jump = love.audio.newSource("sounds/jump.wav", "static")
player.sound_jump:setVolume(0.2)
player.sound_hurt = love.audio.newSource("sounds/hurt.wav", "static")
player.sound_hurt:setVolume(0.5)
player.sound_death = love.audio.newSource("sounds/death.wav", "static")
player.sound_death:setVolume(0.4)
player.sound_death:setPitch(0.5)
player.sound_complete = love.audio.newSource("sounds/complete.wav", "static")
player.sound_complete:setVolume(0.4)
end
function player.init(px, py)
player.x = px
player.y = py
player.y_accel = 0
player.climb_delay = player.CLB_DELAYMAX
player.falling = false
player.jumping = false
player.rope_grip = "no"
player.rope_thread = -1
player.rope_point = 0
player.image_count = 2
player.image_animcount = 0
player.image_flip = 1
player.death = false
end
function player.incrementAnim(dt)
if player.jumping then return end
player.image_animcount = player.image_animcount + dt
if player.image_animcount > player.PLY_ANIMMAX then
player.image_animcount = 0
player.image_count = player.image_count + 1
if player.image_count > #player.images then player.image_count = 3 end
end
end
function player.left(dt)
player.image_flip = -1
player.incrementAnim(dt)
return player.x - (dt * player.WLK_SPEED)
end
function player.right(dt)
player.image_flip = 1
player.incrementAnim(dt)
return player.x + (dt * player.WLK_SPEED)
end
function player.up(dt)
if player.climb_delay < 0 then
if player.rope_point > 2 then player.rope_point = player.rope_point - 1 end
player.climb_delay = player.CLB_DELAYMAX
else
player.climb_delay = player.climb_delay - dt
end
end
function player.down(dt)
if player.climb_delay < 0 then
if player.rope_point < ropes.ROP_POINTMAX then
player.rope_point = player.rope_point + 1
else
player.rope_grip = "left"
player.falling = true
end
player.climb_delay = player.CLB_DELAYMAX
else
player.climb_delay = player.climb_delay - dt
end
end
function player.jump(dt)
player.y_accel = player.JMP_ACCEL
player.jumping = true
player.sound_jump:play()
player.image_count = 1
if player.rope_grip == "yes" then player.rope_grip = "left" end
end
function player.collide()
if player.y_accel <= 0 then
player.falling = false
player.jumping = false
end
player.y_accel = 0
player.rope_grip = "no"
end
function player.grab_rope(colT, colP)
player.rope_grip = "yes"
player.rope_thread = colT
player.rope_point = colP
player.falling = false
player.jumping = false
player.y_accel = 0
end
function player.update_player_on_rope()
local rope = ropes.threads[player.rope_thread]
local path = rope.paths[rope.counter]
local point = path[player.rope_point]
player.x = rope.x + point.x - 6
player.y = rope.y + point.y - 12
end
function player.remember_last_rope()
player.rope_thread = -1
player.rope_point = -1
player.rope_grip = "no"
end
function player.update(dt, level)
local status = ""
local new_x
if love.keyboard.isDown("z") and player.x > 8 then new_x = player.left(dt) end
if love.keyboard.isDown("x") and player.x < 312 then new_x = player.right(dt) end
if new_x then
if not levels.collideScenery(level,
{{new_x + player.COL_DX1, player.y + player.COL_DY1},
{new_x + player.images[1]:getWidth() + player.COL_DX2, player.y + player.COL_DY1},
{new_x + player.COL_DX1, player.y + math.floor(player.images[1]:getHeight()/2)},
{new_x + player.images[1]:getWidth() + player.COL_DX2, player.y + math.floor(player.images[1]:getHeight()/2)},
{new_x + player.COL_DX1, player.y + player.images[1]:getHeight() + player.COL_DY2},
{new_x + player.images[1]:getWidth() + player.COL_DX2, player.y + player.images[1]:getHeight() + player.COL_DY2}}) then
player.x = new_x end
elseif not player.jumping then
player.image_count = 2
end
if (love.keyboard.isDown("p") or love.keyboard.isDown("l"))
and player.rope_grip == "left" then player.remember_last_rope() end
if love.keyboard.isDown("p") and player.rope_grip == "yes" then player.up(dt) end
if love.keyboard.isDown("l") and player.rope_grip == "yes" then player.down(dt) end
if love.keyboard.isDown(" ") and not player.falling then player.jump(dt) end
if player.rope_grip ~= "yes" then player.y_accel = player.y_accel - (dt * 120) end
-- drop player, if new position doesn't collide
local new_y = player.y - (player.y_accel*dt*1.2)
if new_y < 20 then
new_y = 20
player.y_accel = 0
end
if levels.collideScenery(level,
{{player.x + player.COL_DX1, new_y + player.COL_DY1},
{player.x + player.images[1]:getWidth() + player.COL_DX2, new_y + player.COL_DY1},
{player.x + player.COL_DX1, new_y + player.images[1]:getHeight() + player.COL_DY2},
{player.x + player.images[1]:getWidth() + player.COL_DX2, new_y + player.images[1]:getHeight() + player.COL_DY2}}) then
player.collide()
elseif player.rope_grip == "no" or player.rope_grip == "left" then
player.falling = true
player.y = new_y
end
-- enemy collision?
local offx
if player.image_flip == -1 then offx = -2 else offx = 0 end
if enemies.checkEnemyCollision(player.x+offx+player.COL_DX1, player.y + player.COL_DY1-2, player.images[1]:getWidth()+player.COL_DX2, player.images[1]:getHeight() + player.COL_DY2-2) or player.y > 240 then
player.sound_hurt:play()
player.sound_death:play()
player.death = true
status = "lost_life"
end
-- manage rope grabbing and hanging
local colT, colP = ropes.collideWithRopes(player.x+6, player.y+10)
if colT ~= -1 and (player.rope_grip == "no" or (player.rope_grip == "left" and player.rope_thread ~= colT)) then
player.grab_rope(colT, colP)
if ropes.threads[colT].finish then
status = "level_complete"
player.sound_complete:play()
end
end
if player.rope_grip == "yes" then player.update_player_on_rope() end
--if love.keyboard.isDown("t") then status = "level_complete" end
return status
end
function player.draw()
local offx = 0
love.graphics.setColor( 255, 255, 255 )
if not player.death then
if player.image_flip == -1 then offx = 12 end
love.graphics.draw(player.images[player.image_count], math.floor(player.x)+offx, math.floor(player.y), 0, player.image_flip, 1, 0)
else
love.graphics.draw(player.images[2], math.floor(player.x)-4, math.floor(player.y)+26, math.rad(-90), 1, 1, 0)
end
end
return player
|
--author Himanshu Sharma
local App42ExceptionRequest = require("App42-Lua-API.App42ExceptionRequest")
local App42Log = require("App42-Lua-API.App42Log")
local JSON = require("App42-Lua-API.JSON")
local Util = {}
function Util:buildQueryString(queryParams)
local stringRequest = ""
for stringKey, stringValue in sortKeyByValue(queryParams) do
stringRequest= stringRequest..Util:urlEncode(stringKey).."="..Util:urlEncode(stringValue).."&"
end
return stringRequest
end
function Util:buildAclRequest(_aclList)
local __aclList = {}
local createPermission = {}
if table.getn(_aclList) > 1 then
for k=1,table.getn(_aclList) do
local userInArray = _aclList[k].user;
local permissionInArray = _aclList[k].permission;
createPermission[userInArray] = permissionInArray;
__aclList = createPermission;
end
else
local userInObject = _aclList.user;
local permissionInObject = _aclList.permission;
createPermission[userInObject] = permissionInObject;
__aclList = createPermission
end
local aclList = "["..JSON:encode(__aclList).."]"
return aclList
end
function Util:throwExceptionIfNullOrBlank(object,name,callBack)
if object == nil then
local app42NullException = App42ExceptionRequest:buildInternalExceptionRequest(name.." parameter can not be null.")
if callBack.onException ~= nil then
callBack:onException(app42NullException)
end
elseif object == "" then
local app42BlankException = App42ExceptionRequest:buildInternalExceptionRequest(name.." parameter can not be blank.")
if callBack.onException ~= nil then
callBack:onException(app42BlankException)
end
elseif Util:trim(object) == "" then
local app42Exception = App42ExceptionRequest:buildInternalExceptionRequest(name.." parameter can not be blank.")
if callBack.onException ~= nil then
callBack:onException(app42Exception)
end
end
end
function Util:throwExceptionIfEmailIsNotValid(object,name,callBack)
local app42EmailInnvalidException = App42ExceptionRequest:buildInternalExceptionRequest(object.." is not valid email address.")
if callBack.onException ~= nil then
callBack:onException(app42EmailInnvalidException)
end
end
function Util:isValidEmailAddress(object,callBack)
if (object:match("[A-Za-z0-9%.%%%+%-]+@[A-Za-z0-9%.%%%+%-]+%.%w%w%w?%w?")== nil) then
return false
end
end
function Util:getUTCFormattedTimestamp()
local timStamp = ""
local year = os.date("!%Y")
local monthString = os.date("!%m")
local dayString = os.date("!%d")
local hourString = os.date("!%H")
local minString = os.date("!%M")
local secString = os.date("!%S")
if(string.len(monthString) == 1) then
monthString = "0"..monthString
end
if(string.len(dayString) == 1) then
dayString = "0"..dayString
end
if(string.len(hourString) == 1) then
hourString = "0"..hourString
end
if(string.len(minString) == 1) then
minString = "0"..minString
end
if(string.len(secString) == 1) then
secString = "0"..secString
end
timStamp = year.."-"..monthString.."-"..dayString.."T"..hourString..":"..minString..":"..secString..".".."000Z"
return timStamp
end
function Util:getUTCFormattedTimestampWithUserInputDate(_time)
local time = _time
local timStamp = ""
local monthString = time.month
local dayString = time.day
local hourString = time.hour
local minString = time.min
local secString = time.sec
if(string.len(monthString) == 1) then
monthString = "0"..monthString
end
if(string.len(dayString) == 1) then
dayString = "0"..dayString
end
if(string.len(hourString) == 1) then
hourString = "0"..hourString
end
if(string.len(minString) == 1) then
minString = "0"..minString
end
if(string.len(secString) == 1) then
secString = "0"..secString
end
timStamp = time.year.."-"..monthString.."-"..dayString.."T"..hourString..":"..minString..":"..secString..".".."000Z"
return timStamp
end
function Util:urlEncode(str)
if (str) then
str = string.gsub (str, "\n", "\r\n")
str = string.gsub (str, "([^%w %-%_%.%~])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
str = string.gsub (str, " ", "+")
end
return str
end
function Util:sign(secretKey,signParams)
local paramString = ""
App42Log:debug("SignParams is : "..JSON:encode(signParams))
for key, value in sortKeyByValue(signParams) do
paramString = paramString..key..value
end
local hmac = calculateSignature(secretKey, paramString);
return Util:urlEncode(hmac);
end
function fromhex(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
function calculateSignature(secretKey, params)
require "App42-Lua-API.sha1"
local hexString = hmac_sha1(secretKey, params);
local mime = require("mime")
local base64String = mime.b64(fromhex(hexString))
return base64String
end
function Util:queryLength(query)
if table.getn(query) > 1 then
return JSON:encode(query)
else
return "["..JSON:encode(query).."]"
end
end
function Util:trim(string)
return (string.gsub(string, "^%s*(.-)%s*$", "%1"))
end
function sortKeyByValue(t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0
local iter = function ()
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
end
end
return iter
end
function Util:generateKey()
-- Reseed the generator.
math.randomseed(math.random(1, 100000000))
-- Reseed the generator with the current time so the key generation
-- should be even more difficult to recreate.
local characters = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z'
}
local key = ""
for index = 1, 8 do
key = key .. math.random(0, 9) .. characters[math.random(1, 26)]
end
return key
end
return Util
|
local skynet = require 'skynet'
local snax = require 'skynet.snax'
local cjson = require 'cjson'
local CMD = {}
function CMD.add(server)
if string.len(server.host) < 8 then
return nil, "Incorrect IP"
end
if tonumber(server.port) == nil then
return nil, "Incorrect Port"
end
if string.len(server.srvid) < 18 then
return nil, "ID too short"
end
if string.len(server.srvid) > 20 then
return nil, "ID too long"
end
if string.len(server.srvrealm) ~= 10 then
return nil, "Realm length error"
end
if string.len(server.passwd) == 0 then
return nil, "Password must be set!"
end
local s = snax.queryservice("28181_server")
if s then
return s.req.add_server({
ssid = server.type..':0:'..server.host..':'..server.port,
srvid = server.srvid,
srvrealm = server.srvrealm,
passwd = server.passwd,
})
end
return true
end
function CMD.modify(server)
return CMD.add(server)
end
function CMD.remove(server)
local s = snax.queryservice("28181_server")
if s then
return s.req.delete_server(server)
end
return false, "Canont find 28181_server service"
end
return {
get = function(req, res)
local user = lwf.ctx.user
if not user then
return res:redirect('/user/login')
end
local conns = {}
local s = snax.queryservice("28181_server")
if s then
conns = s.req.connections()
end
local servers = s.req.list_servers() or {}
for _,v in ipairs(servers) do
local host, port = v.ssid:match("([^:]+):(%d+)$")
v.type = v.ssid:sub(1,3)
v.host = host
v.port = port
v.status = conns[v.srvid].status or 'N/A'
end
res:ltp('cfg/servers.html', {app=app, lwf=lwf, servers=servers})
end,
post = function(req, res)
if lwf.ctx.user then
local action = req.post_args['action']
local server = {}
for k,v in pairs(req.post_args) do
if k:sub(1, 7) == 'server_' then
server[k:sub(8)] = v
end
end
local r, err = CMD[action](server)
if not r then
res:write(err)
return lwf.set_status(403)
end
end
end
}
|
local Prop = {}
Prop.Name = "Shady Apartment 2-106 Cosmos St"
Prop.Cat = "Apartments"
Prop.Price = 750
Prop.Doors = {
Vector( -3880, -7329, 177.28100585938 ),
Vector( -4184, -7249, 175 ),
Vector( -4272, -7329, 175 ),
}
GM.Property:Register( Prop )
|
local tunpack, pairs, next, type, select, getmetatable, setmetatable = table.unpack or unpack, pairs, next, type, select, getmetatable, setmetatable
local functions
local LootMT
-- Memoization
local allowmemoize = ALLOW_MEMOIZE == nil and true or ALLOW_MEMOIZE
local function memoize( closure, mode )
if not allowmemoize then
return closure
end
local cache
cache = setmetatable( {}, {
__mode = mode,
__index = function( self, v )
local f = closure( v )
cache[v] = f
return f
end,
__call = function( self, v )
return cache[v]
end,
} )
return cache
end
-- Matching
local CaptureMT = {}
local wild = {'_'}
local rest = {'...'}
local wildrest = {'___'}
local function capture( name, predicate, transform ) return name == '_' and wild or name == '...' and rest or name == '___' and wildrest or setmetatable( {name, predicate, transform}, CaptureMT ) end
local function equal( x, y, partial, captures )
if x == y or x == wild or y == wild or y == wildrest then
return true
elseif getmetatable( y ) == CaptureMT then
if captures then
if (not y[2] or y[2](x)) then
local name = y[1]
local value = not y[3] and x or y[3](x)
if captures[name] then
return captures[name] == value
else
captures[name] = value
end
end
end
return true
elseif type(x) == 'table' and type(y) == 'table' and getmetatable(x) == getmetatable(y) then
local nx, ny = 0, 0
for k, v in pairs( x ) do nx = nx + 1 end
for k, v in pairs( y ) do ny = ny + 1 end
if nx == ny or (partial and nx >= ny) then
for k, v in pairs( x ) do
if y[k] == wildrest then
return true
elseif y[k] == rest then
if captures then
captures._ = captures._ or {}
for i = k,#x do
captures._[i-k+1] = x[i]
end
end
return true
elseif y[k] == nil or not equal( v, y[k], partial, captures ) then
return false
end
end
return true
else
return false
end
else
return false
end
end
local function match( x, ... )
for i = 1, select( '#', ... ) do
local y = select( i, ... )
local captures = setmetatable( {}, LootMT )
if equal( x, y, (type(y)=='table' and (y[#y] == rest or y[#y] == wildrest)), captures ) then
return captures
end
end
return false
end
-- Predicates
local pcache = {}
local predicates = {
n = function( y ) return y == nil end,
t = function( y ) return y == true end,
f = function( y ) return y == false end,
boolean = function( y ) return type( y ) == 'boolean' end,
number = function( y ) return type( y ) == 'number' end,
integer = function( y ) return math.floor( y ) == y end,
string = function( y ) return type( y ) == 'string' end,
table = function( y ) return type( y ) == 'table' end,
lambda = function( y ) return type( y ) == 'function' end,
thread = function( y ) return type( y ) == 'thread' end,
userdata = function( y ) return type( y ) == 'userdata' end,
zero = function( y ) return y == 0 end,
positive = function( y ) return y > 0 end,
negative = function( y ) return y < 0 end,
even = function( y ) return y % 2 == 0 end,
odd = function( y ) return y % 2 == 1 end,
id = function( y ) return type( y ) == 'string' and y:match('[%a_][%w_]*') == y end
}
-- Testing predicates
local is = setmetatable( {}, {__index = function( self, k )
local p = predicates[k]
if not p then error( ('Predicate not defined %q'):format( k )) end
return predicates[k]
end} )
local isnot = setmetatable( {}, {__index = function( self, k )
local p = predicates[k]
if not p then error( ('Predicate not defined %q'):format( k )) end
if not pcache[k] then
pcache[k] = function( y ) return not p(y) end
end
return pcache[k]
end } )
local function all( t, f ) for k, v in pairs( t ) do if not f( v ) then return false end end return true end
local function any( t, f ) for k, v in pairs( t ) do if f( v ) then return true end end return false end
-- Operators
local opcache = {}
local op = {
self = function( x ) return x end,
add = function( x, y ) return x + y end,
sub = function( x, y ) return x - y end,
div = function( x, y ) return x / y end,
idiv = function( x, y ) if x >= 0 then return math.floor(x/y) else return math.ceil(x/y) end end,
mul = function( x, y ) return x * y end,
mod = function( x, y ) return x % y end,
pow = function( x, y ) return x ^ y end,
expt = function( x, y ) return y ^ x end,
log = math.log,
neg = function( x ) return -x end,
len = function( x ) return #x end,
inc = function( x ) return x + 1 end,
dec = function( x ) return x - 1 end,
concat = function( x, y ) return x .. y end,
lconcat = function( x, y ) return y .. x end,
lor = function( x, y ) return x or y end,
land = function( x, y ) return x and y end,
lnot = function( x ) return not x end,
gt = function( x, y ) return x > y end,
ge = function( x, y ) return x >= y end,
lt = function( x, y ) return x < y end,
le = function( x, y ) return x <= y end,
eq = function( x, y ) return x == y end,
ne = function( x, y ) return x ~= y end,
at = function( x, y ) return x[y] end,
of = function( x, y ) return y[x] end,
const = function( x ) return x end,
call = function( x, y ) return x( y ) end,
fun = function( x, y ) return y( x ) end,
selfcall = function( x, y ) return x[y](x) end,
selffun = function( x, y ) return y[x](y) end,
}
-- Currying
local cr = setmetatable( {}, {
__index = function( self, k )
local f = op[k] or functions[k]
if not f then error( ('Operator or function not defined %q'):format( k )) end
if not opcache[k] then
opcache[k] = memoize( function( y ) local f = op[k] or functions[k]; return function( x ) return f(x,y) end end, 'kv' )
end
return opcache[k]
end,
})
local function curry( f, ... )
local n = select( '#', ... )
if n <= 0 then return f
elseif n == 1 then local x1 = ...; return function(x) return f( x,x1 ) end
elseif n == 2 then local x1,x2 = ...; return function(x) return f( x,x1,x2 ) end
elseif n == 3 then local x1,x2,x3 = ...; return function(x) return f( x,x1,x2,x3 ) end
elseif n == 4 then local x1,x2,x3,x4 = ...; return function(x) return f( x,x1,x2,x3,x4 ) end
elseif n == 5 then local x1,x2,x3,x4,x5 = ...; return function(x) return f( x,x1,x2,x3,x4,x5 ) end
elseif n == 6 then local x1,x2,x3,x4,x5,x6 = ...; return function(x) return f( x,x1,x2,x3,x4,x5,x6 ) end
elseif n == 7 then local x1,x2,x3,x4,x5,x6,x7 = ...; return function(x) return f( x,x1,x2,x3,x4,x5,x6,x7 ) end
elseif n == 8 then local x1,x2,x3,x4,x5,x6,x7,x8 = ...; return function(x) return f( x,x1,x2,x3,x4,x5,x6,x7,x8 ) end
else local args = {...}; return function(x) return f( x, tunpack( args )) end
end
end
-- Composition
local function compose( fs )
local n = #fs
if n <= 1 then return fs[1]
elseif n == 2 then local f1,f2 = fs[1],fs[2]; return function(...) return f2(f1(...))end
elseif n == 3 then local f1,f2,f3 = fs[1],fs[2],fs[3]; return function(...) return f3(f2(f1(...)))end
elseif n == 4 then local f1,f2,f3,f4 = fs[1],fs[2],fs[3],fs[4]; return function(...) return f4(f3(f2(f1(...))))end
else local f1,f2,f3,f4,f5 = fs[1],fs[2],fs[3],fs[4],fs[5]
if n <= 5 then return function(...) return f5(f4(f3(f2(f1(...))))) end
else
return function(...)
local y = {f5(f4(f3(f2(f1(...)))))}
for i = 1, n-5 do y = {fs[i](tunpack(y))} end
return y
end end
end
end
local function cand( ... )
local n = select( '#', ... )
if n == 1 then local f1 = ...; return function(x) return f1(x) end
elseif n == 2 then local f1,f2 = ...; return function(x) return f1(x) and f2(x) end
elseif n == 3 then local f1,f2,f3 = ...; return function(x) return f1(x) and f2(x) and f3(x) end
elseif n == 4 then local f1,f2,f3,f4 = ...; return function(x) return f1(x) and f2(x) and f3(x) and f4(x) end
else local f1,f2,f3,f4,f5 = ...
if n <= 5 then return function(x) return f1(x) and f2(x) and f3(x) and f4(x) and f5(x) end
else
local fs = {select(6,...)}
return function(x)
local y = f1(x) and f2(x) and f3(x) and f4(x) and f5(x)
for i = 1,n-5 do
if not y then return y
else y = y and fs[i](x)
end
end
return y end
end
end
end
local function cor( ... )
local n = select( '#', ... )
if n == 1 then local f1 = ...; return function(x) return f1(x) end
elseif n == 2 then local f1,f2 = ...; return function(x) return f1(x) or f2(x) end
elseif n == 3 then local f1,f2,f3 = ...; return function(x) return f1(x) or f2(x) or f3(x) end
elseif n == 4 then local f1,f2,f3,f4 = ...; return function(x) return f1(x) or f2(x) or f3(x) or f4(x) end
else local f1,f2,f3,f4,f5 = ...
if n <= 5 then return function(x) return f1(x) or f2(x) or f3(x) or f4(x) or f5(x) end
else
local fs = {select(6,...)}
return function(x)
local y = f1(x) or f2(x) or f3(x) or f4(x) or f5(x)
for i = 1,n-5 do
if y then return y
else y = y or fs[i](x)
end
end
return y end
end
end
end
local function cnot( x ) return function( ... ) return not x( ... ) end end
local function pipe( x, ... )
local y = x
for i = 1, select( '#', ... ) do
local f = select( i, ... )
local tf = type( f )
if tf == 'table' then y = f[1](y, tunpack(f,2))
elseif tf == 'function' then y = f(y)
else error( 'pipe arguments have to be unary functions or tables {f,arg2,arg3,...}')
end
end
return y
end
-- Map
local function map( t, f ) local t_ = {}; for i = 1, #t do t_[i] = f( t[i] ) end return setmetatable( t_, getmetatable(t) ) end
local function imap( t, f ) local t_ = {}; for i = 1, #t do t_[i] = f( i, t[i] ) end return setmetatable( t_, getmetatable(t) ) end
local function vmap( t, f ) local t_ = {}; for k,v in pairs( t ) do t_[k] = f( v ) end return setmetatable( t_, getmetatable(t) ) end
local function kmap( t, f ) local t_ = {}; for k,v in pairs( t ) do t_[k] = f( k ) end return setmetatable( t_, getmetatable(t) ) end
local function kvmap( t, f ) local t_ = {}; for k,v in pairs( t ) do t_[k] = f( k, v ) end return setmetatable( t_, getmetatable(t) ) end
local function vkmap( t, f ) local t_ = {}; for k,v in pairs( t ) do t_[k] = f( v, k ) end return setmetatable( t_, getmetatable(t) ) end
-- Inplace map
local function mapI( t, f ) for i = 1, #t do t[i] = f( t[i] ) end return t end
local function imapI( t, f ) for i = 1, #t do t[i] = f( i, t[i] ) end return t end
local function vmapI( t, f ) for k,v in pairs( t ) do t[k] = f( v ) end return t end
local function kmapI( t, f ) for k,v in pairs( t ) do t[k] = f( k ) end return t end
local function kvmapI( t, f ) for k,v in pairs( t ) do t[k] = f( k, v ) end return t end
local function vkmapI( t, f ) for k,v in pairs( t ) do t[k] = f( v, k ) end return t end
-- Filter
local function filter( t, p ) local t_,j = {},0; for i = 1, #t do if p( t[i] ) then j = j + 1; t_[j] = t[i] end end return setmetatable( t_, getmetatable(t)) end
local function ifilter( t, p ) local t_,j = {},0; for i = 1, #t do if p( i, t[i] ) then j = j + 1; t_[j] = t[i] end end return setmetatable( t_, getmetatable(t)) end
local function vfilter( t, p ) local t_ = {}; for k,v in pairs( t ) do if p( v ) then t_[k] = v end end return setmetatable( t_, getmetatable(t)) end
local function kfilter( t, p ) local t_ = {}; for k,v in pairs( t ) do if p( k ) then t_[k] = v end end return setmetatable( t_, getmetatable(t)) end
local function kvfilter( t, p ) local t_ = {}; for k,v in pairs( t ) do if p( k, v ) then t_[k] = v end end return setmetatable( t_, getmetatable(t)) end
local function vkfilter( t, p ) local t_ = {}; for k,v in pairs( t ) do if p( v, k ) then t_[k] = v end end return setmetatable( t_, getmetatable(t)) end
-- Inplace filter
local function filterI( t, p ) local j = 0; for i = 1, #t do if p( t[i] ) then j = j + 1; t[j] = t[i] end end; for i = j+1, #t do t[i] = nil end; return t end
local function ifilterI( t, p ) local j = 0; for i = 1, #t do if p( i, t[i] ) then j = j + 1; t[j] = t[i] end end; for i = j+1, #t do t[i] = nil end; return t end
local function vfilterI( t, p ) for k,v in pairs( t ) do if not p( v ) then t[k] = nil end end return t end
local function kfilterI( t, p ) for k,v in pairs( t ) do if not p( k ) then t[k] = nil end end return t end
local function kvfilterI( t, p ) for k,v in pairs( t ) do if not p( k, v ) then t[k] = nil end end return t end
local function vkfilterI( t, p ) for k,v in pairs( t ) do if not p( v, k ) then t[k] = nil end end return t end
-- Map-filter
local function mapfilter( t, f, p ) local t_,j = {},0; for i = 1, #t do local v_ = f( t[i] ); if p( v_ ) then j = j + 1; t_[j] = v_ end end return setmetatable( t_, getmetatable(t)) end
local function imapfilter( t, f, p ) local t_,j = {},0; for i = 1, #t do local v_ = f( i, t[i] ); if p( i, v_ ) then j = j + 1; t_[j] = v_ end end return setmetatable( t_, getmetatable(t)) end
local function vmapfilter( t, f, p ) local t_ = {}; for k,v in pairs( t ) do local v_ = f( v ); if p( v_ ) then t_[k] = v_ end end return setmetatable( t_, getmetatable(t)) end
local function kmapfilter( t, f, p ) local t_ = {}; for k,v in pairs( t ) do local v_ = f( k ); if p( k ) then t_[k] = v_ end end return setmetatable( t_, getmetatable(t)) end
local function kvmapfilter( t, f, p ) local t_ = {}; for k,v in pairs( t ) do local v_ = f( k, v ); if p( k, v_ ) then t_[k] = v_ end end return setmetatable( t_, getmetatable(t)) end
local function vkmapfilter( t, f, p ) local t_ = {}; for k,v in pairs( t ) do local v_ = f( v, k ); if p( v_, k ) then t_[k] = v_ end end return setmetatable( t_, getmetatable(t)) end
-- Inplace map-filter
local function mapfilterI( t, f, p ) local j = 0; for i = 1, #t do local v_ = f( t[i] ); if p( v_ ) then j = j + 1; t[j] = v_ end end; for i = j+1, #t do t[i] = nil end; return t end
local function imapfilterI( t, f, p ) local j = 0; for i = 1, #t do local v_ = f( i, t[i] ); if p( i, v_ ) then j = j + 1; t[j] = v_ end end; for i = j+1, #t do t[i] = nil end; return t end
local function vmapfilterI( t, f, p ) for k,v in pairs( t ) do local v_ = f( v ); if not p( v_ ) then t[k] = nil else t[k] = v_ end end return t end
local function kmapfilterI( t, f, p ) for k,v in pairs( t ) do local v_ = f( k ); if not p( k ) then t[k] = nil else t[k] = v_ end end return t end
local function kvmapfilterI( t, f, p ) for k,v in pairs( t ) do local v_ = f( k, v ); if not p( k, v_ ) then t[k] = nil else t[k] = v_ end end return t end
local function vkmapfilterI( t, f, p ) for k,v in pairs( t ) do local v_ = f( v, k ); if not p( v_, k ) then t[k] = nil else t[k] = v_ end end return t end
-- Filter-map
local function filtermap( t, p, f ) local t_,j = {},0; for i = 1, #t do if p( t[i] ) then j = j + 1; t_[j] = f( t[i] ) end end return setmetatable( t_, getmetatable(t)) end
local function ifiltermap( t, p, f ) local t_,j = {},0; for i = 1, #t do if p( i, t[i] ) then j = j + 1; t_[j] = f( i, t[i] ) end end return setmetatable( t_, getmetatable(t)) end
local function vfiltermap( t, p, f ) local t_ = {}; for k,v in pairs( t ) do if p( v ) then t_[k] = f( v ) end end return setmetatable( t_, getmetatable(t)) end
local function kfiltermap( t, p, f ) local t_ = {}; for k,v in pairs( t ) do if p( k ) then t_[k] = f( k ) end end return setmetatable( t_, getmetatable(t)) end
local function kvfiltermap( t, p, f ) local t_ = {}; for k,v in pairs( t ) do if p( k, v ) then t_[k] = f( k, v ) end end return setmetatable( t_, getmetatable(t)) end
local function vkfiltermap( t, p, f ) local t_ = {}; for k,v in pairs( t ) do if p( v, k ) then t_[k] = f( v, k ) end end return setmetatable( t_, getmetatable(t)) end
-- Inplace filter-map
local function filtermapI( t, p, f ) local j = 0; for i = 1, #t do if p( t[i] ) then j = j + 1; t[j] = f( t[i] ) end end; for i = j+1, #t do t[i] = nil end; return t end
local function ifiltermapI( t, p, f ) local j = 0; for i = 1, #t do if p( i, t[i] ) then j = j + 1; t[j] = f( i, t[i] ) end end; for i = j+1, #t do t[i] = nil end; return t end
local function vfiltermapI( t, p, f ) for k,v in pairs( t ) do if not p( v ) then t[k] = nil else t[k] = f( v ) end end return t end
local function kfiltermapI( t, p, f ) for k,v in pairs( t ) do if not p( k ) then t[k] = nil else t[k] = f( k ) end end return t end
local function kvfiltermapI( t, p, f ) for k,v in pairs( t ) do if not p( k, v ) then t[k] = nil else t[k] = f( k, v ) end end return t end
local function vkfiltermapI( t, p, f ) for k,v in pairs( t ) do if not p( v, k ) then t[k] = nil else t[k] = f( v, k ) end end return t end
-- Fold
local function foldl( t, f, acc ) local j,acc = acc==nil and 2 or 1, acc==nil and t[1] or acc; for i = j,#t do acc = f( acc, t[i] ) end return acc end
local function ifoldl( t, f, acc ) local j,acc = acc==nil and 2 or 1, acc==nil and t[1] or acc; for i = j,#t do acc = f( acc, i, t[i] ) end return acc end
local function foldr( t, f, acc ) local l = #t; local j,acc = acc==nil and l-1 or l,acc==nil and t[l] or acc; for i = j,1,-1 do acc = f( acc, t[i] ) end return acc end
local function ifoldr( t, f, acc ) local l = #t; local j,acc = acc==nil and l-1 or l,acc==nil and t[l] or acc; for i = j,1,-1 do acc = f( acc, i, t[i] ) end return acc end
local function vfold( t, f, acc ) local j; if acc==nil then j,acc = next(t) end; for k,v in next, t, j do acc = f( acc, v ) end return acc end
local function kfold( t, f, acc ) local j; if acc==nil then j,acc = next(t) end; for k,v in next, t, j do acc = f( acc, k ) end return acc end
local function kvfold( t, f, acc ) local j; if acc==nil then j,acc = next(t) end; for k,v in next, t, j do acc = f( acc, k, v ) end return acc end
local function vkfold( t, f, acc ) local j; if acc==nil then j,acc = next(t) end; for k,v in next, t, j do acc = f( acc, v, k ) end return acc end
-- Special folds
local function sum( t, acc ) local acc = acc or 0; for i = 1, #t do acc = acc + t[i] end; return acc end
local function product( t, acc ) local acc = acc or 1; for i = 1, #t do acc = acc * t[i] end; return acc end
-- For each
local function each( t, f ) for i = 1, #t do f( t[i] ) end end
local function ieach( t, f ) for i = 1, #t do f( i, t[i] ) end end
local function veach( t, f ) for k,v in pairs( t ) do f( v ) end end
local function keach( t, f ) for k,v in pairs( t ) do f( k ) end end
local function kveach( t, f ) for k,v in pairs( t ) do f( k, v ) end end
local function vkeach( t, f ) for k,v in pairs( t ) do f( v, k ) end end
-- Traversing table
local function traverse( t, f, level, key, saved )
local level = level or 1
local saved = saved or {}
if type( t ) == 'table' and not saved[t] then
saved[t] = t
for k, v in pairs( t ) do
local x = traverse( v, f, level + 1, k, saved )
if x then
return x
end
end
else
return f( t, key, level )
end
end
-- Transformations
local function append( t1, t2 )
local t, n = {}, #t1
for i = 1, n do t[i] = t1[i] end
for i = 1, #t2 do t[i+n] = t2[i] end
return setmetatable( t, getmetatable( t1 ))
end
local function prepend( t1, t2 )
local t, m = {}, #t2
for i = 1, m do t[i] = t2[i] end
for i = 1, #t1 do t[m+i] = t1[i] end
return setmetatable( t, getmetatable( t1 ))
end
local function inject( t1, t2, pos )
local pos = pos < 0 and #t1 + pos + 1 or pos
if pos <= 1 then return prepend( t1, t2 )
elseif pos >= #t1 then return append( t1, t2 )
else
local n, m, t = #t1, #t2, {}
for i = 1, pos-1 do t[i] = t1[i] end
for i = 1, m do t[i+pos-1] = t2[i] end
for i = pos, n do t[i+m] = t1[i] end
return setmetatable( t, getmetatable( t1 ))
end
end
local function reverse( t ) local t_, n = {}, #t; for i = 1, n do t_[i] = t[n-i+1] end; return setmetatable( t_, getmetatable( t )) end
local function shuffle( t, f )
local f, n = f or math.random, #t
local t_ = copy( t )
for i = n, 1, -1 do
local j = f( i )
t_[j], t_[i] = t_[i], t_[j]
end
return t_
end
local function slice( t, init, limit, step )
local init, limit, step = init, limit or #t, step or 1
if init < 0 then init = #t + init + 1 end
if limit < 0 then limit = #t + limit + 1 end
local t_, j = {}, 0
for i = init, limit, step do
j = j + 1
t_[j] = t[i]
end
return setmetatable( t_, getmetatable( t ))
end
local function unique( t )
local enc, out, k = {}, {}, 0
for i = 1, #t do
local e = t[i]
if not enc[e] then
enc[e] = true
k = k + 1
out[k] = e
end
end
return setmetatable( out, getmetatable( t ))
end
local null = {}
local function update( t, args )
local t_ = {}
for k, v in pairs( t ) do t_[k] = t[k] end
for k, v in pairs( args ) do t_[k] = v ~= null and v or nil end
return setmetatable( t_, getmetatable( t ))
end
local function flatten( t )
local function recflatten( t, v, i )
if type( v ) == 'table' then
for j = 1, #v do i = recflatten( t, v[j], i ) end
else
i = i + 1
t[i] = v
end
return i
end
local t_, j = {}, 0
for i = 1, #t do j = recflatten( t_, t[i], j ) end
return setmetatable( t_, getmetatable( t ))
end
-- Inplace transformations
local function appendI( t1, t2 )
local n = #t1
for i = 1, #t2 do t1[i+n] = t2[i] end
return t1
end
local function prependI( t1, t2 )
local n, m = #t1,#t2
for i = n+1, n+m do t1[i] = false end
for i = n+m, m+1, -1 do t1[i] = t1[i-m] end
for i = 1, m do t1[i] = t2[i] end
return t1
end
local function injectI( t1, t2, pos )
local pos = pos < 0 and #t1 + pos + 1 or pos
if pos <= 1 then return prependI( t1, t2 )
elseif pos >= #t1 then return appendI( t1, t2 )
else
local n, m = #t1, #t2
for i = 1, m do t1[i+n] = false end
for i = n, pos, -1 do t1[i+m] = t1[i] end
for i = 1, m do t1[i+pos-1] = t2[i] end
return t1
end
end
local function reverseI( t ) local n = #t; for i = 1, math.floor( n/2 ) do t[i], t[n-i+1] = t[n-i+1], t[i] end; return t end
local function updateI( t, args ) for k, v in pairs( args ) do t[k] = v ~= null and v or nil end; return t end
local function shuffleI( t, f )
local f, n = f or math.random, #t
for i = n, 1, -1 do
local j = f( i )
t[j], t[i] = t[i], t[j]
end
return t
end
-- Searching and sorting
local function indexof( t, v, cmp )
if not cmp then
for i = 1, #t do if t[i] == v then return i end end
else
local function defaultcmp( a, b ) return a < b end
local init, limit = 1, #t, 0
local f = type(cmp) == 'function' and cmp or defaultcmp
local floor = math.floor
while init <= limit do
local mid = floor( 0.5*(init+limit))
local v_ = t[mid]
if v == v_ then return mid
elseif f( v, v_ ) then limit = mid - 1
else init = mid + 1
end
end
end
end
local function indexofq( t, v, eq, cmp )
local eq = eq or equal
if not cmp then
for i = 1, #t do if eq( t[i], v ) then return i end end
else
local function defaultcmp( a, b ) return a < b end
local init, limit = 1, #t, 0
local f = type(cmp) == 'function' and cmp or defaultcmp
local floor = math.floor
while init <= limit do
local mid = floor( 0.5*(init+limit))
local v_ = t[mid]
if eq( v, v_ ) then return mid
elseif f( v, v_ ) then limit = mid - 1
else init = mid + 1
end
end
end
end
local function keyof( t, v ) for k, v_ in pairs( t ) do if v_ == v then return k end end end
local function keyofq( t, v, eq ) local eq = eq or equal; for k, v_ in pairs( t ) do if eq( v_, v ) then return k end end end
local function sort( t, f ) local t_ = copy(t); table.sort( t_, f ); return t_ end
local function sortI( t, f ) table.sort( t, f ); return t end
-- Partition
local function partition( t, f ) local mt = getmetatable( t ); local t1, t2, j, k = setmetatable({},mt), setmetatable({},mt), 0, 0; for i = 1, #t do if f( t[i] ) then j = j + 1; t1[j] = t[i] else k = k + 1; t2[k] = t[i] end end; return t1,t2 end
local function ipartition( t, f ) local mt = getmetatable( t ); local t1, t2, j, k = setmetatable({},mt), setmetatable({},mt), 0, 0; for i = 1, #t do if f( i, t[i] ) then j = j + 1; t1[j] = t[i] else k = k + 1; t2[k] = t[i] end end; return t1,t2 end
local function vpartition( t, f ) local mt = getmetatable( t ); local t1, t2 = setmetatable({},mt), setmetatable({},mt); for k, v in pairs( t ) do if f( v ) then t1[k] = v else t2[k] = v end end; return t1,t2 end
local function kpartition( t, f ) local mt = getmetatable( t ); local t1, t2 = setmetatable({},mt), setmetatable({},mt); for k, v in pairs( t ) do if f( k ) then t1[k] = v else t2[k] = v end end; return t1,t2 end
local function vkpartition( t, f ) local mt = getmetatable( t ); local t1, t2 = setmetatable({},mt), setmetatable({},mt); for k, v in pairs( t ) do if f( v, k ) then t1[k] = v else t2[k] = v end end; return t1,t2 end
local function kvpartition( t, f ) local mt = getmetatable( t ); local t1, t2 = setmetatable({},mt), setmetatable({},mt); for k, v in pairs( t ) do if f( k, v ) then t1[k] = v else t2[k] = v end end; return t1,t2 end
-- Zip/unzip
local function zip( ... )
local ts = { ... }
local t = {}
if ts[1] then
local ncols, nrows = #ts, #ts[1]
for i = 2, ncols do
if #ts[i] < nrows then nrows = #ts[i] end
end
for i = 1, nrows do
local t_ = {}
for j = 1, ncols do t_[j] = ts[j][i] end
t[i] = t_
end
end
return t
end
local function unzip( t )
local t_ = {}
if #t > 0 and type( t[1] ) == 'table' then
local n = #t[1]
for i = 1, n do t_[i] = {} end
for i = 1, n do
for j = 1, #t do t_[i][j] = t[j][i] end
end
end
return tunpack( t_ )
end
-- Table creation and manipulation
local function newtable( size, init )
local init = init or false
if not size or size <= 0 then return {}
elseif size == 1 then return {init}
elseif size == 2 then return {init,init}
elseif size == 3 then return {init,init,init}
elseif size == 4 then return {init,init,init,init}
elseif size == 5 then return {init,init,init,init,init}
elseif size == 6 then return {init,init,init,init,init,init}
elseif size == 7 then return {init,init,init,init,init,init,init}
elseif size >= 8 then
local t = {init,init,init,init,init,init,init,init}
for i = 9,size do t[i] = init end
return t
end
end
local function keys( t ) local t_,j = {},0; for k, v in pairs( t ) do j = j + 1; t_[j] = k end; return t_ end
local function values( t ) local t_,j = {},0; for k, v in pairs( t ) do j = j + 1; t_[j] = v end; return t_ end
local function topairs( t ) local t_,j = {},0; for k, v in pairs( t ) do j = j + 1; t_[j] = {k,v} end; return t_ end
local function frompairs( t ) local t_ = {}; for i = 1, #t do t_[t[i][1]] = t[i][2] end; return t_ end
local function tolists( t )
local t1, t2, i = {}, {}, 0
for k, v in pairs( t ) do
i = i + 1
t1[i], t2[i] = k, v
end
return t1, t2
end
local function fromlists( t1, t2 )
local t = {}
for i = 1, math.min( #t1, #t2 ) do t[t1[i]] = t2[i] end
return t
end
local function pack( ... ) return { ... } end
-- Counting
local function nkeys( t )
local len = 0
for k, v in pairs( t ) do len = len + 1 end
return len
end
local function count( t )
local t_ = {}
for i = 1, #t do
local v = t[i]
t_[v] = (t_[v] or 0) + 1
end
return t_
end
-- Copying
local function copy( t, arrayfor )
if type( t ) == 'table' then
local t_ = {}
if arrayfor then
for i = 1, #t do t_[i] = t[i] end
else
for k, v in pairs( t ) do t_[k] = v end
end
return setmetatable( t_, getmetatable( t ))
else
return t
end
end
local function deepcopy( t, saved )
local saved = saved or {}
if type( t ) == 'table' then
if not saved[t] then
local t_ = {}
saved[t] = setmetatable( t_, getmetatable( t ))
for k, v in pairs( t ) do
t_[deepcopy( k, saved )] = deepcopy( v, saved )
end
return t_
else
return saved[t]
end
else
return t
end
end
-- Range
local RangeMT = {
__index = function( self, k ) return self.i + self.s*(k-1) end,
__len = function( self ) return self.l end,
}
local function range( init, limit, step )
local init, limit, step = init, limit, step or 1
if not limit then
init, limit = 1, init
end
return setmetatable( {i = init,l = 1+math.floor((limit-init)/step),s = step}, RangeMT )
end
-- Set operations
local function setof( ... )
local t = {}
for i = 1, select( '#', ... ) do
local k = select( i, ... )
t[k] = true
end
return setmetatable( t, LootMT )
end
local function intersect( t1, t2 )
local t = {}
for k, v in pairs( t1 ) do
if t2[k] ~= nil then t[k] = v end
end
return setmetatable( t, getmetatable( t1 ))
end
local function union( t1, t2 )
local t = {}
for k, v in pairs( t1 ) do t[k] = v end
for k, v in pairs( t2 ) do t[k] = v end
return setmetatable( t, getmetatable( t1 ))
end
local function difference( t1, t2 )
local t = {}
for k, v in pairs( t1 ) do
if t2[k] == nil then t[k] = v end
end
return setmetatable( t, getmetatable( t1 ))
end
-- Combinatorics
local function permutations( input )
local out, used, n, level, acc = {}, {}, #input, 1, {}
local function recpermute( level )
if level <= n then
for i = 1, n do
if not used[i] then
used[i] = true
out[#out+1] = input[i]
recpermute( level+1 )
used[i] = false
out[#out] = nil
end
end
else
local t = {}
for i = 1, n do t[i] = out[i] end
acc[#acc+1] = t
end
return acc
end
return recpermute( 1 )
end
local function combinations( ts, n )
local m, t, acc = #ts, {}, {}
local function reccombine( i )
if #t >= n then
acc[#acc+1] = copy( t )
else
for j = i, m do
t[#t+1] = ts[j]
reccombine( j + 1 )
t[#t] = nil
end
end
end
reccombine( 1 )
return acc
end
local function combinationsof( ... )
local ts = {...}
local n, t, acc = #ts, {}, {}
local function reccombine( i )
if i > n then
acc[#acc+1] = copy( t )
else
local c = ts[i]
for j = 1, #c do
t[#t+1] = c[j]
reccombine( i+1 )
t[#t] = nil
end
end
end
reccombine( 1 )
return acc
end
-- Profiling utilities
local function diffclock( f, ... )
local t = os.clock()
f( ... )
return os.clock() - t
end
local function ndiffclock( n, f, ... )
local t = os.clock()
for i = 1, n do f( ... ) end
return (os.clock() - t) / n
end
local function diffmemory( f, ... )
collectgarbage()
local m = collectgarbage('count')
f( ... )
return 1024*(collectgarbage('count') - m)
end
-- Swap
local function swap( x, y ) return y, x end
-- Generate simple function from string
local fn = memoize( function(code)
return loadstring(('return function(x,y,z,u,v,w)\nreturn %s\nend'):format( code ))()
end )
-- Advanced tostring and pretty-printing
local function xtostring( x, tables, identSymbol )
local tables = tables or {}
local identSymbol = identSymbol or ' '
local function serialize( v, ident )
local t_ = type( v )
if t_ ~= 'table' then
if t_ == 'string' then
return ('%q'):format( v )
else
return tostring( v )
end
else
if not tables[v] then
tables.n = (tables.n or 0) + 1
tables[v] = tables.n
tables[tables.n] = v
local buff = {}
local arr = {}
for i = 1, #v do
arr[i] = true
buff[i] = serialize( v[i], ident )
end
for k, vv in pairs( v ) do
if not arr[k] then
if type( k ) == 'string' and k:match('[%a_][%w_]*') == k then
buff[#buff+1] = ('\n%s%s = %s'):format( ident and identSymbol:rep(ident) or '', k, serialize( vv, ident and (ident + 1)))
else
buff[#buff+1] = ('%s[%s] = %s'):format( ident and identSymbol:rep(ident) or '', serialize( k, ident ), serialize( vv, ident ))
end
end
end
return '{' .. table.concat( buff, ', ' ) .. '}'
else
return '__' .. tables[v]
end
end
end
return serialize( x, 0 )
end
local function pp( ... )
local n = select( '#', ... )
local x, pred
for i = 1, n do
pred = x
x = select( i, ... )
if type( x ) == 'table' and i > 1 then
io.write( '\n' )
end
io.write( xtostring( x,{},' ' ) )
if i < n then
io.write( type(x) == 'table' and '\n' or '\t' )
end
end
io.write('\n')
end
local function mt( t )
return setmetatable( t, LootMT )
end
-- Exporting library
local function export( ... )
local n = select( '#', ... )
if n == 0 then
setmetatable( _G, LootMT )
else
local f = {}
for i = 1, n do
f[i] = functions[select( i, ... )]
end
return tunpack( f )
end
end
functions = {
null = null, memoize = memoize, op = op, cr = cr,is = is, isnot = isnot, predicates = predicates,
all = all, any = any, wild = wild, rest = rest, wildrest = wildrest, capture = capture, equal = equal, match = match,
pipe = pipe, curry = curry, compose = compose, cand = cand, cor = cor, cnot = cnot, swap = swap,
map = map, imap = imap, vmap = vmap, kmap = kmap, vkmap = vkmap, kvmap = kvmap,
filter = filter, ifilter = ifilter, vfilter = vfilter, kfilter = kfilter, vkfilter = vkfilter, kvfilter = kvfilter,
mapfilter = mapfilter, imapfilter = imapfilter, vmapfilter = vmapfilter, kmapfilter = kmapfilter, vkmapfilter = vkmapfilter, kvmapfilter = kvmapfilter,
mapfilterI = mapfilterI, imapfilterI = imapfilterI, vmapfilterI = vmapfilterI, kmapfilterI = kmapfilterI, vkmapfilterI = vkmapfilterI, kvmapfilterI = kvmapfilterI,
filtermap = filtermap, ifiltermap = ifiltermap, vfiltermap = vfiltermap, kfiltermap = kfiltermap, vkfiltermap = vkfiltermap, kvfiltermap = kvfiltermap,
filtermapI = filtermapI, ifiltermapI = ifiltermapI, vfiltermapI = vfiltermapI, kfiltermapI = kfiltermapI, vkfiltermapI = vkfiltermapI, kvfiltermapI = kvfiltermapI,
foldl = foldl, foldr = foldr, ifoldl = ifoldl, ifoldr = ifoldr, kfold = kfold, vfold = vfold, vkfold = vkfold, kvfold = kvfold,
each = each, ieach = ieach, veach = veach, keach = keach, vkeach = vkeach, kveach = kveach,
mapI = mapI, imapI = imapI, vmapI = vmapI, kmapI = kmapI, vkmapI = vkmapI, kvmapI = kvmapI,
filterI = filterI, ifilterI = ifilterI, vfilterI = vfilterI, kfilterI = kfilterI, vkfilterI = vkfilterI, kvfilterI = kvfilterI,
sum = sum, product = product, count = count, nkeys = nkeys, traverse = traverse, newtable = newtable,
range = range, slice = slice, append = append, appendI = appendI, prepend = prepend, prependI = prependI,
inject = inject, injectI = injectI, reverse = reverse, reverseI = reverseI, shuffle = shuffle, shuffleI = shuffleI,
update = update, updateI = updateI, indexof = indexof, indexofq = indexofq, keyof = keyof, keyofq = keyofq,
sort = sort, sortI = sortI, keys = keys, values = values, setof = setof, intersect = intersect, difference = difference, union = union,
permutations = permutations, combinations = combinations, combinationsof = combinationsof,
unique = unique, copy = copy, deepcopy = deepcopy, topairs = topairs, frompairs = frompairs, tolists = tolists, fromlists = fromlists,
flatten = flatten, zip = zip, unzip = unzip, partition = partition, ipartition = ipartition, vpartition = vpartition,
kpartition = kpartition, vkpartition = vkpartition, kvpartition = kvpartition, pack = pack, diffclock = diffclock,
ndiffclock = ndiffclock, diffmemory = diffmemory, xtostring = xtostring, pp = pp, export = export, fn = fn, mt = mt,
}
LootMT = {
__index = functions,
}
return functions
|
local oop = medialib.load("oop")
local mediaregistry = medialib.load("mediaregistry")
local Service = oop.class("Service")
function Service:on(event, callback)
self._events = {}
self._events[event] = self._events[event] or {}
self._events[event][callback] = true
end
function Service:emit(event, ...)
for k,_ in pairs(self._events[event] or {}) do
k(...)
end
if event == "error" then
MsgN("[MediaLib] Video error: " .. table.ToString{...})
end
end
function Service:load(url, opts) end
function Service:loadMediaObject(media, url, opts)
media._unresolvedUrl = url
media._service = self
media:setDefaultTag()
hook.Run("Medialib_ProcessOpts", media, opts or {})
mediaregistry.add(media)
self:resolveUrl(url, function(resolvedUrl, resolvedData)
media:openUrl(resolvedUrl)
if resolvedData and resolvedData.start and (not opts or not opts.dontSeek) then media:seek(resolvedData.start) end
end)
end
function Service:isValidUrl(url) end
-- Sub-services should override this
function Service:directQuery(url, callback) end
-- A metatable for the callback chain
local _service_cbchain_meta = {}
_service_cbchain_meta.__index = _service_cbchain_meta
function _service_cbchain_meta:addCallback(cb)
table.insert(self._callbacks, cb)
end
function _service_cbchain_meta:run(err, data)
local first = table.remove(self._callbacks, 1)
if not first then return end
first(err, data, function(err, data)
self:run(err, data)
end)
end
-- Query calls direct query and then passes the data through a medialib hook
function Service:query(url, callback)
local cbchain = setmetatable({_callbacks = {}}, _service_cbchain_meta)
-- First add the data gotten from the service itself
cbchain:addCallback(function(_, _, cb) return self:directQuery(url, cb) end)
-- Then add custom callbacks
hook.Run("Medialib_ExtendQuery", url, cbchain)
-- Then add the user callback
cbchain:addCallback(function(err, data) callback(err, data) end)
-- Finally run the chain
cbchain:run(url)
end
function Service:parseUrl(url) end
-- the second argument to cb() function call has some standard keys:
-- `start` the time at which to start media in seconds
function Service:resolveUrl(url, cb)
cb(url, self:parseUrl(url))
end
|
---
--- File: lua_clx.lua
---
--- This file implements the tgs actions for CLX devices
---
---
---
---
clx_device = {}
clx_device.ssh_stream = {}
--
-- register common code drivers
--
clx_device.ECHO = common_device_code.ECHO
clx_device.TIME_DELAY = common_device_code.TIME_DELAY
clx_device.PING = common_device_code.PING
clx_device.PING_GATEWAY = common_device_code.PING_GATEWAY
function clx_device.INIT( )
clx_device.ssh_stream = {}
end
function clx_device.CONNECT( parameters, actionResult, chain, unitEntry )
--- set password
--- this is an assert because
--- problem in driving script
--- trying to connect with out a disconnect
assert( clx_device.ssh_stream.pid == nil , "trying to open an open stream")
actionResult.status = lua_clx_ppp.connect( chain, clx_device, unitEntry ,actionResult.result)
if actionResult.status ~= 1 then
return actionResult.status
end
if unitEntry.ssh_password == nil then
clx_device.user = chain.clx.ssh_username
clx_device.password = chain.clx.ssh_password
else
clx_device.user = unitEntry.ssh_username
clx_device.password = unitEntry.ssh_password
end
---
--- This is an assert because unit data base is messed up
---
---
assert( clx_device.user ~= nil, "ssh connection requires user")
assert( clx_device.password ~= nil, "ssh connection requires password")
assert( unitEntry.ip ~= nil,"ssh connection requires ipaddress")
tgs_ssh.setPassword( clx_device.password)
---
clx_device.ssh_stream = {}
actionResult.status = tgs_ssh.connect( clx_device.user, clx_device.ip, clx_device.ssh_stream )
actionResult.result.status = "connection to "..unitEntry.ip
if actionResult.status == 0 then
actionResult.result.status = "bad connection for ip ".. clx_device.ip
clx_device.ssh_stream = {}
end
return actionResult.status
end
function clx_device.DISCONNECT(parameters, actionResult, chain, unitEntry )
if clx_device.ip == nil then clx_device.ip = "bad ppp connection" end
actionResult.status = true
actionResult.result.status = "disconnecting ".. clx_device.ip
tgs_ssh.disconnect( clx_device )
clx_device.ssh_stream = {}
lua_clx_ppp.disconnect( chain, clx_device, actionResult.result )
return actionResult.status
end
function clx_device.GET_FILE(parameters, actionResult, chain, unitEntry )
local getFile, temp
tgs_ssh.setPassword( clx_device.password)
getFile = clx_device.parseUnitReplacement( chain, unitEntry, parameters[2])
actionResult.status, temp =
tgs_ssh.getFile( clx_device.user, clx_device.ip, parameters[1], getFile )
actionResult.result.status = "got file "..getFile.." from remote unit ".. temp
actionResult.result.tgsFile = parameters[1]
actionResult.result.mtsFile = getFile
getFile = nil
temp = nil
return actionResult.status
end
function clx_device.PUT_FILE(parameters, actionResult, chain, unitEntry )
local sendFile, temp
tgs_ssh.setPassword( clx_device.password)
sendFile = clx_device.parseUnitReplacement( chain, unitEntry, parameters[1] )
actionResult.status, temp =
tgs_ssh.sendFile( clx_device.user, clx_device.ip, parameters[2] ,sendFile )
actionResult.result.status = "set file "..sendFile.." to remote units "..temp
actionResult.result.tgsFile = parameters[2]
actionResult.result.mtsFile = sendFile
sendFile = nil
return actionResult.status
end
function clx_device.GET_TIME(parameters, actionResult, chain, unitEntry, timeCorrection )
tgs_ssh.setPassword( clx_device.password)
if timeCorrection == nil then timeCorrection = false end
actionResult.result.timeCorrection = timeCorrection
actionResult.result.tgsTime = os.time()
actionResult.status, actionResult.result.mtsTime = tgs_ssh.sendCommand( clx_device,'date +"%s" ')
actionResult.result.mtsTimeString = actionResult.result.mtsTime
actionResult.result.mtsTime = tonumber( actionResult.result.mtsTime)
return actionResult.status
end
function clx_device.SET_TIME(parameters, actionResult, chain, unitEntry )
local timeString , status1, status2
tgs_ssh.setPassword( clx_device.password)
clx_device.GET_TIME(parameters, actionResult, chain, unitEntry, true )
timeString = tgs_time.generateTime()
actionResult.result.timeString = timeString
status1 = tgs_ssh.sendString( clx_device , "date -us "..timeString )
if status1 > 0 then
status2 = tgs_ssh.sendString(clx_device, "hwclock -wu ")
actionResult.result.status = "set time and hwclock -wu"
actionResult.status = status2
else
actionResult.status = 0
actionResult.result.status = "bad date command"
end
return actionResult.status
end
function clx_device.GET_VERSION(parameters, actionResult, chain, unitEntry )
tgs_ssh.setPassword( clx_device.password)
actionResult.status, actionResult.result.data
= tgs_ssh.sendCommand( clx_device ,"cat /usr/shoptalk/logs/info.log ")
actionResult.result.status = "action ok"
return actionResult.status
end
function clx_device.REBOOT( parameter, actionResult, chain, unitEntry )
tgs_ssh.setPassword( clx_device.password)
tgs_ssh.reboot( clx_device )
clx_device.ssh_stream = {}
actionResult.status = 1
actionResult.result.status = "rebooting clx"
return 1
end
function clx_device.PS(parameter, actionResult, chain, unitEntry )
tgs_ssh.setPassword( clx_device.password)
actionResult.status, actionResult.result.data
= tgs_ssh.sendCommand( clx_device ,"ps ")
actionResult.result.status = "action ok"
return actionResult.status
end
function clx_device.PROC(parameter, actionResult, chain, unitEntry )
local procFile
procFile = parameter[1]
tgs_ssh.setPassword( clx_device.password)
actionResult.status, actionResult.result.data
= tgs_ssh.sendCommand( clx_device ,"cat /proc/"..procFile)
actionResult.result.status = "action ok"
return actionResult.status
end
function clx_device.help()
print("implements clx tgs commands")
end
function clx_device.description()
return "implements clx tgs commands"
end
function clx_device.parseUnitReplacement( chain, unitEntry, fileName )
local key
local unitName
local match
local returnValue
match = "$unit"
key = chain.key
unitName = unitEntry[ key]
if string.find( fileName, match ) ~= nil then
returnValue = string.gsub(fileName, match, unitName )
else
returnValue = fileName
end
return returnValue
end
devices.addDevice( "clx", clx_device)
|
PipeController = {}
PipeController.__index = PipeController
function PipeController:new()
local pipeController = {}
setmetatable(pipeController, PipeController)
pipeController.list = {}
pipeController.maxStep = 64
pipeController.step = 32
pipeController.speed = 2
return pipeController
end
function PipeController:create()
local val = {}
val.left = width
val.right = val.left + 16
val.top = 40 + (20 * math.random(5))
val.bottom = val.top + 96
val.ind = #self.list + 1
self.list[val.ind] = val
end
function PipeController:update()
for ind, val in pairs(self.list) do
val.left = val.left - self.speed
val.right = val.left + 16
if val.right < 0 then
self.list[val.ind] = nil
end
end
if self.step == self.maxStep then
self:create()
self.step = 0
end
self.step = self.step + 1
self.speed = self.speed + 0.001
end
function PipeController:draw()
for ind, val in pairs(self.list) do
love.graphics.rectangle('fill', val.left, 0, 16, val.top)
love.graphics.rectangle('fill', val.left, val.bottom, 16, height)
end
end
|
-- sfinv/init.lua
dofile(minetest.get_modpath("sfinv") .. "/api.lua")
-- Load support for MT game translation.
local S = minetest.get_translator("sfinv")
sfinv.register_page("sfinv:crafting", {
title = S("Crafting"),
get = function(self, player, context)
return sfinv.make_formspec(player, context, [[
image[0.5,0.2;1.5,3;player.png]
list[current_player;craft;4,0.5;2,2;]
list[current_player;craftpreview;7,1;1,1;]
image[6,1;1,1;arrow_fg.png^[transformR270]
]], true)
end
})
|
local VisualFile = class('VisualFile')
function VisualFile:Initialize(filename)
self.filenameText = love.graphics.newText(love.graphics.getFont(), filename)
self.width = self.filenameText:getWidth()
self.height = self.filenameText:getHeight()
end
function VisualTicker:drawCentered(x, y)
love.graphics.draw(self.filenameText, x - self.filenameText:getWidth()/2, y)
end
return VisualFile
|
ENT.Spawnable = false
ENT.AdminSpawnable = false
include('shared.lua')
function ENT:Think()
end
|
function Start()
print("Program start");
end
function Update()
print("Program updating")
end
function End()
print("Program end")
end
|
require "app.runtime.Event"
require "app.runtime.AnimateManager"
require "app.runtime.Audio"
require "app.runtime.EventManager"
require "app.runtime.RuntimeData"
require "app.runtime.NetWork"
require "app.runtime.NetWorkEvent"
|
local MainWindow = class("MainWindow", import(".BaseWindow"))
function MainWindow:ctor(name, params)
MainWindow.super.ctor(self, name, params)
end
function MainWindow:initWindow()
MainWindow.super.initWindow(self)
self:getUIComponent()
end
function MainWindow:getUIComponent()
local window_ = self.window_.transform
self.btnConfirm = window_:NodeByName("@confirm").gameObject
self.imgConfirm = window_:ComponentByName("@confirm", typeof(Image))
local gameObject = window_:NodeByName("GameObject").gameObject
self.imgDisplay = gameObject:ComponentByName("@display", typeof(Image))
local groupBtn = window_:NodeByName("group_btn").gameObject
self.btnGroupBtnConfirm = groupBtn:NodeByName("@confirm").gameObject
self.imgConfirmDisplay = self.btnGroupBtnConfirm:ComponentByName("@display", typeof(Image))
self.btnClose = groupBtn:NodeByName("@close").gameObject
self.imgCloseDisplay = self.btnClose:ComponentByName("@display", typeof(Image))
end
|
--File is using the old RPP map format, thus we add a function for backward compatibility for this file only
local _c=createObject
local function createObject(m,x,y,z,a,b,c,i,d,lod)
local t
if lod then
t=_c(m,x,y,z,a,b,c,true)
else
t=_c(m,x,y,z,a,b,c)
end
if d then
setElementDimension(t,d)
end
if i then
setElementInterior(t,i)
end
return t
end
--CONTROL TOWER INTERIORS (by Exciter)
--Los Santos (custom base)
createObject(2165,1818.90002,-2360.80005,45.6,0,0,179.995,0,0)
createObject(2166,1820.80005,-2359.80005,45.6,0,0,179.995,0,0)
createObject(2166,1817.09998,-2360.80005,45.6,0,0,89.995,0,0)
createObject(1714,1820,-2359.6001,45.6,0,0,0,0,0)
createObject(1714,1818.30005,-2359.69995,45.6,0,0,0,0,0)
createObject(1713,1814.30005,-2357.1001,45.6,0,0,39.996,0,0)
createObject(1747,1816,-2359.8999,46.38,0,0,205.999,0,0)
createObject(2001,1816.5,-2355.1001,45.6,0,0,0,0,0)
createObject(1808,1818.59998,-2355.1001,45.5,0,0,90,0,0)
createObject(1649,1818.19995,-2364.30005,47.2,0,0,179.995,0,0)
createObject(1649,1814.40002,-2362.80005,47.2,0,0,135.995,0,0)
createObject(1649,1812.90002,-2359.1001,47.2,0,0,89.994,0,0)
createObject(1649,1814.5,-2355.6001,47.2,0,0,41.989,0,0)
createObject(1649,1818.09998,-2354.30005,47.2,0,0,1.984,0,0)
createObject(1649,1821.80005,-2362.69995,47.2,0,0,229.995,0,0)
createObject(1649,1823.19995,-2358.8999,47.2,0,0,269.993,0,0)
createObject(1649,1821.59998,-2355.5,47.2,0,0,318.989,0,0)
createObject(1649,1818.19995,-2362.80005,49.5,65,0,179.995,0,0)
createObject(1649,1814.40002,-2359,49.5,65,0,89.989,0,0)
createObject(1649,1818.09998,-2355.80005,49.5,65,0,1.983,0,0)
createObject(1649,1821.69995,-2359,49.5,65,0,269.989,0,0)
createObject(1649,1820.69995,-2361.69995,49.5,65,0,229.993,0,0)
createObject(1649,1815.40002,-2361.69995,49.5,65,0,135.994,0,0)
createObject(1649,1815.5,-2356.80005,49.5,65,0,41.984,0,0)
createObject(1649,1820.59998,-2356.6001,49.5,65,0,318.988,0,0)
createObject(1649,1818.40002,-2359.6001,50.1,90,0,179.995,0,0)
createObject(1649,1818.40002,-2358.30005,50.1,90,0,179.995,0,0)
createObject(1649,1818.39941,-2358.2998,50.1,90,0,179.995,0,0)
createObject(1649,1814.90002,-2359.5,50.1,90,0,179.995,0,0)
createObject(16782,1818,-2359.30005,49.7,0,90,0,0,0)
createObject(2395,1820.5,-2364,45.6,269.989,0,90,0,0)
createObject(2395,1818.59998,-2364,45.6,269.989,0,90,0,0)
createObject(2395,1817.40002,-2362.19995,45.6,269.989,0,136,0,0)
createObject(2395,1816.90002,-2361.69995,45.6,269.989,0,136,0,0)
createObject(2395,1815.40002,-2360.8999,45.6,269.989,0,90,0,0)
createObject(2395,1815.40002,-2360.19995,45.6,269.989,0,89.995,0,0)
createObject(2395,1814.80005,-2358.69995,45.6,269.989,0,41.995,0,0)
createObject(2395,1815.19995,-2358.30005,45.6,269.989,0,41.99,0,0)
createObject(2395,1816.40002,-2356.80005,45.6,269.989,0,1.99,0,0)
createObject(2395,1817.09998,-2356.80005,45.6,269.989,0,1.989,0,0)
createObject(2395,1818.80005,-2356.30005,45.6,269.989,0,317.989,0,0)
createObject(2395,1819.19995,-2356.6001,45.6,269.989,0,317.988,0,0)
createObject(2395,1820.69995,-2357.19995,45.6,269.989,0,267.988,0,0)
createObject(2395,1820.69995,-2357.80005,45.6,269.989,0,267.984,0,0)
createObject(2395,1820.90002,-2359.69995,45.6,269.989,0,229.984,0,0)
createObject(2395,1820.5,-2360.19995,45.6,269.989,0,229.982,0,0)
createObject(2395,1818.09998,-2360.30005,45.6,269.989,0,90,0,0)
createObject(2395,1820.69995,-2360.30005,45.6,269.989,0,90,0,0)
createObject(2395,1819.40002,-2356,45.6,269.989,0,180,0,0)
createObject(9131,1817.30005,-2354.69995,46.6,0,0,359.999,0,0)
createObject(9131,1818,-2354.69995,46.6,0,0,359.995,0,0)
createObject(9131,1818,-2355.3999,46.6,0,0,359.995,0,0)
createObject(9131,1817.30005,-2355.3999,46.6,0,0,359.995,0,0)
createObject(9131,1817.30005,-2354.69995,48.3,0,0,359.995,0,0)
createObject(9131,1817.30005,-2355.3999,48.3,0,0,359.995,0,0)
createObject(9131,1818,-2354.69995,48.3,0,0,359.995,0,0)
createObject(9131,1818,-2355.3999,48.3,0,0,359.995,0,0)
createObject(3051,1817.65991,-2355.80005,46.8,0,0,319,0,0)
--San Fierro
createObject(9819,-1277.30005,51.5,65.4,0,0,232,0,0)
createObject(2395,-1277.09998,54.2,64.9,270,0,140,0,0)
createObject(2395,-1274.30005,51.8,64.9,270,0,139.999,0,0)
createObject(2395,-1272.30005,50.1,64.9,270,0,140,0,0)
createObject(2395,-1270.59998,52.2,64.9,270,0,140,0,0)
createObject(2395,-1273.30005,54.4,64.9,270,0,140,0,0)
createObject(2395,-1276,56.7,64.9,270,0,140,0,0)
createObject(2395,-1269.5,53,64.9,270,0,140,0,0)
createObject(2395,-1277.30005,55.1,64.9,270,0,139.999,0,0)
createObject(2395,-1277.5,53,64.9,270,0,139.999,0,0)
createObject(2395,-1277.19995,51.5,64.9,270,0,139.999,0,0)
createObject(2395,-1275.19995,50,64.9,270,0,139.999,0,0)
createObject(2395,-1273.69995,50,64.9,270,0,139.999,0,0)
createObject(9819,-1277.69995,55.3,65.4,0,0,141.998,0,0)
createObject(8572,-1274,55.5,63.6,0,0,140,0,0)
createObject(2395,-1273.59998,58,64.9,270,0,139.999,0,0)
createObject(2395,-1271.09998,57.8,64.9,270,0,139.999,0,0)
createObject(2395,-1269.30005,56.3,64.9,270,0,139.999,0,0)
createObject(2395,-1270.40002,53.8,61.6,270,0,139.999,0,0)
createObject(1649,-1276.5,49.3,66.5,0,0,140,0,0)
createObject(1649,-1279.40002,51.8,66.5,0,0,139.999,0,0)
createObject(1649,-1279.69995,54.9,66.5,0,0,51.999,0,0)
createObject(1649,-1277.5,57.7,66.5,0,0,51.998,0,0)
createObject(1649,-1274.40002,58,66.5,0,0,321.998,0,0)
createObject(1649,-1273.5,49.7,66.5,0,0,231.999,0,0)
createObject(1649,-1271.59998,52,66.5,0,0,231.998,0,0)
createObject(1649,-1271.59998,55,66.5,0,0,303.998,0,0)
createObject(1649,-1272.69995,54.2,68.9,60,0,303.997,0,0)
createObject(1649,-1275.40002,57.1,68.9,59.996,0,321.997,0,0)
createObject(1649,-1276.5,57.1,68.9,59.991,0,51.994,0,0)
createObject(1649,-1278.69995,54.1,68.9,59.985,0,49.994,0,0)
createObject(1649,-1278.59998,52.8,68.9,59.98,0,139.993,0,0)
createObject(1649,-1275.69995,50.3,68.9,59.974,0,139.988,0,0)
createObject(1649,-1274.5,50.5,68.9,59.974,0,229.988,0,0)
createObject(1649,-1272.5,52.9,68.9,59.969,0,229.982,0,0)
createObject(1649,-1275.90002,53.9,69.7,90,0,321.993,0,0)
createObject(2395,-1272.09998,51.8,61.6,270,0,139.999,0,0)
createObject(2395,-1273.19995,50.5,61.6,270,0,139.999,0,0)
createObject(2395,-1275.90002,52.8,61.6,270,0,139.999,0,0)
createObject(2395,-1274.19995,54.8,61.6,270,0,139.999,0,0)
createObject(2395,-1273.09998,56.1,61.6,270,0,139.999,0,0)
createObject(1649,-1273.19995,49.9,63.2,0,0,229.998,0,0)
createObject(1649,-1276.19995,49.7,63.2,0,0,139.993,0,0)
createObject(1649,-1278.30005,51.4,63.2,0,0,139.988,0,0)
createObject(1649,-1278.59998,54.4,63.2,0,0,49.988,0,0)
createObject(1649,-1277,56.4,63.2,0,0,51.488,0,0)
createObject(1649,-1271.5,51.9,63.2,0,0,229.993,0,0)
createObject(1649,-1271.80005,54.9,63.2,0,0,319.993,0,0)
createObject(2395,-1275.09998,48.2,64.4,90,0,139.999,0,0)
createObject(2395,-1277.90002,50.6,64.4,90,0,139.999,0,0)
createObject(2395,-1278.5,51.1,64.4,90,0,139.999,0,0)
createObject(2395,-1276.80005,53.1,64.4,90,0,139.999,0,0)
createObject(2395,-1274.69995,51.3,64.4,90,0,139.999,0,0)
createObject(2395,-1273.40002,50.2,64.4,90,0,139.999,0,0)
createObject(2395,-1275.5,55.3,64.4,90,0,139.999,0,0)
createObject(2395,-1270.80005,50.7,64.4,90,0,139.999,0,0)
createObject(2395,-1275.40002,55.4,61.8,0,0,320.249,0,0)
createObject(2395,-1276.5,56.3,61.8,0,0,320.246,0,0)
createObject(2395,-1276.5,56.3,59.2,0,0,320.246,0,0)
createObject(2395,-1275.40002,55.4,59.2,0,0,320.246,0,0)
createObject(2395,-1275.30005,55.5,61.8,0,0,140.746,0,0)
createObject(2395,-1273.09998,53.7,61.8,0,0,140.746,0,0)
createObject(2395,-1273.09998,53.7,59.2,0,0,140.746,0,0)
createObject(2395,-1275.30005,55.5,59.1,0,0,140.746,0,0)
createObject(2395,-1272.90002,54.1,61.5,320,0,50.996,0,0)
createObject(2395,-1273.69995,54.8,62.7,319.999,0,50.993,0,0)
createObject(3051,-1275.59998,55.6,62.6,0,0,276,0,0)
createObject(3051,-1275.19995,55.2,62.6,0,0,276.999,0,0)
--Las Venturas
createObject(1649,1295.9000244141,1580.5,44,0,0,270,0,0)
createObject(1649,1295.9000244141,1578.1999511719,44,0,0,269.99450683594,0,0)
createObject(1649,1293.6999511719,1576,44,0,0,180,0,0)
createObject(1649,1291.4000244141,1576,44,0,0,179.99450683594,0,0)
createObject(1649,1289.1999511719,1578.1999511719,44,0,0,90,0,0)
createObject(1649,1289.1999511719,1580.5,44,0,0,90,0,0)
createObject(1649,1291.4000244141,1582.6999511719,44,0,0,0,0,0)
createObject(1649,1293.6999511719,1582.6999511719,44,0,0,0,0,0)
createObject(1649,1294.5999755859,1580.6999511719,45.5,90,0,270,0,0)
createObject(1649,1294.5999755859,1578,45.599998474121,90,0,270,0,0)
createObject(1649,1291.4000244141,1578,45.599998474121,90,0,270,0,0)
createObject(1649,1290.4000244141,1578,45.700000762939,90,0,270,0,0)
createObject(1649,1290.4000244141,1580.8000488281,45.599998474121,90,0,270,0,0)
createObject(1649,1291.4000244141,1580.8000488281,45.5,90,0,270,0,0)
createObject(9131,1289.5999755859,1582.3000488281,43.5,0,0,0,0,0)
createObject(9131,1289.5999755859,1581.5999755859,43.5,0,0,0,0,0)
createObject(9131,1290.3000488281,1581.5999755859,43.5,0,0,0,0,0)
createObject(9131,1290.3000488281,1582.3000488281,43.5,0,0,0,0,0)
createObject(9131,1289.5999755859,1582.3000488281,44.5,0,0,0,0,0)
createObject(9131,1289.5999755859,1581.5999755859,44.5,0,0,0,0,0)
createObject(9131,1290.3000488281,1582.3000488281,44.5,0,0,0,0,0)
createObject(9131,1290.3000488281,1581.5999755859,44.5,0,0,0,0,0)
createObject(3051,1290,1581.1999511719,43.700000762939,0,0,318,0,0)
|
--- This module provides connector to ETCD
local M = {}
local uri = require 'net.url'
local fiber = require 'fiber'
local fun = require 'fun'
local log = require 'log'
local json = require 'json'
local base64 = {
encode = require 'digest'.base64_encode,
decode = require 'digest'.base64_decode,
}
local http = require 'http.client'
local clock = require 'clock'
local function deepmerge(t1, t2, seen)
seen = seen or {}
if type(t2) ~= 'table' or type(t1) ~= 'table' then
return t2 or t1
end
if seen[t2] then
return seen[t2]
elseif seen[t1] then
return seen[t1]
end
local r = {}
-- from this point t1 and t2 are both tables
seen[t1] = r
seen[t2] = r
-- and we have saw them
for k2, v2 in pairs(t2) do
if type(t1[k2]) == 'table' then
r[k2] = deepmerge(t1[k2], v2, seen)
else
r[k2] = v2
end
end
for k1, v1 in pairs(t1) do if r[k1] == nil then r[k1] = v1 end end
return r, seen
end
local function trace(...)
log.verbose(...)
end
local function __assert(cond, err, ...)
if not cond then
error(err, 2)
end
return cond, err, ...
end
--- Instances ETCD object
-- @tparam table cfg configuration of ETCD
-- @treturn ETCD new etcd object
function M.new(cfg)
assert(cfg ~= M, "Usage: etcd.new({...}) not etcd:new({...})")
assert(type(cfg.endpoints) == 'table', ".endpoints are required to be table")
local self = setmetatable({
prefix = cfg.prefix or "/",
endpoints = {},
__peers = cfg.endpoints,
timeout = tonumber(cfg.timeout) or 1,
http_params = cfg.http_params,
boolean_auto = cfg.boolean_auto,
integer_auto = cfg.integer_auto,
}, { __index = M })
self.http_params = self.http_params or { timeout = self.timeout }
self.client = setmetatable({
options = cfg.http_params or { timeout = self.timeout },
headers = {
authorization = cfg.login and ("Basic %s"):format(base64.encode(("%s:%s"):format(cfg.login and cfg.password or "")))
}
}, { __index = http })
if cfg.autoconnect then
self:connect()
end
return self
end
--- ETCD node.
-- @table etcdNode
-- @tfield[optional] string key key of the node
-- @tfield[optional] boolean dir is this node a directory
-- @tfield[optional] string value This is value of the node.
-- @tfield[optional] number ttl TTL of the node in seconds.
-- @tfield[optional] string expiration date of expiration in the following format: '2019-11-06T10:04:02.215117744Z'
-- @tfield number createdIndex This specific index reflects the point in the etcd state member at which a given key was created.
-- @tfield number modifiedIndex Actions that cause the value to change include set, delete, update, create, compareAndSwap and compareAndDelete.
-- @tfield[optional] Array(etcdNode) nodes keeps children nodes.
--- ETCD table
-- @table ETCD
-- @field action
-- @tfield etcdNode node
---
--
function M:_endpoint(opts)
opts = opts or {}
if not opts.leader then
return self.endpoints[math.random(#self.endpoints)]
end
return self.leader
end
--- Performs general request to ETCD.
-- @param method http method.
-- @param path url path.
-- @param query url query (it is better to transmit a table).
-- @param options options of http request such as timeout and others. They will be directly forwarded to http client.
-- @return[1] false if request failed.
-- @return[1] error string error or table error (if succeeded to decode).
-- @return[1] headers table of headers (may be nil).
-- @return[2] body decoded response body (almost always a table).
-- @return[2] headers headers of http response.
function M:request(method, path, query, options, with_discovery)
if with_discovery then
self:discovery()
end
local endpoint = self:_endpoint(options)
local url = uri.parse(endpoint .. "/" .. path)
url:setQuery(deepmerge(url.query, query))
url:normalize()
local s = clock.time()
local r, err = self.client.request(method, tostring(url), "", deepmerge(self.client, options))
trace("%s %s => %s:%s (%.4f)", method, url, r and r.status, r and r.reason, clock.time() - s)
if not r then
return false, err or "Unexpected HTTP error", r
end
if not r.headers or r.status >= 500 then
r.headers = {}
if not with_discovery then
return self:request(method, path, query, options, true)
end
end
local body
if r.body and r.headers["content-type"] and r.headers["content-type"]:match("^application/json") then
local ok, data = pcall(json.decode, r.body)
if not ok then
return false, data, r
end
body = data
end
body = body or ("%s:%s: %s"):format(r.status, r.reason, r.body)
if r.status >= 500 then
return false, body, r
end
return body, r
end
function M:_raw_request(endpoint, path)
local url = uri.parse(("%s/%s"):format(endpoint, path))
url:normalize()
local s = clock.time()
local res = self.client.request("GET", tostring(url), "", self.client)
trace("GET %s => %s:%s (%.4f)", tostring(url), res.status, res.reason, clock.time() - s)
local ok, data = pcall(json.decode, res.body)
if not ok then
trace("%s: JSON decode of '%s' failed with: %s", url, res.body, data)
data = nil
end
return res.status, data, res.headers or {}
end
---
-- Discovers ClientURls from ETCD (updates self.endpoints)
function M:discovery()
local endpoints = {}
local leaders = {}
local peers = {}
for _, p in ipairs(self.__peers) do
peers[p] = true
end
for _, p in ipairs(self.endpoints) do
peers[p] = true
end
for endpoint in pairs(peers) do
local status, body = self:_raw_request(endpoint, "/v2/members")
if status ~= 200 or type(body) ~= 'table' then return end
for _, member in pairs(body.members) do
for _, u in pairs(member.clientURLs) do
if not endpoints[u] then
table.insert(endpoints, u)
endpoints[u] = #endpoints
end
end
end
end
local function leader_discovery(endpoint)
local status, body = self:_raw_request(endpoint, "/v2/members/leader")
if status ~= 200 or type(body) ~= 'table' then return end
local leader = body.clientURLs[1]:gsub("/*$", "")
leaders[leader] = (leaders[leader] or 0) + 1
end
local fs = {}
for endpoint in pairs(endpoints) do
local f = fiber.new(leader_discovery, endpoint)
f:set_joinable(true)
fs[#fs+1] = f
end
for _, f in ipairs(fs) do f:join() end
if fun.length(leaders) == 1 then
self.leader = next(leaders)
elseif fun.length(leaders) > 1 then
local total = fun.iter(leaders):map(function(_,v) return v end):sum()
local leader_candidate = fun.iter(leaders):max_by(function(_,v) return v end)
if leaders[leader_candidate] >= math.ceil((total+1)/2) then
self.leader = leader_candidate
else
error(("Can't choose leader from: %s. ETCD is in split brain"):format(
table.concat(fun.totable(leaders)",")), 0)
end
end
assert(self.leader, "No leader found")
trace("Choosing leader: %s", self.leader)
assert(#endpoints > 0, "No endpoints discovered")
self.endpoints = { unpack(endpoints) }
return self.endpoints
end
--- Connects to the ETCD cluster discovering all peers.
function M:connect()
self:discovery()
trace("Got endpoints: %s", table.concat(self.endpoints, ","))
end
--- Converts ETCD response to Lua table
-- @param root ETCD tree
-- @param prefix a prefix of the call
-- @param[optional] keys_only boolean flag forces to return only keys if true.
-- @param[optional] flatten boolean flag forces to return flat structure instead of subtree.
-- @usage unpacked = etcd:unpack(etcd:get("/some/prefix", { recursive = true }, { raw = true }), "/some/prefix")
-- @return unpacked lua table
function M:unpack(root, prefix, keys_only, flatten)
local r = {}
local flat = {}
local stack = { root }
repeat
local node = table.remove(stack)
if node.key then
if self.integer_auto then
if tostring(tonumber(node.key)) == node.key then
node.key = tonumber(node.key)
end
end
if node.dir then
flat[node.key] = {}
elseif keys_only then
flat[node.key] = true
else
if self.boolean_auto then
if node.value == "true" then
node.value = true
elseif node.value == "false" then
node.value = false
end
end
if self.integer_auto then
if tostring(tonumber(node.value)) == node.value then
node.value = tonumber(node.value)
end
end
flat[node.key] = node.value
end
end
if node.nodes then
for i = 1, #node.nodes do
table.insert(stack, node.nodes[i])
end
end
until #stack == 0
if flatten then
return flat
end
r[prefix:sub(#"/"+1)] = flat[prefix]
for key, value in pairs(flat) do
local cur = r
local len = 0
for chunk in key:gmatch("([^/]+)/") do
cur[chunk] = cur[chunk] or {}
cur = cur[chunk]
len = len + #"/" + #chunk
end
local tail = key:sub(#"/" + len + 1)
if keys_only then
table.insert(cur, tail)
elseif cur[tail] == nil then
cur[tail] = value
end
end
local sub = r
for chunk in prefix:gmatch("([^/]+)") do
sub = sub[chunk]
end
return sub
end
function M:_path(path)
return (("%s/%s"):format(self.prefix, path):gsub("/+", "/"):gsub("/$", ""))
end
--- Gets subtree from ETCD.
-- @param path path of subtree
-- @param flags flags of the request.
-- @param options options of request.
-- @return subtree from ETCD
function M:get(path, flags, options)
options = options or {}
flags = flags or {}
path = self:_path(path)
local res, hdrs = __assert(self:request("GET", "/v2/keys"..path, flags, options))
if options.raw then
return res
end
if hdrs.status == 404 then
return nil
end
return self:unpack(res.node, path)
end
--- Returns whole subtree from ETCD
-- @param path path to subtree
-- @param options options of request.
-- @return subtree from ETCD
function M:getr(path, flags, options)
return self:get(path, deepmerge(flags, { recursive = true }), options)
end
--- Returns listing of keys from subtree
-- @param path path to subtree
-- @param flags ls flags
-- @param options options of http
-- @return listing
function M:ls(path, flags, options)
flags = flags or {}
options = options or {}
local res = self:get(path, flags, deepmerge(options, { raw = true }))
if options.raw then
return res
end
return self:unpack(res.node, path, true)
end
--- Returns recursive listing of subtree
-- @param path path to subtree
-- @param options options of http
-- @return listing
function M:lsr(path, options)
return self:ls(path, { recursive = true }, options)
end
--- Waits for changes of given path in ETCD
-- @param path of subtree
-- @param timeout in seconds
-- @return etcd node
function M:wait(path, timeout)
return __assert(self:request("GET", "/v2/keys"..self:_path(path), { wait = true }, { timeout = timeout }))
end
--- Provides 'mkdir -p' mechanism.
-- @param path path to the directory. All parent directories will be created if not exist.
-- @param[optional] options options of http request
-- @return etcd API response
function M:mkdir(path, options)
return __assert(self:request("PUT", "/v2/keys"..self:_path(path), { dir = true }, options))
end
--- Provides 'rmdir' mechanism.
-- @param path path ro the directory to delete.
-- @param[optional] options options of http request
-- @return etcd API response
function M:rmdir(path, options)
return __assert(self:request("DELETE", "/v2/keys"..self:_path(path), { dir = true }, options))
end
--- Provides 'rm' mechanism.
-- @param path path to the resource to delete.
-- @tparam[optional] rmFlags flags of command.
-- @param[optional] options options of http request.
-- @return etcd API response
function M:rm(path, flags, options)
flags = flags or {}
return __assert(self:request("DELETE", "/v2/keys"..self:_path(path), flags, options))
end
function M:rmrf(path, options)
assert(path, "path is required")
options = options or {}
return __assert(self:request("DELETE", "/v2/keys"..self:_path(path), { recursive = true, force = true }, options))
end
--- Sets value by path into ETCD.
-- @param path path to the key
-- @param value value of the key
-- @param path_options options of the path
-- @param options options of http request
-- @return etcd API response
function M:set(path, value, path_options, options)
return __assert(self:request("PUT", "/v2/keys"..self:_path(path), deepmerge(path_options, { value = value }), options))
end
--- Fills up the ETCD config.
-- PUTs structure key be key using CaS prevExists = false denying clearing previous value.
-- @param path path to subtree
-- @param subtree lua table describes subtree
-- @param options options of the request
-- @return etcd API response
function M:fill(path, subtree, options)
path = path:gsub("/+$", "/")
options = options or {}
local flat = {}
local stack = { subtree }
local map = { [subtree] = path }
repeat
local node = table.remove(stack)
for key, sub in pairs(node) do
local fullpath = map[node] .. "/" .. key
if map[sub] then
error(("Caught recursive subtree. Key '%s' can be reached via '%s'"):format(map[sub], fullpath), 2)
end
if type(sub) == 'table' then
map[sub] = fullpath
table.insert(stack, sub)
else
flat[fullpath] = tostring(sub)
end
end
until #stack == 0
local rawlist = self:get(path, { recursive = true }, { raw = true }).node
local current
if rawlist then -- can be nil ;)
current = self:unpack(rawlist, path, false, true)
end
for newkey, newvalue in pairs(flat) do
local body, headers = self:request("PUT", "/v2/keys/" .. newkey, { prevExists = false, value = newvalue }, options)
if headers.status ~= 201 then
error(body, 2)
end
end
return current
end
return M
|
local M = {}
require 'globals'
setmetatable(M, {
__index = function(self, k)
local mt = getmetatable(self)
if mt[k] then
return mt[k]
end
local ok, x = pcall(RELOAD, 'utils.' .. k)
if not ok then
error('Missing utils module ' .. k .. ' Error: ' .. x)
x = nil
end
return x
end,
})
return M
|
object_draft_schematic_dance_prop_prop_double_ribbon_spark_r_s02 = object_draft_schematic_dance_prop_shared_prop_double_ribbon_spark_r_s02:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_dance_prop_prop_double_ribbon_spark_r_s02, "object/draft_schematic/dance_prop/prop_double_ribbon_spark_r_s02.iff")
|
local level = BaseLevel:extend({ txlimit = 3136 })
function level:constructor (fromPipe)
self:load('level1map.lua', {146/255,144/255,1}, fromPipe or false)
Sounds.mainTheme:play()
end
return level
|
--- @class unknown @ unknown type
--- The player abandons a skill.
--- [https://wowpedia.fandom.com/wiki/API_AbandonSkill]
--- @param skillLineID number @ The Skill Line ID (can be found with API GetProfessionInfo())
--- @return void
function AbandonSkill(skillLineID)
end
--- Acccept the area Spirit Healer's resurrection in battlegrounds.
--- [https://wowpedia.fandom.com/wiki/API_AcceptAreaSpiritHeal]
--- @return void
function AcceptAreaSpiritHeal()
end
--- Confirms entry into a Battleground you are queued for that is ready.
--- [https://wowpedia.fandom.com/wiki/API_AcceptBattlefieldPort]
--- @param index number @ The battlefield in queue to enter.
--- @param accept boolean @ Whether or not to accept entry to the battlefield.
--- @return void
function AcceptBattlefieldPort(index, accept)
end
--- Accept the challenge to a duel.
--- [https://wowpedia.fandom.com/wiki/API_AcceptDuel]
--- @return void
function AcceptDuel()
end
--- Accept the invitation to a group.
--- [https://wowpedia.fandom.com/wiki/API_AcceptGroup]
--- @return void
function AcceptGroup()
end
--- Accepts a guild invitation.
--- [https://wowpedia.fandom.com/wiki/API_AcceptGuild]
--- @return void
function AcceptGuild()
end
--- Accepts a group invite by the Looking for Dungeon system.
--- [https://wowpedia.fandom.com/wiki/API_AcceptProposal]
--- @return void
function AcceptProposal()
end
--- Accepts the currently offered quest.
--- [https://wowpedia.fandom.com/wiki/API_AcceptQuest]
--- @return void
function AcceptQuest()
end
--- Accepts a resurrection, returning the character to life.
--- [https://wowpedia.fandom.com/wiki/API_AcceptResurrect]
--- @return void
function AcceptResurrect()
end
--- Confirms insertion of new gems into the item currently being socketed.
--- [https://wowpedia.fandom.com/wiki/API_AcceptSockets]
--- @return void
function AcceptSockets()
end
--- Confirms a spell confirmation prompt (e.g. bonus loot roll).
--- [https://wowpedia.fandom.com/wiki/API_AcceptSpellConfirmationPrompt]
--- @param spellID number @ spell ID of the prompt to confirm.
--- @return void
function AcceptSpellConfirmationPrompt(spellID)
end
--- Accept a pending trade.
--- [https://wowpedia.fandom.com/wiki/API_AcceptTrade]
--- @return void
function AcceptTrade()
end
--- Accept the resurrection sickness and durability loss when being resurrected by the spirit healer instead of returning to a corpse.
--- [https://wowpedia.fandom.com/wiki/API_AcceptXPLoss]
--- @return void
function AcceptXPLoss()
end
--- Acknowledges that the currently-offered auto-accept quest has been accepted by the player.
--- [https://wowpedia.fandom.com/wiki/API_AcknowledgeAutoAcceptQuest]
--- @return void
function AcknowledgeAutoAcceptQuest()
end
--- [https://wowpedia.fandom.com/wiki/API_AcknowledgeSurvey?action=edit&redlink=1]
--- @return void
function AcknowledgeSurvey()
end
--- [https://wowpedia.fandom.com/wiki/API_ActionBindsItem?action=edit&redlink=1]
--- @return void
function ActionBindsItem()
end
--- Returns true if the action has a numeric range requirement.
--- [https://wowpedia.fandom.com/wiki/API_ActionHasRange]
--- @param slotID number @ The slot ID to test.
--- @return boolean @ hasRange
function ActionHasRange(slotID)
end
--- Adds a popup notification to the objectives tracker, showing that a quest is available or completed.
--- [https://wowpedia.fandom.com/wiki/API_AddAutoQuestPopUp]
--- @param questID number @ the quest id
--- @param type string @ popup type, one of OFFER or COMPLETE
--- @return void
function AddAutoQuestPopUp(questID, type)
end
--- Makes messages from a specified chat channel output in a specific chat frame.
--- [https://wowpedia.fandom.com/wiki/API_AddChatWindowChannel]
--- @param windowId number @ index of the chat window/frame (ascending from 1) to add the channel to.
--- @param channelName string @ name of the chat channel to add to the frame.
--- @return void
function AddChatWindowChannel(windowId, channelName)
end
--- Sets a chat frame to receive and show messages of the given message group.
--- [https://wowpedia.fandom.com/wiki/API_AddChatWindowMessages]
--- @param index number @ The chat window index, ascending from 1.
--- @param messageGroup string @ Message group to add to the chat window, e.g. SAY, EMOTE, MONSTER_BOSS_EMOTE.
--- @return void
function AddChatWindowMessages(index, messageGroup)
end
--- Marks an achievement for tracking in the WatchFrame.
--- [https://wowpedia.fandom.com/wiki/API_AddTrackedAchievement]
--- @param achievementID number @ ID of the achievement to add to tracking.
--- @return void
function AddTrackedAchievement(achievementID)
end
--- Adds money currently on the cursor to your trade offer.
--- [https://wowpedia.fandom.com/wiki/API_AddTradeMoney]
--- @return void
function AddTradeMoney()
end
--- Returns a version of a character-realm string suitable for use in a given context.
--- [https://wowpedia.fandom.com/wiki/API_Ambiguate]
--- @param fullName string @ character-realm for a character, e.g. Shion-DieAldor
--- @param context string @ context the name will be used in, one of: all, guild, mail, none, or short.
--- @return string @ name
function Ambiguate(fullName, context)
end
--- [https://wowpedia.fandom.com/wiki/API_AntiAliasingSupported?action=edit&redlink=1]
--- @return void
function AntiAliasingSupported()
end
--- Purchases currently selected customizations from the barber shop.
--- [https://wowpedia.fandom.com/wiki/API_ApplyBarberShopStyle]
--- @return void
function ApplyBarberShopStyle()
end
--- [https://wowpedia.fandom.com/wiki/API_ArchaeologyGetIconInfo?action=edit&redlink=1]
--- @return void
function ArchaeologyGetIconInfo()
end
--- Returns how many digsites are in a zone like Azsuna or Elwynn Forest.
--- [https://wowpedia.fandom.com/wiki/API_ArchaeologyMapUpdateAll]
--- @param uiMapID number @ UiMapID
--- @return number @ numSites
function ArchaeologyMapUpdateAll(uiMapID)
end
--- [https://wowpedia.fandom.com/wiki/API_ArcheologyGetVisibleBlobID?action=edit&redlink=1]
--- @return void
function ArcheologyGetVisibleBlobID()
end
--- Returns whether account-wide achievements are hidden from other players.
--- [https://wowpedia.fandom.com/wiki/API_AreAccountAchievementsHidden]
--- @return boolean @ hidden
function AreAccountAchievementsHidden()
end
--- [https://wowpedia.fandom.com/wiki/API_AreDangerousScriptsAllowed?action=edit&redlink=1]
--- @return void
function AreDangerousScriptsAllowed()
end
--- [https://wowpedia.fandom.com/wiki/API_AreTalentsLocked?action=edit&redlink=1]
--- @return void
function AreTalentsLocked()
end
--- This doesn't appear to affect the actual jump at all and is used as a way for users to get when the jump key was released.
--- [https://wowpedia.fandom.com/wiki/API_AscendStop]
--- @return void
function AscendStop()
end
--- Assists the specified unit, setting the player's target to theirs.
--- [https://wowpedia.fandom.com/wiki/API_AssistUnit]
--- @param unit string @ unit to assist.
--- @return void
function AssistUnit(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_AttachGlyphToSpell?action=edit&redlink=1]
--- @return void
function AttachGlyphToSpell()
end
--- Toggles auto-attacking of the player's current target.
--- [https://wowpedia.fandom.com/wiki/API_AttackTarget]
--- @return void
function AttackTarget()
end
--- [https://wowpedia.fandom.com/wiki/API_AutoChooseCurrentGraphicsSetting?action=edit&redlink=1]
--- @return void
function AutoChooseCurrentGraphicsSetting()
end
--- Automatically equips the item currently held on the cursor.
--- [https://wowpedia.fandom.com/wiki/API_AutoEquipCursorItem]
--- @return void
function AutoEquipCursorItem()
end
--- [https://wowpedia.fandom.com/wiki/API_AutoLootMailItem?action=edit&redlink=1]
--- @return void
function AutoLootMailItem()
end
--- Allows you to withdraw an item and automatically store it in your inventory.
--- [https://wowpedia.fandom.com/wiki/API_AutoStoreGuildBankItem]
--- @param tab number @ The index of the tab in the guild bank
--- @param slot number @ The index of the slot in the chosen tab.
--- @return void
function AutoStoreGuildBankItem(tab, slot)
end
--- [https://wowpedia.fandom.com/wiki/API_BNAcceptFriendInvite?action=edit&redlink=1]
--- @return void
function BNAcceptFriendInvite()
end
--- [https://wowpedia.fandom.com/wiki/API_BNCheckBattleTagInviteToGuildMember?action=edit&redlink=1]
--- @return void
function BNCheckBattleTagInviteToGuildMember()
end
--- [https://wowpedia.fandom.com/wiki/API_BNCheckBattleTagInviteToUnit?action=edit&redlink=1]
--- @return void
function BNCheckBattleTagInviteToUnit()
end
--- Returns info whether the WoW Client is connected to the Battle.net.
--- [https://wowpedia.fandom.com/wiki/API_BNConnected]
--- @return boolean @ connected
function BNConnected()
end
--- [https://wowpedia.fandom.com/wiki/API_BNDeclineFriendInvite?action=edit&redlink=1]
--- @return void
function BNDeclineFriendInvite()
end
--- [https://wowpedia.fandom.com/wiki/API_BNFeaturesEnabled?action=edit&redlink=1]
--- @return void
function BNFeaturesEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_BNFeaturesEnabledAndConnected?action=edit&redlink=1]
--- @return void
function BNFeaturesEnabledAndConnected()
end
--- [https://wowpedia.fandom.com/wiki/API_BNGetBlockedInfo?action=edit&redlink=1]
--- @return void
function BNGetBlockedInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_BNGetDisplayName?action=edit&redlink=1]
--- @return void
function BNGetDisplayName()
end
--- Returns information about the specified friend of a RealID friend
--- [https://wowpedia.fandom.com/wiki/API_BNGetFOFInfo]
--- @param mutual boolean @ Should the list include mutual friends (I.e. people who you and the person referenced by presenceID are both friends with).
--- @param nonMutual boolean @ Should the list include non-mutual friends.
--- @param index number @ The index of the entry in the list to retrieve (1 to BNGetNumFOF(...))
--- @return number, string, boolean @ friendID, accountName, isMutual
function BNGetFOFInfo(mutual, nonMutual, index)
end
--- Returns the index in the friend frame of the given Battle.net friend.
--- [https://wowpedia.fandom.com/wiki/API_BNGetFriendIndex]
--- @param presenceID number @ A unique numeric identifier for the friend's battle.net account during this session.
--- @return number @ index
function BNGetFriendIndex(presenceID)
end
--- Returns information about a Battle.net friend invite.
--- [https://wowpedia.fandom.com/wiki/API_BNGetFriendInviteInfo]
--- @param inviteIndex number @ Ranging from 1 to BNGetNumFriendInvites()
--- @return number, number, boolean, unknown, number @ inviteID, accountName, isBattleTag, unknown, sentTime
function BNGetFriendInviteInfo(inviteIndex)
end
--- Returns information about the player
--- [https://wowpedia.fandom.com/wiki/API_BNGetInfo]
--- @return number, string, number, string, boolean, boolean, boolean @ presenceID, battleTag, toonID, currentBroadcast, bnetAFK, bnetDND, isRIDEnabled
function BNGetInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_BNGetNumBlocked?action=edit&redlink=1]
--- @return void
function BNGetNumBlocked()
end
--- [https://wowpedia.fandom.com/wiki/API_BNGetNumFOF?action=edit&redlink=1]
--- @return void
function BNGetNumFOF()
end
--- [https://wowpedia.fandom.com/wiki/API_BNGetNumFriendInvites?action=edit&redlink=1]
--- @return void
function BNGetNumFriendInvites()
end
--- Returns info about how much Battle.net friends are added to the friendslist and how much of them are currently online.
--- [https://wowpedia.fandom.com/wiki/API_BNGetNumFriends]
--- @return number, number, number, number @ numBNetTotal, numBNetOnline, numBNetFavorite, numBNetFavoriteOnline
function BNGetNumFriends()
end
--- [https://wowpedia.fandom.com/wiki/API_BNGetSelectedBlock?action=edit&redlink=1]
--- @return void
function BNGetSelectedBlock()
end
--- [https://wowpedia.fandom.com/wiki/API_BNGetSelectedFriend?action=edit&redlink=1]
--- @return void
function BNGetSelectedFriend()
end
--- [https://wowpedia.fandom.com/wiki/API_BNInviteFriend?action=edit&redlink=1]
--- @return void
function BNInviteFriend()
end
--- [https://wowpedia.fandom.com/wiki/API_BNIsBlocked?action=edit&redlink=1]
--- @return void
function BNIsBlocked()
end
--- [https://wowpedia.fandom.com/wiki/API_BNIsFriend?action=edit&redlink=1]
--- @return void
function BNIsFriend()
end
--- [https://wowpedia.fandom.com/wiki/API_BNIsSelf?action=edit&redlink=1]
--- @return void
function BNIsSelf()
end
--- [https://wowpedia.fandom.com/wiki/API_BNRemoveFriend?action=edit&redlink=1]
--- @return void
function BNRemoveFriend()
end
--- [https://wowpedia.fandom.com/wiki/API_BNRequestFOFInfo?action=edit&redlink=1]
--- @return void
function BNRequestFOFInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_BNRequestInviteFriend?action=edit&redlink=1]
--- @return void
function BNRequestInviteFriend()
end
--- [https://wowpedia.fandom.com/wiki/API_BNSendFriendInvite?action=edit&redlink=1]
--- @return void
function BNSendFriendInvite()
end
--- [https://wowpedia.fandom.com/wiki/API_BNSendFriendInviteByID?action=edit&redlink=1]
--- @return void
function BNSendFriendInviteByID()
end
--- BNSendGameData is the battle.net chat-equivalent of SendAddonMessage().
--- [https://wowpedia.fandom.com/wiki/API_BNSendGameData]
--- @param presenceID number @ A unique numeric identifier for the friend during this session. -- get it with BNGetFriendInfo()
--- @param addonPrefix string @ <=16 bytes, cannot include a colon
--- @param message string @ <=4078 bytes
--- @return void
function BNSendGameData(presenceID, addonPrefix, message)
end
--- [https://wowpedia.fandom.com/wiki/API_BNSendSoR?action=edit&redlink=1]
--- @return void
function BNSendSoR()
end
--- [https://wowpedia.fandom.com/wiki/API_BNSendVerifiedBattleTagInvite?action=edit&redlink=1]
--- @return void
function BNSendVerifiedBattleTagInvite()
end
--- Sends a whisper to Battle.net friends.
--- [https://wowpedia.fandom.com/wiki/API_BNSendWhisper]
--- @param bnetAccountID number @ A unique numeric identifier for the friend during this session. You can get bnetAccountID from C_BattleNet.GetFriendAccountInfo()
--- @param message string @ Message text. Must be less than 4096 bytes.
--- @return void
function BNSendWhisper(bnetAccountID, message)
end
--- Set or unset afk status
--- [https://wowpedia.fandom.com/wiki/API_BNSetAFK]
--- @param bool boolean @ true set your battle.net status to afk and false unset it.
--- @return void
function BNSetAFK(bool)
end
--- [https://wowpedia.fandom.com/wiki/API_BNSetBlocked?action=edit&redlink=1]
--- @return void
function BNSetBlocked()
end
--- Sends a broadcast message to your Real ID friends.
--- [https://wowpedia.fandom.com/wiki/API_BNSetCustomMessage]
--- @param text string @ message to be broadcasted (max 127 chars)
--- @return void
function BNSetCustomMessage(text)
end
--- Set or unset DND status
--- [https://wowpedia.fandom.com/wiki/API_BNSetDND]
--- @param bool boolean @ true set your battle.net status to dnd and false unset it.
--- @return void
function BNSetDND(bool)
end
--- Sets a battle.net friend as favorite.
--- [https://wowpedia.fandom.com/wiki/API_BNSetFriendFavoriteFlag]
--- @param id number @ account Id
--- @param isFavorite boolean
--- @return void
function BNSetFriendFavoriteFlag(id, isFavorite)
end
--- Sets the Friend Note for a specific Battle.Net friend.
--- [https://wowpedia.fandom.com/wiki/API_BNSetFriendNote]
--- @param bnetIDAccount number @ A unique numeric identifier for the friend's battle.net account during this session.
--- @param noteText string @ The text you wish to set as the battle.net friend's new note.
--- @return void
function BNSetFriendNote(bnetIDAccount, noteText)
end
--- [https://wowpedia.fandom.com/wiki/API_BNSetSelectedBlock?action=edit&redlink=1]
--- @return void
function BNSetSelectedBlock()
end
--- [https://wowpedia.fandom.com/wiki/API_BNSetSelectedFriend?action=edit&redlink=1]
--- @return void
function BNSetSelectedFriend()
end
--- [https://wowpedia.fandom.com/wiki/API_BNSummonFriendByIndex?action=edit&redlink=1]
--- @return void
function BNSummonFriendByIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_BNTokenFindName?action=edit&redlink=1]
--- @return void
function BNTokenFindName()
end
--- Map a bank item button or bag to an inventory slot button for use in inventory functions.
--- [https://wowpedia.fandom.com/wiki/API_BankButtonIDToInvSlotID]
--- @param buttonID number @ bank item/bag ID.
--- @param isBag unknown @ 1 if buttonID is a bag, nil otherwise. Same result as ContainerIDToInventoryID, except this one only works for bank bags and is more awkward to use.
--- @return unknown @ invSlot
function BankButtonIDToInvSlotID(buttonID, isBag)
end
--- Resets all customization categories to original styles.
--- [https://wowpedia.fandom.com/wiki/API_BarberShopReset]
--- @return void
function BarberShopReset()
end
--- [https://wowpedia.fandom.com/wiki/API_BattlefieldMgrEntryInviteResponse?action=edit&redlink=1]
--- @return void
function BattlefieldMgrEntryInviteResponse()
end
--- [https://wowpedia.fandom.com/wiki/API_BattlefieldMgrExitRequest?action=edit&redlink=1]
--- @return void
function BattlefieldMgrExitRequest()
end
--- [https://wowpedia.fandom.com/wiki/API_BattlefieldMgrQueueInviteResponse?action=edit&redlink=1]
--- @return void
function BattlefieldMgrQueueInviteResponse()
end
--- [https://wowpedia.fandom.com/wiki/API_BattlefieldMgrQueueRequest?action=edit&redlink=1]
--- @return void
function BattlefieldMgrQueueRequest()
end
--- [https://wowpedia.fandom.com/wiki/API_BattlefieldSetPendingReportTarget?action=edit&redlink=1]
--- @return void
function BattlefieldSetPendingReportTarget()
end
--- Accepts an offer to start trading with another player.
--- [https://wowpedia.fandom.com/wiki/API_BeginTrade]
--- @return void
function BeginTrade()
end
--- Accepts the confirmation to bind an item by enchanting it, and proceeds with applying the enchantment.
--- [https://wowpedia.fandom.com/wiki/API_BindEnchant]
--- @return void
function BindEnchant()
end
--- Breaks up large numbers (>=1000), or shortens lengthy decimal values (<1000), into a localized string.
--- [https://wowpedia.fandom.com/wiki/API_BreakUpLargeNumbers]
--- @param value number @ The number to convert into a localized string
--- @return string @ valueString
function BreakUpLargeNumbers(value)
end
--- [https://wowpedia.fandom.com/wiki/API_BuyGuildBankTab?action=edit&redlink=1]
--- @return void
function BuyGuildBankTab()
end
--- Purchase a Guild Charter.
--- [https://wowpedia.fandom.com/wiki/API_BuyGuildCharter]
--- @param guildName string @ Name of the guild you wish to purchase a guild charter for.
--- @return void
function BuyGuildCharter(guildName)
end
--- Buys the specified item.
--- [https://wowpedia.fandom.com/wiki/API_BuyMerchantItem]
--- @param index number @ The index of the item in the merchant's inventory
--- @param quantity number @ ?Optional. Could be nil. - Quantity to buy.
--- @return void
function BuyMerchantItem(index, quantity)
end
--- [https://wowpedia.fandom.com/wiki/API_BuyReagentBank?action=edit&redlink=1]
--- @return void
function BuyReagentBank()
end
--- Buys a service available at the current trainer.
--- [https://wowpedia.fandom.com/wiki/API_BuyTrainerService]
--- @param index number @ The index of the service to train.
--- @return void
function BuyTrainerService(index)
end
--- Buyback an item from a merchant if you have the merchant window open.
--- [https://wowpedia.fandom.com/wiki/API_BuybackItem]
--- @param slot number @ the slot from topleft to bottomright of the Merchant Buyback window.
--- @return void
function BuybackItem(slot)
end
--- [https://wowpedia.fandom.com/wiki/API_CalculateStringEditDistance?action=edit&redlink=1]
--- @return void
function CalculateStringEditDistance()
end
--- Summons the specified companion.
--- [https://wowpedia.fandom.com/wiki/API_CallCompanion]
--- @param type string @ The type of companion to summon or dismiss: CRITTER or MOUNT.
--- @param id number @ The companion index to summon or dismiss, ascending from 1.
--- @return void
function CallCompanion(type, id)
end
--- Begin Left click in the 3D world.
--- [https://wowpedia.fandom.com/wiki/API_CameraOrSelectOrMoveStart]
--- @return void
function CameraOrSelectOrMoveStart()
end
--- End Left click in the 3D game world.
--- [https://wowpedia.fandom.com/wiki/API_CameraOrSelectOrMoveStop]
--- @param stickyFlag number @ optional) - If present and set then any camera offset is 'sticky' and remains until explicitly cancelled.
--- @return void
function CameraOrSelectOrMoveStop(stickyFlag)
end
--- Zooms the camera into the viewplane
--- [https://wowpedia.fandom.com/wiki/API_CameraZoomIn]
--- @param increment unknown
--- @return void
function CameraZoomIn(increment)
end
--- Zooms the camera out of the viewplane
--- [https://wowpedia.fandom.com/wiki/API_CameraZoomOut]
--- @param increment unknown
--- @return void
function CameraZoomOut(increment)
end
--- [https://wowpedia.fandom.com/wiki/API_CanAffordMerchantItem?action=edit&redlink=1]
--- @return void
function CanAffordMerchantItem()
end
--- [https://wowpedia.fandom.com/wiki/API_CanAutoSetGamePadCursorControl?action=edit&redlink=1]
--- @return void
function CanAutoSetGamePadCursorControl()
end
--- Returns whether the specified unit can be assigned a raid target marker.
--- [https://wowpedia.fandom.com/wiki/API_CanBeRaidTarget]
--- @param unit string @ unitId to query.
--- @return boolean @ canBeRaidTarget
function CanBeRaidTarget(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_CanCancelScene?action=edit&redlink=1]
--- @return void
function CanCancelScene()
end
--- [https://wowpedia.fandom.com/wiki/API_CanChangePlayerDifficulty?action=edit&redlink=1]
--- @return void
function CanChangePlayerDifficulty()
end
--- [https://wowpedia.fandom.com/wiki/API_CanComplainInboxItem?action=edit&redlink=1]
--- @return void
function CanComplainInboxItem()
end
--- Returns whether the player can Dual wield weapons.
--- [https://wowpedia.fandom.com/wiki/API_CanDualWield]
--- @return boolean @ canDualWield
function CanDualWield()
end
--- [https://wowpedia.fandom.com/wiki/API_CanEditGuildBankTabInfo?action=edit&redlink=1]
--- @return void
function CanEditGuildBankTabInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_CanEditGuildEvent?action=edit&redlink=1]
--- @return void
function CanEditGuildEvent()
end
--- [https://wowpedia.fandom.com/wiki/API_CanEditGuildInfo?action=edit&redlink=1]
--- @return void
function CanEditGuildInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_CanEditGuildTabInfo?action=edit&redlink=1]
--- @return void
function CanEditGuildTabInfo()
end
--- Checks if the player can edit the guild MOTD.
--- [https://wowpedia.fandom.com/wiki/API_CanEditMOTD]
--- @return boolean @ canEdit
function CanEditMOTD()
end
--- [https://wowpedia.fandom.com/wiki/API_CanEditPublicNote?action=edit&redlink=1]
--- @return void
function CanEditPublicNote()
end
--- [https://wowpedia.fandom.com/wiki/API_CanEjectPassengerFromSeat?action=edit&redlink=1]
--- @return void
function CanEjectPassengerFromSeat()
end
--- [https://wowpedia.fandom.com/wiki/API_CanExitVehicle?action=edit&redlink=1]
--- @return void
function CanExitVehicle()
end
--- [https://wowpedia.fandom.com/wiki/API_CanGamePadControlCursor?action=edit&redlink=1]
--- @return void
function CanGamePadControlCursor()
end
--- [https://wowpedia.fandom.com/wiki/API_CanGuildBankRepair?action=edit&redlink=1]
--- @return void
function CanGuildBankRepair()
end
--- Checks if the player can demote guild members.
--- [https://wowpedia.fandom.com/wiki/API_CanGuildDemote]
--- @return boolean @ canDemote
function CanGuildDemote()
end
--- Checks whether you have guild inviting permission.
--- [https://wowpedia.fandom.com/wiki/API_CanGuildInvite]
--- @return boolean @ canInvite
function CanGuildInvite()
end
--- Checks if the player can promote guild members.
--- [https://wowpedia.fandom.com/wiki/API_CanGuildPromote]
--- @return boolean @ canPromote
function CanGuildPromote()
end
--- [https://wowpedia.fandom.com/wiki/API_CanGuildRemove?action=edit&redlink=1]
--- @return void
function CanGuildRemove()
end
--- [https://wowpedia.fandom.com/wiki/API_CanHearthAndResurrectFromArea?action=edit&redlink=1]
--- @return void
function CanHearthAndResurrectFromArea()
end
--- [https://wowpedia.fandom.com/wiki/API_CanInitiateWarGame?action=edit&redlink=1]
--- @return void
function CanInitiateWarGame()
end
--- Returns whether you can inspect a particular unit.
--- [https://wowpedia.fandom.com/wiki/API_CanInspect]
--- @param unit string @ unitId) - Unit to check inspectability of.
--- @param showError number @ If true, the function will display an error message (You can't inspect that unit) if you cannot inspect the specified unit.
--- @return number @ canInspect
function CanInspect(unit, showError)
end
--- [https://wowpedia.fandom.com/wiki/API_CanItemBeSocketedToArtifact?action=edit&redlink=1]
--- @return void
function CanItemBeSocketedToArtifact()
end
--- Returns, whether the player can join a battlefield as group or not.
--- [https://wowpedia.fandom.com/wiki/API_CanJoinBattlefieldAsGroup]
--- @return boolean @ isTrue
function CanJoinBattlefieldAsGroup()
end
--- [https://wowpedia.fandom.com/wiki/API_CanLootUnit?action=edit&redlink=1]
--- @return void
function CanLootUnit()
end
--- [https://wowpedia.fandom.com/wiki/API_CanMapChangeDifficulty?action=edit&redlink=1]
--- @return void
function CanMapChangeDifficulty()
end
--- Can the merchant repair items or not.
--- [https://wowpedia.fandom.com/wiki/API_CanMerchantRepair]
--- @return number @ canRepair
function CanMerchantRepair()
end
--- [https://wowpedia.fandom.com/wiki/API_CanPartyLFGBackfill?action=edit&redlink=1]
--- @return void
function CanPartyLFGBackfill()
end
--- Returns whether you can impeach the Guild Master due to inactivity.
--- [https://wowpedia.fandom.com/wiki/API_CanReplaceGuildMaster]
--- @return boolean @ canReplace
function CanReplaceGuildMaster()
end
--- [https://wowpedia.fandom.com/wiki/API_CanResetTutorials?action=edit&redlink=1]
--- @return void
function CanResetTutorials()
end
--- Returns whether the player is currently on a digsite.
--- [https://wowpedia.fandom.com/wiki/API_CanScanResearchSite]
--- @return boolean @ onSite
function CanScanResearchSite()
end
--- Returns if the AchievementUI can be displayed.
--- [https://wowpedia.fandom.com/wiki/API_CanShowAchievementUI]
--- @return boolean @ canShow
function CanShowAchievementUI()
end
--- Returns true if the player can reset instances now.
--- [https://wowpedia.fandom.com/wiki/API_CanShowResetInstances]
--- @return boolean @ canReset
function CanShowResetInstances()
end
--- [https://wowpedia.fandom.com/wiki/API_CanSignPetition?action=edit&redlink=1]
--- @return void
function CanSignPetition()
end
--- [https://wowpedia.fandom.com/wiki/API_CanSolveArtifact?action=edit&redlink=1]
--- @return void
function CanSolveArtifact()
end
--- Returns whether you can RaF summon a particular unit.
--- [https://wowpedia.fandom.com/wiki/API_CanSummonFriend]
--- @param unit string @ UnitId) - player to check whether you can summon.
--- @return number @ summonable
function CanSummonFriend(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_CanSurrenderArena?action=edit&redlink=1]
--- @return void
function CanSurrenderArena()
end
--- [https://wowpedia.fandom.com/wiki/API_CanSwitchVehicleSeat?action=edit&redlink=1]
--- @return void
function CanSwitchVehicleSeat()
end
--- [https://wowpedia.fandom.com/wiki/API_CanSwitchVehicleSeats?action=edit&redlink=1]
--- @return void
function CanSwitchVehicleSeats()
end
--- Returns whether the player can track battle pets.
--- [https://wowpedia.fandom.com/wiki/API_CanTrackBattlePets]
--- @return boolean @ canTrack
function CanTrackBattlePets()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_CanUpgradeExpansion]
--- @return boolean @ canUpgradeExpansion
function CanUpgradeExpansion()
end
--- Returns if the player has access to the Void Storage.
--- [https://wowpedia.fandom.com/wiki/API_CanUseVoidStorage]
--- @return number @ canUse
function CanUseVoidStorage()
end
--- Checks if the player can view specific guild recipes.
--- [https://wowpedia.fandom.com/wiki/API_CanViewGuildRecipes]
--- @param skillID number @ The skill ID to view recipes of. See GetGuildTradeSkillInfo on how to fetch a skill ID.
--- @return boolean @ canView
function CanViewGuildRecipes(skillID)
end
--- [https://wowpedia.fandom.com/wiki/API_CanWithdrawGuildBankMoney?action=edit&redlink=1]
--- @return void
function CanWithdrawGuildBankMoney()
end
--- Cancels the area Spirit Healer's resurrection in battlegrounds.
--- [https://wowpedia.fandom.com/wiki/API_CancelAreaSpiritHeal]
--- @return void
function CancelAreaSpiritHeal()
end
--- Exits the barber shop without applying selected customizations.
--- [https://wowpedia.fandom.com/wiki/API_CancelBarberShop]
--- @return void
function CancelBarberShop()
end
--- Forfeits the current duel, or declines an invitation to duel.
--- [https://wowpedia.fandom.com/wiki/API_CancelDuel]
--- @return void
function CancelDuel()
end
--- [https://wowpedia.fandom.com/wiki/API_CancelEmote?action=edit&redlink=1]
--- @return void
function CancelEmote()
end
--- [https://wowpedia.fandom.com/wiki/API_CancelGuildMembershipRequest?action=edit&redlink=1]
--- @return void
function CancelGuildMembershipRequest()
end
--- Removes temporary item buffs, such as Rogue poisons, Shaman weapon buffs, and sharpening stones from either the Main Hand or Off Hand equipment slots.
--- [https://wowpedia.fandom.com/wiki/API_CancelItemTempEnchantment]
--- @param weaponHand number @ for Main Hand, 2 for Off Hand.
--- @return void
function CancelItemTempEnchantment(weaponHand)
end
--- Cancels the logout timer (from camping or quitting).
--- [https://wowpedia.fandom.com/wiki/API_CancelLogout]
--- @return void
function CancelLogout()
end
--- [https://wowpedia.fandom.com/wiki/API_CancelMasterLootRoll?action=edit&redlink=1]
--- @return void
function CancelMasterLootRoll()
end
--- Cancels a pending equip operation.
--- [https://wowpedia.fandom.com/wiki/API_CancelPendingEquip]
--- @param slot number @ equipment slot to cancel equipping an item to.
--- @return void
function CancelPendingEquip(slot)
end
--- [https://wowpedia.fandom.com/wiki/API_CancelPetPossess?action=edit&redlink=1]
--- @return void
function CancelPetPossess()
end
--- [https://wowpedia.fandom.com/wiki/API_CancelPreloadingMovie?action=edit&redlink=1]
--- @return void
function CancelPreloadingMovie()
end
--- [https://wowpedia.fandom.com/wiki/API_CancelScene?action=edit&redlink=1]
--- @return void
function CancelScene()
end
--- Cancels a druid's shapeshift buff.
--- [https://wowpedia.fandom.com/wiki/API_CancelShapeshiftForm]
--- @return void
function CancelShapeshiftForm()
end
--- [https://wowpedia.fandom.com/wiki/API_CancelSpellByName?action=edit&redlink=1]
--- @return void
function CancelSpellByName()
end
--- Cancels the currently open trade.
--- [https://wowpedia.fandom.com/wiki/API_CancelTrade]
--- @return void
function CancelTrade()
end
--- [https://wowpedia.fandom.com/wiki/API_CancelTradeAccept?action=edit&redlink=1]
--- @return void
function CancelTradeAccept()
end
--- Removes a specific buff from the unit.
--- [https://wowpedia.fandom.com/wiki/API_CancelUnitBuff]
--- @param unit string @ unitId) - Unit to cancel the buff from, must be under the player's control.
--- @param buffIndex number @ index of the buff to cancel, ascending from 1.
--- @param filter string @ any of combination of HELPFUL|HARMFUL|PLAYER|RAID|CANCELABLE|NOT_CANCELABLE.
--- @return void
function CancelUnitBuff(unit, buffIndex, filter)
end
--- [https://wowpedia.fandom.com/wiki/API_CannotBeResurrected?action=edit&redlink=1]
--- @return void
function CannotBeResurrected()
end
--- [https://wowpedia.fandom.com/wiki/API_CaseAccentInsensitiveParse?action=edit&redlink=1]
--- @return void
function CaseAccentInsensitiveParse()
end
--- Cast the corresponding pet skill.
--- [https://wowpedia.fandom.com/wiki/API_CastPetAction]
--- @param index number @ pet action bar slot index, ascending from 1.
--- @param target string @ unit to cast the action on; defaults to target.
--- @return void
function CastPetAction(index, target)
end
--- Casts a shapeshift ability.
--- [https://wowpedia.fandom.com/wiki/API_CastShapeshiftForm]
--- @param index number @ specifies which shapeshift form to activate or toggle; generally equivalent to the index of the form on the stance bar.
--- @return void
function CastShapeshiftForm(index)
end
--- Casts the specified spell.
--- [https://wowpedia.fandom.com/wiki/API_CastSpell]
--- @param spellIndex number @ index of the spell to cast.
--- @param spellbookType string @ spellbook to cast the spell from; one of
--- @return void
function CastSpell(spellIndex, spellbookType)
end
--- [https://wowpedia.fandom.com/wiki/API_CastSpellByID?action=edit&redlink=1]
--- @return void
function CastSpellByID()
end
--- Casts the specified spell.
--- [https://wowpedia.fandom.com/wiki/API_CastSpellByName]
--- @param spellName unknown
--- @param target string @ unit to cast the spell on. If omitted, target is assumed for spells that require a target.
--- @return void
function CastSpellByName(spellName, target)
end
--- [https://wowpedia.fandom.com/wiki/API_CenterCamera?action=edit&redlink=1]
--- @return void
function CenterCamera()
end
--- Changes the current action button to the one specified in the arguments.
--- [https://wowpedia.fandom.com/wiki/API_ChangeActionBarPage]
--- @param actionBarPage unknown @ Numer - Which page of your action bar to switch to. Expects an integer 1-6.
--- @return void
function ChangeActionBarPage(actionBarPage)
end
--- Changes the text color of the specified chat channel. The color wheel popup calls this function to do the actual work, once the user is done with the popup.
--- [https://wowpedia.fandom.com/wiki/API_ChangeChatColor]
--- @param channelname string @ Name of the channel as given in chat-cache.txt files.
--- @param red unknown
--- @param green unknown
--- @param blue unknown
--- @return void
function ChangeChatColor(channelname, red, green, blue)
end
--- Bans a player from the specified channel.
--- [https://wowpedia.fandom.com/wiki/API_ChannelBan]
--- @param channelName string @ The name of the channel to ban on
--- @param playerName string @ The name of the player to ban
--- @return void
function ChannelBan(channelName, playerName)
end
--- Invites the specified user to the channel.
--- [https://wowpedia.fandom.com/wiki/API_ChannelInvite]
--- @param channelName string @ The name of the channel to invite to
--- @param playerName string @ The name of the player to invite
--- @return void
function ChannelInvite(channelName, playerName)
end
--- Kicks a player from the specified channel.
--- [https://wowpedia.fandom.com/wiki/API_ChannelKick]
--- @param channelName string @ The name of the channel to kick from
--- @param playerName string @ The name of the player to kick
--- @return void
function ChannelKick(channelName, playerName)
end
--- Sets the specified player as the channel moderator.
--- [https://wowpedia.fandom.com/wiki/API_ChannelModerator]
--- @param channelName unknown @ The name of the channel to set moderator status on
--- @param playerName unknown @ The name of the player to set as a moderator
--- @return void
function ChannelModerator(channelName, playerName)
end
--- [https://wowpedia.fandom.com/wiki/API_ChannelSetAllSilent?action=edit&redlink=1]
--- @return void
function ChannelSetAllSilent()
end
--- [https://wowpedia.fandom.com/wiki/API_ChannelSetPartyMemberSilent?action=edit&redlink=1]
--- @return void
function ChannelSetPartyMemberSilent()
end
--- Toggles the channel to display announcements either on or off.
--- [https://wowpedia.fandom.com/wiki/API_ChannelToggleAnnouncements]
--- @param channelName unknown @ The name of the channel to toggle announcements on
--- @param name unknown
--- @return void
function ChannelToggleAnnouncements(channelName, name)
end
--- Unbans a player from the specified channel.
--- [https://wowpedia.fandom.com/wiki/API_ChannelUnban]
--- @param channelName unknown @ The name of the channel to remove the ban on
--- @param playerName unknown @ The name of the player to unban
--- @return void
function ChannelUnban(channelName, playerName)
end
--- Takes the specified user away from the moderator status.
--- [https://wowpedia.fandom.com/wiki/API_ChannelUnmoderator]
--- @param channelName unknown @ The name of the channel to remove moderator status on
--- @param playerName unknown @ The name of the player to remove moderator status from
--- @return void
function ChannelUnmoderator(channelName, playerName)
end
--- [https://wowpedia.fandom.com/wiki/API_CheckBinderDist?action=edit&redlink=1]
--- @return void
function CheckBinderDist()
end
--- Populates client's inbox with messages.
--- [https://wowpedia.fandom.com/wiki/API_CheckInbox]
--- @return void
function CheckInbox()
end
--- Checks whether you are in range to perform a specific interaction with a specified unit.
--- [https://wowpedia.fandom.com/wiki/API_CheckInteractDistance]
--- @param unit string @ Unit to compare distance to.
--- @param distIndex number @ A value from 1 to 5:
--- @return number @ inRange
function CheckInteractDistance(unit, distIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_CheckSpiritHealerDist?action=edit&redlink=1]
--- @return void
function CheckSpiritHealerDist()
end
--- [https://wowpedia.fandom.com/wiki/API_CheckTalentMasterDist?action=edit&redlink=1]
--- @return void
function CheckTalentMasterDist()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearAchievementComparisonUnit?action=edit&redlink=1]
--- @return void
function ClearAchievementComparisonUnit()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearAchievementSearchString?action=edit&redlink=1]
--- @return void
function ClearAchievementSearchString()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearAllLFGDungeons?action=edit&redlink=1]
--- @return void
function ClearAllLFGDungeons()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearAllTracking?action=edit&redlink=1]
--- @return void
function ClearAllTracking()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearAutoAcceptQuestSound?action=edit&redlink=1]
--- @return void
function ClearAutoAcceptQuestSound()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearBattlemaster?action=edit&redlink=1]
--- @return void
function ClearBattlemaster()
end
--- Clears the in-game cursor, returning the object held to its original position (equivalent to right-clicking while holding something on the cursor).
--- [https://wowpedia.fandom.com/wiki/API_ClearCursor]
--- @return void
function ClearCursor()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearFailedPVPTalentIDs?action=edit&redlink=1]
--- @return void
function ClearFailedPVPTalentIDs()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearFailedTalentIDs?action=edit&redlink=1]
--- @return void
function ClearFailedTalentIDs()
end
--- I believe this is supposed to clear your focus just like /clearfocus does. However, it has been blocked by blizzard or something like that. (/clearfocus still works however.)
--- [https://wowpedia.fandom.com/wiki/API_ClearFocus]
--- @return void
function ClearFocus()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearInspectPlayer?action=edit&redlink=1]
--- @return void
function ClearInspectPlayer()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearItemUpgrade?action=edit&redlink=1]
--- @return void
function ClearItemUpgrade()
end
--- Removes all override bindings owned by a particular frame.
--- [https://wowpedia.fandom.com/wiki/API_ClearOverrideBindings]
--- @param owner Frame @ The frame to clear override bindings for.
--- @return void
function ClearOverrideBindings(owner)
end
--- [https://wowpedia.fandom.com/wiki/API_ClearPartyAssignment?action=edit&redlink=1]
--- @return void
function ClearPartyAssignment()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearRaidMarker?action=edit&redlink=1]
--- @return void
function ClearRaidMarker()
end
--- Clears everything that has been typed into the 'Send Mail' window.
--- [https://wowpedia.fandom.com/wiki/API_ClearSendMail]
--- @return void
function ClearSendMail()
end
--- Clears the player's target.
--- [https://wowpedia.fandom.com/wiki/API_ClearTarget]
--- @return void
function ClearTarget()
end
--- [https://wowpedia.fandom.com/wiki/API_ClearTutorials?action=edit&redlink=1]
--- @return void
function ClearTutorials()
end
--- Clears the specified Void Transfer deposit slot [1]
--- [https://wowpedia.fandom.com/wiki/API_ClearVoidTransferDepositSlot]
--- @param slotIndex number @ Index ranging from 1 to 9 (VOID_DEPOSIT_MAX)
--- @return void
function ClearVoidTransferDepositSlot(slotIndex)
end
--- Places or picks up an item from the send mail frame. Can also clear an item rather than picking it up.
--- [https://wowpedia.fandom.com/wiki/API_ClickSendMailItemButton]
--- @param itemIndex number @ The index of the item (1-ATTACHMENTS_MAX_SEND(12))
--- @param clearItem boolean @ ?Optional. Could be nil. - Clear the item already in this slot. (Done by right clicking an item)
--- @return void
function ClickSendMailItemButton(itemIndex, clearItem)
end
--- [https://wowpedia.fandom.com/wiki/API_ClickSocketButton?action=edit&redlink=1]
--- @return void
function ClickSocketButton()
end
--- [https://wowpedia.fandom.com/wiki/API_ClickTargetTradeButton?action=edit&redlink=1]
--- @return void
function ClickTargetTradeButton()
end
--- [https://wowpedia.fandom.com/wiki/API_ClickTradeButton?action=edit&redlink=1]
--- @return void
function ClickTradeButton()
end
--- Clicks the specified Void Storage slot [1]
--- [https://wowpedia.fandom.com/wiki/API_ClickVoidStorageSlot]
--- @param slotIndex number @ Index ranging from 1 to 80 (VOID_STORAGE_MAX). The index starts from top to bottom first (vertically), then left to right (horizontally); This is similar to the Guild Bank frame
--- @param isRightClick boolean @ ?Optional. Could be nil. - Whether the button was right-clicked
--- @return void
function ClickVoidStorageSlot(slotIndex, isRightClick)
end
--- Clicks the specified Void Transfer deposit slot [1]
--- [https://wowpedia.fandom.com/wiki/API_ClickVoidTransferDepositSlot]
--- @param slotIndex number @ Index ranging from 1 to 9 (VOID_DEPOSIT_MAX). Defaults to 1 if not a valid Index
--- @param isRightClick boolean @ Whether the button was right-clicked
--- @return void
function ClickVoidTransferDepositSlot(slotIndex, isRightClick)
end
--- Clicks the specified Void Transfer withdrawal slot [1]
--- [https://wowpedia.fandom.com/wiki/API_ClickVoidTransferWithdrawalSlot]
--- @param slotIndex number @ Index ranging from 1 to 9 (VOID_WITHDRAW_MAX)
--- @param isRightClick boolean @ Whether the button was right-clicked
--- @return void
function ClickVoidTransferWithdrawalSlot(slotIndex, isRightClick)
end
--- [https://wowpedia.fandom.com/wiki/API_ClickWorldMapActionButton?action=edit&redlink=1]
--- @return void
function ClickWorldMapActionButton()
end
--- Will Close the Bank Frame if opened.
--- [https://wowpedia.fandom.com/wiki/API_CloseBankFrame]
--- @return void
function CloseBankFrame()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseGuildBankFrame?action=edit&redlink=1]
--- @return void
function CloseGuildBankFrame()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseGuildRegistrar?action=edit&redlink=1]
--- @return void
function CloseGuildRegistrar()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseGuildRoster?action=edit&redlink=1]
--- @return void
function CloseGuildRoster()
end
--- Close an open item text (book, plaque, etc).
--- [https://wowpedia.fandom.com/wiki/API_CloseItemText]
--- @return void
function CloseItemText()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseItemUpgrade?action=edit&redlink=1]
--- @return void
function CloseItemUpgrade()
end
--- Close the loot window.
--- [https://wowpedia.fandom.com/wiki/API_CloseLoot]
--- @param errNum number @ Optional) - A reason for the window closing. Unsure whether/how the game deals with error codes passed to it.
--- @return void
function CloseLoot(errNum)
end
--- Closes the 'Mailbox' window.
--- [https://wowpedia.fandom.com/wiki/API_CloseMail]
--- @return void
function CloseMail()
end
--- Closes the merchant window.
--- [https://wowpedia.fandom.com/wiki/API_CloseMerchant]
--- @return void
function CloseMerchant()
end
--- Closes the pet stable window.
--- [https://wowpedia.fandom.com/wiki/API_ClosePetStables]
--- @return void
function ClosePetStables()
end
--- Closes a petition that has been presented to the player.
--- [https://wowpedia.fandom.com/wiki/API_ClosePetition]
--- @return void
function ClosePetition()
end
--- [https://wowpedia.fandom.com/wiki/API_ClosePlayerChoice?action=edit&redlink=1]
--- @return void
function ClosePlayerChoice()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseQuest?action=edit&redlink=1]
--- @return void
function CloseQuest()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseResearch?action=edit&redlink=1]
--- @return void
function CloseResearch()
end
--- Stops considering the item for socketing, ignoring any tentative changes made.
--- [https://wowpedia.fandom.com/wiki/API_CloseSocketInfo]
--- @return void
function CloseSocketInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseTabardCreation?action=edit&redlink=1]
--- @return void
function CloseTabardCreation()
end
--- Closes your Flightpath Map.
--- [https://wowpedia.fandom.com/wiki/API_CloseTaxiMap]
--- @return void
function CloseTaxiMap()
end
--- Closes the trade window.
--- [https://wowpedia.fandom.com/wiki/API_CloseTrade]
--- @return void
function CloseTrade()
end
--- Closes the trainer window.
--- [https://wowpedia.fandom.com/wiki/API_CloseTrainer]
--- @return void
function CloseTrainer()
end
--- [https://wowpedia.fandom.com/wiki/API_CloseVoidStorageFrame?action=edit&redlink=1]
--- @return void
function CloseVoidStorageFrame()
end
--- [https://wowpedia.fandom.com/wiki/API_ClosestGameObjectPosition?action=edit&redlink=1]
--- @return void
function ClosestGameObjectPosition()
end
--- Returns the unit position of the closest creature by ID. Only works for mobs in the starting zones.
--- [https://wowpedia.fandom.com/wiki/API_ClosestUnitPosition]
--- @param creatureID number @ NPC ID of a GUID of a creature.
--- @return number, number, number @ x, y, distance
function ClosestUnitPosition(creatureID)
end
--- [https://wowpedia.fandom.com/wiki/API_CollapseAllFactionHeaders?action=edit&redlink=1]
--- @return void
function CollapseAllFactionHeaders()
end
--- Collapse a faction header row.
--- [https://wowpedia.fandom.com/wiki/API_CollapseFactionHeader]
--- @param rowIndex number @ The row index of the header to collapse (Specifying a non-header row can have unpredictable results). The UPDATE_FACTION event is fired after the change since faction indexes will have been shifted around.
--- @return void
function CollapseFactionHeader(rowIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_CollapseGuildTradeSkillHeader?action=edit&redlink=1]
--- @return void
function CollapseGuildTradeSkillHeader()
end
--- Collapses the quest header.
--- [https://wowpedia.fandom.com/wiki/API_CollapseQuestHeader]
--- @param questID unknown @ The quest ID of the header you wish to collapse - 0 to collapse all quest headers
--- @return void
function CollapseQuestHeader(questID)
end
--- [https://wowpedia.fandom.com/wiki/API_CollapseWarGameHeader?action=edit&redlink=1]
--- @return void
function CollapseWarGameHeader()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogAddFilter?action=edit&redlink=1]
--- @return void
function CombatLogAddFilter()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogAdvanceEntry?action=edit&redlink=1]
--- @return void
function CombatLogAdvanceEntry()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogClearEntries?action=edit&redlink=1]
--- @return void
function CombatLogClearEntries()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogGetCurrentEntry?action=edit&redlink=1]
--- @return void
function CombatLogGetCurrentEntry()
end
--- Returns the current COMBAT_LOG_EVENT payload.
--- [https://wowpedia.fandom.com/wiki/API_CombatLogGetCurrentEventInfo]
--- @return unknown @ eventInfo
function CombatLogGetCurrentEventInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogGetNumEntries?action=edit&redlink=1]
--- @return void
function CombatLogGetNumEntries()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogGetRetentionTime?action=edit&redlink=1]
--- @return void
function CombatLogGetRetentionTime()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogResetFilter?action=edit&redlink=1]
--- @return void
function CombatLogResetFilter()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogSetCurrentEntry?action=edit&redlink=1]
--- @return void
function CombatLogSetCurrentEntry()
end
--- [https://wowpedia.fandom.com/wiki/API_CombatLogSetRetentionTime?action=edit&redlink=1]
--- @return void
function CombatLogSetRetentionTime()
end
--- Compares two UnitFlag bitfields.
--- [https://wowpedia.fandom.com/wiki/API_CombatLog_Object_IsA]
--- @param flag1 number @ UnitFlag bitfield, typically a sourceFlags or destFlags paramater from COMBAT_LOG_EVENT.
--- @param flag2 number @ UnitFlag bitfield, typically a COMBATLOG_FILTER constant.
--- @return number, number @ flag1, flag2
function CombatLog_Object_IsA(flag1, flag2)
end
--- Alters the entity for which the COMBAT_TEXT_UPDATE event fires.
--- [https://wowpedia.fandom.com/wiki/API_CombatTextSetActiveUnit]
--- @param unit string @ UnitId of the entity you want receive notifications for.
--- @return void
function CombatTextSetActiveUnit(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_ComplainInboxItem?action=edit&redlink=1]
--- @return void
function ComplainInboxItem()
end
--- [https://wowpedia.fandom.com/wiki/API_CompleteLFGReadyCheck?action=edit&redlink=1]
--- @return void
function CompleteLFGReadyCheck()
end
--- [https://wowpedia.fandom.com/wiki/API_CompleteLFGRoleCheck?action=edit&redlink=1]
--- @return void
function CompleteLFGRoleCheck()
end
--- Advances the quest completion dialog to the reward selection step.
--- [https://wowpedia.fandom.com/wiki/API_CompleteQuest]
--- @return void
function CompleteQuest()
end
--- Accept an escort quest being started by a player nearby.
--- [https://wowpedia.fandom.com/wiki/API_ConfirmAcceptQuest]
--- @return void
function ConfirmAcceptQuest()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_ConfirmBNRequestInviteFriend]
--- @param presenceID number
--- @param tank boolean @ optional)
--- @param heal unknown
--- @param dps boolean @ optional)
--- @return void
function ConfirmBNRequestInviteFriend(presenceID, tank, heal, dps)
end
--- Accepts the confirmation to bind an item after attempting to loot a Bind on Pickup item (BoP) or attempting to equip a Bind on Equip item (BoE).
--- [https://wowpedia.fandom.com/wiki/API_ConfirmBindOnUse]
--- @return void
function ConfirmBindOnUse()
end
--- [https://wowpedia.fandom.com/wiki/API_ConfirmBinder?action=edit&redlink=1]
--- @return void
function ConfirmBinder()
end
--- Confirm your loot roll after either CONFIRM_LOOT_ROLL or CONFIRM_DISENCHANT_ROLL fires.
--- [https://wowpedia.fandom.com/wiki/API_ConfirmLootRoll]
--- @param rollID number @ As passed by the event. (The number increases with every roll you have in a party)
--- @param roll number @ Type of roll: (also passed by the event)
--- @return void
function ConfirmLootRoll(rollID, roll)
end
--- After a Bind on Pickup item has been looted via a LootButton, this function needs to be called to confirm that the player wants to loot the item.
--- [https://wowpedia.fandom.com/wiki/API_ConfirmLootSlot]
--- @param slot number @ the loot slot of a BoP loot item that is waiting for confirmation
--- @return void
function ConfirmLootSlot(slot)
end
--- [https://wowpedia.fandom.com/wiki/API_ConfirmNoRefundOnUse?action=edit&redlink=1]
--- @return void
function ConfirmNoRefundOnUse()
end
--- [https://wowpedia.fandom.com/wiki/API_ConfirmOnUse?action=edit&redlink=1]
--- @return void
function ConfirmOnUse()
end
--- Sends a response to a raid ready check
--- [https://wowpedia.fandom.com/wiki/API_ConfirmReadyCheck]
--- @param isReady number @ ?Optional. Could be nil. - 1 if the player is ready, nil if the player is not ready
--- @return void
function ConfirmReadyCheck(isReady)
end
--- [https://wowpedia.fandom.com/wiki/API_ConfirmTalentWipe?action=edit&redlink=1]
--- @return void
function ConfirmTalentWipe()
end
--- [https://wowpedia.fandom.com/wiki/API_ConsoleAddMessage?action=edit&redlink=1]
--- @return void
function ConsoleAddMessage()
end
--- Execute a console command.
--- [https://wowpedia.fandom.com/wiki/API_ConsoleExec]
--- @param command string @ The console command to execute.
--- @return void
function ConsoleExec(command)
end
--- Prints all bag container IDs and their respective inventory IDs(You need to be at the bank for bank inventory IDs to return valid results)
--- [https://wowpedia.fandom.com/wiki/API_ContainerIDToInventoryID]
--- @param containerID unknown
--- @return number @ bagID
function ContainerIDToInventoryID(containerID)
end
--- [https://wowpedia.fandom.com/wiki/API_ContainerRefundItemPurchase?action=edit&redlink=1]
--- @return void
function ContainerRefundItemPurchase()
end
--- [https://wowpedia.fandom.com/wiki/API_CopyToClipboard?action=edit&redlink=1]
--- @return void
function CopyToClipboard()
end
--- Creates a font object.
--- [https://wowpedia.fandom.com/wiki/API_CreateFont]
--- @param name string @ Globally-accessible name to be assigned for use as _G[name]
--- @return unknown @ fontObject
function CreateFont(name)
end
--- Creates a new Frame object.
--- [https://wowpedia.fandom.com/wiki/API_CreateFrame]
--- @param frameType string @ Type of the frame e.g. Frame or Button.
--- @param name string @ ? - Globally accessible name to assign to the frame, or nil for an anonymous frame.
--- @param parent Frame @ ? - Parent object to assign to the frame, or nil to be parentless; cannot be a string. Can also be set with Region:SetParent()
--- @param template string @ ? - Comma-delimited list of virtual frames to inherit from. See also the Complete List of FrameXML templates.
--- @param id number @ ? - ID to assign to the frame. Can also be set with Frame:SetID()
--- @return Frame @ frame
function CreateFrame(frameType, name, parent, template, id)
end
--- Creates a new macro command/button.
--- [https://wowpedia.fandom.com/wiki/API_CreateMacro]
--- @param name string @ The name of the macro to be displayed in the UI. The current UI imposes a 16-character limit.
--- @param iconFileID number @ |string - A FileID or string identifying the icon texture to use. The available icons can be retrieved by calling GetMacroIcons() and GetMacroItemIcons(); other textures inside Interface\ICONS may also be used.
--- @param body string @ ?Optional. Could be nil. - The macro commands to be executed. If this string is longer than 255 characters, only the first 255 will be saved.
--- @param perCharacter boolean @ ?Optional. Could be nil. - true to create a per-character macro, nil to create a general macro available to all characters.
--- @return number @ macroId
function CreateMacro(name, iconFileID, body, perCharacter)
end
--- [https://wowpedia.fandom.com/wiki/API_CreateNewRaidProfile?action=edit&redlink=1]
--- @return void
function CreateNewRaidProfile()
end
--- Determines if the item in the cursor can be equipped in the specified inventory slot. Always returns 1 for bank bag slots.
--- [https://wowpedia.fandom.com/wiki/API_CursorCanGoInSlot]
--- @param invSlot number @ inventorySlotId) - Inventory slot to query
--- @return number @ fitsInSlot
function CursorCanGoInSlot(invSlot)
end
--- Returns 1 if the cursor currently holds an item, nil otherwise.
--- [https://wowpedia.fandom.com/wiki/API_CursorHasItem]
--- @return boolean @ hasItem
function CursorHasItem()
end
--- [https://wowpedia.fandom.com/wiki/API_CursorHasMacro?action=edit&redlink=1]
--- @return void
function CursorHasMacro()
end
--- [https://wowpedia.fandom.com/wiki/API_CursorHasMoney?action=edit&redlink=1]
--- @return void
function CursorHasMoney()
end
--- [https://wowpedia.fandom.com/wiki/API_CursorHasSpell?action=edit&redlink=1]
--- @return void
function CursorHasSpell()
end
--- Returns a table representing the last five damaging combat events against the player.
--- [https://wowpedia.fandom.com/wiki/API_DeathRecap_GetEvents]
--- @param recapID number @ The specific death to view, from 1 to the most recent death. If this is not given, the most recent ID is used.
--- @return table @ events
function DeathRecap_GetEvents(recapID)
end
--- Returns a boolean for if the player has any available death events.
--- [https://wowpedia.fandom.com/wiki/API_DeathRecap_HasEvents]
--- @return boolean @ hasEvents
function DeathRecap_HasEvents()
end
--- Declines an invitation to join a specific chat channel.
--- [https://wowpedia.fandom.com/wiki/API_DeclineChannelInvite]
--- @param channel string @ name of the channel the player was invited to but does not wish to join.
--- @return void
function DeclineChannelInvite(channel)
end
--- [https://wowpedia.fandom.com/wiki/API_DeclineGroup?action=edit&redlink=1]
--- @return void
function DeclineGroup()
end
--- Declines a guild invitation.
--- [https://wowpedia.fandom.com/wiki/API_DeclineGuild]
--- @return void
function DeclineGuild()
end
--- [https://wowpedia.fandom.com/wiki/API_DeclineGuildApplicant?action=edit&redlink=1]
--- @return void
function DeclineGuildApplicant()
end
--- [https://wowpedia.fandom.com/wiki/API_DeclineName?action=edit&redlink=1]
--- @return void
function DeclineName()
end
--- Declines the currently offered quest.
--- [https://wowpedia.fandom.com/wiki/API_DeclineQuest]
--- @return void
function DeclineQuest()
end
--- Declines a resurrection offer.
--- [https://wowpedia.fandom.com/wiki/API_DeclineResurrect]
--- @return void
function DeclineResurrect()
end
--- Declines a spell confirmation prompt (e.g. bonus loot roll).
--- [https://wowpedia.fandom.com/wiki/API_DeclineSpellConfirmationPrompt]
--- @param spellID number @ spell ID of the prompt to decline.
--- @return void
function DeclineSpellConfirmationPrompt(spellID)
end
--- Destroys the item currently held by the cursor.
--- [https://wowpedia.fandom.com/wiki/API_DeleteCursorItem]
--- @return void
function DeleteCursorItem()
end
--- [https://wowpedia.fandom.com/wiki/API_DeleteGMTicket?action=edit&redlink=1]
--- @return void
function DeleteGMTicket()
end
--- Asynchronously request the server to remove a message from the mailbox.
--- [https://wowpedia.fandom.com/wiki/API_DeleteInboxItem]
--- @param index number @ the index of the message (1 is the first message)
--- @return void
function DeleteInboxItem(index)
end
--- Deletes a macro.
--- [https://wowpedia.fandom.com/wiki/API_DeleteMacro]
--- @param index_or_macroname unknown
--- @return void
function DeleteMacro(index_or_macroname)
end
--- [https://wowpedia.fandom.com/wiki/API_DeleteRaidProfile?action=edit&redlink=1]
--- @return void
function DeleteRaidProfile()
end
--- [https://wowpedia.fandom.com/wiki/API_DemoteAssistant?action=edit&redlink=1]
--- @return void
function DemoteAssistant()
end
--- [https://wowpedia.fandom.com/wiki/API_DepositGuildBankMoney?action=edit&redlink=1]
--- @return void
function DepositGuildBankMoney()
end
--- [https://wowpedia.fandom.com/wiki/API_DepositReagentBank?action=edit&redlink=1]
--- @return void
function DepositReagentBank()
end
--- The player stops descending (while flying or swimming).
--- [https://wowpedia.fandom.com/wiki/API_DescendStop]
--- @return void
function DescendStop()
end
--- Destroys a totem/minion.
--- [https://wowpedia.fandom.com/wiki/API_DestroyTotem]
--- @param slot number @ The totem type to be destroyed, where Fire is 1, Earth is 2, Water is 3 and Air is 4.
--- @return void
function DestroyTotem(slot)
end
--- [https://wowpedia.fandom.com/wiki/API_DetectWowMouse?action=edit&redlink=1]
--- @return void
function DetectWowMouse()
end
--- Disable an AddOn for subsequent sessions.
--- [https://wowpedia.fandom.com/wiki/API_DisableAddOn]
--- @param index_or_name unknown
--- @param character string @ The name of the character (without realm) for whom to disable the addon. Defaults to the current character.
--- @return void
function DisableAddOn(index_or_name, character)
end
--- Disable all AddOns for subsequent sessions.
--- [https://wowpedia.fandom.com/wiki/API_DisableAllAddOns]
--- @return void
function DisableAllAddOns()
end
--- [https://wowpedia.fandom.com/wiki/API_DisableSpellAutocast?action=edit&redlink=1]
--- @return void
function DisableSpellAutocast()
end
--- Dismisses a currently-summoned mount or non-combat pet.
--- [https://wowpedia.fandom.com/wiki/API_DismissCompanion]
--- @param type string @ type of companion to dismiss, either MOUNT or CRITTER.
--- @return void
function DismissCompanion(type)
end
--- Dismounts the player if the player was mounted.
--- [https://wowpedia.fandom.com/wiki/API_Dismount]
--- @return void
function Dismount()
end
--- Displays the name of the owner of the specified channel in the Default Chat Frame. Same as typing /owner in chat.
--- [https://wowpedia.fandom.com/wiki/API_DisplayChannelOwner]
--- @param channelName unknown
--- @return void
function DisplayChannelOwner(channelName)
end
--- [https://wowpedia.fandom.com/wiki/API_DoEmote]
--- @param token string @ the token that describes which emote is being used. See Emotes Tokens
--- @param target string @ UnitId of who the emote will be performed on. If nil, then it performs the emote on your current target, or yourself if you don't have a target. If the specified target does not exist or is out of range, then it performs the emote on yourself.
--- @return void
function DoEmote(token, target)
end
--- [https://wowpedia.fandom.com/wiki/API_DoMasterLootRoll?action=edit&redlink=1]
--- @return void
function DoMasterLootRoll()
end
--- Initiates a raid ready check. Can only be called by the raid leader, does nothing if called by other raid members or outside of a raid.
--- [https://wowpedia.fandom.com/wiki/API_DoReadyCheck]
--- @return void
function DoReadyCheck()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_DoesCurrentLocaleSellExpansionLevels]
--- @return boolean @ regionSellsExpansions
function DoesCurrentLocaleSellExpansionLevels()
end
--- [https://wowpedia.fandom.com/wiki/API_DoesItemContainSpec?action=edit&redlink=1]
--- @return void
function DoesItemContainSpec()
end
--- This function returns true if the player character knows the spell.
--- [https://wowpedia.fandom.com/wiki/API_DoesSpellExist]
--- @param spellName string
--- @return boolean @ spellExists
function DoesSpellExist(spellName)
end
--- [https://wowpedia.fandom.com/wiki/API_DoesTemplateExist?action=edit&redlink=1]
--- @return void
function DoesTemplateExist()
end
--- Drops the money currently attached to your cursor back into your bag.
--- [https://wowpedia.fandom.com/wiki/API_DropCursorMoney]
--- @return void
function DropCursorMoney()
end
--- Drops an item from the cursor onto the specified target. Can be used to initiate a trade session (though see Trade functions) or feeding pets.
--- [https://wowpedia.fandom.com/wiki/API_DropItemOnUnit]
--- @param unit unknown @ UnitId - Unit to which you want to give the item on the cursor.
--- @return void
function DropItemOnUnit(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_DumpMovementCapture?action=edit&redlink=1]
--- @return void
function DumpMovementCapture()
end
--- [https://wowpedia.fandom.com/wiki/API_DungeonAppearsInRandomLFD?action=edit&redlink=1]
--- @return void
function DungeonAppearsInRandomLFD()
end
--- Clears the encounter journal search results. [1]
--- [https://wowpedia.fandom.com/wiki/API_EJ_ClearSearch]
--- @return void
function EJ_ClearSearch()
end
--- Ends any active encounter journal search. [1]
--- [https://wowpedia.fandom.com/wiki/API_EJ_EndSearch]
--- @return void
function EJ_EndSearch()
end
--- Returns the currently selected content tuning ID for BFA instances per EJ_SelectInstance.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetContentTuningID]
--- @return number @ tuningID
function EJ_GetContentTuningID()
end
--- Returns encounter boss info.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetCreatureInfo]
--- @param index number @ creature index, up to nine for encounters with multiple bosses.
--- @param encounterID number @ optional) - if omitted this will default to the currently viewed encounter.
--- @return number, string, string, number, number, number @ id, name, description, displayInfo, iconImage, uiModelSceneID
function EJ_GetCreatureInfo(index, encounterID)
end
--- Returns the currently active encounter journal tier index.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetCurrentTier]
--- @return number @ index
function EJ_GetCurrentTier()
end
--- Returns the currently viewed difficulty in the journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetDifficulty]
--- @return number @ difficultyId
function EJ_GetDifficulty()
end
--- Returns encounter info from the journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetEncounterInfo]
--- @param encounterID number
--- @return void
function EJ_GetEncounterInfo(encounterID)
end
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetEncounterInfoByIndex]
--- @return void
function EJ_GetEncounterInfoByIndex()
end
--- Returns instance info for the Encounter Journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetInstanceByIndex]
--- @param index number
--- @param isRaid boolean @ whether to return raid or normal instances.
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ instanceID, name, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID, link, shouldDisplayDifficulty
function EJ_GetInstanceByIndex(index, isRaid)
end
--- Returns any corresponding instance ID for a UiMapID.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetInstanceForMap]
--- @param mapID number
--- @return number @ instanceID
function EJ_GetInstanceForMap(mapID)
end
--- Returns instance info for the Encounter Journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetInstanceInfo]
--- @param instanceID number @ optional) - if omitted, this will default to the currently selected instance per EJ_SelectInstance.
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ name, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID, link, shouldDisplayDifficulty
function EJ_GetInstanceInfo(instanceID)
end
--- Returns the sort order for an inventory type.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetInvTypeSortOrder]
--- @param invType number @ Enum.InventoryType
--- @return number @ sortOrder
function EJ_GetInvTypeSortOrder(invType)
end
--- Returns the currently used loot filter.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetLootFilter]
--- @return number, number @ classID, specID
function EJ_GetLootFilter()
end
--- Returns boss pin locations on instance maps. Unused in the FrameXML.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetMapEncounter]
--- @param mapID unknown
--- @param index number @ index of the boss pins.
--- @param fromJournal boolean @ optional) - this function seems to only return results when passing true.
--- @return number, number, number, string, string, number, number, string @ x, y, instanceID, name, description, encounterID, rootSectionID, link
function EJ_GetMapEncounter(mapID, index, fromJournal)
end
--- Returns the amount of encounters that drop the same loot item.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetNumEncountersForLootByIndex]
--- @param index number @ ranging from 1 to EJ_GetNumLoot.
--- @return number @ numLoot
function EJ_GetNumEncountersForLootByIndex(index)
end
--- Returns the amount of loot for the currently selected instance or encounter per EJ_SelectInstance.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetNumLoot]
--- @return number @ numLoot
function EJ_GetNumLoot()
end
--- Returns the number of search results for the Encounter Journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetNumSearchResults]
--- @return number @ numResults
function EJ_GetNumSearchResults()
end
--- Returns the number of valid encounter journal tier indices.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetNumTiers]
--- @return number @ numTiers
function EJ_GetNumTiers()
end
--- Returns the search bar's progress ratio.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetSearchProgress]
--- @return number @ searchProgress
function EJ_GetSearchProgress()
end
--- Returns search results for the Encounter Journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetSearchResult]
--- @param index number @ search result index, ascending from 1 to EJ_GetNumSearchResults().
--- @return number, number, number, number, number, string @ id, stype, difficultyID, instanceID, encounterID, itemLink
function EJ_GetSearchResult(index)
end
--- Returns the amount of Encounter Journal objects to search through.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetSearchSize]
--- @return number @ searchSize
function EJ_GetSearchSize()
end
--- Returns the parent Section ID if available.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetSectionPath]
--- @param sectionID number
--- @return number, number, number @ sectionID, parentSectionID, grandParentSectionID
function EJ_GetSectionPath(sectionID)
end
--- Get some information about the encounter journal tier for index.
--- [https://wowpedia.fandom.com/wiki/API_EJ_GetTierInfo]
--- @param index number @ The index of the tier. Ranging from 1 to EJ_GetNumTiers(). See below for details.
--- @return string, string @ name, link
function EJ_GetTierInfo(index)
end
--- Returns the supplementary instance and encounter ID for an encounter or section ID.
--- [https://wowpedia.fandom.com/wiki/API_EJ_HandleLinkPath]
--- @param jtype number @ journal type
--- @param id number @ depending on journal type; 0=instanceID, 1=encounterID, 2=sectionID
--- @return number, number, number, unknown @ instanceID, encounterID, sectionID, tierIndex
function EJ_HandleLinkPath(jtype, id)
end
--- Returns whether the selected instance is a raid.
--- [https://wowpedia.fandom.com/wiki/API_EJ_InstanceIsRaid]
--- @return boolean @ isRaid
function EJ_InstanceIsRaid()
end
--- Returns whether the loot list is out of date in relation to any filters when getting new loot data.
--- [https://wowpedia.fandom.com/wiki/API_EJ_IsLootListOutOfDate]
--- @return boolean @ listOutOfDate
function EJ_IsLootListOutOfDate()
end
--- Returns whether the current search has finished.
--- [https://wowpedia.fandom.com/wiki/API_EJ_IsSearchFinished]
--- @return boolean @ isFinished
function EJ_IsSearchFinished()
end
--- Returns whether the difficultyID is valid for use in the journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_IsValidInstanceDifficulty]
--- @param difficultyID number @ the following IDs should be valid:
--- @return boolean @ isValid
function EJ_IsValidInstanceDifficulty(difficultyID)
end
--- Clears any current loot filter in the journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_ResetLootFilter]
--- @return void
function EJ_ResetLootFilter()
end
--- Selects an encounter for the Encounter Journal API state.
--- [https://wowpedia.fandom.com/wiki/API_EJ_SelectEncounter]
--- @param encounterID number
--- @return void
function EJ_SelectEncounter(encounterID)
end
--- Selects an instance for the Encounter Journal API state. [1]
--- [https://wowpedia.fandom.com/wiki/API_EJ_SelectInstance]
--- @param instanceID number
--- @return void
function EJ_SelectInstance(instanceID)
end
--- Selects a tier for the Encounter Journal API state.
--- [https://wowpedia.fandom.com/wiki/API_EJ_SelectTier]
--- @param index number @ ranging from 1 to EJ_GetNumTiers.
--- @return void
function EJ_SelectTier(index)
end
--- Sets the encounter difficulty shown in the Encounter Journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_SetDifficulty]
--- @param difficultyID number @ ID of the difficulty to display ability/loot/encounter information for, as per GetDifficultyInfo.
--- @return void
function EJ_SetDifficulty(difficultyID)
end
--- Sets the loot filter for a specialization.
--- [https://wowpedia.fandom.com/wiki/API_EJ_SetLootFilter]
--- @param classID number
--- @param specID number
--- @return void
function EJ_SetLootFilter(classID, specID)
end
--- Starts a search in the journal.
--- [https://wowpedia.fandom.com/wiki/API_EJ_SetSearch]
--- @param text string
--- @return void
function EJ_SetSearch(text)
end
--- Modifies an existing macro. This function may only be called when out of combat.
--- [https://wowpedia.fandom.com/wiki/API_EditMacro]
--- @param index_or_macroName unknown
--- @param name string @ The name to assign to the macro. The current UI imposes a 16-character limit. The existing name remains unchanged if this argument is nil.
--- @param icon string @ The path to the icon texture to assign to the macro. The existing icon remains unchanged if this argument is nil.
--- @param body string @ The macro commands to be executed. If this string is longer than 255 characters, only the first 255 will be saved.
--- @return void
function EditMacro(index_or_macroName, name, icon, body)
end
--- [https://wowpedia.fandom.com/wiki/API_EjectPassengerFromSeat?action=edit&redlink=1]
--- @return void
function EjectPassengerFromSeat()
end
--- Enables an AddOn for subsequent sessions.
--- [https://wowpedia.fandom.com/wiki/API_EnableAddOn]
--- @param index_or_name unknown
--- @param character string @ The name of the character (without realm) for whom to disable the addon, Defaults to the current character.
--- @return void
function EnableAddOn(index_or_name, character)
end
--- Enable all AddOns for subsequent sessions.
--- [https://wowpedia.fandom.com/wiki/API_EnableAllAddOns]
--- @return void
function EnableAllAddOns()
end
--- [https://wowpedia.fandom.com/wiki/API_EnableSpellAutocast?action=edit&redlink=1]
--- @return void
function EnableSpellAutocast()
end
--- [https://wowpedia.fandom.com/wiki/API_EndBoundTradeable?action=edit&redlink=1]
--- @return void
function EndBoundTradeable()
end
--- [https://wowpedia.fandom.com/wiki/API_EndRefund?action=edit&redlink=1]
--- @return void
function EndRefund()
end
--- Returns frame which follows current frame, or first frame if argument is nil. The order of iteration follows the order that the frames were created in.
--- [https://wowpedia.fandom.com/wiki/API_EnumerateFrames]
--- @param currentFrame table @ Frame) - current frame or nil to get first frame.
--- @return table @ nextFrame
function EnumerateFrames(currentFrame)
end
--- Retrieves all available server channels (zone dependent).
--- [https://wowpedia.fandom.com/wiki/API_EnumerateServerChannels]
--- @return unknown, unknown, unknown @ channel1, channel2, ...
function EnumerateServerChannels()
end
--- Equips the currently picked up item to a specific inventory slot.
--- [https://wowpedia.fandom.com/wiki/API_EquipCursorItem]
--- @param slot number @ The InventorySlotId to place the item into.
--- @return void
function EquipCursorItem(slot)
end
--- Equips an item, optionally into a specified slot.
--- [https://wowpedia.fandom.com/wiki/API_EquipItemByName]
--- @param itemId_or_itemName_or_itemLink unknown
--- @param slot number @ optional) - The inventory slot to put the item in, obtained via GetInventorySlotInfo().
--- @return void
function EquipItemByName(itemId_or_itemName_or_itemLink, slot)
end
--- Equips the currently pending Bind-on-Equip or Bind-on-Pickup item from the specified inventory slot.
--- [https://wowpedia.fandom.com/wiki/API_EquipPendingItem]
--- @param invSlot unknown @ InventorySlotID - The slot ID of the item being equipped
--- @return void
function EquipPendingItem(invSlot)
end
--- Applies all pending void transfers (and pays for the cost of any deposited items) [1]
--- [https://wowpedia.fandom.com/wiki/API_ExecuteVoidTransfer]
--- @return void
function ExecuteVoidTransfer()
end
--- [https://wowpedia.fandom.com/wiki/API_ExpandAllFactionHeaders?action=edit&redlink=1]
--- @return void
function ExpandAllFactionHeaders()
end
--- Expand a faction header row.
--- [https://wowpedia.fandom.com/wiki/API_ExpandFactionHeader]
--- @param rowIndex number @ The row index of the header to expand (Specifying a non-header row can have unpredictable results). The UPDATE_FACTION event is fired after the change since faction indexes will have been shifted around.
--- @return void
function ExpandFactionHeader(rowIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_ExpandGuildTradeSkillHeader?action=edit&redlink=1]
--- @return void
function ExpandGuildTradeSkillHeader()
end
--- Expands the quest header.
--- [https://wowpedia.fandom.com/wiki/API_ExpandQuestHeader]
--- @param questID number @ The index of the header you wish to expand. - 0 to expand all quest headers
--- @return void
function ExpandQuestHeader(questID)
end
--- [https://wowpedia.fandom.com/wiki/API_ExpandWarGameHeader?action=edit&redlink=1]
--- @return void
function ExpandWarGameHeader()
end
--- Toggle the At War status of a faction row.
--- [https://wowpedia.fandom.com/wiki/API_FactionToggleAtWar]
--- @param rowIndex number @ The row index of the faction to toggle the At War status for. The row must have a true canToggleAtWar value (From GetFactionInfo)
--- @return void
function FactionToggleAtWar(rowIndex)
end
--- Fills a table with localized class names, callable with localization-independent class IDs.
--- [https://wowpedia.fandom.com/wiki/API_FillLocalizedClassList]
--- @param classTable table @ The table you want to be filled with the data (does not have to be an empty table).
--- @param isFemale boolean @ If true the table will be filled with female class names.
--- @return void
function FillLocalizedClassList(classTable, isFemale)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_FindBaseSpellByID]
--- @param spellID number
--- @return number @ baseSpellID
function FindBaseSpellByID(spellID)
end
--- [https://wowpedia.fandom.com/wiki/API_FindFlyoutSlotBySpellID?action=edit&redlink=1]
--- @return void
function FindFlyoutSlotBySpellID()
end
--- [https://wowpedia.fandom.com/wiki/API_FindSpellBookSlotBySpellID?action=edit&redlink=1]
--- @return void
function FindSpellBookSlotBySpellID()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_FindSpellOverrideByID]
--- @param spellID number
--- @return number @ overrideSpellID
function FindSpellOverrideByID(spellID)
end
--- [https://wowpedia.fandom.com/wiki/API_FlagTutorial?action=edit&redlink=1]
--- @return void
function FlagTutorial()
end
--- Flashes the game client icon in the Operating System.
--- [https://wowpedia.fandom.com/wiki/API_FlashClientIcon]
--- @return void
function FlashClientIcon()
end
--- Rotates the camera about the Z-axis.
--- [https://wowpedia.fandom.com/wiki/API_FlipCameraYaw]
--- @param angle number
--- @return void
function FlipCameraYaw(angle)
end
--- Returns whether a flyout contains a specific spell.
--- [https://wowpedia.fandom.com/wiki/API_FlyoutHasSpell]
--- @param flyoutID number @ flyout ID (as returned by GetSpellBookItemInfo or GetActionInfo).
--- @param spellID number @ spell ID.
--- @return boolean @ hasSpell
function FlyoutHasSpell(flyoutID, spellID)
end
--- Sets the focus target.
--- [https://wowpedia.fandom.com/wiki/API_FocusUnit]
--- @param unit string @ Unit to focus.
--- @return void
function FocusUnit(unit)
end
--- Start following an allied unit
--- [https://wowpedia.fandom.com/wiki/API_FollowUnit]
--- @param unit string @ the UnitID to follow, e.g. target, party1, raid1, etc..
--- @return void
function FollowUnit(unit)
end
--- Logs the player out immediately, even if outside a resting zone.
--- [https://wowpedia.fandom.com/wiki/API_ForceLogout]
--- @return void
function ForceLogout()
end
--- Instantly quits the game, bypassing the usual 20 seconds countdown.
--- [https://wowpedia.fandom.com/wiki/API_ForceQuit]
--- @return void
function ForceQuit()
end
--- [https://wowpedia.fandom.com/wiki/API_ForfeitDuel?action=edit&redlink=1]
--- @return void
function ForfeitDuel()
end
--- [https://wowpedia.fandom.com/wiki/API_FrameXML_Debug?action=edit&redlink=1]
--- @return void
function FrameXML_Debug()
end
--- [https://wowpedia.fandom.com/wiki/API_GMEuropaBugsEnabled?action=edit&redlink=1]
--- @return void
function GMEuropaBugsEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GMEuropaComplaintsEnabled?action=edit&redlink=1]
--- @return void
function GMEuropaComplaintsEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GMEuropaSuggestionsEnabled?action=edit&redlink=1]
--- @return void
function GMEuropaSuggestionsEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GMEuropaTicketsEnabled?action=edit&redlink=1]
--- @return void
function GMEuropaTicketsEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GMItemRestorationButtonEnabled?action=edit&redlink=1]
--- @return void
function GMItemRestorationButtonEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GMQuickTicketSystemEnabled?action=edit&redlink=1]
--- @return void
function GMQuickTicketSystemEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GMQuickTicketSystemThrottled?action=edit&redlink=1]
--- @return void
function GMQuickTicketSystemThrottled()
end
--- [https://wowpedia.fandom.com/wiki/API_GMReportLag?action=edit&redlink=1]
--- @return void
function GMReportLag()
end
--- [https://wowpedia.fandom.com/wiki/API_GMRequestPlayerInfo]
--- @return void
function GMRequestPlayerInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GMResponseResolve?action=edit&redlink=1]
--- @return void
function GMResponseResolve()
end
--- [https://wowpedia.fandom.com/wiki/API_GMSurveyAnswer?action=edit&redlink=1]
--- @return void
function GMSurveyAnswer()
end
--- [https://wowpedia.fandom.com/wiki/API_GMSurveyAnswerSubmit?action=edit&redlink=1]
--- @return void
function GMSurveyAnswerSubmit()
end
--- [https://wowpedia.fandom.com/wiki/API_GMSurveyCommentSubmit?action=edit&redlink=1]
--- @return void
function GMSurveyCommentSubmit()
end
--- [https://wowpedia.fandom.com/wiki/API_GMSurveyNumAnswers?action=edit&redlink=1]
--- @return void
function GMSurveyNumAnswers()
end
--- Usage: GMSurveyGetQuestion(index)
--- [https://wowpedia.fandom.com/wiki/API_GMSurveyQuestion]
--- @return void
function GMSurveyQuestion()
end
--- [https://wowpedia.fandom.com/wiki/API_GMSurveySubmit?action=edit&redlink=1]
--- @return void
function GMSurveySubmit()
end
--- [https://wowpedia.fandom.com/wiki/API_GameMovieFinished?action=edit&redlink=1]
--- @return void
function GameMovieFinished()
end
--- Returns the expansion level the account has been flagged for.
--- [https://wowpedia.fandom.com/wiki/API_GetAccountExpansionLevel]
--- @return number @ expansionLevel
function GetAccountExpansionLevel()
end
--- Returns the category number the requested achievement belongs to.
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementCategory]
--- @param achievementID number @ ID of the achievement to retrieve information for.
--- @return number @ categoryID
function GetAchievementCategory(achievementID)
end
--- Returns information about the comparison unit's achievements.
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementComparisonInfo]
--- @param achievementID number @ ID of the achievement to retrieve information for.
--- @return boolean, number, number, number @ completed, month, day, year
function GetAchievementComparisonInfo(achievementID)
end
--- Returns information about the given Achievement's specified criteria.
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementCriteriaInfo]
--- @param achievementID number
--- @param criteriaIndex number @ Index of the criteria to query, ascending from 1 up to GetAchievementNumCriteria(achievementID).
--- @param countHidden boolean
--- @return void
function GetAchievementCriteriaInfo(achievementID, criteriaIndex, countHidden)
end
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementCriteriaInfoByID]
--- @return void
function GetAchievementCriteriaInfoByID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementGuildRep?action=edit&redlink=1]
--- @return void
function GetAchievementGuildRep()
end
--- Returns information about an Achievement.
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementInfo]
--- @param achievementID_or_categoryID unknown
--- @param index number @ An offset into the achievement category, between 1 and GetCategoryNumAchievements(categoryID)
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ id, name, points, completed, month, day, year, description, flags, icon, rewardText, isGuild, wasEarnedByMe, earnedBy
function GetAchievementInfo(achievementID_or_categoryID, index)
end
--- Returns a achievementLink for the specified Achievement.
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementLink]
--- @param AchievementID number @ The ID of the Achievement.
--- @return string @ achievementLink
function GetAchievementLink(AchievementID)
end
--- Returns the number of criteria for the given Achievement.
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementNumCriteria]
--- @param achievementID unknown @ Uniquely identifies each achievement
--- @return number @ numCriteria
function GetAchievementNumCriteria(achievementID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementNumRewards?action=edit&redlink=1]
--- @return void
function GetAchievementNumRewards()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementReward?action=edit&redlink=1]
--- @return void
function GetAchievementReward()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementSearchProgress?action=edit&redlink=1]
--- @return void
function GetAchievementSearchProgress()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAchievementSearchSize?action=edit&redlink=1]
--- @return void
function GetAchievementSearchSize()
end
--- [https://wowpedia.fandom.com/wiki/API_GetActionAutocast?action=edit&redlink=1]
--- @return void
function GetActionAutocast()
end
--- Returns the index of the currently-selected action bar page.
--- [https://wowpedia.fandom.com/wiki/API_GetActionBarPage]
--- @return number @ index
function GetActionBarPage()
end
--- Gets the toggle states of the extra action bars.
--- [https://wowpedia.fandom.com/wiki/API_GetActionBarToggles]
--- @return number, number, number, number @ bottomLeftState, bottomRightState, sideRightState, sideRight2State
function GetActionBarToggles()
end
--- Returns information about the charges of a charge-accumulating player ability.
--- [https://wowpedia.fandom.com/wiki/API_GetActionCharges]
--- @param slot number @ The action slot to retrieve data from.
--- @return number, number, number, number, number @ currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate
function GetActionCharges(slot)
end
--- Retrieves the cooldown data of the action specified.
--- [https://wowpedia.fandom.com/wiki/API_GetActionCooldown]
--- @param slot number @ The action slot to retrieve data from.
--- @return number, number, number, number @ start, duration, enable, modRate
function GetActionCooldown(slot)
end
--- Counts the available uses of certain kinds of actions.
--- [https://wowpedia.fandom.com/wiki/API_GetActionCount]
--- @param actionSlot number @ An action slot ID.
--- @return number @ text
function GetActionCount(actionSlot)
end
--- Returns information about a specific action.
--- [https://wowpedia.fandom.com/wiki/API_GetActionInfo]
--- @param slot number @ Action slot to retrieve information about.
--- @return string, unknown, unknown @ actionType, id, subType
function GetActionInfo(slot)
end
--- Returns information about a loss-of-control cooldown affecting an action.
--- [https://wowpedia.fandom.com/wiki/API_GetActionLossOfControlCooldown]
--- @param slot number @ action slot to query information about.
--- @return number, number @ start, duration
function GetActionLossOfControlCooldown(slot)
end
--- Gets the text label for an action.
--- [https://wowpedia.fandom.com/wiki/API_GetActionText]
--- @param actionSlot unknown
--- @return unknown @ text
function GetActionText(actionSlot)
end
--- Returns the filepath for an action's texture.
--- [https://wowpedia.fandom.com/wiki/API_GetActionTexture]
--- @param actionSlot unknown
--- @return unknown @ texture
function GetActionTexture(actionSlot)
end
--- Returns the information for a specific race's active artifact.
--- [https://wowpedia.fandom.com/wiki/API_GetActiveArtifactByRace]
--- @param raceIndex unknown
--- @param artifactIndex number
--- @return string, string, string, string, string, number, string @ artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture
function GetActiveArtifactByRace(raceIndex, artifactIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetActiveLevel?action=edit&redlink=1]
--- @return void
function GetActiveLevel()
end
--- [https://wowpedia.fandom.com/wiki/API_GetActiveLootRollIDs?action=edit&redlink=1]
--- @return void
function GetActiveLootRollIDs()
end
--- [https://wowpedia.fandom.com/wiki/API_GetActiveQuestID?action=edit&redlink=1]
--- @return void
function GetActiveQuestID()
end
--- Returns the index of the current active specialization/talent/glyph group.
--- [https://wowpedia.fandom.com/wiki/API_GetActiveSpecGroup]
--- @param isInspect boolean @ If true returns the information for the inspected unit instead of the player. Defaults to false.
--- @return number @ activeSpec
function GetActiveSpecGroup(isInspect)
end
--- [https://wowpedia.fandom.com/wiki/API_GetActiveTitle?action=edit&redlink=1]
--- @return void
function GetActiveTitle()
end
--- Returns the total time used by the specified AddOn.
--- [https://wowpedia.fandom.com/wiki/API_GetAddOnCPUUsage]
--- @param index_or_name unknown
--- @return number @ time
function GetAddOnCPUUsage(index_or_name)
end
--- Get the required dependencies for an AddOn.
--- [https://wowpedia.fandom.com/wiki/API_GetAddOnDependencies]
--- @param index_or_name unknown
--- @return unknown, unknown, unknown, unknown @ dep1, dep2, dep3, ...
function GetAddOnDependencies(index_or_name)
end
--- Get the enabled state of an addon for a character
--- [https://wowpedia.fandom.com/wiki/API_GetAddOnEnableState]
--- @param character string @ The name of the character to check against or nil.
--- @param addonIndex_or_AddOnName unknown
--- @return number @ enabledState
function GetAddOnEnableState(character, addonIndex_or_AddOnName)
end
--- Get information about an AddOn.
--- [https://wowpedia.fandom.com/wiki/API_GetAddOnInfo]
--- @param index_or_name unknown
--- @return string, string, string, boolean, string, string, boolean @ name, title, notes, loadable, reason, security, newVersion
function GetAddOnInfo(index_or_name)
end
--- [https://wowpedia.fandom.com/wiki/API_GetAddOnMemoryUsage?action=edit&redlink=1]
--- @return void
function GetAddOnMemoryUsage()
end
--- Returns addon metadata.
--- [https://wowpedia.fandom.com/wiki/API_GetAddOnMetadata]
--- @param addon string @ Addon name to look up metadata for
--- @param field string @ Field name. May be Title, Notes, Author, Version, or anything starting with X-
--- @return string @ value
function GetAddOnMetadata(addon, field)
end
--- [https://wowpedia.fandom.com/wiki/API_GetAddOnOptionalDependencies?action=edit&redlink=1]
--- @return void
function GetAddOnOptionalDependencies()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAllowLowLevelRaid?action=edit&redlink=1]
--- @return void
function GetAllowLowLevelRaid()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAlternativeDefaultLanguage?action=edit&redlink=1]
--- @return void
function GetAlternativeDefaultLanguage()
end
--- Returns the localized name for Archaeology.
--- [https://wowpedia.fandom.com/wiki/API_GetArchaeologyInfo]
--- @return unknown @ izedName
function GetArchaeologyInfo()
end
--- Returns the information for a specific race used in Archaeology.
--- [https://wowpedia.fandom.com/wiki/API_GetArchaeologyRaceInfo]
--- @param raceIndex number @ Index of the race to query, between 1 and GetNumArchaeologyRaces().
--- @return string, number, number, number, number, number @ raceName, raceTexture, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments
function GetArchaeologyRaceInfo(raceIndex)
end
--- Returns information about a branch of Archaeology.
--- [https://wowpedia.fandom.com/wiki/API_GetArchaeologyRaceInfoByID]
--- @param branchID number @ ID of the research branch (race) to query. The following are the valid IDs:
--- @return string, number, number, number, number, number @ raceName, raceTextureID, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments
function GetArchaeologyRaceInfoByID(branchID)
end
--- Gets the time left until the next resurrection cast.
--- [https://wowpedia.fandom.com/wiki/API_GetAreaSpiritHealerTime]
--- @return number @ timeleft
function GetAreaSpiritHealerTime()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetAreaText]
--- @return string @ areaText
function GetAreaText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetArenaOpponentSpec?action=edit&redlink=1]
--- @return void
function GetArenaOpponentSpec()
end
--- Returns the information for a specific race's artifact.
--- [https://wowpedia.fandom.com/wiki/API_GetArtifactInfoByRace]
--- @param raceIndex number @ Index of the race to pick the artifact from.
--- @param artifactIndex number @ Index of the artifact.
--- @return string, string, number, string, string, number, string, number, number @ artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, firstCompletionTime, completionCount
function GetArtifactInfoByRace(raceIndex, artifactIndex)
end
--- Returns information about current used fragments for the selected artifact.
--- [https://wowpedia.fandom.com/wiki/API_GetArtifactProgress]
--- @return number, number, number @ numFragmentsCollected, numFragmentsAdded, numFragmentsRequired
function GetArtifactProgress()
end
--- Returns attack power granted by particular amount of a particular stat.
--- [https://wowpedia.fandom.com/wiki/API_GetAttackPowerForStat]
--- @param statId number @ Index of the stat (Strength, Agility, ...) to check the bonus AP of.
--- @param amount number @ Amount of the stat to check the AP value of.
--- @return number @ ap
function GetAttackPowerForStat(statId, amount)
end
--- [https://wowpedia.fandom.com/wiki/API_GetAutoCompletePresenceID?action=edit&redlink=1]
--- @return void
function GetAutoCompletePresenceID()
end
--- Returns a table of realm names for auto-completion.
--- [https://wowpedia.fandom.com/wiki/API_GetAutoCompleteRealms]
--- @param realmNames table @ If a table is provided, it will be populated with realm names; otherwise, a new table will be created.
--- @return table @ realmNames
function GetAutoCompleteRealms(realmNames)
end
--- Returns possible player names matching a given prefix string and specified requirements.
--- [https://wowpedia.fandom.com/wiki/API_GetAutoCompleteResults]
--- @param text string @ First characters of the possible names to be autocompleted
--- @param numResults number @ Number of results desired.
--- @param cursorPosition number @ Position of the cursor within the editbox (i.e. how much of the text string should be matching).
--- @param allowFullMatch boolean
--- @param includeBitField number @ Bit mask of filters that the results must match at least one of.
--- @param excludeBitField number @ Bit mask of filters that the results must not match any of.
--- @return unknown @ results
function GetAutoCompleteResults(text, numResults, cursorPosition, allowFullMatch, includeBitField, excludeBitField)
end
--- Returns whether guild invitations are being automatically declined.
--- [https://wowpedia.fandom.com/wiki/API_GetAutoDeclineGuildInvites]
--- @return number @ enabled
function GetAutoDeclineGuildInvites()
end
--- Returns information about a popup quest notification.
--- [https://wowpedia.fandom.com/wiki/API_GetAutoQuestPopUp]
--- @param index number @ which popup to get information about, between 1 and GetNumAutoQuestPopUps()
--- @return number, string @ questID, type
function GetAutoQuestPopUp(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetAvailableBandwidth?action=edit&redlink=1]
--- @return void
function GetAvailableBandwidth()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAvailableLevel?action=edit&redlink=1]
--- @return void
function GetAvailableLevel()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAvailableLocaleInfo]
--- @return void
function GetAvailableLocaleInfo()
end
--- Two functions return lists of the available locales:
--- [https://wowpedia.fandom.com/wiki/API_GetAvailableLocales]
--- @param ignoreLocalRestrictions boolean @ Returns the complete list, not only those locales which the game client might use in the current region (NA, Europe, etc.)
--- @return unknown, unknown, unknown, unknown @ aaAA, bbBB, ccCC, ...
function GetAvailableLocales(ignoreLocalRestrictions)
end
--- Returns information about the type of an available quest.
--- [https://wowpedia.fandom.com/wiki/API_GetAvailableQuestInfo]
--- @param index number @ Index of the available quest to query, starting from 1.
--- @return boolean, number, boolean, boolean, number @ isTrivial, frequency, isRepeatable, isLegendary, questID
function GetAvailableQuestInfo(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetAvailableTitle?action=edit&redlink=1]
--- @return void
function GetAvailableTitle()
end
--- Returns the average item level of the player's character and average item level equipped.
--- [https://wowpedia.fandom.com/wiki/API_GetAverageItemLevel]
--- @return number, number, number @ avgItemLevel, avgItemLevelEquipped, avgItemLevelPvp
function GetAverageItemLevel()
end
--- [https://wowpedia.fandom.com/wiki/API_GetAvoidance?action=edit&redlink=1]
--- @return void
function GetAvoidance()
end
--- [https://wowpedia.fandom.com/wiki/API_GetBackgroundLoadingStatus?action=edit&redlink=1]
--- @return void
function GetBackgroundLoadingStatus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetBackpackAutosortDisabled?action=edit&redlink=1]
--- @return void
function GetBackpackAutosortDisabled()
end
--- Returns the name of the bag for the selected index
--- [https://wowpedia.fandom.com/wiki/API_GetBagName]
--- @param index number @ number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags, numbered right to left
--- @return string @ bagName
function GetBagName(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetBagSlotFlag?action=edit&redlink=1]
--- @return void
function GetBagSlotFlag()
end
--- [https://wowpedia.fandom.com/wiki/API_GetBankAutosortDisabled?action=edit&redlink=1]
--- @return void
function GetBankAutosortDisabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GetBankBagSlotFlag?action=edit&redlink=1]
--- @return void
function GetBankBagSlotFlag()
end
--- Returns the price of a particular bank slot.
--- [https://wowpedia.fandom.com/wiki/API_GetBankSlotCost]
--- @param numSlots number @ Number of slots already purchased.
--- @return number @ cost
function GetBankSlotCost(numSlots)
end
--- Returns information about the current selection for a barber shop customization.
--- [https://wowpedia.fandom.com/wiki/API_GetBarberShopStyleInfo]
--- @param catId number @ Ascending index of the customization category to retrieve information for.
--- @return string, unknown, unknown, number @ name, unknown, unknown, isCurrent
function GetBarberShopStyleInfo(catId)
end
--- Returns the total costs of the cosmetic changes.
--- [https://wowpedia.fandom.com/wiki/API_GetBarberShopTotalCost]
--- @return void
function GetBarberShopTotalCost()
end
--- Returns the faction played during a cross faction battleground.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldArenaFaction]
--- @return unknown @ myFaction
function GetBattlefieldArenaFaction()
end
--- Get estimated wait for entry into the battlefield.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldEstimatedWaitTime]
--- @return number @ waitTime
function GetBattlefieldEstimatedWaitTime()
end
--- Used to position the flag icon on the world map and the battlefield minimap.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldFlagPosition]
--- @param index number @ Index to get the flag position from
--- @return number, number, string @ flagX, flagY, flagToken
function GetBattlefieldFlagPosition(index)
end
--- Get shutdown timer for the battlefield instance.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldInstanceExpiration]
--- @return number @ expiration
function GetBattlefieldInstanceExpiration()
end
--- Returns the time passed since the battleground started.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldInstanceRunTime]
--- @return number @ time
function GetBattlefieldInstanceRunTime()
end
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldMapIconScale?action=edit&redlink=1]
--- @return void
function GetBattlefieldMapIconScale()
end
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldPortExpiration]
--- @param index number @ Index of queue to get the expiration from
--- @return number @ expiration
function GetBattlefieldPortExpiration(index)
end
--- Returns information about a player's score in battlegrounds.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldScore]
--- @param index number @ The characters index in battlegrounds, going from 1 to GetNumBattlefieldScores().
--- @return string, number, number, number, number, number, string, string, string, number, number, unknown, unknown, unknown, unknown, string @ name, killingBlows, honorableKills, deaths, honorGained, faction, race, class, classToken, damageDone, healingDone, bgRating, ratingChange, preMatchMMR, mmrChange, talentSpec
function GetBattlefieldScore(index)
end
--- Get data from the custom battlefield scoreboard columns
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldStatData]
--- @param playerIndex number @ Player you want to grab the data for
--- @param slotIndex number @ Column you want to grab the data from
--- @return unknown @ battlefieldStatData
function GetBattlefieldStatData(playerIndex, slotIndex)
end
--- Get the status of the arena, battleground, or wargame that the player is either queued for or inside.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldStatus]
--- @param index number @ Index of the battlefield you wish to view, in the range of 1 to GetMaxBattlefieldID()
--- @return string, string, number, number, unknown, string, string, string, unknown, string, string @ status, mapName, teamSize, registeredMatch, suspendedQueue, queueType, gameType, role, asGroup, shortDescription, longDescription
function GetBattlefieldStatus(index)
end
--- Returns information regarding an Arena team
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldTeamInfo]
--- @param index number @ Which team to get information on, 0 is Green team and 1 is Gold Team
--- @return string, number, number, number @ teamName, oldTeamRating, newTeamRating, teamRating
function GetBattlefieldTeamInfo(index)
end
--- Get time this player's been in the queue in milliseconds
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldTimeWaited]
--- @param battlegroundQueuePosition number @ The queue position.
--- @return number @ timeInQueue
function GetBattlefieldTimeWaited(battlegroundQueuePosition)
end
--- Get the winner of the battlefield
--- [https://wowpedia.fandom.com/wiki/API_GetBattlefieldWinner]
--- @return number @ winner
function GetBattlefieldWinner()
end
--- Returns information about a battleground type.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlegroundInfo]
--- @param index number @ battleground type index, 1 to GetNumBattlegroundTypes().
--- @return string, number, number, number, number, string @ name, canEnter, isHoliday, isRandom, battleGroundID, info
function GetBattlegroundInfo(index)
end
--- [NYI] Returns battlegrounds points earned by a team.
--- [https://wowpedia.fandom.com/wiki/API_GetBattlegroundPoints]
--- @param team number @ team to query the points of; 0 for Horde, 1 for Alliance.
--- @return number, number @ currentPoints, maxPoints
function GetBattlegroundPoints(team)
end
--- Returns the dungeon ID of the most appropriate Flex Raid instance for the player.
--- [https://wowpedia.fandom.com/wiki/API_GetBestFlexRaidChoice]
--- @return number @ flexDungeonID
function GetBestFlexRaidChoice()
end
--- Returns the suggested/default Dungeon Id for the Raid Finder [1]
--- [https://wowpedia.fandom.com/wiki/API_GetBestRFChoice]
--- @return number @ dungeonId
function GetBestRFChoice()
end
--- Returns the time spent logged in in current billing unit. This function is to limit players from playing the game for too long.
--- [https://wowpedia.fandom.com/wiki/API_GetBillingTimeRested]
--- @return number @ secondsRemaining
function GetBillingTimeRested()
end
--- Finds the subzone the player's Hearthstone is set to.
--- [https://wowpedia.fandom.com/wiki/API_GetBindLocation]
--- @return unknown @ bindLocation
function GetBindLocation()
end
--- Returns the command name and all keys currently bound to the specified binding.
--- [https://wowpedia.fandom.com/wiki/API_GetBinding]
--- @param index number @ index of the binding to query, from 1 to GetNumBindings().
--- @param mode number @ optional, defaults to 1) - ?
--- @return string, string, unknown, unknown, unknown @ command, category, key1, key2, ...
function GetBinding(index, mode)
end
--- Returns the name of the action performed by the specified binding.
--- [https://wowpedia.fandom.com/wiki/API_GetBindingAction]
--- @param binding string @ The name of the key (eg. BUTTON1, 1, CTRL-G)
--- @param checkOverride boolean @ optional) - if true, override bindings will be checked, otherwise, only default (bindings.xml/SetBinding) bindings are consulted.
--- @return string @ action
function GetBindingAction(binding, checkOverride)
end
--- Returns the binding action performed when the specified key combination is triggered.
--- [https://wowpedia.fandom.com/wiki/API_GetBindingByKey]
--- @param key string @ binding key to query, e.g. G, ALT-G, ALT-CTRL-SHIFT-F1.
--- @return string @ bindingAction
function GetBindingByKey(key)
end
--- Returns all keys currently bound to the command specified by command. This function is almost identical to GetBinding(index) except it takes the command name as an argument instead of the index and doesn't return the command name along with the key bindings.
--- [https://wowpedia.fandom.com/wiki/API_GetBindingKey]
--- @param command unknown @ The name of the command to get key bindings for (e.g. MOVEFORWARD, TOGGLEFRIENDSTAB)
--- @return string, string, unknown @ key1, key2, ...
function GetBindingKey(command)
end
--- Returns the localized string value for the given key and prefix. Essentially a glorified getglobal() function.
--- [https://wowpedia.fandom.com/wiki/API_GetBindingText]
--- @param key string @ optional) - The name of the key (e.g. UP, SHIFT-PAGEDOWN)
--- @param prefix string @ optional) - The prefix of the variable name you're looking for. Usually KEY_ or BINDING_NAME_.
--- @param abbreviate boolean @ optional) - Whether to return an abbreviated version of the modifier keys
--- @return string @ text
function GetBindingText(key, prefix, abbreviate)
end
--- Returns the Player's block chance in percentage.
--- [https://wowpedia.fandom.com/wiki/API_GetBlockChance]
--- @return number @ blockChance
function GetBlockChance()
end
--- [https://wowpedia.fandom.com/wiki/API_GetBonusBarIndex?action=edit&redlink=1]
--- @return void
function GetBonusBarIndex()
end
--- Returns the current bonus action bar index.
--- [https://wowpedia.fandom.com/wiki/API_GetBonusBarOffset]
--- @return unknown @ offset
function GetBonusBarOffset()
end
--- Returns information about the current client build.
--- [https://wowpedia.fandom.com/wiki/API_GetBuildInfo]
--- @return string, string, string, number @ version, build, date, tocversion
function GetBuildInfo()
end
--- Return information about an item that can be bought back from a merchant.
--- [https://wowpedia.fandom.com/wiki/API_GetBuybackItemInfo]
--- @param slotIndex number @ The index of a slot in the merchant's buyback inventory, between 1 and GetNumBuybackItems()
--- @return string, number, number, number @ name, icon, price, quantity
function GetBuybackItemInfo(slotIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetBuybackItemLink?action=edit&redlink=1]
--- @return void
function GetBuybackItemLink()
end
--- Returns information on a console variable.
--- [https://wowpedia.fandom.com/wiki/API_GetCVarInfo]
--- @param name string @ name of the CVar to query the value of. Only accepts console variables (i.e. not console commands)
--- @return string, string, boolean, boolean, boolean, boolean, boolean @ value, defaultValue, account, character, unknown5, setCvarOnly, readOnly
function GetCVarInfo(name)
end
--- [https://wowpedia.fandom.com/wiki/API_GetCVarSettingValidity?action=edit&redlink=1]
--- @return void
function GetCVarSettingValidity()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCallPetSpellInfo?action=edit&redlink=1]
--- @return void
function GetCallPetSpellInfo()
end
--- Gets the current zoom level of the camera.
--- [https://wowpedia.fandom.com/wiki/API_GetCameraZoom]
--- @return number @ zoom
function GetCameraZoom()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCategoryAchievementPoints?action=edit&redlink=1]
--- @return void
function GetCategoryAchievementPoints()
end
--- Returns information about the given category.
--- [https://wowpedia.fandom.com/wiki/API_GetCategoryInfo]
--- @param categoryID number
--- @return string, number, number @ title, parentCategoryID, flags
function GetCategoryInfo(categoryID)
end
--- Returns the list of Achievement categories.
--- [https://wowpedia.fandom.com/wiki/API_GetCategoryList]
--- @return table @ idTable
function GetCategoryList()
end
--- Returns the total, completed and incompleted number of achievements in a specific category.
--- [https://wowpedia.fandom.com/wiki/API_GetCategoryNumAchievements]
--- @param categoryId number @ Achievement category ID, as returned by GetCategoryList.
--- @param includeAll boolean @ If true-equivalent, include all achievements, otherwise, only includes those currently visible
--- @return number, number, number @ total, completed, incompleted
function GetCategoryNumAchievements(categoryId, includeAll)
end
--- [https://wowpedia.fandom.com/wiki/API_GetCemeteryPreference?action=edit&redlink=1]
--- @return void
function GetCemeteryPreference()
end
--- Retrieves channels (and category headers) that would be displayed in Blizzards ChannelFrame.
--- [https://wowpedia.fandom.com/wiki/API_GetChannelDisplayInfo]
--- @param i unknown
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ name, header, collapsed, channelNumber, count, active, category, voiceEnabled, voiceActive
function GetChannelDisplayInfo(i)
end
--- Retrieves joined channels, the return list can be of variable length so the 4th return is id2 and so on. (see Blizzard_TradeSkillUI.lua TradeSkillUIMixin:InitLinkToMenu())
--- [https://wowpedia.fandom.com/wiki/API_GetChannelList]
--- @return number, string, boolean, number @ id, name, disabled, ...
function GetChannelList()
end
--- Returns information about the specified channel.
--- [https://wowpedia.fandom.com/wiki/API_GetChannelName]
--- @param id_or_name unknown
--- @return number, string, number, boolean @ id, name, instanceID, isCommunitiesChannel
function GetChannelName(id_or_name)
end
--- Return the numeric type index for a specific chat type.
--- [https://wowpedia.fandom.com/wiki/API_GetChatTypeIndex]
--- @param typeCode string @ The type code for the chat type (One of the key values of the ChatTypeInfo table).
--- @return number @ typeIndex
function GetChatTypeIndex(typeCode)
end
--- Get the channels received by a chat window.
--- [https://wowpedia.fandom.com/wiki/API_GetChatWindowChannels]
--- @param frameId number @ The frame number of the chat frame to be queried (starts at 1).
--- @return string, number, string, number, unknown @ name1, zone1, name2, zone2, ...
function GetChatWindowChannels(frameId)
end
--- Retrieves configuration information about a chat window.
--- [https://wowpedia.fandom.com/wiki/API_GetChatWindowInfo]
--- @param frameIndex number @ The index of the chat window to get information for (starts at 1).
--- @return string, number, number, number, number, number, number, number, number, unknown @ name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable
function GetChatWindowInfo(frameIndex)
end
--- Returns chat types received by a chat window.
--- [https://wowpedia.fandom.com/wiki/API_GetChatWindowMessages]
--- @param index number @ Chat window index, ascending from 1.
--- @return unknown, unknown @ type1, ...
function GetChatWindowMessages(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetChatWindowSavedDimensions?action=edit&redlink=1]
--- @return void
function GetChatWindowSavedDimensions()
end
--- [https://wowpedia.fandom.com/wiki/API_GetChatWindowSavedPosition?action=edit&redlink=1]
--- @return void
function GetChatWindowSavedPosition()
end
--- Returns information about a class.
--- [https://wowpedia.fandom.com/wiki/API_GetClassInfo]
--- @param classIndex number @ a number between 1 and GetNumClasses()
--- @return string, string, number @ className, classFile, classID
function GetClassInfo(classIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetClickFrame?action=edit&redlink=1]
--- @return void
function GetClickFrame()
end
--- Returns the expansion level of the game client.
--- [https://wowpedia.fandom.com/wiki/API_GetClientDisplayExpansionLevel]
--- @return number @ expansionLevel
function GetClientDisplayExpansionLevel()
end
--- Returns the path to the texture used for a given amount of money.
--- [https://wowpedia.fandom.com/wiki/API_GetCoinIcon]
--- @param amount number @ amount of money in copper
--- @return string @ texturePath
function GetCoinIcon(amount)
end
--- Breaks down an amount of money into gold/silver/copper, inserts separator strings, and returns the resulting string.
--- [https://wowpedia.fandom.com/wiki/API_GetCoinText]
--- @param amount number @ the amount of money in copper (for example, the return value from GetMoney)
--- @param separator string @ ?Optional. Could be nil. - a string to insert between the formatted amounts of currency, if there is more than one type
--- @return string @ formattedAmount
function GetCoinText(amount, separator)
end
--- Breaks down an amount of money into gold/silver/copper, inserts appropriate |T texture strings for coin icons, and returns the resulting string.
--- [https://wowpedia.fandom.com/wiki/API_GetCoinTextureString]
--- @param amount number @ the amount of money in copper (for example, the return value from GetMoney)
--- @param fontHeight unknown @ Optional Number - the height of the coin icon; if not specified, defaults to 14.
--- @return string @ formattedAmount
function GetCoinTextureString(amount, fontHeight)
end
--- Returns the number of points of a specific combat rating the player has.
--- [https://wowpedia.fandom.com/wiki/API_GetCombatRating]
--- @param combatRatingIdentifier number @ One of the following values from FrameXML/PaperDollFrame.lua:
--- @return number @ rating
function GetCombatRating(combatRatingIdentifier)
end
--- Returns the bonus, in percent (or other converted units, such as skill points), of a specific combat rating for the player.
--- [https://wowpedia.fandom.com/wiki/API_GetCombatRatingBonus]
--- @param combatRatingIdentifier number @ One of the following values from FrameXML/PaperDollFrame.lua:
--- @return number @ bonus
function GetCombatRatingBonus(combatRatingIdentifier)
end
--- [https://wowpedia.fandom.com/wiki/API_GetCombatRatingBonusForCombatRatingValue?action=edit&redlink=1]
--- @return void
function GetCombatRatingBonusForCombatRatingValue()
end
--- Retrieves the number of combo points gained by a player.
--- [https://wowpedia.fandom.com/wiki/API_GetComboPoints]
--- @param unit string @ unitId) - Either player or vehicle. (More strings/UnitIds may be possible but have not been seen in Blizzard code.)
--- @param target string @ unitId) - Normally target, but can be any valid UnitId.
--- @return number @ comboPoints
function GetComboPoints(unit, target)
end
--- Returns information about the companions you have.
--- [https://wowpedia.fandom.com/wiki/API_GetCompanionInfo]
--- @param type string @ Companion type to query: CRITTER or MOUNT.
--- @param id number @ Index of the slot to query. Starting at 1 and going up to GetNumCompanions(type).
--- @return number, string, number, string, number, number @ creatureID, creatureName, creatureSpellID, icon, issummoned, mountType
function GetCompanionInfo(type, id)
end
--- [https://wowpedia.fandom.com/wiki/API_GetComparisonAchievementPoints?action=edit&redlink=1]
--- @return void
function GetComparisonAchievementPoints()
end
--- [https://wowpedia.fandom.com/wiki/API_GetComparisonCategoryNumAchievements?action=edit&redlink=1]
--- @return void
function GetComparisonCategoryNumAchievements()
end
--- Return the value of the requested Statistic from the comparison unit.
--- [https://wowpedia.fandom.com/wiki/API_GetComparisonStatistic]
--- @param achievementID number @ The ID of the Achievement.
--- @return string @ value
function GetComparisonStatistic(achievementID)
end
--- Populates a table with references to unused slots inside a container.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerFreeSlots]
--- @param index number @ the slot containing the bag, e.g. 0 for backpack, etc.
--- @param returnTable table @ optional) Provide an empty table and the function will populate it with the free slots
--- @return table @ returnTable
function GetContainerFreeSlots(index, returnTable)
end
--- Returns cooldown information for an item in your inventory
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemCooldown]
--- @param bagID number @ number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags
--- @param slot number @ slot number of the bag item you want the info for.
--- @return unknown, unknown, unknown @ startTime, duration, isEnabled
function GetContainerItemCooldown(bagID, slot)
end
--- Returns current and maximum durability of an item in the character's bags.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemDurability]
--- @param bag number @ Index of the bag slot the bag storing the item is in.
--- @param slot number @ Index of the bag slot containing the item to query durability of.
--- @return number, number @ current, maximum
function GetContainerItemDurability(bag, slot)
end
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemEquipmentSetInfo?action=edit&redlink=1]
--- @return void
function GetContainerItemEquipmentSetInfo()
end
--- Returns the item id of the item in a particular container slot.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemID]
--- @param bag number @ BagID) - Index of the bag to query.
--- @param slot number @ Index of the slot within the bag to query; ascending from 1.
--- @return number @ itemId
function GetContainerItemID(bag, slot)
end
--- Returns information about an item in a container slot.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemInfo]
--- @param bagID number @ bagID) - number of the bag the item is in, e.g. 0 for your backpack.
--- @param slot number @ index of the slot inside the bag to look up.
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ icon, itemCount, locked, quality, readable, lootable, itemLink, isFiltered, noValue, itemID
function GetContainerItemInfo(bagID, slot)
end
--- Returns a link of the object located in the specified slot of a specified bag.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemLink]
--- @param bagID number @ Bag index (bagID). Valid indices are integers -2 through 11. 0 is the backpack.
--- @param slotIndex number @ Slot index within the specified bag, ascending from 1. Slot 1 is typically the leftmost topmost slot.
--- @return string @ itemLink
function GetContainerItemLink(bagID, slotIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemPurchaseCurrency?action=edit&redlink=1]
--- @return void
function GetContainerItemPurchaseCurrency()
end
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemPurchaseInfo?action=edit&redlink=1]
--- @return void
function GetContainerItemPurchaseInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemPurchaseItem?action=edit&redlink=1]
--- @return void
function GetContainerItemPurchaseItem()
end
--- Returns whether the item in the slot is a quest item.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerItemQuestInfo]
--- @param bag number @ BagID) - Index of the bag to query.
--- @param slot number @ Index of the slot within the bag (ascending from 1) to query.
--- @return number, number, number @ isQuestItem, questId, isActive
function GetContainerItemQuestInfo(bag, slot)
end
--- Returns the total number of free slots in the bag an the type of items that can go into it specified by the index.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerNumFreeSlots]
--- @param bagID number @ the slot containing the bag, e.g. 0 for backpack, etc.
--- @return number, number @ numberOfFreeSlots, bagType
function GetContainerNumFreeSlots(bagID)
end
--- Returns the total number of slots in the bag specified by the index.
--- [https://wowpedia.fandom.com/wiki/API_GetContainerNumSlots]
--- @param bagID number @ the slot containing the bag, e.g. 0 for backpack, etc.
--- @return number @ numberOfSlots
function GetContainerNumSlots(bagID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetCorpseRecoveryDelay?action=edit&redlink=1]
--- @return void
function GetCorpseRecoveryDelay()
end
--- Tracks the extent to which a player is wearing items touched by N'Zoth's influence.
--- [https://wowpedia.fandom.com/wiki/API_GetCorruption]
--- @return number @ corruption
function GetCorruption()
end
--- Tracks how much the player has offset their exposure to dangers that result from wearing items touched by N'Zoth's influence.
--- [https://wowpedia.fandom.com/wiki/API_GetCorruptionResistance]
--- @return number @ corruptionResistance
function GetCorruptionResistance()
end
--- Returns the player's critical hit chance.
--- [https://wowpedia.fandom.com/wiki/API_GetCritChance]
--- @return number @ critChance
function GetCritChance()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCritChanceProvidesParryEffect?action=edit&redlink=1]
--- @return void
function GetCritChanceProvidesParryEffect()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCriteriaSpell?action=edit&redlink=1]
--- @return void
function GetCriteriaSpell()
end
--- Returns the current arena season
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentArenaSeason]
--- @return number @ season
function GetCurrentArenaSeason()
end
--- Returns whether account- or character-specific bindings are active.
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentBindingSet]
--- @return number @ which
function GetCurrentBindingSet()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentCombatTextEventInfo?action=edit&redlink=1]
--- @return void
function GetCurrentCombatTextEventInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentEventID?action=edit&redlink=1]
--- @return void
function GetCurrentEventID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentGlyphNameForSpell?action=edit&redlink=1]
--- @return void
function GetCurrentGlyphNameForSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentGraphicsSetting?action=edit&redlink=1]
--- @return void
function GetCurrentGraphicsSetting()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentGuildBankTab?action=edit&redlink=1]
--- @return void
function GetCurrentGuildBankTab()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentKeyBoardFocus?action=edit&redlink=1]
--- @return void
function GetCurrentKeyBoardFocus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentLevelFeatures?action=edit&redlink=1]
--- @return void
function GetCurrentLevelFeatures()
end
--- For the level you put in, it returns the ID of the spell that will become available.
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentLevelSpells]
--- @return void
function GetCurrentLevelSpells()
end
--- Returns a numeric ID representing the region the player is currently logged into.
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentRegion]
--- @return unknown @ regionID
function GetCurrentRegion()
end
--- Returns the name of the current region, as determined by the existing `GetCurrentRegion()` function.
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentRegionName]
--- @return string @ regionName
function GetCurrentRegionName()
end
--- Returns the index of the current resolution in effect
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentResolution]
--- @return unknown @ index
function GetCurrentResolution()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentScaledResolution?action=edit&redlink=1]
--- @return void
function GetCurrentScaledResolution()
end
--- Returns the title currently used by the player.
--- [https://wowpedia.fandom.com/wiki/API_GetCurrentTitle]
--- @return number @ currentTitle
function GetCurrentTitle()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCursorDelta?action=edit&redlink=1]
--- @return void
function GetCursorDelta()
end
--- Returns information about what the mouse cursor is holding.
--- [https://wowpedia.fandom.com/wiki/API_GetCursorInfo]
--- @return unknown, unknown @ infoType, ...
function GetCursorInfo()
end
--- Returns the amount of copper held on the cursor.
--- [https://wowpedia.fandom.com/wiki/API_GetCursorMoney]
--- @return number @ copper
function GetCursorMoney()
end
--- Returns the cursor's position on the screen.
--- [https://wowpedia.fandom.com/wiki/API_GetCursorPosition]
--- @return number, number @ x, y
function GetCursorPosition()
end
--- [https://wowpedia.fandom.com/wiki/API_GetCustomizationDetails?action=edit&redlink=1]
--- @return void
function GetCustomizationDetails()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDailyQuestsCompleted?action=edit&redlink=1]
--- @return void
function GetDailyQuestsCompleted()
end
--- Returns a chat link for a specific death.
--- [https://wowpedia.fandom.com/wiki/API_GetDeathRecapLink]
--- @param recapID number @ The specific death to view, from 1 to the most recent death.
--- @return unknown @ recapLink
function GetDeathRecapLink(recapID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetDefaultGraphicsQuality?action=edit&redlink=1]
--- @return void
function GetDefaultGraphicsQuality()
end
--- Returns the player's default language.
--- [https://wowpedia.fandom.com/wiki/API_GetDefaultLanguage]
--- @return string, number @ language, languageID
function GetDefaultLanguage()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDefaultScale?action=edit&redlink=1]
--- @return void
function GetDefaultScale()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDefaultVideoOption?action=edit&redlink=1]
--- @return void
function GetDefaultVideoOption()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDefaultVideoOptions?action=edit&redlink=1]
--- @return void
function GetDefaultVideoOptions()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDefaultVideoQualityOption?action=edit&redlink=1]
--- @return void
function GetDefaultVideoQualityOption()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDemotionRank?action=edit&redlink=1]
--- @return void
function GetDemotionRank()
end
--- Returns detailed item level information about a given item.
--- [https://wowpedia.fandom.com/wiki/API_GetDetailedItemLevelInfo]
--- @param itemID_or_itemString_or_itemName_or_itemLink unknown
--- @return number, boolean, number @ effectiveILvl, isPreview, baseILvl
function GetDetailedItemLevelInfo(itemID_or_itemString_or_itemName_or_itemLink)
end
--- Returns information about a difficulty.
--- [https://wowpedia.fandom.com/wiki/API_GetDifficultyInfo]
--- @param id number @ difficulty ID to query, ascending from 1.
--- @return string, string, boolean, boolean, boolean, boolean, number @ name, groupType, isHeroic, isChallengeMode, displayHeroic, displayMythic, toggleDifficultyID
function GetDifficultyInfo(id)
end
--- Returns the Player's dodge chance in percentage.
--- [https://wowpedia.fandom.com/wiki/API_GetDodgeChance]
--- @return number @ dodgeChance
function GetDodgeChance()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDodgeChanceFromAttribute?action=edit&redlink=1]
--- @return void
function GetDodgeChanceFromAttribute()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDownloadedPercentage?action=edit&redlink=1]
--- @return void
function GetDownloadedPercentage()
end
--- Returns the player's currently selected dungeon difficulty.
--- [https://wowpedia.fandom.com/wiki/API_GetDungeonDifficultyID]
--- @return number @ difficultyID
function GetDungeonDifficultyID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDungeonForRandomSlot?action=edit&redlink=1]
--- @return void
function GetDungeonForRandomSlot()
end
--- [https://wowpedia.fandom.com/wiki/API_GetDungeonInfo?action=edit&redlink=1]
--- @return void
function GetDungeonInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetEquipmentNameFromSpell?action=edit&redlink=1]
--- @return void
function GetEquipmentNameFromSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_GetEventCPUUsage?action=edit&redlink=1]
--- @return void
function GetEventCPUUsage()
end
--- [https://wowpedia.fandom.com/wiki/API_GetEventTime?action=edit&redlink=1]
--- @return void
function GetEventTime()
end
--- [https://wowpedia.fandom.com/wiki/API_GetExistingSocketInfo?action=edit&redlink=1]
--- @return void
function GetExistingSocketInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetExistingSocketLink?action=edit&redlink=1]
--- @return void
function GetExistingSocketLink()
end
--- Returns the logo and banner textures for an expansion id.
--- [https://wowpedia.fandom.com/wiki/API_GetExpansionDisplayInfo]
--- @param expansionLevel number
--- @return unknown @ info
function GetExpansionDisplayInfo(expansionLevel)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetExpansionForLevel]
--- @param playerLevel number
--- @return number @ expansionLevel
function GetExpansionForLevel(playerLevel)
end
--- Returns the expansion level currently accessible by the player.
--- [https://wowpedia.fandom.com/wiki/API_GetExpansionLevel]
--- @return number @ expansionLevel
function GetExpansionLevel()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetExpansionTrialInfo]
--- @return boolean, number @ isExpansionTrialAccount, expansionTrialRemainingSeconds
function GetExpansionTrialInfo()
end
--- Returns the player's expertise percentage for main hand, offhand and ranged attacks.
--- [https://wowpedia.fandom.com/wiki/API_GetExpertise]
--- @return number, number, number @ expertise, offhandExpertise, rangedExpertise
function GetExpertise()
end
--- Returns the action bar page containing the extra bar/button.
--- [https://wowpedia.fandom.com/wiki/API_GetExtraBarIndex]
--- @return number @ extraPage
function GetExtraBarIndex()
end
--- Returns information about the specified faction or faction header in the player's reputation pane.
--- [https://wowpedia.fandom.com/wiki/API_GetFactionInfo]
--- @param factionIndex number @ Index of the faction to query. Indices correspond to the rows currently displayed in the player's reptuation pane, and include headers, but do not include factions that are not currently displayed because their parent header is collapsed.
--- @return number, number, number, number, number, unknown, unknown @ isCollapsed, hasRep, isWatched, isChild, factionID, hasBonusRepGain, canBeLFGBonus
function GetFactionInfo(factionIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetFactionInfoByID]
--- @return void
function GetFactionInfoByID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetFailedPVPTalentIDs?action=edit&redlink=1]
--- @return void
function GetFailedPVPTalentIDs()
end
--- [https://wowpedia.fandom.com/wiki/API_GetFailedTalentIDs?action=edit&redlink=1]
--- @return void
function GetFailedTalentIDs()
end
--- Returns the FileDataID corresponding to the given game file path (texture, sound, model, etc.).
--- [https://wowpedia.fandom.com/wiki/API_GetFileIDFromPath]
--- @param filePath string @ The path to a game file. For example Interface/Icons/Temp.blp
--- @return number @ fileID
function GetFileIDFromPath(filePath)
end
--- [https://wowpedia.fandom.com/wiki/API_GetFileStreamingStatus?action=edit&redlink=1]
--- @return void
function GetFileStreamingStatus()
end
--- Returns the ID of a filtered achievement, resulting from a call to SetAchievementSearchString.
--- [https://wowpedia.fandom.com/wiki/API_GetFilteredAchievementID]
--- @param index number @ The index of the filtered achievement to return the ID of, between 1 and GetNumFilteredAchievements().
--- @return number @ achievementID
function GetFilteredAchievementID(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetFlexRaidDungeonInfo?action=edit&redlink=1]
--- @return void
function GetFlexRaidDungeonInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetFlyoutID?action=edit&redlink=1]
--- @return void
function GetFlyoutID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetFlyoutInfo?action=edit&redlink=1]
--- @return void
function GetFlyoutInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetFlyoutSlotInfo?action=edit&redlink=1]
--- @return void
function GetFlyoutSlotInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetFollowerTypeIDFromSpell?action=edit&redlink=1]
--- @return void
function GetFollowerTypeIDFromSpell()
end
--- Returns a structured table of information about the given font object.
--- [https://wowpedia.fandom.com/wiki/API_GetFontInfo]
--- @param font_or_name unknown
--- @return unknown @ fontInfo
function GetFontInfo(font_or_name)
end
--- Returns a table listing all registered font object names.
--- [https://wowpedia.fandom.com/wiki/API_GetFonts]
--- @return string @ fonts
function GetFonts()
end
--- Returns the total time used by and number of calls of a frame's event handlers.
--- [https://wowpedia.fandom.com/wiki/API_GetFrameCPUUsage]
--- @param frame Frame @ Specifies the frame.
--- @param includeChildren boolean @ If false, only event handlers of the specified frame are considered. If true or omitted, the values returned will include the handlers for all of the frame's children as well.
--- @return number, number @ time, count
function GetFrameCPUUsage(frame, includeChildren)
end
--- Retrieve the current framerate (frames / second).
--- [https://wowpedia.fandom.com/wiki/API_GetFramerate]
--- @return number @ framerate
function GetFramerate()
end
--- Returns all frames registered for the specified event, in dispatch order.
--- [https://wowpedia.fandom.com/wiki/API_GetFramesRegisteredForEvent]
--- @param event string @ Event for which to return registered frames, e.g. PLAYER_LOGOUT
--- @return unknown, unknown, unknown @ frame1, frame2, ...
function GetFramesRegisteredForEvent(event)
end
--- Returns information about the specified friendship in the player's reputation pane.
--- [https://wowpedia.fandom.com/wiki/API_GetFriendshipReputation]
--- @param factionID number @ ID of the friendship to retrieve information for, provided by GetFactionInfo (14th return).
--- @return number, number, number, string, string, number, string, number, number @ friendID, friendRep, friendMaxRep, friendName, friendText, friendTexture, friendTextLevel, friendThreshold, nextFriendThreshold
function GetFriendshipReputation(factionID)
end
--- Returns friendship rank indices. [1]
--- [https://wowpedia.fandom.com/wiki/API_GetFriendshipReputationRanks]
--- @param factionID number @ provided by GetFactionInfo (14th return); defaults to the currently interacting NPC if omitted
--- @return number, number @ currentRank, maxRank
function GetFriendshipReputationRanks(factionID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetFunctionCPUUsage?action=edit&redlink=1]
--- @return void
function GetFunctionCPUUsage()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGMStatus?action=edit&redlink=1]
--- @return void
function GetGMStatus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGMTicket?action=edit&redlink=1]
--- @return void
function GetGMTicket()
end
--- Returns the error message for an id.
--- [https://wowpedia.fandom.com/wiki/API_GetGameMessageInfo]
--- @param messageType number @ errorType from UI_INFO_MESSAGE or UI_ERROR_MESSAGE
--- @return string, number, number @ stringId, soundKitID, voiceID
function GetGameMessageInfo(messageType)
end
--- Returns the realm's current time in hours and minutes.
--- [https://wowpedia.fandom.com/wiki/API_GetGameTime]
--- @return number, number @ hours, minutes
function GetGameTime()
end
--- Returns the supported graphics APIs for the system, D3D11_LEGACY, D3D11, D3D12, etc.
--- [https://wowpedia.fandom.com/wiki/API_GetGraphicsAPIs]
--- @return string, unknown @ cvarValues, ...
function GetGraphicsAPIs()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGraphicsDropdownIndexByMasterIndex?action=edit&redlink=1]
--- @return void
function GetGraphicsDropdownIndexByMasterIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGreetingText?action=edit&redlink=1]
--- @return void
function GetGreetingText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGroupMemberCounts?action=edit&redlink=1]
--- @return void
function GetGroupMemberCounts()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildAchievementMemberInfo?action=edit&redlink=1]
--- @return void
function GetGuildAchievementMemberInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildAchievementMembers?action=edit&redlink=1]
--- @return void
function GetGuildAchievementMembers()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildAchievementNumMembers?action=edit&redlink=1]
--- @return void
function GetGuildAchievementNumMembers()
end
--- Returns information about the given selected guild applicant.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildApplicantInfo]
--- @param selectionID number @ The index of the selected applicant (from 1 to GetNumGuildApplicants()).
--- @return unknown, number, string, boolean, boolean, boolean, boolean, boolean, boolean, unknown, boolean, boolean, boolean, string, number, number @ name, level, class, bQuest, bDungeon, bRaid, bPvP, bRP, bWeekdays, bWeekends, bTank, bHealer, bDamage, comment, timeSince, timeLeft
function GetGuildApplicantInfo(selectionID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildApplicantSelection?action=edit&redlink=1]
--- @return void
function GetGuildApplicantSelection()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankBonusDepositMoney?action=edit&redlink=1]
--- @return void
function GetGuildBankBonusDepositMoney()
end
--- Gets information about an item slot from the guild bank.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankItemInfo]
--- @param tab number @ The index of the tab in the guild bank
--- @param slot number @ The index of the slot in the chosen tab.
--- @return number, number, boolean, boolean, number @ texture, itemCount, locked, isFiltered, quality
function GetGuildBankItemInfo(tab, slot)
end
--- Returns the item link for an item in the given Guild Bank tab and slot.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankItemLink]
--- @return void
function GetGuildBankItemLink()
end
--- Returns the amount of money in the guild bank in copper.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankMoney]
--- @return number @ retVal1
function GetGuildBankMoney()
end
--- gets a specific money transaction from the guild bank
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankMoneyTransaction]
--- @param index number @ The index of the transaction to select. From 1 to GetNumGuildBankMoneyTransactions().
--- @return string, unknown, number, number, number, number, number @ type, name, amount, years, months, days, hours
function GetGuildBankMoneyTransaction(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankTabCost?action=edit&redlink=1]
--- @return void
function GetGuildBankTabCost()
end
--- Gets display / player's access information regarding a guild bank tab.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankTabInfo]
--- @param tab number @ The index of the guild bank tab. (result of GetCurrentGuildBankTab())
--- @return string, string, boolean, boolean, number, number, boolean @ name, icon, isViewable, canDeposit, numWithdrawals, remainingWithdrawals, filtered
function GetGuildBankTabInfo(tab)
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankTabPermissions]
--- @param tab number @ guild bank tab number
--- @return boolean, boolean, boolean, number @ canView, canDeposit, canEdit, stacksPerDay
function GetGuildBankTabPermissions(tab)
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankText?action=edit&redlink=1]
--- @return void
function GetGuildBankText()
end
--- Get information for specific item transaction from Guild Bank.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankTransaction]
--- @param tab number @ Tab number, ascending from 1 to GetNumGuildBankTabs().
--- @param index number @ Transaction index, ascending from 1 to GetNumGuildBankTransactions(tab). Higher indices correspond to more recent entries.
--- @return string, string, string, number, number, number, number, number, number, number @ type, name, itemLink, count, tab1, tab2, year, month, day, hour
function GetGuildBankTransaction(tab, index)
end
--- Arguments none
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankWithdrawGoldLimit]
--- @return number @ dailyGoldWithdrawlLimit
function GetGuildBankWithdrawGoldLimit()
end
--- Returns the amount of money the player is allowed to withdraw from the guild bank.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildBankWithdrawMoney]
--- @return unknown @ withdrawLimit
function GetGuildBankWithdrawMoney()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildCategoryList?action=edit&redlink=1]
--- @return void
function GetGuildCategoryList()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildChallengeInfo?action=edit&redlink=1]
--- @return void
function GetGuildChallengeInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildCharterCost?action=edit&redlink=1]
--- @return void
function GetGuildCharterCost()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildEventInfo?action=edit&redlink=1]
--- @return void
function GetGuildEventInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildExpirationTime?action=edit&redlink=1]
--- @return void
function GetGuildExpirationTime()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildFactionGroup?action=edit&redlink=1]
--- @return void
function GetGuildFactionGroup()
end
--- Returns the guild name and faction standing of the player.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildFactionInfo]
--- @return string, string, number, number, number, number @ guildName, description, standingID, barMin, barMax, barValue
function GetGuildFactionInfo()
end
--- Returns guild-related information about a unit.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildInfo]
--- @param unit string @ The unitId whose guild information you wish to query.
--- @return string, string, number, string @ guildName, guildRankName, guildRankIndex, realm
function GetGuildInfo(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildInfoText?action=edit&redlink=1]
--- @return void
function GetGuildInfoText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildLogoInfo?action=edit&redlink=1]
--- @return void
function GetGuildLogoInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildMemberRecipes?action=edit&redlink=1]
--- @return void
function GetGuildMemberRecipes()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildMembershipRequestInfo?action=edit&redlink=1]
--- @return void
function GetGuildMembershipRequestInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildMembershipRequestSettings?action=edit&redlink=1]
--- @return void
function GetGuildMembershipRequestSettings()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildNewsFilters?action=edit&redlink=1]
--- @return void
function GetGuildNewsFilters()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildNewsMemberName?action=edit&redlink=1]
--- @return void
function GetGuildNewsMemberName()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildNewsSort?action=edit&redlink=1]
--- @return void
function GetGuildNewsSort()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildPerkInfo?action=edit&redlink=1]
--- @return void
function GetGuildPerkInfo()
end
--- This function returns information about the last tradeskill you were looking at when you clicked View Crafters on a guild listing.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRecipeInfoPostQuery]
--- @return number, number, unknown @ professionID, recipeID, unknown
function GetGuildRecipeInfoPostQuery()
end
--- Renders the name and online status of a guild member having a certain recipe.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRecipeMember]
--- @param index number @ index, beginning with 1, of a list of members who can craft the recipe
--- @return string, boolean @ name, online
function GetGuildRecipeMember(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRecruitmentComment?action=edit&redlink=1]
--- @return void
function GetGuildRecruitmentComment()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRecruitmentSettings?action=edit&redlink=1]
--- @return void
function GetGuildRecruitmentSettings()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRenameRequired?action=edit&redlink=1]
--- @return void
function GetGuildRenameRequired()
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRewardInfo?action=edit&redlink=1]
--- @return void
function GetGuildRewardInfo()
end
--- Returns information about a character in your current guild.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRosterInfo]
--- @param index number @ From 1 to GetNumGuildMembers()
--- @return string, string, number, number, string, string, string, string, boolean, number, string, number, number, boolean, boolean, number, string @ name, rankName, rankIndex, level, classDisplayName, zone, publicNote, officerNote, isOnline, status, class, achievementPoints, achievementRank, isMobile, canSoR, repStanding, GUID
function GetGuildRosterInfo(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRosterLargestAchievementPoints?action=edit&redlink=1]
--- @return void
function GetGuildRosterLargestAchievementPoints()
end
--- Returns a specific guild member's last seen time.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRosterLastOnline]
--- @param index number @ index of the guild roster entry you wish to query.
--- @return number, number, number, number @ yearsOffline, monthsOffline, daysOffline, hoursOffline
function GetGuildRosterLastOnline(index)
end
--- Retrieves the guild's Message of the Day.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRosterMOTD]
--- @return string @ motd
function GetGuildRosterMOTD()
end
--- Returns index of the current selected guild member in the guild roster according the active sorting. If none is selected, the return value is 0 (zero).
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRosterSelection]
--- @return unknown @ selectedGuildMember
function GetGuildRosterSelection()
end
--- Returns 1 if the guild roster is currently set to show offline members, nil otherwise.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildRosterShowOffline]
--- @return number @ showoffline
function GetGuildRosterShowOffline()
end
--- Returns File IDs of tabard textures used in guild bank logo.
--- [https://wowpedia.fandom.com/wiki/API_GetGuildTabardFiles]
--- @return number, number, number, number, number, number @ tabardBackgroundUpper, tabardBackgroundLower, tabardEmblemUpper, tabardEmblemLower, tabardBorderUpper, tabardBorderLower
function GetGuildTabardFiles()
end
--- Returns information about a guild tradeskill
--- [https://wowpedia.fandom.com/wiki/API_GetGuildTradeSkillInfo]
--- @param index number @ The index of the tradeskill from GetNumGuildTradeSkill().
--- @return number, boolean, string, string, number, number, number, string, string, string, boolean, string, number, string, boolean, number @ skillID, isCollapsed, iconTexture, headerName, numOnline, numVisible, numPlayers, playerName, playerNameWithRealm, class, online, zone, skill, classFileName, isMobile, isAway
function GetGuildTradeSkillInfo(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetHaste?action=edit&redlink=1]
--- @return void
function GetHaste()
end
--- Returns the amount of Melee Hit %, not from Melee Hit Rating, that your character has.
--- [https://wowpedia.fandom.com/wiki/API_GetHitModifier]
--- @return number @ hitModifier
function GetHitModifier()
end
--- Returns names of characters in your home (non-instance) party.
--- [https://wowpedia.fandom.com/wiki/API_GetHomePartyInfo]
--- @param homePlayers table @ table to populate and return; a new table is created if this argument is omitted.
--- @return table @ homePlayers
function GetHomePartyInfo(homePlayers)
end
--- Returns information about a message in the mailbox.
--- [https://wowpedia.fandom.com/wiki/API_GetInboxHeaderInfo]
--- @param index number @ the index of the message (ascending from 1).
--- @return number, number, number @ textCreated, canReply, isGM
function GetInboxHeaderInfo(index)
end
--- Returns information about an auction house invoice.
--- [https://wowpedia.fandom.com/wiki/API_GetInboxInvoiceInfo]
--- @param index number @ the index of the message (1 is the first message)
--- @return string, string, string, number, number, number, number @ invoiceType, itemName, playerName, bid, buyout, deposit, consignment
function GetInboxInvoiceInfo(index)
end
--- Provides information about an item attached to a message in the player's mailbox.
--- [https://wowpedia.fandom.com/wiki/API_GetInboxItem]
--- @param index number @ The index of the message to query, in the range [1,GetInboxNumItems()]
--- @param itemIndex number @ The index of the item to query, in the range [1,ATTACHMENTS_MAX_RECEIVE]
--- @return string, number, string, number, number, number @ name, itemID, texture, count, quality, canUse
function GetInboxItem(index, itemIndex)
end
--- Returns the itemLink of an item attached to a message in the player's mailbox.
--- [https://wowpedia.fandom.com/wiki/API_GetInboxItemLink]
--- @param message number @ The index of the message to query, in the range of [1,GetInboxNumItems()]
--- @param attachment number @ The index of the attachment to query, in the range of [1,ATTACHMENTS_MAX_RECEIVE]
--- @return unknown @ itemLink
function GetInboxItemLink(message, attachment)
end
--- [https://wowpedia.fandom.com/wiki/API_GetInboxNumItems]
--- @return unknown, unknown @ numItems, totalItems
function GetInboxNumItems()
end
--- Returns information about a mailbox item.
--- [https://wowpedia.fandom.com/wiki/API_GetInboxText]
--- @param index number @ the index of the message (1 is the first message)
--- @return string, string, string, boolean, boolean @ bodyText, stationaryMiddle, stationaryEdge, isTakeable, isInvoice
function GetInboxText(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetInsertItemsLeftToRight?action=edit&redlink=1]
--- @return void
function GetInsertItemsLeftToRight()
end
--- Returns the inspected unit's rated PvP stats.
--- [https://wowpedia.fandom.com/wiki/API_GetInspectArenaData]
--- @param bracketId number @ rated PvP bracket to query, ascending from 1 for 2v2, 3v3, and 5v5 arenas, and Rated Battlegrounds respectively.
--- @return number, number, number, number, number @ rating, seasonPlayed, seasonWon, weeklyPlayed, weeklyWon
function GetInspectArenaData(bracketId)
end
--- [https://wowpedia.fandom.com/wiki/API_GetInspectGuildInfo?action=edit&redlink=1]
--- @return void
function GetInspectGuildInfo()
end
--- Get the honor information about the inspected unit.
--- [https://wowpedia.fandom.com/wiki/API_GetInspectHonorData]
--- @return number, number, number, number, number, number @ todayHK, todayHonor, yesterdayHK, yesterdayHonor, lifetimeHK, lifetimeRank
function GetInspectHonorData()
end
--- [https://wowpedia.fandom.com/wiki/API_GetInspectRatedBGData?action=edit&redlink=1]
--- @return void
function GetInspectRatedBGData()
end
--- Returns a number representing the current active specialization of a given unit.
--- [https://wowpedia.fandom.com/wiki/API_GetInspectSpecialization]
--- @param unit string @ The unitid of the player to request the specialization of.
--- @return number @ id
function GetInspectSpecialization(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetInspectTalent?action=edit&redlink=1]
--- @return void
function GetInspectTalent()
end
--- [https://wowpedia.fandom.com/wiki/API_GetInstanceBootTimeRemaining?action=edit&redlink=1]
--- @return void
function GetInstanceBootTimeRemaining()
end
--- Returns information about the map instance the player is currently in.
--- [https://wowpedia.fandom.com/wiki/API_GetInstanceInfo]
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceID, instanceGroupSize, LfgDungeonID
function GetInstanceInfo()
end
--- Returns information about the instance lock timer for the current instance.
--- [https://wowpedia.fandom.com/wiki/API_GetInstanceLockTimeRemaining]
--- @return number, boolean, number, number @ lockTimeleft, isPreviousInstance, encountersTotal, encountersComplete
function GetInstanceLockTimeRemaining()
end
--- Returns information about bosses in the instance the player is about to be saved to.
--- [https://wowpedia.fandom.com/wiki/API_GetInstanceLockTimeRemainingEncounter]
--- @param id number @ Index of the boss to query, ascending from 1 to encountersTotal return value from GetInstanceLockTimeRemaining.
--- @return string, string, boolean @ bossName, texture, isKilled
function GetInstanceLockTimeRemainingEncounter(id)
end
--- Returns one of several codes describing the status of an equipped item. The main use for this function is generalized durability checks.
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryAlertStatus]
--- @param index string @ one of the following:
--- @return number @ alertStatus
function GetInventoryAlertStatus(index)
end
--- Determine if an inventory item is broken (no durability)
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemBroken]
--- @param unit string @ The UnitId of the unit whose inventory is to be queried.
--- @param slotId number @ The inventory slot to be queried, obtained via GetInventorySlotInfo.
--- @return number @ isBroken
function GetInventoryItemBroken(unit, slotId)
end
--- Get cooldown information for an inventory item.
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemCooldown]
--- @param unit string @ The UnitId of the unit whose inventory is to be queried.
--- @param slotId number @ The inventory slot to be queried, obtained via GetInventorySlotInfo.
--- @return number, number, number @ start, duration, enable
function GetInventoryItemCooldown(unit, slotId)
end
--- Determine the quantity of an item in an inventory slot.
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemCount]
--- @param unit string @ The UnitId of the unit whose inventory is to be queried.
--- @param slotId number @ The inventory slot to be queried, obtained via GetInventorySlotInfo.
--- @return number @ count
function GetInventoryItemCount(unit, slotId)
end
--- Returns current and maximum durability of an equipped item.
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemDurability]
--- @param slot number @ Inventory slot index to query durability of.
--- @return number, number @ current, maximum
function GetInventoryItemDurability(slot)
end
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemEquippedUnusable?action=edit&redlink=1]
--- @return void
function GetInventoryItemEquippedUnusable()
end
--- Returns the item id of the item in the specified inventory slot
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemID]
--- @param unit string @ The UnitId of the unit whose inventory is to be queried.
--- @param invSlot number @ InventorySlotId) - index of the inventory slot to query.
--- @return number, number @ itemId, unknown
function GetInventoryItemID(unit, invSlot)
end
--- Get the itemLink for the specified item.
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemLink]
--- @param unit unknown
--- @param slotId unknown @ InventorySlotId - The inventory slot to be queried, obtained via GetInventorySlotInfo().
--- @return unknown @ itemLink
function GetInventoryItemLink(unit, slotId)
end
--- Return the quality of an inventory item.
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemQuality]
--- @param unitId string @ The UnitId of the unit whose inventory is to be queried.
--- @param slotId number @ The InventorySlotId to be queried, obtained via GetInventorySlotInfo().
--- @return unknown @ quality
function GetInventoryItemQuality(unitId, slotId)
end
--- Return the texture for an inventory item.
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemTexture]
--- @param unit string @ The UnitId of the unit whose inventory is to be queried.
--- @param slotId number @ The inventory slot to be queried, obtained via GetInventorySlotInfo.
--- @return string @ texture
function GetInventoryItemTexture(unit, slotId)
end
--- [https://wowpedia.fandom.com/wiki/API_GetInventoryItemsForSlot?action=edit&redlink=1]
--- @return void
function GetInventoryItemsForSlot()
end
--- Return information about a specific inventory slot
--- [https://wowpedia.fandom.com/wiki/API_GetInventorySlotInfo]
--- @param slotName string @ InventorySlotName to query (e.g. HEADSLOT).
--- @return number, string, boolean @ slotId, textureName, checkRelic
function GetInventorySlotInfo(slotName)
end
--- Retrieves information about a player that could be invited.
--- [https://wowpedia.fandom.com/wiki/API_GetInviteConfirmationInfo]
--- @param invite unknown @ unknown - return value of function GetNextPendingInviteConfirmation
--- @return number, string, string, boolean, boolean, number, number, number @ confirmationType, name, guid, rolesInvalid, willConvertToRaid, level, spec, itemLevel
function GetInviteConfirmationInfo(invite)
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemChildInfo?action=edit&redlink=1]
--- @return void
function GetItemChildInfo()
end
--- Returns the name of the item type.
--- [https://wowpedia.fandom.com/wiki/API_GetItemClassInfo]
--- @param classID number @ ID of the ItemType
--- @return string @ name
function GetItemClassInfo(classID)
end
--- Returns cooldown information for the item.
--- [https://wowpedia.fandom.com/wiki/API_GetItemCooldown]
--- @param itemID number @ The numeric ID of the item. ie. 12345
--- @return number, number, number @ startTime, duration, enable
function GetItemCooldown(itemID)
end
--- Counts an item.
--- [https://wowpedia.fandom.com/wiki/API_GetItemCount]
--- @param itemInfo string @ ItemLink, Name or ID
--- @param includeBank boolean @ ?Optional. Could be nil. - If true, includes the bank
--- @param includeUses boolean @ ?Optional. Could be nil. - If true, includes each charge of an item similar to GetActionCount()
--- @param includeReagentBank boolean @ ?Optional. Could be nil. - If true, includes the reagent bank
--- @return number @ count
function GetItemCount(itemInfo, includeBank, includeUses, includeReagentBank)
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemCreationContext?action=edit&redlink=1]
--- @return void
function GetItemCreationContext()
end
--- Gets the bitfield of what types of bags an item can go into or contain.
--- [https://wowpedia.fandom.com/wiki/API_GetItemFamily]
--- @param itemId_or_itemName_or_itemLink unknown
--- @return unknown @ bagType
function GetItemFamily(itemId_or_itemName_or_itemLink)
end
--- Returns the gem for a socketed equipment item.
--- [https://wowpedia.fandom.com/wiki/API_GetItemGem]
--- @param item string @ The name of the equipment item (the item must be equipped or in your inventory for this to work) or the ItemLink
--- @param index number @ The index of the desired gem: 1, 2, or 3
--- @return string, string @ itemName, itemLink
function GetItemGem(item, index)
end
--- Returns an item's icon texture.
--- [https://wowpedia.fandom.com/wiki/API_GetItemIcon]
--- @param itemID number @ The numeric ID of the item to query e.g. 23405 for [Farstrider's Tunic].
--- @return number @ icon
function GetItemIcon(itemID)
end
--- Returns information about an item.
--- [https://wowpedia.fandom.com/wiki/API_GetItemInfo]
--- @param itemInfo string @ ItemLink, Name or ID
--- @return void
function GetItemInfo(itemInfo)
end
--- Returns instantly-available information about a specific item.
--- [https://wowpedia.fandom.com/wiki/API_GetItemInfoInstant]
--- @param itemID_or_itemString_or_itemName_or_itemLink unknown
--- @return number, unknown, unknown, unknown, unknown, unknown, unknown @ itemID, itemType, itemSubType, itemEquipLoc, icon, itemClassID, itemSubClassID
function GetItemInfoInstant(itemID_or_itemString_or_itemName_or_itemLink)
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemInventorySlotInfo?action=edit&redlink=1]
--- @return void
function GetItemInventorySlotInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemLevelColor?action=edit&redlink=1]
--- @return void
function GetItemLevelColor()
end
--- Returns the proposed item level increment for the item being considered for upgrading.
--- [https://wowpedia.fandom.com/wiki/API_GetItemLevelIncrement]
--- @return number @ itemLevelIncrement
function GetItemLevelIncrement()
end
--- Returns RGB color codes for an item quality.
--- [https://wowpedia.fandom.com/wiki/API_GetItemQualityColor]
--- @param quality number @ Enum.ItemQuality
--- @return number, number, number, string @ r, g, b, hex
function GetItemQualityColor(quality)
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemSetInfo?action=edit&redlink=1]
--- @return void
function GetItemSetInfo()
end
--- Returns which specializations an item is useful for.
--- [https://wowpedia.fandom.com/wiki/API_GetItemSpecInfo]
--- @param itemLink_or_itemID_or_itemName unknown
--- @param specTable table @ if provided, this table will be populated with the results and returned; otherwise, a new table will be created.
--- @return table @ specTable
function GetItemSpecInfo(itemLink_or_itemID_or_itemName, specTable)
end
--- Return spell information about a specific item.
--- [https://wowpedia.fandom.com/wiki/API_GetItemSpell]
--- @param itemID_or_itemString_or_itemName_or_itemLink unknown
--- @return string, number @ spellName, spellID
function GetItemSpell(itemID_or_itemString_or_itemName_or_itemLink)
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemStatDelta?action=edit&redlink=1]
--- @return void
function GetItemStatDelta()
end
--- Returns a table of stats for an item.
--- [https://wowpedia.fandom.com/wiki/API_GetItemStats]
--- @param itemLink unknown
--- @param statTable unknown
--- @return unknown @ stats
function GetItemStats(itemLink, statTable)
end
--- Returns the name of the item subtype.
--- [https://wowpedia.fandom.com/wiki/API_GetItemSubClassInfo]
--- @param classID number @ ID of the ItemType
--- @param subClassID number @ ID of the item subtype
--- @return string, boolean @ name, isArmorType
function GetItemSubClassInfo(classID, subClassID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemUniqueness?action=edit&redlink=1]
--- @return void
function GetItemUniqueness()
end
--- Returns the current (upgraded) item level of the item being considered for upgrades.
--- [https://wowpedia.fandom.com/wiki/API_GetItemUpdateLevel]
--- @return number @ itemLevel
function GetItemUpdateLevel()
end
--- Returns the effect of upgrading an item on one of its effects.
--- [https://wowpedia.fandom.com/wiki/API_GetItemUpgradeEffect]
--- @param effectIndex number @ Index of the effect to query, ascending from 1 to GetNumItemUpgradeEffects().
--- @return string, string @ leftText, rightText
function GetItemUpgradeEffect(effectIndex)
end
--- Returns information for the item that is placed in the upgrade frame.
--- [https://wowpedia.fandom.com/wiki/API_GetItemUpgradeItemInfo]
--- @return void
function GetItemUpgradeItemInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetItemUpgradeStats?action=edit&redlink=1]
--- @return void
function GetItemUpgradeStats()
end
--- [https://wowpedia.fandom.com/wiki/API_GetJailersTowerLevel?action=edit&redlink=1]
--- @return void
function GetJailersTowerLevel()
end
--- [https://wowpedia.fandom.com/wiki/API_GetJournalInfoForSpellConfirmation?action=edit&redlink=1]
--- @return void
function GetJournalInfoForSpellConfirmation()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFDChoiceCollapseState?action=edit&redlink=1]
--- @return void
function GetLFDChoiceCollapseState()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFDChoiceEnabledState?action=edit&redlink=1]
--- @return void
function GetLFDChoiceEnabledState()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFDChoiceOrder?action=edit&redlink=1]
--- @return void
function GetLFDChoiceOrder()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFDLockInfo?action=edit&redlink=1]
--- @return void
function GetLFDLockInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFDLockPlayerCount?action=edit&redlink=1]
--- @return void
function GetLFDLockPlayerCount()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFDRoleLockInfo?action=edit&redlink=1]
--- @return void
function GetLFDRoleLockInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFDRoleRestrictions?action=edit&redlink=1]
--- @return void
function GetLFDRoleRestrictions()
end
--- Returns information about an LFG Kick vote currently in progress.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGBootProposal]
--- @return number, number, number, string @ totalVotes, bootVotes, timeLeft, reason
function GetLFGBootProposal()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGCategoryForID?action=edit&redlink=1]
--- @return void
function GetLFGCategoryForID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGCompletionReward?action=edit&redlink=1]
--- @return void
function GetLFGCompletionReward()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGCompletionRewardItem?action=edit&redlink=1]
--- @return void
function GetLFGCompletionRewardItem()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGCompletionRewardItemLink?action=edit&redlink=1]
--- @return void
function GetLFGCompletionRewardItemLink()
end
--- Returns the time at which you may once again use the dungeon finder after prematurely leaving a group.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDeserterExpiration]
--- @return number @ expiryTime
function GetLFGDeserterExpiration()
end
--- Returns info about a specific encounter in an LFG/RF dungeon.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonEncounterInfo]
--- @param dungeonID number @ Ranging from 1 to around 2000 in patch 8.1.5
--- @param encounterIndex number @ Index from 1 to GetLFGDungeonNumEncounters(). For multi-part raids, many bosses will never be accessible to players because they were in an earlier 'wing'.
--- @return string, string, boolean, boolean @ bossName, texture, isKilled, unknown4
function GetLFGDungeonEncounterInfo(dungeonID, encounterIndex)
end
--- Retrieves specific dungeon information, not limited by player level and all dungeons can be looked up.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonInfo]
--- @param dungeonID number @ Numeric ID to uniquely identify each dungeon
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ name, typeID, subtypeID, minLevel, maxLevel, recLevel, minRecLevel, maxRecLevel, expansionLevel, groupID, textureFilename, difficulty, maxPlayers, description, isHoliday, bonusRepAmount, minPlayers, isTimeWalker, name2, minGearLevel
function GetLFGDungeonInfo(dungeonID)
end
--- Returns the number of encounters and number of completed encounters for a specified dungeon ID.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonNumEncounters]
--- @param dungeonID number @ Ranging from 1 to around 2000 in patch 8.1.5
--- @return number, number @ numEncounters, numCompleted
function GetLFGDungeonNumEncounters(dungeonID)
end
--- Retrieves information on the weekly limits for currency rewards from the dungeon system (i.e. Valor Point Cap)
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonRewardCapBarInfo]
--- @param VALOR_TIER1_LFG_ID number @ id of the dungeon type for which information is being sought (currently 301)
--- @return number, number, number, number, number, number, number, number, number, number @ currencyID, DungeonID, Quantity, Limit, overallQuantity, overallLimit, periodPurseQuantity, periodPurseLimit, purseQuantity, purseLimit
function GetLFGDungeonRewardCapBarInfo(VALOR_TIER1_LFG_ID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonRewardCapInfo?action=edit&redlink=1]
--- @return void
function GetLFGDungeonRewardCapInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonRewardInfo?action=edit&redlink=1]
--- @return void
function GetLFGDungeonRewardInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonRewardLink?action=edit&redlink=1]
--- @return void
function GetLFGDungeonRewardLink()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonRewards?action=edit&redlink=1]
--- @return void
function GetLFGDungeonRewards()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonShortageRewardInfo?action=edit&redlink=1]
--- @return void
function GetLFGDungeonShortageRewardInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGDungeonShortageRewardLink?action=edit&redlink=1]
--- @return void
function GetLFGDungeonShortageRewardLink()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGInfoServer?action=edit&redlink=1]
--- @return void
function GetLFGInfoServer()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGInviteRoleAvailability?action=edit&redlink=1]
--- @return void
function GetLFGInviteRoleAvailability()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGInviteRoleRestrictions?action=edit&redlink=1]
--- @return void
function GetLFGInviteRoleRestrictions()
end
--- Returns information about the current LFD group invite.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGProposal]
--- @return number, number, boolean, boolean, number @ completedEncounters, numMembers, isLeader, isHoliday, proposalCategory
function GetLFGProposal()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGProposalEncounter?action=edit&redlink=1]
--- @return void
function GetLFGProposalEncounter()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGProposalMember?action=edit&redlink=1]
--- @return void
function GetLFGProposalMember()
end
--- Returns the current state and wait times for being in queue.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGQueueStats]
--- @param category number @ Depending on which type of LFG you're looking for.
--- @param activeID number @ ?Optional. Could be nil. - Specific LFG 'forming group' ID
--- @return void
function GetLFGQueueStats(category, activeID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGQueuedList?action=edit&redlink=1]
--- @return void
function GetLFGQueuedList()
end
--- Returns the time at which you may once again queue for a random dungeon.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRandomCooldownExpiration]
--- @return number @ expiryTime
function GetLFGRandomCooldownExpiration()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRandomDungeonInfo?action=edit&redlink=1]
--- @return void
function GetLFGRandomDungeonInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGReadyCheckUpdate?action=edit&redlink=1]
--- @return void
function GetLFGReadyCheckUpdate()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGReadyCheckUpdateBattlegroundInfo?action=edit&redlink=1]
--- @return void
function GetLFGReadyCheckUpdateBattlegroundInfo()
end
--- Return information concerning the LFG Call to Arms rewards.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRoleShortageRewards]
--- @param dungeonID number @ LfgDungeonID - The type of the dungeons to queue for. See table below.
--- @param shortageSeverity number @ A number from 1 to LFG_ROLE_NUM_SHORTAGE_TYPES. See below for specific shortage types.
--- @return boolean, boolean, boolean, boolean, number, number, number @ eligible, forTank, forHealer, forDamage, itemCount, money, xp
function GetLFGRoleShortageRewards(dungeonID, shortageSeverity)
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRoleUpdate?action=edit&redlink=1]
--- @return void
function GetLFGRoleUpdate()
end
--- Returns the name of the battleground queue triggering a role check.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRoleUpdateBattlegroundInfo]
--- @return string @ queueName
function GetLFGRoleUpdateBattlegroundInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRoleUpdateMember?action=edit&redlink=1]
--- @return void
function GetLFGRoleUpdateMember()
end
--- Returns the objectives you are currently flagged to as LFG. Usage: dungeonType, dungeonID = GetLFGRoleUpdateSlot(slot);
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRoleUpdateSlot]
--- @return void
function GetLFGRoleUpdateSlot()
end
--- Returns what roles you signed up as in the Dungeon Finder.
--- [https://wowpedia.fandom.com/wiki/API_GetLFGRoles]
--- @return boolean, boolean, boolean, boolean @ isLeader, isTank, isHealer, isDPS
function GetLFGRoles()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLFGSuspendedPlayers?action=edit&redlink=1]
--- @return void
function GetLFGSuspendedPlayers()
end
--- Seems to be for used ordering the LFR list [1]
--- [https://wowpedia.fandom.com/wiki/API_GetLFRChoiceOrder]
--- @param LFRRaidList table @ ?
--- @return table @ raidList
function GetLFRChoiceOrder(LFRRaidList)
end
--- Returns the language specified by the index that your character can speak.
--- [https://wowpedia.fandom.com/wiki/API_GetLanguageByIndex]
--- @param index number @ Ranging from 1 up to GetNumLanguages()
--- @return string, number @ language, languageID
function GetLanguageByIndex(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetLatestCompletedAchievements?action=edit&redlink=1]
--- @return void
function GetLatestCompletedAchievements()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLatestCompletedComparisonAchievements?action=edit&redlink=1]
--- @return void
function GetLatestCompletedComparisonAchievements()
end
--- Returns up to three names of senders of unread mail in the character's inbox.
--- [https://wowpedia.fandom.com/wiki/API_GetLatestThreeSenders]
--- @return unknown, unknown, unknown @ sender1, sender2, sender3
function GetLatestThreeSenders()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLatestUpdatedComparisonStats?action=edit&redlink=1]
--- @return void
function GetLatestUpdatedComparisonStats()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLatestUpdatedStats?action=edit&redlink=1]
--- @return void
function GetLatestUpdatedStats()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLegacyRaidDifficultyID?action=edit&redlink=1]
--- @return void
function GetLegacyRaidDifficultyID()
end
--- Returns a list of dungeon/raid IDs that are advertised as available at a given level.
--- [https://wowpedia.fandom.com/wiki/API_GetLevelUpInstances]
--- @param level number @ level at which to list newly-available instances.
--- @param isRaid boolean @ true to list raid instances, false to list dungeons.
--- @return unknown, unknown, unknown @ id1, id2, ...
function GetLevelUpInstances(level, isRaid)
end
--- Returns the player's Leech %.
--- [https://wowpedia.fandom.com/wiki/API_GetLifesteal]
--- @return unknown @ Leech
function GetLifesteal()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLocalGameTime?action=edit&redlink=1]
--- @return void
function GetLocalGameTime()
end
--- Returns information about the client locale.
--- [https://wowpedia.fandom.com/wiki/API_GetLocale]
--- @return unknown @ e
function GetLocale()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLookingForGuildComment?action=edit&redlink=1]
--- @return void
function GetLookingForGuildComment()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLookingForGuildSettings?action=edit&redlink=1]
--- @return void
function GetLookingForGuildSettings()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLooseMacroIcons?action=edit&redlink=1]
--- @return void
function GetLooseMacroIcons()
end
--- [https://wowpedia.fandom.com/wiki/API_GetLooseMacroItemIcons?action=edit&redlink=1]
--- @return void
function GetLooseMacroItemIcons()
end
--- Returns a table with all of the loot info for the current loot window.
--- [https://wowpedia.fandom.com/wiki/API_GetLootInfo]
--- @return table @ info
function GetLootInfo()
end
--- Retrieves the Loot Method and (if applicable) Master Looter idenity.
--- [https://wowpedia.fandom.com/wiki/API_GetLootMethod]
--- @return string, number, number @ lootmethod, masterlooterPartyID, masterlooterRaidID
function GetLootMethod()
end
--- Returns information about the loot event with rollID.
--- [https://wowpedia.fandom.com/wiki/API_GetLootRollItemInfo]
--- @param rollID number @ The number increments by 1 for each new roll. The count is not reset by reloading the UI.
--- @return string, string, number, number, number, number, number, number, number, number, number, number @ texture, name, count, quality, bindOnPickUp, canNeed, canGreed, canDisenchant, reasonNeed, reasonGreed, reasonDisenchant, deSkillRequired
function GetLootRollItemInfo(rollID)
end
--- Retrieves the itemLink of an item being rolled on.
--- [https://wowpedia.fandom.com/wiki/API_GetLootRollItemLink]
--- @param id number @ id is a number used by the server to keep track of items being rolled on. It is generated server side and transmitted to the client.
--- @return unknown @ itemLink
function GetLootRollItemLink(id)
end
--- [https://wowpedia.fandom.com/wiki/API_GetLootRollTimeLeft?action=edit&redlink=1]
--- @return void
function GetLootRollTimeLeft()
end
--- Returns information about the contents of a loot slot.
--- [https://wowpedia.fandom.com/wiki/API_GetLootSlotInfo]
--- @param slot number @ the index of the loot (1 is the first item, typically coin)
--- @return string, string, number, number, number, boolean, boolean, number, boolean @ lootIcon, lootName, lootQuantity, currencyID, lootQuality, locked, isQuestItem, questID, isActive
function GetLootSlotInfo(slot)
end
--- Retrieves the itemLink of one item in the current loot window.
--- [https://wowpedia.fandom.com/wiki/API_GetLootSlotLink]
--- @param index number @ The index of the item in the list to retrieve info from (1 to GetNumLootItems())
--- @return string @ itemLink
function GetLootSlotLink(index)
end
--- Returns an integer loot type for a given loot slot.
--- [https://wowpedia.fandom.com/wiki/API_GetLootSlotType]
--- @param slotIndex number @ Position in loot window to query, from 1 - GetNumLootItems().
--- @return number @ slotType
function GetLootSlotType(slotIndex)
end
--- Returns information about the source of the objects in a loot slot.
--- [https://wowpedia.fandom.com/wiki/API_GetLootSourceInfo]
--- @param lootSlot number @ index of the loot slot, ascending from 1 up to GetNumLootItems()
--- @return string, number, unknown @ guid, quantity, ...
function GetLootSourceInfo(lootSlot)
end
--- Returns the player's current loot specialization.
--- [https://wowpedia.fandom.com/wiki/API_GetLootSpecialization]
--- @return number @ specID
function GetLootSpecialization()
end
--- Returns the currently active loot threshold as a number.
--- [https://wowpedia.fandom.com/wiki/API_GetLootThreshold]
--- @return number @ threshold
function GetLootThreshold()
end
--- Returns the body (macro text) of a macro.
--- [https://wowpedia.fandom.com/wiki/API_GetMacroBody]
--- @param macroIndex_or_name unknown
--- @return string @ body
function GetMacroBody(macroIndex_or_name)
end
--- [https://wowpedia.fandom.com/wiki/API_GetMacroIcons?action=edit&redlink=1]
--- @return void
function GetMacroIcons()
end
--- Returns macro slot index containing a macro with the specified name.
--- [https://wowpedia.fandom.com/wiki/API_GetMacroIndexByName]
--- @param name string @ Macro name to query.
--- @return number @ macroSlot
function GetMacroIndexByName(name)
end
--- Return information about a macro.
--- [https://wowpedia.fandom.com/wiki/API_GetMacroInfo]
--- @param name_or_macroSlot unknown
--- @return string, number, string, number @ name, icon, body, isLocal
function GetMacroInfo(name_or_macroSlot)
end
--- [https://wowpedia.fandom.com/wiki/API_GetMacroItem?action=edit&redlink=1]
--- @return void
function GetMacroItem()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMacroItemIcons?action=edit&redlink=1]
--- @return void
function GetMacroItemIcons()
end
--- Returns information about the spell a given macro is set to cast.
--- [https://wowpedia.fandom.com/wiki/API_GetMacroSpell]
--- @param slot_or_macroName unknown
--- @return number @ id
function GetMacroSpell(slot_or_macroName)
end
--- Gets the player's current mana regeneration rates (in mana per 1 seconds).
--- [https://wowpedia.fandom.com/wiki/API_GetManaRegen]
--- @return number, number @ base, casting
function GetManaRegen()
end
--- Returns the name of the player at the specified index, who would receive an item assigned by GiveMasterLoot(slot, index) using the same index.
--- [https://wowpedia.fandom.com/wiki/API_GetMasterLootCandidate]
--- @param slot unknown @ The loot slot number of the item you want to get information about
--- @param index unknown @ The number of the player whose name you wish to return. Typically between 1 and 40. Can exceed the value of GetNumRaidMembers()
--- @return unknown @ candidate
function GetMasterLootCandidate(slot, index)
end
--- Returns the (raw) mastery of the player.
--- [https://wowpedia.fandom.com/wiki/API_GetMastery]
--- @return number @ mastery
function GetMastery()
end
--- Returns the effect of player's current Mastery.
--- [https://wowpedia.fandom.com/wiki/API_GetMasteryEffect]
--- @return number, number @ mastery, coefficient
function GetMasteryEffect()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMawPowerLinkBySpellID?action=edit&redlink=1]
--- @return void
function GetMawPowerLinkBySpellID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMaxArenaCurrency?action=edit&redlink=1]
--- @return void
function GetMaxArenaCurrency()
end
--- Returns the max number of battlefields you can queue for [1]
--- [https://wowpedia.fandom.com/wiki/API_GetMaxBattlefieldID]
--- @return number @ maxBattlefieldID
function GetMaxBattlefieldID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMaxCombatRatingBonus?action=edit&redlink=1]
--- @return void
function GetMaxCombatRatingBonus()
end
--- Maps an expansion level to a maximum character level for that expansion.
--- [https://wowpedia.fandom.com/wiki/API_GetMaxLevelForExpansionLevel]
--- @param expansionLevel number
--- @return number @ maxLevel
function GetMaxLevelForExpansionLevel(expansionLevel)
end
--- Returns the highest reachable character level for the latest expansion.
--- [https://wowpedia.fandom.com/wiki/API_GetMaxLevelForLatestExpansion]
--- @return number @ maxLevel
function GetMaxLevelForLatestExpansion()
end
--- Returns the highest reachable character level for the players' owned expansion level.
--- [https://wowpedia.fandom.com/wiki/API_GetMaxLevelForPlayerExpansion]
--- @return number @ maxLevel
function GetMaxLevelForPlayerExpansion()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMaxNumCUFProfiles?action=edit&redlink=1]
--- @return void
function GetMaxNumCUFProfiles()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMaxPlayerLevel?action=edit&redlink=1]
--- @return void
function GetMaxPlayerLevel()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMaxRenderScale?action=edit&redlink=1]
--- @return void
function GetMaxRenderScale()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMaxRewardCurrencies?action=edit&redlink=1]
--- @return void
function GetMaxRewardCurrencies()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMaxSpellStartRecoveryOffset?action=edit&redlink=1]
--- @return void
function GetMaxSpellStartRecoveryOffset()
end
--- Returns the number of available talent tiers.
--- [https://wowpedia.fandom.com/wiki/API_GetMaxTalentTier]
--- @return number @ tiers
function GetMaxTalentTier()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetMaximumExpansionLevel]
--- @return number @ expansionLevel
function GetMaximumExpansionLevel()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMeleeHaste?action=edit&redlink=1]
--- @return void
function GetMeleeHaste()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantCurrencies?action=edit&redlink=1]
--- @return void
function GetMerchantCurrencies()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantFilter?action=edit&redlink=1]
--- @return void
function GetMerchantFilter()
end
--- The itemCount is the number of different types of items required, not how many of those types. For example, the Scout's Tabard which requires 3 Arathi Basin Marks of Honor and 3 Warsong Gulch Marks of Honor would return a 2 for the item count. To find out how many of each item is required, use the GetMerchantItemCostItem function.
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantItemCostInfo]
--- @param index number @ The index of the item in the merchant's inventory
--- @return number @ itemCount
function GetMerchantItemCostInfo(index)
end
--- Returns information about an item's token/currency cost.
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantItemCostItem]
--- @param index number @ Slot in the merchant's inventory to query.
--- @param itemIndex number @ The index for the required item cost type, ascending from 1 to itemCount returned by GetMerchantItemCostInfo.
--- @return string, number, string, string @ itemTexture, itemValue, itemLink, currencyName
function GetMerchantItemCostItem(index, itemIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantItemID?action=edit&redlink=1]
--- @return void
function GetMerchantItemID()
end
--- Returns information about a merchant's item.
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantItemInfo]
--- @param index number @ The index of the item in the merchant's inventory
--- @return string, string, number, number, number, unknown, number, number @ name, texture, price, quantity, numAvailable, isPurchasable, isUsable, extendedCost
function GetMerchantItemInfo(index)
end
--- Returns a link to the indexed item in the merchant's inventory.
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantItemLink]
--- @param index number @ The index of the item in the merchant's inventory
--- @return unknown @ link
function GetMerchantItemLink(index)
end
--- Gets the maximum stack size for an item from the active merchant.
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantItemMaxStack]
--- @param index number @ The index of the item in the merchant's inventory.
--- @return number @ maxStack
function GetMerchantItemMaxStack(index)
end
--- Returns the number of items a merchant carries.
--- [https://wowpedia.fandom.com/wiki/API_GetMerchantNumItems]
--- @return number @ numItems
function GetMerchantNumItems()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMinRenderScale?action=edit&redlink=1]
--- @return void
function GetMinRenderScale()
end
--- Returns the zone text, that is displayed over the minimap
--- [https://wowpedia.fandom.com/wiki/API_GetMinimapZoneText]
--- @return string @ zone
function GetMinimapZoneText()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetMinimumExpansionLevel]
--- @return number @ expansionLevel
function GetMinimumExpansionLevel()
end
--- Gives information about the mirror bar. (Spirit release, exhaustion/fatigue, etc)
--- [https://wowpedia.fandom.com/wiki/API_GetMirrorTimerInfo]
--- @param id number @ timer index, from 1 to MIRRORTIMER_NUMTIMERS (3 as of 3.2). In general, the following correspondence holds: 1 = Fatigue, 2 = Breath, 3 = Feign Death.
--- @return string, number, number, number, number, string @ timer, initial, maxvalue, scale, paused, label
function GetMirrorTimerInfo(id)
end
--- Returns the current value of a mirror timer (fatigue, breath, feign death etc).
--- [https://wowpedia.fandom.com/wiki/API_GetMirrorTimerProgress]
--- @param timer string @ the first return value from GetMirrorTimerInfo, identifying the timer queried. Valid values include EXHAUSTION, BREATH and FEIGNDEATH.
--- @return number @ value
function GetMirrorTimerProgress(timer)
end
--- [https://wowpedia.fandom.com/wiki/API_GetModResilienceDamageReduction?action=edit&redlink=1]
--- @return void
function GetModResilienceDamageReduction()
end
--- Returns the modifier key assigned to the given action.
--- [https://wowpedia.fandom.com/wiki/API_GetModifiedClick]
--- @param action string @ The action to query. Actions defined by Blizzard:
--- @return string @ key
function GetModifiedClick(action)
end
--- [https://wowpedia.fandom.com/wiki/API_GetModifiedClickAction?action=edit&redlink=1]
--- @return void
function GetModifiedClickAction()
end
--- Returns an integer value of your held money.
--- [https://wowpedia.fandom.com/wiki/API_GetMoney]
--- @return number @ money
function GetMoney()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMonitorAspectRatio?action=edit&redlink=1]
--- @return void
function GetMonitorAspectRatio()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMonitorCount?action=edit&redlink=1]
--- @return void
function GetMonitorCount()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMonitorName?action=edit&redlink=1]
--- @return void
function GetMonitorName()
end
--- Returns the name of the button responsible causing the OnClick handler to fire.
--- [https://wowpedia.fandom.com/wiki/API_GetMouseButtonClicked]
--- @return string @ buttonName
function GetMouseButtonClicked()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMouseButtonName?action=edit&redlink=1]
--- @return void
function GetMouseButtonName()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMouseClickFocus?action=edit&redlink=1]
--- @return void
function GetMouseClickFocus()
end
--- Returns the frame that is currently receiving mouse events. The frame must have enableMouse=true
--- [https://wowpedia.fandom.com/wiki/API_GetMouseFocus]
--- @return table @ frameID
function GetMouseFocus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMouseMotionFocus?action=edit&redlink=1]
--- @return void
function GetMouseMotionFocus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMovieDownloadProgress?action=edit&redlink=1]
--- @return void
function GetMovieDownloadProgress()
end
--- [https://wowpedia.fandom.com/wiki/API_GetMultiCastBarIndex?action=edit&redlink=1]
--- @return void
function GetMultiCastBarIndex()
end
--- Returns a list of valid totem spells for the specified totem bar slot.
--- [https://wowpedia.fandom.com/wiki/API_GetMultiCastTotemSpells]
--- @param slot number @ The totem bar slot number:
--- @return number, number, number, number, number, number, number @ totem1, totem2, totem3, totem4, totem5, totem6, totem7
function GetMultiCastTotemSpells(slot)
end
--- Produces a table describing all the harmful consequences of wearing corrupted gear without resistance.
--- [https://wowpedia.fandom.com/wiki/API_GetNegativeCorruptionEffectInfo]
--- @return unknown @ corruptionEffects
function GetNegativeCorruptionEffectInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNetIpTypes?action=edit&redlink=1]
--- @return void
function GetNetIpTypes()
end
--- Returns various network statistics.
--- [https://wowpedia.fandom.com/wiki/API_GetNetStats]
--- @return number, number, number, number @ bandwidthIn, bandwidthOut, latencyHome, latencyWorld
function GetNetStats()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNewSocketInfo?action=edit&redlink=1]
--- @return void
function GetNewSocketInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNewSocketLink?action=edit&redlink=1]
--- @return void
function GetNewSocketLink()
end
--- Return the next achievement in a chain.
--- [https://wowpedia.fandom.com/wiki/API_GetNextAchievement]
--- @param achievementID number @ The ID of the Achievement
--- @return number @ nextAchievementID
function GetNextAchievement(achievementID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetNextCompleatedTutorial?action=edit&redlink=1]
--- @return void
function GetNextCompleatedTutorial()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNextPendingInviteConfirmation?action=edit&redlink=1]
--- @return void
function GetNextPendingInviteConfirmation()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNormalizedRealmName]
--- @return void
function GetNormalizedRealmName()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumActiveQuests?action=edit&redlink=1]
--- @return void
function GetNumActiveQuests()
end
--- Get the number of user supplied AddOns.
--- [https://wowpedia.fandom.com/wiki/API_GetNumAddOns]
--- @return number @ count
function GetNumAddOns()
end
--- Returns the number of Archaeology races in the game.
--- [https://wowpedia.fandom.com/wiki/API_GetNumArchaeologyRaces]
--- @return number @ numRaces
function GetNumArchaeologyRaces()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumArenaOpponentSpecs?action=edit&redlink=1]
--- @return void
function GetNumArenaOpponentSpecs()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumArenaOpponents?action=edit&redlink=1]
--- @return void
function GetNumArenaOpponents()
end
--- Returns the amount of artifacts the player has acquired from the provided race.
--- [https://wowpedia.fandom.com/wiki/API_GetNumArtifactsByRace]
--- @param raceIndex number @ Index of the race to be selected.
--- @return number @ numProjects
function GetNumArtifactsByRace(raceIndex)
end
--- Returns the number of popup quest notifications being shown.
--- [https://wowpedia.fandom.com/wiki/API_GetNumAutoQuestPopUps]
--- @return number @ numPopups
function GetNumAutoQuestPopUps()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumAvailableQuests?action=edit&redlink=1]
--- @return void
function GetNumAvailableQuests()
end
--- Returns information about the number of purchased bank bag slots.
--- [https://wowpedia.fandom.com/wiki/API_GetNumBankSlots]
--- @return number, number @ numSlots, full
function GetNumBankSlots()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumBattlefieldFlagPositions?action=edit&redlink=1]
--- @return void
function GetNumBattlefieldFlagPositions()
end
--- Appears to return the number of scores in the battleground/field scoreboard:
--- [https://wowpedia.fandom.com/wiki/API_GetNumBattlefieldScores]
--- @return unknown @ numBattlefieldScores
function GetNumBattlefieldScores()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumBattlefieldVehicles?action=edit&redlink=1]
--- @return void
function GetNumBattlefieldVehicles()
end
--- Returns the number of battleground types.
--- [https://wowpedia.fandom.com/wiki/API_GetNumBattlegroundTypes]
--- @return number @ numBattlegrounds
function GetNumBattlegroundTypes()
end
--- Returns the total number of key bindings listed in the key bindings window. This includes not only actions that can be bound, but also the category headers in the window. This would generally be used in conjunction with GetBinding to loop through and set/get all of the key bindings available.
--- [https://wowpedia.fandom.com/wiki/API_GetNumBindings]
--- @return unknown @ numKeyBindings
function GetNumBindings()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumBuybackItems?action=edit&redlink=1]
--- @return void
function GetNumBuybackItems()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumChannelMembers?action=edit&redlink=1]
--- @return void
function GetNumChannelMembers()
end
--- Returns the number of existing player classes.
--- [https://wowpedia.fandom.com/wiki/API_GetNumClasses]
--- @return number @ numClasses
function GetNumClasses()
end
--- Returns the number of companions you have.
--- [https://wowpedia.fandom.com/wiki/API_GetNumCompanions]
--- @param type string @ Type of companions to count: CRITTER, or MOUNT.
--- @return number @ count
function GetNumCompanions(type)
end
--- Returns the number of completed achievements for the comparison player.
--- [https://wowpedia.fandom.com/wiki/API_GetNumComparisonCompletedAchievements]
--- @return void
function GetNumComparisonCompletedAchievements()
end
--- Return the total number of Achievements, and number completed.
--- [https://wowpedia.fandom.com/wiki/API_GetNumCompletedAchievements]
--- @return number, number @ total, completed
function GetNumCompletedAchievements()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumDeclensionSets?action=edit&redlink=1]
--- @return void
function GetNumDeclensionSets()
end
--- This function returns the number of channels and headers currently displayed by ChannelFrame. Usually used to loop through all available channels/headers to perfom API GetChannelDisplayInfo on them. Note that this function only retrieves the number of visible channels/headers! Those subchannels that are hidden by a collapsed header are not counted.
--- [https://wowpedia.fandom.com/wiki/API_GetNumDisplayChannels]
--- @return unknown @ channelCount
function GetNumDisplayChannels()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumDungeonForRandomSlot?action=edit&redlink=1]
--- @return void
function GetNumDungeonForRandomSlot()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetNumExpansions]
--- @return number @ numExpansions
function GetNumExpansions()
end
--- Returns the number of lines in the faction display.
--- [https://wowpedia.fandom.com/wiki/API_GetNumFactions]
--- @return number @ numFactions
function GetNumFactions()
end
--- Returns the number of achievements that match the search string specified calling SetAchievementSearchString
--- [https://wowpedia.fandom.com/wiki/API_GetNumFilteredAchievements]
--- @return number @ numFiltered
function GetNumFilteredAchievements()
end
--- Returns the number of available Flexible Raid instances.
--- [https://wowpedia.fandom.com/wiki/API_GetNumFlexRaidDungeons]
--- @return number @ numInstances
function GetNumFlexRaidDungeons()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumFlyouts?action=edit&redlink=1]
--- @return void
function GetNumFlyouts()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumFrames?action=edit&redlink=1]
--- @return void
function GetNumFrames()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGroupChannels?action=edit&redlink=1]
--- @return void
function GetNumGroupChannels()
end
--- Returns the total number of players in a group.
--- [https://wowpedia.fandom.com/wiki/API_GetNumGroupMembers]
--- @param groupType unknown @ Optional - One of the following:
--- @return number @ numGroupMembers
function GetNumGroupMembers(groupType)
end
--- Returns the total number of applicants to your guild received trough the Guild Finder.
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildApplicants]
--- @return number @ numApplicants
function GetNumGuildApplicants()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildBankMoneyTransactions?action=edit&redlink=1]
--- @return void
function GetNumGuildBankMoneyTransactions()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildBankTabs?action=edit&redlink=1]
--- @return void
function GetNumGuildBankTabs()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildBankTransactions?action=edit&redlink=1]
--- @return void
function GetNumGuildBankTransactions()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildChallenges?action=edit&redlink=1]
--- @return void
function GetNumGuildChallenges()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildEvents?action=edit&redlink=1]
--- @return void
function GetNumGuildEvents()
end
--- Returns the number of guild members.
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildMembers]
--- @return number, number, number @ numTotalGuildMembers, numOnlineGuildMembers, numOnlineAndMobileMembers
function GetNumGuildMembers()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildMembershipRequests?action=edit&redlink=1]
--- @return void
function GetNumGuildMembershipRequests()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildNews?action=edit&redlink=1]
--- @return void
function GetNumGuildNews()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildPerks?action=edit&redlink=1]
--- @return void
function GetNumGuildPerks()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildRewards?action=edit&redlink=1]
--- @return void
function GetNumGuildRewards()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumGuildTradeSkill?action=edit&redlink=1]
--- @return void
function GetNumGuildTradeSkill()
end
--- Returns the number of item effects affected by upgrading the current item.
--- [https://wowpedia.fandom.com/wiki/API_GetNumItemUpgradeEffects]
--- @return number @ numUpgradeEffects
function GetNumItemUpgradeEffects()
end
--- Returns the number of languages your character can speak.
--- [https://wowpedia.fandom.com/wiki/API_GetNumLanguages]
--- @return number @ NumLanguages
function GetNumLanguages()
end
--- Returns the slot number of the last item in the loot window (the item window must be opened). So it may be more than the number of items remaining, if one or more items have already been taken.
--- [https://wowpedia.fandom.com/wiki/API_GetNumLootItems]
--- @return number @ numLootItems
function GetNumLootItems()
end
--- Return the number of macros the player has.
--- [https://wowpedia.fandom.com/wiki/API_GetNumMacros]
--- @return number, number @ global, perChar
function GetNumMacros()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumMembersInRank?action=edit&redlink=1]
--- @return void
function GetNumMembersInRank()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumModifiedClickActions?action=edit&redlink=1]
--- @return void
function GetNumModifiedClickActions()
end
--- Gets the number of names that have signed the open petition.
--- [https://wowpedia.fandom.com/wiki/API_GetNumPetitionNames]
--- @return number @ numNames
function GetNumPetitionNames()
end
--- Returns the number of reward choices in the quest you're currently completing.
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestChoices]
--- @return number @ numChoices
function GetNumQuestChoices()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestCurrencies?action=edit&redlink=1]
--- @return void
function GetNumQuestCurrencies()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestItemDrops?action=edit&redlink=1]
--- @return void
function GetNumQuestItemDrops()
end
--- Returns the number of items nessecary to complete a particular quest.
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestItems]
--- @return number @ numRequiredItems
function GetNumQuestItems()
end
--- Returns the number of objectives for a given quest.
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestLeaderBoards]
--- @param questID number @ Identifier of the quest. If not provided, default to the currently selected Quest, via SelectQuestLogEntry().
--- @return number @ numQuestLogLeaderBoards
function GetNumQuestLeaderBoards(questID)
end
--- Returns the number of options someone has when getting a quest item.
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestLogChoices]
--- @param questID number
--- @param includeCurrencies boolean @ ?Optional. Could be nil.
--- @return number @ numQuestChoices
function GetNumQuestLogChoices(questID, includeCurrencies)
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestLogRewardCurrencies?action=edit&redlink=1]
--- @return void
function GetNumQuestLogRewardCurrencies()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestLogRewardFactions?action=edit&redlink=1]
--- @return void
function GetNumQuestLogRewardFactions()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestLogRewardSpells?action=edit&redlink=1]
--- @return void
function GetNumQuestLogRewardSpells()
end
--- Returns the count of the rewards for a particular quest.
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestLogRewards]
--- @return number @ numQuestRewards
function GetNumQuestLogRewards()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestLogTasks?action=edit&redlink=1]
--- @return void
function GetNumQuestLogTasks()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestPOIWorldEffects?action=edit&redlink=1]
--- @return void
function GetNumQuestPOIWorldEffects()
end
--- Returns the number of items unconditionally rewarded by the quest being completed.
--- [https://wowpedia.fandom.com/wiki/API_GetNumQuestRewards]
--- @return number @ numRewards
function GetNumQuestRewards()
end
--- Returns the number of available Raid Finder dungeons [1]
--- [https://wowpedia.fandom.com/wiki/API_GetNumRFDungeons]
--- @return number @ numRFDungeons
function GetNumRFDungeons()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumRaidProfiles?action=edit&redlink=1]
--- @return void
function GetNumRaidProfiles()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumRandomDungeons?action=edit&redlink=1]
--- @return void
function GetNumRandomDungeons()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumRandomScenarios?action=edit&redlink=1]
--- @return void
function GetNumRandomScenarios()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumRecruitingGuilds?action=edit&redlink=1]
--- @return void
function GetNumRecruitingGuilds()
end
--- Returns the number of currency rewards for the quest currently being viewed in the quest log or quest info frame.
--- [https://wowpedia.fandom.com/wiki/API_GetNumRewardCurrencies]
--- @return number @ numCurrencies
function GetNumRewardCurrencies()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumRewardSpells?action=edit&redlink=1]
--- @return void
function GetNumRewardSpells()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumRoutes?action=edit&redlink=1]
--- @return void
function GetNumRoutes()
end
--- Returns the number of instances for which the player currently has lockout data saved.
--- [https://wowpedia.fandom.com/wiki/API_GetNumSavedInstances]
--- @return number @ numInstances
function GetNumSavedInstances()
end
--- Returns the number of world bosses the player currently cannot receive loot from.
--- [https://wowpedia.fandom.com/wiki/API_GetNumSavedWorldBosses]
--- @return number @ numSavedWorldBosses
function GetNumSavedWorldBosses()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumScenarios?action=edit&redlink=1]
--- @return void
function GetNumScenarios()
end
--- Returns the number of shapeshift buttons (stances for Warriors, auras for Paladins, forms for Druids, etc) the player currently has.
--- [https://wowpedia.fandom.com/wiki/API_GetNumShapeshiftForms]
--- @return void
function GetNumShapeshiftForms()
end
--- Returns the number of sockets in the item currently in the item socketing window.
--- [https://wowpedia.fandom.com/wiki/API_GetNumSockets]
--- @return unknown @ SocketCount
function GetNumSockets()
end
--- Returns the number of specialization group (dual specs) the player has.
--- [https://wowpedia.fandom.com/wiki/API_GetNumSpecGroups]
--- @param b boolean @ In theory this returns information for the inspected target instead of the player. In practice, this seems to return 0 if true. Defaults to false.
--- @return number @ numSpecGroups
function GetNumSpecGroups(b)
end
--- Returns the number of available specializations.
--- [https://wowpedia.fandom.com/wiki/API_GetNumSpecializations]
--- @param isInspect boolean @ if true, return information for the inspected unit; false by default
--- @param isPet boolean @ if true, return information for the player's pet; false by default
--- @return unknown @ numSpecializations
function GetNumSpecializations(isInspect, isPet)
end
--- Returns the number of specializations available to a particular class.
--- [https://wowpedia.fandom.com/wiki/API_GetNumSpecializationsForClassID]
--- @param classID number @ classId) - class ID to return information about.
--- @return unknown @ numSpecializations
function GetNumSpecializationsForClassID(classID)
end
--- Retrieves the number of tabs in the player's spellbook.
--- [https://wowpedia.fandom.com/wiki/API_GetNumSpellTabs]
--- @return number @ numTabs
function GetNumSpellTabs()
end
--- Returns the number of other players in the player's party (5-man sub-group).
--- [https://wowpedia.fandom.com/wiki/API_GetNumSubgroupMembers]
--- @param groupType unknown @ Optional - One of the following:
--- @return number @ numSubgroupMembers
function GetNumSubgroupMembers(groupType)
end
--- Returns the number of the highest Title ID.
--- [https://wowpedia.fandom.com/wiki/API_GetNumTitles]
--- @return number @ numTitles
function GetNumTitles()
end
--- Returns the total number of tracked achievements.
--- [https://wowpedia.fandom.com/wiki/API_GetNumTrackedAchievements]
--- @return number @ numTracked
function GetNumTrackedAchievements()
end
--- Returns the number of available tracking methods.
--- [https://wowpedia.fandom.com/wiki/API_GetNumTrackingTypes]
--- @return void
function GetNumTrackingTypes()
end
--- Returns the number of trainer services.
--- [https://wowpedia.fandom.com/wiki/API_GetNumTrainerServices]
--- @return number @ numTrainerServices
function GetNumTrainerServices()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumTreasurePickerItems?action=edit&redlink=1]
--- @return void
function GetNumTreasurePickerItems()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumUnspentPvpTalents?action=edit&redlink=1]
--- @return void
function GetNumUnspentPvpTalents()
end
--- Returns the number of unspent talents.
--- [https://wowpedia.fandom.com/wiki/API_GetNumUnspentTalents]
--- @return number @ numUnspentTalents
function GetNumUnspentTalents()
end
--- Returns the number of items being deposited into the Void Storage [1]
--- [https://wowpedia.fandom.com/wiki/API_GetNumVoidTransferDeposit]
--- @return number @ numDeposits
function GetNumVoidTransferDeposit()
end
--- Returns the number of items being withdrawed from the Void Storage [1]
--- [https://wowpedia.fandom.com/wiki/API_GetNumVoidTransferWithdrawal]
--- @return number @ numWithdrawals
function GetNumVoidTransferWithdrawal()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumWarGameTypes?action=edit&redlink=1]
--- @return void
function GetNumWarGameTypes()
end
--- [https://wowpedia.fandom.com/wiki/API_GetNumWorldPVPAreas?action=edit&redlink=1]
--- @return void
function GetNumWorldPVPAreas()
end
--- [https://wowpedia.fandom.com/wiki/API_GetOSLocale?action=edit&redlink=1]
--- @return void
function GetOSLocale()
end
--- Returns texture coordinates of an object icon.
--- [https://wowpedia.fandom.com/wiki/API_GetObjectIconTextureCoords]
--- @param objectIcon number @ index of the object icon to retrieve texture coordinates for, ascending from -2.
--- @return number, number, number, number @ left, right, top, bottom
function GetObjectIconTextureCoords(objectIcon)
end
--- [https://wowpedia.fandom.com/wiki/API_GetObjectiveText?action=edit&redlink=1]
--- @return void
function GetObjectiveText()
end
--- Returns whether you're currently passing on all loot.
--- [https://wowpedia.fandom.com/wiki/API_GetOptOutOfLoot]
--- @return number @ optedOut
function GetOptOutOfLoot()
end
--- [https://wowpedia.fandom.com/wiki/API_GetOverrideAPBySpellPower?action=edit&redlink=1]
--- @return void
function GetOverrideAPBySpellPower()
end
--- [https://wowpedia.fandom.com/wiki/API_GetOverrideBarIndex?action=edit&redlink=1]
--- @return void
function GetOverrideBarIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_GetOverrideBarSkin?action=edit&redlink=1]
--- @return void
function GetOverrideBarSkin()
end
--- [https://wowpedia.fandom.com/wiki/API_GetOverrideSpellPowerByAP?action=edit&redlink=1]
--- @return void
function GetOverrideSpellPowerByAP()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPOITextureCoords?action=edit&redlink=1]
--- @return void
function GetPOITextureCoords()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPVPDesired]
--- @return void
function GetPVPDesired()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPVPGearStatRules?action=edit&redlink=1]
--- @return void
function GetPVPGearStatRules()
end
--- Gets the statistics about your lifetime PVP contributions.
--- [https://wowpedia.fandom.com/wiki/API_GetPVPLifetimeStats]
--- @return number, number, number @ honorableKills, dishonorableKills, highestRank
function GetPVPLifetimeStats()
end
--- Returns which roles the player is willing to perform in PvP battlegrounds.
--- [https://wowpedia.fandom.com/wiki/API_GetPVPRoles]
--- @return boolean, boolean, boolean @ tank, healer, dps
function GetPVPRoles()
end
--- Gets the amount of honorable kills and honor points you have for the current session ( today ).
--- [https://wowpedia.fandom.com/wiki/API_GetPVPSessionStats]
--- @return number, number @ hk, hp
function GetPVPSessionStats()
end
--- Returns the amount of time left on your PVP flag.
--- [https://wowpedia.fandom.com/wiki/API_GetPVPTimer]
--- @return number @ ms
function GetPVPTimer()
end
--- Gets the player's PVP contribution statistics for the previous day.
--- [https://wowpedia.fandom.com/wiki/API_GetPVPYesterdayStats]
--- @return number, number, number @ hk, dk, contribution
function GetPVPYesterdayStats()
end
--- Returns the Player's parry chance in percentage.
--- [https://wowpedia.fandom.com/wiki/API_GetParryChance]
--- @return number @ parryChance
function GetParryChance()
end
--- [https://wowpedia.fandom.com/wiki/API_GetParryChanceFromAttribute?action=edit&redlink=1]
--- @return void
function GetParryChanceFromAttribute()
end
--- Returns a list of raidmembers with a main tank or main assist role.
--- [https://wowpedia.fandom.com/wiki/API_GetPartyAssignment]
--- @param assignment string @ The role to search, either MAINTANK or MAINASSIST (not case-sensitive).
--- @param raidmember string @ UnitId
--- @param exactMatch boolean
--- @return number, number @ raidIndex1, raidIndex2
function GetPartyAssignment(assignment, raidmember, exactMatch)
end
--- [https://wowpedia.fandom.com/wiki/API_GetPartyLFGBackfillInfo?action=edit&redlink=1]
--- @return void
function GetPartyLFGBackfillInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPartyLFGID?action=edit&redlink=1]
--- @return void
function GetPartyLFGID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPendingGlyphName?action=edit&redlink=1]
--- @return void
function GetPendingGlyphName()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPendingInviteConfirmations?action=edit&redlink=1]
--- @return void
function GetPendingInviteConfirmations()
end
--- Returns information about the player's personal PvP rating in a specific bracket.
--- [https://wowpedia.fandom.com/wiki/API_GetPersonalRatedInfo]
--- @param index number @ PvP bracket index ascending from 1 for 2v2, 3v3, 5v5 and 10v10 rated battlegrounds.
--- @return number, number, number, number, number, number, number, number @ rating, seasonBest, weeklyBest, seasonPlayed, seasonWon, weeklyPlayed, weeklyWon, cap
function GetPersonalRatedInfo(index)
end
--- Returns cooldown information for the pet action in the specified pet action bar slot.
--- [https://wowpedia.fandom.com/wiki/API_GetPetActionCooldown]
--- @param index number @ The index of the pet action button you want to query for cooldown info.
--- @return number, number, boolean @ startTime, duration, enable
function GetPetActionCooldown(index)
end
--- Returns information on the specified pet action.
--- [https://wowpedia.fandom.com/wiki/API_GetPetActionInfo]
--- @param index number @ The index of the pet action button you want to query.
--- @return string, string, string, boolean, boolean, boolean, boolean @ name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled
function GetPetActionInfo(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetActionSlotUsable?action=edit&redlink=1]
--- @return void
function GetPetActionSlotUsable()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetActionsUsable?action=edit&redlink=1]
--- @return void
function GetPetActionsUsable()
end
--- Returns the pet's current XP total, and the XP total required for the next level.
--- [https://wowpedia.fandom.com/wiki/API_GetPetExperience]
--- @return number, number @ currXP, nextXP
function GetPetExperience()
end
--- Returns the food types the current pet can eat.
--- [https://wowpedia.fandom.com/wiki/API_GetPetFoodTypes]
--- @return unknown @ petFoodList
function GetPetFoodTypes()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetIcon?action=edit&redlink=1]
--- @return void
function GetPetIcon()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetMeleeHaste?action=edit&redlink=1]
--- @return void
function GetPetMeleeHaste()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetSpellBonusDamage?action=edit&redlink=1]
--- @return void
function GetPetSpellBonusDamage()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetTalentTree?action=edit&redlink=1]
--- @return void
function GetPetTalentTree()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetTimeRemaining?action=edit&redlink=1]
--- @return void
function GetPetTimeRemaining()
end
--- Gets the information for a petition being viewed.
--- [https://wowpedia.fandom.com/wiki/API_GetPetitionInfo]
--- @return string, string, string, number, string, boolean, number @ petitionType, title, bodyText, maxSigs, originator, isOriginator, minSigs
function GetPetitionInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPetitionNameInfo?action=edit&redlink=1]
--- @return void
function GetPetitionNameInfo()
end
--- Returns physical screen size of game.
--- [https://wowpedia.fandom.com/wiki/API_GetPhysicalScreenSize]
--- @return number, number @ width, height
function GetPhysicalScreenSize()
end
--- Returns an active buff/debuff by spell ID on the player character.
--- [https://wowpedia.fandom.com/wiki/API_GetPlayerAuraBySpellID]
--- @param spellID number
--- @return void
function GetPlayerAuraBySpellID(spellID)
end
--- Returns the direction the player character is currently facing.
--- [https://wowpedia.fandom.com/wiki/API_GetPlayerFacing]
--- @return number @ facing
function GetPlayerFacing()
end
--- Returns basic information about another player from their GUID.
--- [https://wowpedia.fandom.com/wiki/API_GetPlayerInfoByGUID]
--- @param guid string @ The GUID of the player you're querying.
--- @return unknown, string, unknown, string, number, string, string @ izedClass, englishClass, izedRace, englishRace, sex, name, realm
function GetPlayerInfoByGUID(guid)
end
--- [https://wowpedia.fandom.com/wiki/API_GetPlayerTradeCurrency?action=edit&redlink=1]
--- @return void
function GetPlayerTradeCurrency()
end
--- Gets the amount of money in the trade window for the current user.
--- [https://wowpedia.fandom.com/wiki/API_GetPlayerTradeMoney]
--- @return string @ playerTradeMoney
function GetPlayerTradeMoney()
end
--- Returns information about a spell on the possession bar.
--- [https://wowpedia.fandom.com/wiki/API_GetPossessInfo]
--- @param index number @ The slot of the possess bar to check, ascending from 1.
--- @return string, number, boolean @ texture, spellID, enabled
function GetPossessInfo(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetPowerRegen?action=edit&redlink=1]
--- @return void
function GetPowerRegen()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPowerRegenForPowerType?action=edit&redlink=1]
--- @return void
function GetPowerRegenForPowerType()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPrevCompleatedTutorial?action=edit&redlink=1]
--- @return void
function GetPrevCompleatedTutorial()
end
--- Return the previous achievement in a chain.
--- [https://wowpedia.fandom.com/wiki/API_GetPreviousAchievement]
--- @param achievementID number @ The ID of the Achievement
--- @return number @ previousAchievementID
function GetPreviousAchievement(achievementID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetPreviousArenaSeason?action=edit&redlink=1]
--- @return void
function GetPreviousArenaSeason()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPrimarySpecialization?action=edit&redlink=1]
--- @return void
function GetPrimarySpecialization()
end
--- Gets details on a profession from its index including name, icon, and skill level.
--- [https://wowpedia.fandom.com/wiki/API_GetProfessionInfo]
--- @param index number @ The skill index number (can be found with API GetProfessions())
--- @return string, string, number, number, number, number, number, number, number, number @ name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier, specializationIndex, specializationOffset
function GetProfessionInfo(index)
end
--- Returns spell tab indices of the player's current professions
--- [https://wowpedia.fandom.com/wiki/API_GetProfessions]
--- @return number, number, number, number, number @ prof1, prof2, archaeology, fishing, cooking
function GetProfessions()
end
--- Returns quest progress text, displayed by the NPC before the player hits Continue.
--- [https://wowpedia.fandom.com/wiki/API_GetProgressText]
--- @return string @ progress
function GetProgressText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPromotionRank?action=edit&redlink=1]
--- @return void
function GetPromotionRank()
end
--- Returns the effect of PvP Power on damage dealt to players.
--- [https://wowpedia.fandom.com/wiki/API_GetPvpPowerDamage]
--- @return number @ pvpDamage
function GetPvpPowerDamage()
end
--- Returns the effect of PvP power on Healing Power.
--- [https://wowpedia.fandom.com/wiki/API_GetPvpPowerHealing]
--- @return number @ pvpHealing
function GetPvpPowerHealing()
end
--- Returns information about a PvP (honor) talent.
--- [https://wowpedia.fandom.com/wiki/API_GetPvpTalentInfoByID]
--- @param talentID number @ Talent ID.
--- @param specGroupIndex number @ ? - Index of active specialization group (GetActiveSpecGroup); if nil, the selected/available return values will always be false.
--- @param isInspect boolean @ ? - If non-nil, returns information based on inspectedUnit.
--- @param inspectUnit unknown
--- @return number, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ talentID, name, icon, selected, available, spellID, unlocked, row, column, known, grantedByAura
function GetPvpTalentInfoByID(talentID, specGroupIndex, isInspect, inspectUnit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetPvpTalentInfoBySpecialization?action=edit&redlink=1]
--- @return void
function GetPvpTalentInfoBySpecialization()
end
--- [https://wowpedia.fandom.com/wiki/API_GetPvpTalentLink?action=edit&redlink=1]
--- @return void
function GetPvpTalentLink()
end
--- Returns the material string associated with the particular quest. The material string is non-nil if this quest uses a custom texture other than the default Parchment texture.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestBackgroundMaterial]
--- @return string @ material
function GetQuestBackgroundMaterial()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestCurrencyID?action=edit&redlink=1]
--- @return void
function GetQuestCurrencyID()
end
--- Returns information about a currency token rewarded from the quest currently being viewed in the quest info frame.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestCurrencyInfo]
--- @param itemType string @ The category of the currency to query. Currently reward is the only category in use for currencies.
--- @param index number @ The index of the currency to query, in the range [1,GetNumRewardCurrencies()].
--- @return string, string, number, number @ name, texture, numItems, quality
function GetQuestCurrencyInfo(itemType, index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestExpansion?action=edit&redlink=1]
--- @return void
function GetQuestExpansion()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestFactionGroup?action=edit&redlink=1]
--- @return void
function GetQuestFactionGroup()
end
--- Returns the quest ID of the quest being offered/discussed with an NPC.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestID]
--- @return number @ questID
function GetQuestID()
end
--- Returns information about a quest's item rewards or requirements.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestItemInfo]
--- @param type string @ type of the item to query. One of the following values:
--- @param index number @ index of the item of the specified type to return information about, ascending from 1.
--- @return string, string, number, number, number @ name, texture, count, quality, isUsable
function GetQuestItemInfo(type, index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestItemInfoLootType?action=edit&redlink=1]
--- @return void
function GetQuestItemInfoLootType()
end
--- Returns link to the quest item.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestItemLink]
--- @param type string @ required, reward or choice
--- @param index number @ Quest reward item index.
--- @return string @ itemLink
function GetQuestItemLink(type, index)
end
--- At an unknown point between patches 6.2 and 7.3.2, this function's argument was changed to take a QuestID instead of a quest log index.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLink]
--- @param QuestID number @ Unique identifier for a quest.
--- @return string @ QuestLink
function GetQuestLink(QuestID)
end
--- Returns a bunch of data about a quest reward choice from the quest log.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogChoiceInfo]
--- @param itemNum number @ The item number to get info on
--- @return string, string, number, number, boolean @ name, texture, numItems, quality, isUsable
function GetQuestLogChoiceInfo(itemNum)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogChoiceInfoLootType?action=edit&redlink=1]
--- @return void
function GetQuestLogChoiceInfoLootType()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogCompletionText?action=edit&redlink=1]
--- @return void
function GetQuestLogCompletionText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogCriteriaSpell?action=edit&redlink=1]
--- @return void
function GetQuestLogCriteriaSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogItemDrop?action=edit&redlink=1]
--- @return void
function GetQuestLogItemDrop()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogItemLink]
--- @param type string @ required, reward or choice
--- @param index table @ Integer - Quest reward item index (starts with 1).
--- @return string @ itemLink
function GetQuestLogItemLink(type, index)
end
--- Returns information about a quest objective.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogLeaderBoard]
--- @param i number @ Index of the quest objective to query, ascending from 1 to GetNumQuestLeaderBoards(questIndex).
--- @param questIndex unknown @ Optional Number - Index of the quest log entry to query, ascending from 1 to GetNumQuestLogEntries. If not provided or invalid, defaults to the currently selected quest (via SelectQuestLogEntry)
--- @return string, string, boolean @ description, objectiveType, isCompleted
function GetQuestLogLeaderBoard(i, questIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogPortraitGiver?action=edit&redlink=1]
--- @return void
function GetQuestLogPortraitGiver()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogPortraitTurnIn?action=edit&redlink=1]
--- @return void
function GetQuestLogPortraitTurnIn()
end
--- Returns the description and objectives required for the selected (the one highlighted in the quest log) quest or by index.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogQuestText]
--- @param questLogIndex number @ ?Optional. Could be nil.
--- @return string, string @ questDescription, questObjectives
function GetQuestLogQuestText(questLogIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogQuestType?action=edit&redlink=1]
--- @return void
function GetQuestLogQuestType()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardArtifactXP?action=edit&redlink=1]
--- @return void
function GetQuestLogRewardArtifactXP()
end
--- Provides information about a currency reward for the quest currently being viewed in the quest log, or of the provided questId.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardCurrencyInfo]
--- @param index number @ The index of the currency to query, in the range of [1,GetNumRewardCurrencies()]
--- @param questId unknown
--- @return string, string, number, number, number @ name, texture, numItems, currencyId, quality
function GetQuestLogRewardCurrencyInfo(index, questId)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardFactionInfo?action=edit&redlink=1]
--- @return void
function GetQuestLogRewardFactionInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardHonor?action=edit&redlink=1]
--- @return void
function GetQuestLogRewardHonor()
end
--- GetQuestLogRewardInfo returns information about mandatory quest reward items.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardInfo]
--- @param itemIndex number @ Index of the item reward to query, up to GetNumQuestLogRewards
--- @param questID number @ ?Optional. Could be nil. - Unique identifier for a quest.
--- @return string, string, number, number, boolean, number, number @ itemName, itemTexture, numItems, quality, isUsable, itemID, itemLevel
function GetQuestLogRewardInfo(itemIndex, questID)
end
--- Returns a number representing the amount of copper rewarded by a particular quest in the quest log.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardMoney]
--- @param questID number @ ?Optional. Could be nil. - Unique identifier for a quest.
--- @return unknown @ money
function GetQuestLogRewardMoney(questID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardSkillPoints?action=edit&redlink=1]
--- @return void
function GetQuestLogRewardSkillPoints()
end
--- Returns information about the spell reward of the current selected quest.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardSpell]
--- @param rewardIndex number @ The index of the spell reward to get the details for
--- @param questID number @ Unique QuestID for the quest to be queried.
--- @return string, string, boolean, boolean, unknown, boolean, number, unknown, number @ texture, name, isTradeskillSpell, isSpellLearned, hideSpellLearnText, isBoostSpell, garrFollowerID, genericUnlock, spellID
function GetQuestLogRewardSpell(rewardIndex, questID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardTitle?action=edit&redlink=1]
--- @return void
function GetQuestLogRewardTitle()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogRewardXP?action=edit&redlink=1]
--- @return void
function GetQuestLogRewardXP()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogSpecialItemCooldown?action=edit&redlink=1]
--- @return void
function GetQuestLogSpecialItemCooldown()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogSpecialItemInfo?action=edit&redlink=1]
--- @return void
function GetQuestLogSpecialItemInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogSpellLink?action=edit&redlink=1]
--- @return void
function GetQuestLogSpellLink()
end
--- Gets the seconds left for the current quest that is being timed.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestLogTimeLeft]
--- @return unknown @ timeLeft
function GetQuestLogTimeLeft()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestMoneyToGet?action=edit&redlink=1]
--- @return void
function GetQuestMoneyToGet()
end
--- Returns information about a quest objective.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestObjectiveInfo]
--- @param questID number @ Unique identifier of the quest.
--- @param objectiveIndex unknown @ Index of the quest objective to query, ascending from 1 to GetNumQuestLeaderBoards(questIndex) or to numObjectives from GetTaskInfo(questID).
--- @param Boolean unknown @ Required to actually obtain quest text.
--- @return string, string, boolean, number, number @ text, objectiveType, finished, fulfilled, required
function GetQuestObjectiveInfo(questID, objectiveIndex, Boolean)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestPOIBlobCount?action=edit&redlink=1]
--- @return void
function GetQuestPOIBlobCount()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestPOILeaderBoard?action=edit&redlink=1]
--- @return void
function GetQuestPOILeaderBoard()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestPOIs?action=edit&redlink=1]
--- @return void
function GetQuestPOIs()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestPortraitGiver?action=edit&redlink=1]
--- @return void
function GetQuestPortraitGiver()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestPortraitTurnIn?action=edit&redlink=1]
--- @return void
function GetQuestPortraitTurnIn()
end
--- Returns a quest's objective completion percentage.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestProgressBarPercent]
--- @param questID number @ Unique identifier of the quest.
--- @return number @ percent
function GetQuestProgressBarPercent(questID)
end
--- Returns the number of seconds until daily quests reset.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestResetTime]
--- @return number @ nextReset
function GetQuestResetTime()
end
--- Completes the quest with the specified quest reward. Warning: Since making a choice here is irrevocable, use with caution.
--- [https://wowpedia.fandom.com/wiki/API_GetQuestReward]
--- @param itemChoice number @ The quest reward chosen
--- @return void
function GetQuestReward(itemChoice)
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestSortIndex?action=edit&redlink=1]
--- @return void
function GetQuestSortIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestSpellLink?action=edit&redlink=1]
--- @return void
function GetQuestSpellLink()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestText?action=edit&redlink=1]
--- @return void
function GetQuestText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetQuestUiMapID?action=edit&redlink=1]
--- @return void
function GetQuestUiMapID()
end
--- Returns info about a Raid Finder dungeon by index. Limited by player level and other factors, so only Raid Finder dungeons listed in the LFG tool can be looked up.
--- [https://wowpedia.fandom.com/wiki/API_GetRFDungeonInfo]
--- @param index number @ index of a Raid Finder dungeon, from 1 to GetNumRFDungeons()
--- @return number, string, number, number, number, number, number, number, number, number, number, string, number, number, string, boolean, number, number @ ID, name, typeID, subtypeID, minLevel, maxLevel, recLevel, minRecLevel, maxRecLevel, expansionLevel, groupID, textureFilename, difficulty, maxPlayers, description, isHoliday, bonusRepAmount, minPlayers
function GetRFDungeonInfo(index)
end
--- Returns the player's currently selected raid difficulty.
--- [https://wowpedia.fandom.com/wiki/API_GetRaidDifficultyID]
--- @return number @ difficultyID
function GetRaidDifficultyID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRaidProfileFlattenedOptions?action=edit&redlink=1]
--- @return void
function GetRaidProfileFlattenedOptions()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRaidProfileName?action=edit&redlink=1]
--- @return void
function GetRaidProfileName()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRaidProfileOption?action=edit&redlink=1]
--- @return void
function GetRaidProfileOption()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRaidProfileSavedPosition?action=edit&redlink=1]
--- @return void
function GetRaidProfileSavedPosition()
end
--- Gets information about a raid member.
--- [https://wowpedia.fandom.com/wiki/API_GetRaidRosterInfo]
--- @param raidIndex number @ Index of raid member between 1 and MAX_RAID_MEMBERS (40). If you specify an index that is out of bounds, some return values change to nil (see details).
--- @return string, boolean, boolean, string, boolean, string @ zone, online, isDead, role, isML, combatRole
function GetRaidRosterInfo(raidIndex)
end
--- Returns the raid target index assigned to a unit.
--- [https://wowpedia.fandom.com/wiki/API_GetRaidTargetIndex]
--- @param unit string @ UnitId
--- @return number @ index
function GetRaidTargetIndex(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetRandomDungeonBestChoice?action=edit&redlink=1]
--- @return void
function GetRandomDungeonBestChoice()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRandomScenarioBestChoice?action=edit&redlink=1]
--- @return void
function GetRandomScenarioBestChoice()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRandomScenarioInfo?action=edit&redlink=1]
--- @return void
function GetRandomScenarioInfo()
end
--- Returns the player's ranged critical hit chance.
--- [https://wowpedia.fandom.com/wiki/API_GetRangedCritChance]
--- @return number @ critChance
function GetRangedCritChance()
end
--- Returns the player's ranged haste amount granted through buffs.
--- [https://wowpedia.fandom.com/wiki/API_GetRangedHaste]
--- @return number @ haste
function GetRangedHaste()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRatedBattleGroundInfo?action=edit&redlink=1]
--- @return void
function GetRatedBattleGroundInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetReadyCheckStatus?action=edit&redlink=1]
--- @return void
function GetReadyCheckStatus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetReadyCheckTimeLeft?action=edit&redlink=1]
--- @return void
function GetReadyCheckTimeLeft()
end
--- [https://wowpedia.fandom.com/wiki/API_GetReagentBankCost?action=edit&redlink=1]
--- @return void
function GetReagentBankCost()
end
--- Returns the map instance name.
--- [https://wowpedia.fandom.com/wiki/API_GetRealZoneText]
--- @param instanceID number @ ? - InstanceID
--- @return string @ zone
function GetRealZoneText(instanceID)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetRealmID]
--- @return number @ realmID
function GetRealmID()
end
--- GetRealmName() and GetNormalizedRealmName() return the name of the character's realm in different formats.
--- [https://wowpedia.fandom.com/wiki/API_GetRealmName]
--- @return string @ realmName
function GetRealmName()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRecruitingGuildInfo?action=edit&redlink=1]
--- @return void
function GetRecruitingGuildInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRecruitingGuildSelection?action=edit&redlink=1]
--- @return void
function GetRecruitingGuildSelection()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRecruitingGuildSettings?action=edit&redlink=1]
--- @return void
function GetRecruitingGuildSettings()
end
--- [https://wowpedia.fandom.com/wiki/API_GetReleaseTimeRemaining?action=edit&redlink=1]
--- @return void
function GetReleaseTimeRemaining()
end
--- Arguments none
--- [https://wowpedia.fandom.com/wiki/API_GetRepairAllCost]
--- @return number, boolean @ repairAllCost, canRepair
function GetRepairAllCost()
end
--- [https://wowpedia.fandom.com/wiki/API_GetResSicknessDuration?action=edit&redlink=1]
--- @return void
function GetResSicknessDuration()
end
--- Returns whether the player is in a rested (earning double XP for kills) or normal state.
--- [https://wowpedia.fandom.com/wiki/API_GetRestState]
--- @return number, string, number @ id, name, mult
function GetRestState()
end
--- Returns the cap on trial character level, money and profession skill for Starter Edition accounts.
--- [https://wowpedia.fandom.com/wiki/API_GetRestrictedAccountData]
--- @return number, number, number @ rLevel, rMoney, profCap
function GetRestrictedAccountData()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardArtifactXP?action=edit&redlink=1]
--- @return void
function GetRewardArtifactXP()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardHonor?action=edit&redlink=1]
--- @return void
function GetRewardHonor()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardMoney?action=edit&redlink=1]
--- @return void
function GetRewardMoney()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardNumSkillUps?action=edit&redlink=1]
--- @return void
function GetRewardNumSkillUps()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardPackArtifactPower?action=edit&redlink=1]
--- @return void
function GetRewardPackArtifactPower()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardPackCurrencies?action=edit&redlink=1]
--- @return void
function GetRewardPackCurrencies()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardPackItems?action=edit&redlink=1]
--- @return void
function GetRewardPackItems()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardPackMoney?action=edit&redlink=1]
--- @return void
function GetRewardPackMoney()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardPackTitle?action=edit&redlink=1]
--- @return void
function GetRewardPackTitle()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardPackTitleName?action=edit&redlink=1]
--- @return void
function GetRewardPackTitleName()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardSkillLineID?action=edit&redlink=1]
--- @return void
function GetRewardSkillLineID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardSkillPoints?action=edit&redlink=1]
--- @return void
function GetRewardSkillPoints()
end
--- Returns information about spell that you get as reward for completing quest currently in gossip frame.
--- [https://wowpedia.fandom.com/wiki/API_GetRewardSpell]
--- @return unknown, unknown, unknown, unknown @ texture, name, isTradeskillSpell, isSpellLearned
function GetRewardSpell()
end
--- Returns quest reward text, displayed by the NPC before the player hits Complete Quest.
--- [https://wowpedia.fandom.com/wiki/API_GetRewardText]
--- @return string @ reward
function GetRewardText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRewardTitle?action=edit&redlink=1]
--- @return void
function GetRewardTitle()
end
--- Returns the experience reward of the quest most recently discussed with an NPC.
--- [https://wowpedia.fandom.com/wiki/API_GetRewardXP]
--- @return number @ xp
function GetRewardXP()
end
--- Gets the cooldown information about a Death Knight's Rune
--- [https://wowpedia.fandom.com/wiki/API_GetRuneCooldown]
--- @param id unknown @ A number between 1 and 6 denoting which rune to be queried.
--- @return unknown, unknown, unknown @ start, duration, runeReady
function GetRuneCooldown(id)
end
--- Returns the rune count for the given slot.
--- [https://wowpedia.fandom.com/wiki/API_GetRuneCount]
--- @param slot number @ Ranging from 1 to 6 which correspond to the available rune slots from left to right.
--- @return number @ count
function GetRuneCount(slot)
end
--- [https://wowpedia.fandom.com/wiki/API_GetRunningMacro?action=edit&redlink=1]
--- @return void
function GetRunningMacro()
end
--- [https://wowpedia.fandom.com/wiki/API_GetRunningMacroButton?action=edit&redlink=1]
--- @return void
function GetRunningMacroButton()
end
--- Retrieves the SavedInstanceChatLink to a specific instance.
--- [https://wowpedia.fandom.com/wiki/API_GetSavedInstanceChatLink]
--- @param index unknown @ The index of the instance you want to query.
--- @return unknown @ link
function GetSavedInstanceChatLink(index)
end
--- Returns info about a specific encounter from a saved instance lockout.
--- [https://wowpedia.fandom.com/wiki/API_GetSavedInstanceEncounterInfo]
--- @param instanceIndex number @ Index from 1 to GetNumSavedInstances()
--- @param encounterIndex number @ Index from 1 to the number of encounters in the instance. For multi-part raids, this includes bosses that are not in that raid section, so the first boss in the second wing of a Raid Finder raid could actually have an encounterIndex of '4'.
--- @return string, number, boolean, boolean @ bossName, fileDataID, isKilled, unknown4
function GetSavedInstanceEncounterInfo(instanceIndex, encounterIndex)
end
--- Returns information about an instance for which the player has saved lockout data.
--- [https://wowpedia.fandom.com/wiki/API_GetSavedInstanceInfo]
--- @param index number @ index of the saved instance, from 1 to GetNumSavedInstances()
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ name, id, reset, difficulty, locked, extended, instanceIDMostSig, isRaid, maxPlayers, difficultyName, numEncounters, encounterProgress, extendDisabled
function GetSavedInstanceInfo(index)
end
--- Returns information about the player's world boss loot lockout.
--- [https://wowpedia.fandom.com/wiki/API_GetSavedWorldBossInfo]
--- @param index number @ Index of the world boss lockout to query, ascending from 1 to GetNumSavedWorldBosses().
--- @return string, number, number @ name, worldBossID, reset
function GetSavedWorldBossInfo(index)
end
--- Returns an ordered list of all available scenario IDs.
--- [https://wowpedia.fandom.com/wiki/API_GetScenariosChoiceOrder]
--- @param allScenarios table @ If provided, this table will be wiped and populated with return values; otherwise, a new table will be created for the return value.
--- @return table @ allScenarios
function GetScenariosChoiceOrder(allScenarios)
end
--- Returns the name of the specified damage school mask.
--- [https://wowpedia.fandom.com/wiki/API_GetSchoolString]
--- @param schoolMask number @ bitfield mask of damage types.
--- @return string @ school
function GetSchoolString(schoolMask)
end
--- [https://wowpedia.fandom.com/wiki/API_GetScreenDPIScale?action=edit&redlink=1]
--- @return void
function GetScreenDPIScale()
end
--- Returns the height of the window in pixels. This value is affected by the UI's scale.
--- [https://wowpedia.fandom.com/wiki/API_GetScreenHeight]
--- @return number @ screenHeight
function GetScreenHeight()
end
--- Returns a list of available screen resolutions
--- [https://wowpedia.fandom.com/wiki/API_GetScreenResolutions]
--- @return unknown, unknown, unknown, unknown @ resolution1, resolution2, resolution3, ...
function GetScreenResolutions()
end
--- Returns the width of the window in pixels. This value is affected by the UI's scale.
--- [https://wowpedia.fandom.com/wiki/API_GetScreenWidth]
--- @return number @ screenWidth
function GetScreenWidth()
end
--- [https://wowpedia.fandom.com/wiki/API_GetScriptCPUUsage?action=edit&redlink=1]
--- @return void
function GetScriptCPUUsage()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSecondsUntilParentalControlsKick?action=edit&redlink=1]
--- @return void
function GetSecondsUntilParentalControlsKick()
end
--- Returns the information for the selected race's current archaeology artifact.
--- [https://wowpedia.fandom.com/wiki/API_GetSelectedArtifactInfo]
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, spellID
function GetSelectedArtifactInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSelectedDisplayChannel?action=edit&redlink=1]
--- @return void
function GetSelectedDisplayChannel()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSelectedFaction?action=edit&redlink=1]
--- @return void
function GetSelectedFaction()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSelectedWarGameType?action=edit&redlink=1]
--- @return void
function GetSelectedWarGameType()
end
--- Used to determine the amount of COD gold is entered for a mail that is sent.
--- [https://wowpedia.fandom.com/wiki/API_GetSendMailCOD]
--- @return void
function GetSendMailCOD()
end
--- Returns information about an item attached in the send mail frame.
--- [https://wowpedia.fandom.com/wiki/API_GetSendMailItem]
--- @param index number @ The index of the attachment to query, in the range of [1,ATTACHMENTS_MAX_SEND]
--- @return string, number, string, number, number @ name, itemID, texture, count, quality
function GetSendMailItem(index)
end
--- Returns the itemLink of an item attached to the mail message the player is sending.
--- [https://wowpedia.fandom.com/wiki/API_GetSendMailItemLink]
--- @param attachment number @ The index of the attachment to query, in the range of [1,ATTACHMENTS_MAX_SEND]
--- @return unknown @ itemLink
function GetSendMailItemLink(attachment)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSendMailMoney?action=edit&redlink=1]
--- @return void
function GetSendMailMoney()
end
--- Gets the cost for sending mail.
--- [https://wowpedia.fandom.com/wiki/API_GetSendMailPrice]
--- @return number @ sendPrice
function GetSendMailPrice()
end
--- Returns the expansion level currently active on the server.
--- [https://wowpedia.fandom.com/wiki/API_GetServerExpansionLevel]
--- @return number @ serverExpansionLevel
function GetServerExpansionLevel()
end
--- Returns the server's Unix time.
--- [https://wowpedia.fandom.com/wiki/API_GetServerTime]
--- @return number @ timestamp
function GetServerTime()
end
--- Returns the time since you opened the game client.
--- [https://wowpedia.fandom.com/wiki/API_GetSessionTime]
--- @return number @ sessionTime
function GetSessionTime()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSetBonusesForSpecializationByItemID?action=edit&redlink=1]
--- @return void
function GetSetBonusesForSpecializationByItemID()
end
--- For some classes the return value is nil during the loading process. You need to wait until UPDATE_SHAPESHIFT_FORMS fires to get correct return values.
--- [https://wowpedia.fandom.com/wiki/API_GetShapeshiftForm]
--- @param flag boolean @ Optional) - True if return value is to be compared to a macro's conditional statement. This makes it always return zero for Presences and Auras. False or nil returns an index based on which button to highlight on the shapeshift/stance bar left to right starting at 1.
--- @return number @ index
function GetShapeshiftForm(flag)
end
--- Returns cooldown information for a specified form.
--- [https://wowpedia.fandom.com/wiki/API_GetShapeshiftFormCooldown]
--- @param index number @ Index of the desired form
--- @return number, number, number @ startTime, duration, isActive
function GetShapeshiftFormCooldown(index)
end
--- Returns the ID of the form or stance the player is currently in.
--- [https://wowpedia.fandom.com/wiki/API_GetShapeshiftFormID]
--- @return number @ index
function GetShapeshiftFormID()
end
--- Retrieves information about an available shapeshift form or similar ability.
--- [https://wowpedia.fandom.com/wiki/API_GetShapeshiftFormInfo]
--- @param index number @ index, ascending from 1 to GetNumShapeshiftForms()
--- @return string, number, number, number @ icon, active, castable, spellID
function GetShapeshiftFormInfo(index)
end
--- Returns which type of weapon the player currently has unsheathed, if any.
--- [https://wowpedia.fandom.com/wiki/API_GetSheathState]
--- @return number @ sheathState
function GetSheathState()
end
--- Returns the percentage of damage blocked by your shield.
--- [https://wowpedia.fandom.com/wiki/API_GetShieldBlock]
--- @return number @ damageReduction
function GetShieldBlock()
end
--- Returns whether the item currently selected for socketing can be traded to other eligible players.
--- [https://wowpedia.fandom.com/wiki/API_GetSocketItemBoundTradeable]
--- @return number @ isBoundTradeable
function GetSocketItemBoundTradeable()
end
--- Returns various information about the inventory item currently being socketed (i.e. socket UI is open for the item).
--- [https://wowpedia.fandom.com/wiki/API_GetSocketItemInfo]
--- @return string, string, number @ itemName, iconPathName, itemQuality
function GetSocketItemInfo()
end
--- Returns whether the item currently selected for socketing can be refunded.
--- [https://wowpedia.fandom.com/wiki/API_GetSocketItemRefundable]
--- @return number @ isRefundable
function GetSocketItemRefundable()
end
--- Returns the type of one of the sockets in the item currently in the item socketing window.
--- [https://wowpedia.fandom.com/wiki/API_GetSocketTypes]
--- @return void
function GetSocketTypes()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSortBagsRightToLeft?action=edit&redlink=1]
--- @return void
function GetSortBagsRightToLeft()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpecChangeCost?action=edit&redlink=1]
--- @return void
function GetSpecChangeCost()
end
--- Returns the index of the player's current specialization.
--- [https://wowpedia.fandom.com/wiki/API_GetSpecialization]
--- @param isInspect boolean @ if true, return information for the inspected player
--- @param isPet boolean @ if true, return information for the player's pet.
--- @param specGroup number @ The index of a given specialization/talent/glyph group (1 for primary / 2 for secondary).
--- @return number @ currentSpec
function GetSpecialization(isInspect, isPet, specGroup)
end
--- Returns information about the specified specialization.
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationInfo]
--- @param specIndex number @ Index of the specialization to query, ascending from 1 to GetNumSpecializations().
--- @param isInspect boolean @ ? - Whether to query specialization information for the inspected unit. Does not actually seem to work, see #Details.
--- @param isPet boolean @ ? - Whether to query specialization information for the player's pet.
--- @param inspectTarget unknown @ unk? - Unknown, not used in FrameXML.
--- @param sex number @ ? - Player's sex as returned by UnitSex()
--- @return number, string, string, number, string, number @ id, name, description, icon, role, primaryStat
function GetSpecializationInfo(specIndex, isInspect, isPet, inspectTarget, sex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationInfoByID]
--- @return void
function GetSpecializationInfoByID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationInfoForClassID]
--- @return void
function GetSpecializationInfoForClassID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationInfoForSpecID]
--- @return void
function GetSpecializationInfoForSpecID()
end
--- Returns the mastery spellID of the current player's specializiation.
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationMasterySpells]
--- @param specIndex number @ The index of the specialization to query (1, 2, 3, 4) (Druids have four specializations)
--- @param isInspect boolean @ Optional) Reserved. Must be nil
--- @param isPet boolean @ Optional) Reserved. Must be nil
--- @return unknown @ spellID
function GetSpecializationMasterySpells(specIndex, isInspect, isPet)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationNameForSpecID?action=edit&redlink=1]
--- @return void
function GetSpecializationNameForSpecID()
end
--- Returns the role a specialization is intended to perform.
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationRole]
--- @param specIndex number @ Specialization index, ascending from 1.
--- @param isInspect unknown
--- @param isPet unknown
--- @return string @ roleToken
function GetSpecializationRole(specIndex, isInspect, isPet)
end
--- Returns the role a specialization is intended to perform.
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationRoleByID]
--- @param specID number @ Specialization ID, as returned by GetSpecializationInfo or GetInspectSpecialization.
--- @return string @ roleToken
function GetSpecializationRoleByID(specID)
end
--- Returns spells learned as part of a specific specialization.
--- [https://wowpedia.fandom.com/wiki/API_GetSpecializationSpells]
--- @param specIndex number @ index of the specialization to query, integer ascending from 1.
--- @param isInspect number @ a truthy value to query information about the inspected unit; player information is returned otherwise.
--- @param isPet number @ a truthy value to query information about a pet specialization; player information is returned otherwise.
--- @return unknown, unknown, unknown, unknown, unknown @ spellID1, level1, spellID2, level2, ...
function GetSpecializationSpells(specIndex, isInspect, isPet)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpecsForSpell?action=edit&redlink=1]
--- @return void
function GetSpecsForSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpeed?action=edit&redlink=1]
--- @return void
function GetSpeed()
end
--- Get information about a spell's Autocast.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellAutocast]
--- @param spellName_or_spellId unknown
--- @param bookType string @ Either BOOKTYPE_SPELL (spell) or BOOKTYPE_PET (pet).
--- @return number, number @ autocastable, autostate
function GetSpellAutocast(spellName_or_spellId, bookType)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellAvailableLevel?action=edit&redlink=1]
--- @return void
function GetSpellAvailableLevel()
end
--- Gives the (unmodified) cooldown and global cooldown of an ability in milliseconds.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellBaseCooldown]
--- @param spellid number @ The spellid of your ability.
--- @return number, number @ cooldownMS, gcdMS
function GetSpellBaseCooldown(spellid)
end
--- Returns the raw spell damage bonus of the player for a given spell tree.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellBonusDamage]
--- @param spellTreeID number @ the spell tree:
--- @return number @ spellDmg
function GetSpellBonusDamage(spellTreeID)
end
--- Returns the spell power value used for healing spell coefficients. This includes your bonus from Versatility.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellBonusHealing]
--- @return number @ bonusHeal
function GetSpellBonusHealing()
end
--- Retrieves information about a specific spellbook item.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellBookItemInfo]
--- @param index number @ The index into the spellbook.
--- @param bookType string @ BOOKTYPE_SPELL or BOOKTYPE_PET depending on if you wish to query the player or pet spellbook. Internally the game only tests if this value is equal to pet and treats any other string value as spell
--- @return string, number @ skillType, special
function GetSpellBookItemInfo(index, bookType)
end
--- Retrieves the spell name and spell rank for a spell in the player's spell book.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellBookItemName]
--- @param index number @ Spell book slot index. Valid values are 1 through total number of spells in the spell book on all pages and all tabs, ignoring empty slots.
--- @param bookType string @ BOOKTYPE_SPELL or BOOKTYPE_PET depending on if you wish to query the player or pet spellbook. Internally the game only tests if this value is equal to pet and treats any other string value as spell
--- @return string, string, number @ spellName, spellSubName, spellID
function GetSpellBookItemName(index, bookType)
end
--- Returns the icon of a spell book entry.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellBookItemTexture]
--- @param spellName_or_index unknown
--- @param bookType string @ spell book to query; e.g.
--- @return number @ icon
function GetSpellBookItemTexture(spellName_or_index, bookType)
end
--- Returns information about the charges of a charge-accumulating player ability.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellCharges]
--- @param spellId_or_spellName unknown
--- @return number, number, number, number, number @ currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate
function GetSpellCharges(spellId_or_spellName)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellConfirmationPromptsInfo?action=edit&redlink=1]
--- @return void
function GetSpellConfirmationPromptsInfo()
end
--- Retrieves the cooldown data of the spell specified.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellCooldown]
--- @param spellName_or_spellID_or_slotID unknown
--- @param bookType string @ spell book category, e.g. BOOKTYPE_SPELL (spell) or BOOKTYPE_PET (pet).
--- @return unknown, number, number, number @ start, duration, enabled, modRate
function GetSpellCooldown(spellName_or_spellID_or_slotID, bookType)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellCount?action=edit&redlink=1]
--- @return void
function GetSpellCount()
end
--- Returns a players critical hit chance with spells for a certain school.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellCritChance]
--- @param school unknown
--- @return unknown @ theCritChance
function GetSpellCritChance(school)
end
--- Returns the spell description.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellDescription]
--- @param spellID number @ Not readily available on function call, see SpellMixin:ContinueOnSpellLoad.
--- @return string @ desc
function GetSpellDescription(spellID)
end
--- Returns the amount of Spell Hit %, not from Spell Hit Rating, that your character has.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellHitModifier]
--- @return number @ hitModifier
function GetSpellHitModifier()
end
--- Returns information about a spell
--- [https://wowpedia.fandom.com/wiki/API_GetSpellInfo]
--- @param spellId_or_spellName unknown
--- @param spellRank string @ Rank (or subtext) of a spell known to the player character, e.g. Pig for pig-transforming variant of [Polymorph].
--- @return string, unknown, number, number, number, number, number @ name, rank, icon, castTime, minRange, maxRange, spellId
function GetSpellInfo(spellId_or_spellName, spellRank)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellLevelLearned?action=edit&redlink=1]
--- @return void
function GetSpellLevelLearned()
end
--- Returns a hyperlink for a spell.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellLink]
--- @param slot number @ Valid values are 1 through total number of spells in the spellbook on all pages and all tabs, ignoring empty slots.
--- @param bookType string @ BOOKTYPE_SPELL or BOOKTYPE_PET depending on if you wish to query the player or pet spellbook. Internally the game only tests if this value is equal to pet and treats any other string value as spell
--- @return string, number @ link, spellID
function GetSpellLink(slot, bookType)
end
--- Returns information about a loss-of-control cooldown affecting a spell.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellLossOfControlCooldown]
--- @param spellSlot number @ spell book slot index, ascending from 1.
--- @param bookType_or_spellName_or_spellID unknown
--- @return number, number @ start, duration
function GetSpellLossOfControlCooldown(spellSlot, bookType_or_spellName_or_spellID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellPenetration?action=edit&redlink=1]
--- @return void
function GetSpellPenetration()
end
--- Returns a table describing the resource cost of a spell.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellPowerCost]
--- @param spellName_or_spellID unknown
--- @return table @ costs
function GetSpellPowerCost(spellName_or_spellID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellQueueWindow?action=edit&redlink=1]
--- @return void
function GetSpellQueueWindow()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellRank?action=edit&redlink=1]
--- @return void
function GetSpellRank()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellSubtext?action=edit&redlink=1]
--- @return void
function GetSpellSubtext()
end
--- Retrieves information about the specified line of spells
--- [https://wowpedia.fandom.com/wiki/API_GetSpellTabInfo]
--- @param tabIndex number @ The index of the tab, ascending from 1.
--- @return string, string, number, number, boolean, number @ name, texture, offset, numEntries, isGuild, offspecID
function GetSpellTabInfo(tabIndex)
end
--- Returns the icon of the specified spell.
--- [https://wowpedia.fandom.com/wiki/API_GetSpellTexture]
--- @param spellId_or_spellName unknown
--- @return number @ icon
function GetSpellTexture(spellId_or_spellName)
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellTradeSkillLink?action=edit&redlink=1]
--- @return void
function GetSpellTradeSkillLink()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSpellsForCharacterUpgradeTier?action=edit&redlink=1]
--- @return void
function GetSpellsForCharacterUpgradeTier()
end
--- Returns a list of the food types a pet in the stable can eat.
--- [https://wowpedia.fandom.com/wiki/API_GetStablePetFoodTypes]
--- @param index number @ The stable slot index of the pet: 0 for the current pet, 1 for the pet in the left slot, and 2 for the pet in the right slot.
--- @return unknown @ PetFoodList
function GetStablePetFoodTypes(index)
end
--- Returns information about a specific stabled pet.
--- [https://wowpedia.fandom.com/wiki/API_GetStablePetInfo]
--- @param index number @ The index of the pet slot, 1 through 5 are the hunter's active pets, 6 through 25 are the hunter's stabled pets.
--- @return string, string, number, string, string @ petIcon, petName, petLevel, petType, petTalents
function GetStablePetInfo(index)
end
--- Return the value of the requested Statistic.
--- [https://wowpedia.fandom.com/wiki/API_GetStatistic]
--- @param category number @ AchievementID of a statistic or statistic category.
--- @param index number @ Entry within a statistic category, if applicable.
--- @return string, boolean, string @ value, skip, id
function GetStatistic(category, index)
end
--- Returns a table of achievement categories.
--- [https://wowpedia.fandom.com/wiki/API_GetStatisticsCategoryList]
--- @return table @ categories
function GetStatisticsCategoryList()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSturdiness?action=edit&redlink=1]
--- @return void
function GetSturdiness()
end
--- Returns the subzone name.
--- [https://wowpedia.fandom.com/wiki/API_GetSubZoneText]
--- @return string @ subzone
function GetSubZoneText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetSuggestedGroupSize?action=edit&redlink=1]
--- @return void
function GetSuggestedGroupSize()
end
--- Returns information about the cooldown time of the RaF Summon Friend ability.
--- [https://wowpedia.fandom.com/wiki/API_GetSummonFriendCooldown]
--- @return number, number @ start, duration
function GetSummonFriendCooldown()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTabardCreationCost?action=edit&redlink=1]
--- @return void
function GetTabardCreationCost()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTabardInfo?action=edit&redlink=1]
--- @return void
function GetTabardInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTalentInfo]
--- @param tier number @ Talent tier from 1 to MAX_TALENT_TIERS
--- @param column number @ Talent column from 1 to NUM_TALENT_COLUMNS
--- @param specGroupIndex number @ Index of active specialization group (GetActiveSpecGroup)
--- @param isInspect boolean @ ? - If non-nil, returns information based on inspectedUnit/classId.
--- @param inspectUnit unknown
--- @return void
function GetTalentInfo(tier, column, specGroupIndex, isInspect, inspectUnit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetTalentInfoByID]
--- @return void
function GetTalentInfoByID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTalentInfoBySpecialization]
--- @return void
function GetTalentInfoBySpecialization()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTalentLink?action=edit&redlink=1]
--- @return void
function GetTalentLink()
end
--- Returns the column of the selected talent for a given tier.
--- [https://wowpedia.fandom.com/wiki/API_GetTalentTierInfo]
--- @param tier number @ Talent tier from 1 to MAX_TALENT_TIERS
--- @param specGroupIndex number @ Index of active specialization group (GetActiveSpecGroup)
--- @param isInspect boolean @ ? - If non-nil, returns information based on inspectedUnit.
--- @param inspectedUnit string @ ? - Inspected unitId.
--- @return unknown, unknown, unknown @ tierAvailable, selectedTalent, tierUnlockLevel
function GetTalentTierInfo(tier, specGroupIndex, isInspect, inspectedUnit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetTargetTradeCurrency?action=edit&redlink=1]
--- @return void
function GetTargetTradeCurrency()
end
--- Gets the amount of money in the trade window for the target user.
--- [https://wowpedia.fandom.com/wiki/API_GetTargetTradeMoney]
--- @return string @ targetTradeMoney
function GetTargetTradeMoney()
end
--- Returns information about a bonus objective.
--- [https://wowpedia.fandom.com/wiki/API_GetTaskInfo]
--- @param questID number @ Unique identifier for the quest.
--- @return boolean, boolean, number @ isInArea, isOnMap, numObjectives
function GetTaskInfo(questID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetTaskPOIs?action=edit&redlink=1]
--- @return void
function GetTaskPOIs()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTasksTable?action=edit&redlink=1]
--- @return void
function GetTasksTable()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTaxiBenchmarkMode?action=edit&redlink=1]
--- @return void
function GetTaxiBenchmarkMode()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTaxiMapID?action=edit&redlink=1]
--- @return void
function GetTaxiMapID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTempShapeshiftBarIndex?action=edit&redlink=1]
--- @return void
function GetTempShapeshiftBarIndex()
end
--- GetText is used to localize some game text. Currently only for the FACTION_STANDING_LABEL..N globalstring.
--- [https://wowpedia.fandom.com/wiki/API_GetText]
--- @param token string @ Reputation index
--- @param gender number @ Gender ID
--- @param ordinal unknown @ unknown
--- @return string @ text
function GetText(token, gender, ordinal)
end
--- Returns RGB color values corresponding to a threat status returned by UnitThreatSituation. Added in Patch 3.0.
--- [https://wowpedia.fandom.com/wiki/API_GetThreatStatusColor]
--- @param statusIndex unknown
--- @return number, number, number @ r, g, b
function GetThreatStatusColor(statusIndex)
end
--- Returns the time in seconds since the end of the previous frame and the start of the current frame.
--- [https://wowpedia.fandom.com/wiki/API_GetTickTime]
--- @return number @ elapsed
function GetTickTime()
end
--- Returns the system uptime of your computer in seconds, with millisecond precision.
--- [https://wowpedia.fandom.com/wiki/API_GetTime]
--- @return number @ seconds
function GetTime()
end
--- Returns a monotonic timestamp in seconds, with millisecond precision.
--- [https://wowpedia.fandom.com/wiki/API_GetTimePreciseSec]
--- @return number @ seconds
function GetTimePreciseSec()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTimeToWellRested?action=edit&redlink=1]
--- @return void
function GetTimeToWellRested()
end
--- Returns the name of a Title ID.
--- [https://wowpedia.fandom.com/wiki/API_GetTitleName]
--- @param titleId number @ Ranging from 1 to GetNumTitles. Not necessarily an index as there can be missing/skipped IDs in between.
--- @return string, boolean @ name, playerTitle
function GetTitleName(titleId)
end
--- Returns the name of the last-offered quest.
--- [https://wowpedia.fandom.com/wiki/API_GetTitleText]
--- @return string @ title
function GetTitleText()
end
--- [https://wowpedia.fandom.com/wiki/API_GetToolTipInfo?action=edit&redlink=1]
--- @return void
function GetToolTipInfo()
end
--- Returns the total number of Achievement Points earned.
--- [https://wowpedia.fandom.com/wiki/API_GetTotalAchievementPoints]
--- @return number @ points
function GetTotalAchievementPoints()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTotemCannotDismiss?action=edit&redlink=1]
--- @return void
function GetTotemCannotDismiss()
end
--- Returns information about totems
--- [https://wowpedia.fandom.com/wiki/API_GetTotemInfo]
--- @param index number @ index of the totem (Fire = 1 Earth = 2 Water = 3 Air = 4)
--- @return unknown, unknown, unknown, unknown, unknown @ haveTotem, totemName, startTime, duration, icon
function GetTotemInfo(index)
end
--- Returns active time remaining (in seconds) before a totem (or ghoul) disappears.
--- [https://wowpedia.fandom.com/wiki/API_GetTotemTimeLeft]
--- @param slot number @ Which totem to query:
--- @return number @ seconds
function GetTotemTimeLeft(slot)
end
--- Returns a list of (up to 10) currently tracked achievements.
--- [https://wowpedia.fandom.com/wiki/API_GetTrackedAchievements]
--- @return unknown, unknown, unknown, unknown @ id1, id2, ..., idn
function GetTrackedAchievements()
end
--- Returns information regarding the specified tracking id.
--- [https://wowpedia.fandom.com/wiki/API_GetTrackingInfo]
--- @param id number @ tracking type index, ascending from 1 to GetNumTrackingTypes().
--- @return string, number, number, string, number @ name, texture, active, category, nested
function GetTrackingInfo(id)
end
--- [https://wowpedia.fandom.com/wiki/API_GetTradePlayerItemInfo?action=edit&redlink=1]
--- @return void
function GetTradePlayerItemInfo()
end
--- Returns a single value: chat-ready item link.
--- [https://wowpedia.fandom.com/wiki/API_GetTradePlayerItemLink]
--- @param i unknown
--- @return string @ chatItemLink
function GetTradePlayerItemLink(i)
end
--- Returns information about items in the target's trade window.
--- [https://wowpedia.fandom.com/wiki/API_GetTradeTargetItemInfo]
--- @param index number @ the slot (1-7) to retrieve info from
--- @return string, string, number, number, unknown, string @ name, texture, quantity, quality, isUsable, enchant
function GetTradeTargetItemInfo(index)
end
--- Simply view, except this function is for your trading partner, ie, the other side of the trade window.
--- [https://wowpedia.fandom.com/wiki/API_GetTradeTargetItemLink]
--- @return void
function GetTradeTargetItemLink()
end
--- Returns the trainer greeting text.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerGreetingText]
--- @return string @ greetingText
function GetTrainerGreetingText()
end
--- Returns the index of the selected trainer service.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerSelectionIndex]
--- @return number @ selectionIndex
function GetTrainerSelectionIndex()
end
--- Gets the name of a requirement for training a skill and whether the player meets the requirement.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceAbilityReq]
--- @param trainerIndex number @ Index of the trainer service to retrieve information about. Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)
--- @param reqIndex number @ Index of the requirement to retrieve information about.
--- @return string, boolean @ ability, hasReq
function GetTrainerServiceAbilityReq(trainerIndex, reqIndex)
end
--- Returns the cost of the selected trainer service.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceCost]
--- @param index unknown @ The index number of a specific trainer service.
--- @return unknown, unknown, unknown @ moneyCost, talentCost, professionCost
function GetTrainerServiceCost(index)
end
--- Returns the description of a specific trainer service.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceDescription]
--- @param index number @ The index of the specific trainer service.
--- @return string @ serviceDescription
function GetTrainerServiceDescription(index)
end
--- Returns the icon texture for a particular trainer service.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceIcon]
--- @param id unknown @ Index of the trainer service to retrieve information about. Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)
--- @return unknown @ icon
function GetTrainerServiceIcon(id)
end
--- Returns information about a trainer service.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceInfo]
--- @param id unknown @ Index of the trainer service to retrieve information about. Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)
--- @return unknown, unknown, unknown, unknown @ name, rank, category, expanded
function GetTrainerServiceInfo(id)
end
--- Returns an item link for a trainer service.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceItemLink]
--- @param index number @ Index of the trainer service to a link for. Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)
--- @return unknown @ link
function GetTrainerServiceItemLink(index)
end
--- Gets the required level to learn a skill from the trainer.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceLevelReq]
--- @param id number @ Index of the trainer service to retrieve information about. Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)
--- @return number @ reqLevel
function GetTrainerServiceLevelReq(id)
end
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceNumAbilityReq?action=edit&redlink=1]
--- @return void
function GetTrainerServiceNumAbilityReq()
end
--- Gets the name of the skill at the specified line from the current trainer.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceSkillLine]
--- @param index number @ Index of the trainer service to get the name of. Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)
--- @return string @ skillLine
function GetTrainerServiceSkillLine(index)
end
--- Returns the name of the skill required, and the amount needed in that skill. Index is the selection index obtained by GetTrainerSelectionIndex().
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceSkillReq]
--- @param index unknown
--- @return unknown, unknown, unknown @ skillName, skillLevel, hasReq
function GetTrainerServiceSkillReq(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceStepIndex?action=edit&redlink=1]
--- @return void
function GetTrainerServiceStepIndex()
end
--- Returns the status of a skill filter in the trainer window.
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerServiceTypeFilter]
--- @param type string @ Possible values:
--- @return boolean @ status
function GetTrainerServiceTypeFilter(type)
end
--- [https://wowpedia.fandom.com/wiki/API_GetTrainerTradeskillRankValues?action=edit&redlink=1]
--- @return void
function GetTrainerTradeskillRankValues()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTreasurePickerItemInfo?action=edit&redlink=1]
--- @return void
function GetTreasurePickerItemInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_GetTutorialsEnabled?action=edit&redlink=1]
--- @return void
function GetTutorialsEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_GetUICameraInfo?action=edit&redlink=1]
--- @return void
function GetUICameraInfo()
end
--- Returns a table of indices for combo points that have been charged. If the unit does not have combo points, or no points are charged, this function may return nil.
--- [https://wowpedia.fandom.com/wiki/API_GetUnitChargedPowerPoints]
--- @param unit string
--- @return number @ pointIndices
function GetUnitChargedPowerPoints(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetUnitHealthModifier?action=edit&redlink=1]
--- @return void
function GetUnitHealthModifier()
end
--- [https://wowpedia.fandom.com/wiki/API_GetUnitMaxHealthModifier?action=edit&redlink=1]
--- @return void
function GetUnitMaxHealthModifier()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetUnitPowerBarInfo]
--- @param unitToken string @ UnitId
--- @return unknown @ info
function GetUnitPowerBarInfo(unitToken)
end
--- [https://wowpedia.fandom.com/wiki/API_GetUnitPowerBarInfoByID]
--- @return void
function GetUnitPowerBarInfoByID()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetUnitPowerBarStrings]
--- @param unitToken string @ UnitId
--- @return string, string, string @ name, tooltip, cost
function GetUnitPowerBarStrings(unitToken)
end
--- [https://wowpedia.fandom.com/wiki/API_GetUnitPowerBarStringsByID]
--- @return void
function GetUnitPowerBarStringsByID()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_GetUnitPowerBarTextureInfo]
--- @param unitToken string
--- @param textureIndex number
--- @param timerIndex number @ ?
--- @return number, number, number, number, number @ texture, colorR, colorG, colorB, colorA
function GetUnitPowerBarTextureInfo(unitToken, textureIndex, timerIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetUnitPowerBarTextureInfoByID]
--- @return void
function GetUnitPowerBarTextureInfoByID()
end
--- [https://wowpedia.fandom.com/wiki/API_GetUnitPowerModifier?action=edit&redlink=1]
--- @return void
function GetUnitPowerModifier()
end
--- Returns a value representing the moving speed of a unit. Added in Patch 3.0.1.
--- [https://wowpedia.fandom.com/wiki/API_GetUnitSpeed]
--- @param unit string @ unitId) - Unit to query the speed of. This has not been tested with all units but does work for player units.
--- @return number, number, number, number @ currentSpeed, runSpeed, flightSpeed, swimSpeed
function GetUnitSpeed(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_GetVehicleBarIndex?action=edit&redlink=1]
--- @return void
function GetVehicleBarIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_GetVehicleUIIndicator?action=edit&redlink=1]
--- @return void
function GetVehicleUIIndicator()
end
--- [https://wowpedia.fandom.com/wiki/API_GetVehicleUIIndicatorSeat?action=edit&redlink=1]
--- @return void
function GetVehicleUIIndicatorSeat()
end
--- [https://wowpedia.fandom.com/wiki/API_GetVersatilityBonus?action=edit&redlink=1]
--- @return void
function GetVersatilityBonus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetVideoCaps?action=edit&redlink=1]
--- @return void
function GetVideoCaps()
end
--- [https://wowpedia.fandom.com/wiki/API_GetVideoOptions?action=edit&redlink=1]
--- @return void
function GetVideoOptions()
end
--- Returns the item link of an item in void storage.
--- [https://wowpedia.fandom.com/wiki/API_GetVoidItemHyperlinkString]
--- @param voidSlot number @ index of the void storage slot to query, ascending from 1.
--- @return string @ itemLink
function GetVoidItemHyperlinkString(voidSlot)
end
--- Returns info about a Void Storage slot [1]
--- [https://wowpedia.fandom.com/wiki/API_GetVoidItemInfo]
--- @param tabIndex number @ Index ranging from 1 to 2
--- @param slotIndex number @ Index ranging from 1 to 80 (VOID_STORAGE_MAX)
--- @return number, string, boolean, boolean, boolean, number @ itemID, textureName, locked, recentDeposit, isFiltered, quality
function GetVoidItemInfo(tabIndex, slotIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetVoidStorageSlotPageIndex?action=edit&redlink=1]
--- @return void
function GetVoidStorageSlotPageIndex()
end
--- Returns the total Void Transfer cost [1]
--- [https://wowpedia.fandom.com/wiki/API_GetVoidTransferCost]
--- @return number @ cost
function GetVoidTransferCost()
end
--- Returns info about the item being deposited into the Void Storage [1]
--- [https://wowpedia.fandom.com/wiki/API_GetVoidTransferDepositInfo]
--- @param slotIndex number @ Index ranging from 1 to 9 (VOID_DEPOSIT_MAX)
--- @return number, string @ itemID, textureName
function GetVoidTransferDepositInfo(slotIndex)
end
--- Returns info about the item being withdrawed from the Void Storage [1]
--- [https://wowpedia.fandom.com/wiki/API_GetVoidTransferWithdrawalInfo]
--- @param slotIndex number @ Index ranging from 1 to 9 (VOID_WITHDRAW_MAX)
--- @return number, string @ itemID, textureName
function GetVoidTransferWithdrawalInfo(slotIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_GetVoidUnlockCost?action=edit&redlink=1]
--- @return void
function GetVoidUnlockCost()
end
--- [https://wowpedia.fandom.com/wiki/API_GetWarGameQueueStatus?action=edit&redlink=1]
--- @return void
function GetWarGameQueueStatus()
end
--- [https://wowpedia.fandom.com/wiki/API_GetWarGameTypeInfo?action=edit&redlink=1]
--- @return void
function GetWarGameTypeInfo()
end
--- Returns information about the faction that is currently being watched.
--- [https://wowpedia.fandom.com/wiki/API_GetWatchedFactionInfo]
--- @return string, number, number, number, number, number @ name, standing, min, max, value, factionID
function GetWatchedFactionInfo()
end
--- Returns information about the player's current temporary enchants, such as fishing lures or sharpening stones and weightstones produced by blacksmiths.
--- [https://wowpedia.fandom.com/wiki/API_GetWeaponEnchantInfo]
--- @return number, number, number, number, number, number, number, number @ hasMainHandEnchant, mainHandExpiration, mainHandCharges, mainHandEnchantID, hasOffHandEnchant, offHandExpiration, offHandCharges, offHandEnchantID
function GetWeaponEnchantInfo()
end
--- Requests updated GM ticket status information.
--- [https://wowpedia.fandom.com/wiki/API_GetWebTicket]
--- @return void
function GetWebTicket()
end
--- [https://wowpedia.fandom.com/wiki/API_GetWorldElapsedTime]
--- @param timerID unknown @ Use by blizzard as self.timerID by WorldStateChallangeModeFrame
--- @return number, number, number @ unknown, elapsedTime, type
function GetWorldElapsedTime(timerID)
end
--- [https://wowpedia.fandom.com/wiki/API_GetWorldElapsedTimers?action=edit&redlink=1]
--- @return void
function GetWorldElapsedTimers()
end
--- [https://wowpedia.fandom.com/wiki/API_GetWorldMapActionButtonSpellInfo?action=edit&redlink=1]
--- @return void
function GetWorldMapActionButtonSpellInfo()
end
--- Get information regarding a world PvP zone (e.g. Wintergrasp or Tol Barad).
--- [https://wowpedia.fandom.com/wiki/API_GetWorldPVPAreaInfo]
--- @param index number @ the zone's index, from 1 to GetNumWorldPVPAreas()
--- @return number, unknown, boolean, boolean, number, boolean, number, number @ pvpID, izedName, isActive, canQueue, startTime, canEnter, minLevel, maxLevel
function GetWorldPVPAreaInfo(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GetWorldPVPQueueStatus?action=edit&redlink=1]
--- @return void
function GetWorldPVPQueueStatus()
end
--- Returns the number of XP gained from killing mobs until player goes from rest state to normal state.
--- [https://wowpedia.fandom.com/wiki/API_GetXPExhaustion]
--- @return number @ exhaustionThreshold
function GetXPExhaustion()
end
--- Returns PVP info for the current zone.
--- [https://wowpedia.fandom.com/wiki/API_GetZonePVPInfo]
--- @return string, boolean, string @ pvpType, isFFA, faction
function GetZonePVPInfo()
end
--- Returns the localized name of the zone the player is in.
--- [https://wowpedia.fandom.com/wiki/API_GetZoneText]
--- @return string @ zoneName
function GetZoneText()
end
--- Assigns an item from the current loot window to a group member, when in Master Looter mode.
--- [https://wowpedia.fandom.com/wiki/API_GiveMasterLoot]
--- @param li unknown
--- @param ci unknown
--- @return void
function GiveMasterLoot(li, ci)
end
--- [https://wowpedia.fandom.com/wiki/API_GroupHasOfflineMember?action=edit&redlink=1]
--- @return void
function GroupHasOfflineMember()
end
--- [https://wowpedia.fandom.com/wiki/API_GuildControlAddRank?action=edit&redlink=1]
--- @return void
function GuildControlAddRank()
end
--- Deletes the rank at that index. The player must be the guild leader.
--- [https://wowpedia.fandom.com/wiki/API_GuildControlDelRank]
--- @param index number @ must be between 1 and the value returned by GuildControlGetNumRanks().
--- @return void
function GuildControlDelRank(index)
end
--- [https://wowpedia.fandom.com/wiki/API_GuildControlGetAllowedShifts?action=edit&redlink=1]
--- @return void
function GuildControlGetAllowedShifts()
end
--- [https://wowpedia.fandom.com/wiki/API_GuildControlGetNumRanks?action=edit&redlink=1]
--- @return void
function GuildControlGetNumRanks()
end
--- Returns the name of the rank at that index.
--- [https://wowpedia.fandom.com/wiki/API_GuildControlGetRankName]
--- @param index number @ the rank index
--- @return void
function GuildControlGetRankName(index)
end
--- Saves the current rank under name. Current rank is set using GuildControlSetRank()
--- [https://wowpedia.fandom.com/wiki/API_GuildControlSaveRank]
--- @param name string @ the name of this rank
--- @return void
function GuildControlSaveRank(name)
end
--- Selects a guild rank to modify or return information about.
--- [https://wowpedia.fandom.com/wiki/API_GuildControlSetRank]
--- @param rankOrder number @ index of the rank to select, between 1 and GuildControlGetNumRanks().
--- @return void
function GuildControlSetRank(rankOrder)
end
--- Sets the current ranks property at index to enabled.
--- [https://wowpedia.fandom.com/wiki/API_GuildControlSetRankFlag]
--- @param index number @ the flag index, between 1 and GuildControlGetNumRanks().
--- @param enabled boolean @ whether the flag is enabled or disabled.
--- @return void
function GuildControlSetRankFlag(index, enabled)
end
--- [https://wowpedia.fandom.com/wiki/API_GuildControlShiftRankDown?action=edit&redlink=1]
--- @return void
function GuildControlShiftRankDown()
end
--- [https://wowpedia.fandom.com/wiki/API_GuildControlShiftRankUp?action=edit&redlink=1]
--- @return void
function GuildControlShiftRankUp()
end
--- Demotes a specified player if you have that privilege.
--- [https://wowpedia.fandom.com/wiki/API_GuildDemote]
--- @param playername string @ The name of the player to demote
--- @return void
function GuildDemote(playername)
end
--- Disbands your guild.
--- [https://wowpedia.fandom.com/wiki/API_GuildDisband]
--- @return void
function GuildDisband()
end
--- Prints information about the Guild you belong to in the following format: Guild: Guild created , players, accounts
--- [https://wowpedia.fandom.com/wiki/API_GuildInfo]
--- @return void
function GuildInfo()
end
--- Invites a player or your target to your guild if you have that privilege.
--- [https://wowpedia.fandom.com/wiki/API_GuildInvite]
--- @param playername unknown
--- @return void
function GuildInvite(playername)
end
--- Removes you from your current guild.
--- [https://wowpedia.fandom.com/wiki/API_GuildLeave]
--- @return void
function GuildLeave()
end
--- [https://wowpedia.fandom.com/wiki/API_GuildMasterAbsent?action=edit&redlink=1]
--- @return void
function GuildMasterAbsent()
end
--- [https://wowpedia.fandom.com/wiki/API_GuildNewsSetSticky?action=edit&redlink=1]
--- @return void
function GuildNewsSetSticky()
end
--- [https://wowpedia.fandom.com/wiki/API_GuildNewsSort?action=edit&redlink=1]
--- @return void
function GuildNewsSort()
end
--- Promotes a specified player if you have that privilege.
--- [https://wowpedia.fandom.com/wiki/API_GuildPromote]
--- @param playername string @ The name of the player to promote.
--- @return void
function GuildPromote(playername)
end
--- Sets the public note of a guild member.
--- [https://wowpedia.fandom.com/wiki/API_GuildRosterSetOfficerNote]
--- @param index unknown @ The position a member is in the guild roster. This can be found by counting from the top down to the member or by selecting the member and using the GetGuildRosterSelection() function.
--- @param Text unknown @ Text to be set to the officer note of the index.
--- @return void
function GuildRosterSetOfficerNote(index, Text)
end
--- Sets the public note of a guild member.
--- [https://wowpedia.fandom.com/wiki/API_GuildRosterSetPublicNote]
--- @param index unknown @ The position a member is in the guild roster. This can be found by counting from the top down to the member or by selecting the member and using the GetGuildRosterSelection() function.
--- @param Text unknown @ Text to be set to the public note of the index.
--- @return void
function GuildRosterSetPublicNote(index, Text)
end
--- Promotes a character to guild leader.
--- [https://wowpedia.fandom.com/wiki/API_GuildSetLeader]
--- @param name string @ name of the character you wish to promote to Guild Leader.
--- @return void
function GuildSetLeader(name)
end
--- Sets the guild message of the day.
--- [https://wowpedia.fandom.com/wiki/API_GuildSetMOTD]
--- @param message unknown
--- @return void
function GuildSetMOTD(message)
end
--- Removes a member of the guild.
--- [https://wowpedia.fandom.com/wiki/API_GuildUninvite]
--- @return void
function GuildUninvite()
end
--- [https://wowpedia.fandom.com/wiki/API_HandleAtlasMemberCommand?action=edit&redlink=1]
--- @return void
function HandleAtlasMemberCommand()
end
--- [https://wowpedia.fandom.com/wiki/API_HasAPEffectsSpellPower?action=edit&redlink=1]
--- @return void
function HasAPEffectsSpellPower()
end
--- Tests if an action slot is occupied.
--- [https://wowpedia.fandom.com/wiki/API_HasAction]
--- @param actionSlot number @ ActionSlot : The tested action slot.
--- @return number @ hasAction
function HasAction(actionSlot)
end
--- Tests if the player has an alternate form and whether they are currently in that form. This is currently only useful for worgen players to determine if they have a human form or are in human form.
--- [https://wowpedia.fandom.com/wiki/API_HasAlternateForm]
--- @return boolean, boolean @ hasAlternateForm, inAlternateForm
function HasAlternateForm()
end
--- [https://wowpedia.fandom.com/wiki/API_HasArtifactEquipped?action=edit&redlink=1]
--- @return void
function HasArtifactEquipped()
end
--- [https://wowpedia.fandom.com/wiki/API_HasAttachedGlyph?action=edit&redlink=1]
--- @return void
function HasAttachedGlyph()
end
--- [https://wowpedia.fandom.com/wiki/API_HasBonusActionBar?action=edit&redlink=1]
--- @return void
function HasBonusActionBar()
end
--- [https://wowpedia.fandom.com/wiki/API_HasBoundGemProposed?action=edit&redlink=1]
--- @return void
function HasBoundGemProposed()
end
--- [https://wowpedia.fandom.com/wiki/API_HasCompletedAnyAchievement?action=edit&redlink=1]
--- @return void
function HasCompletedAnyAchievement()
end
--- [https://wowpedia.fandom.com/wiki/API_HasDualWieldPenalty?action=edit&redlink=1]
--- @return void
function HasDualWieldPenalty()
end
--- Returns whether the player currently has an extra action bar/button.
--- [https://wowpedia.fandom.com/wiki/API_HasExtraActionBar]
--- @return number @ hasBar
function HasExtraActionBar()
end
--- Checks whether you have full control over your character (i.e. you are not feared, etc).
--- [https://wowpedia.fandom.com/wiki/API_HasFullControl]
--- @return boolean @ hasControl
function HasFullControl()
end
--- [https://wowpedia.fandom.com/wiki/API_HasIgnoreDualWieldWeapon?action=edit&redlink=1]
--- @return void
function HasIgnoreDualWieldWeapon()
end
--- [https://wowpedia.fandom.com/wiki/API_HasInboxItem?action=edit&redlink=1]
--- @return void
function HasInboxItem()
end
--- Returns whether the player is in a random party formed by the dungeon finder system.
--- [https://wowpedia.fandom.com/wiki/API_HasLFGRestrictions]
--- @return number @ isRestricted
function HasLFGRestrictions()
end
--- [https://wowpedia.fandom.com/wiki/API_HasLoadedCUFProfiles?action=edit&redlink=1]
--- @return void
function HasLoadedCUFProfiles()
end
--- [https://wowpedia.fandom.com/wiki/API_HasNewMail?action=edit&redlink=1]
--- @return void
function HasNewMail()
end
--- [https://wowpedia.fandom.com/wiki/API_HasNoReleaseAura?action=edit&redlink=1]
--- @return void
function HasNoReleaseAura()
end
--- [https://wowpedia.fandom.com/wiki/API_HasOverrideActionBar?action=edit&redlink=1]
--- @return void
function HasOverrideActionBar()
end
--- [https://wowpedia.fandom.com/wiki/API_HasPendingGlyphCast?action=edit&redlink=1]
--- @return void
function HasPendingGlyphCast()
end
--- Returns how many abilities your pet has available.
--- [https://wowpedia.fandom.com/wiki/API_HasPetSpells]
--- @return unknown, string @ hasPetSpells, petToken
function HasPetSpells()
end
--- Returns True if the player has a pet User Interface.
--- [https://wowpedia.fandom.com/wiki/API_HasPetUI]
--- @return boolean, boolean @ hasUI, isHunterPet
function HasPetUI()
end
--- [https://wowpedia.fandom.com/wiki/API_HasSPEffectsAttackPower?action=edit&redlink=1]
--- @return void
function HasSPEffectsAttackPower()
end
--- [https://wowpedia.fandom.com/wiki/API_HasSendMailItem?action=edit&redlink=1]
--- @return void
function HasSendMailItem()
end
--- [https://wowpedia.fandom.com/wiki/API_HasTempShapeshiftActionBar?action=edit&redlink=1]
--- @return void
function HasTempShapeshiftActionBar()
end
--- [https://wowpedia.fandom.com/wiki/API_HasVehicleActionBar?action=edit&redlink=1]
--- @return void
function HasVehicleActionBar()
end
--- HasWandEquipped();
--- [https://wowpedia.fandom.com/wiki/API_HasWandEquipped]
--- @return void
function HasWandEquipped()
end
--- [https://wowpedia.fandom.com/wiki/API_HaveQuestData?action=edit&redlink=1]
--- @return void
function HaveQuestData()
end
--- [https://wowpedia.fandom.com/wiki/API_HaveQuestRewardData?action=edit&redlink=1]
--- @return void
function HaveQuestRewardData()
end
--- [https://wowpedia.fandom.com/wiki/API_HearthAndResurrectFromArea?action=edit&redlink=1]
--- @return void
function HearthAndResurrectFromArea()
end
--- Takes the cursor out of repair mode.
--- [https://wowpedia.fandom.com/wiki/API_HideRepairCursor]
--- @return void
function HideRepairCursor()
end
--- Returns true during pre-rendered movie-like cinematics.
--- [https://wowpedia.fandom.com/wiki/API_InCinematic]
--- @return boolean @ inCinematic
function InCinematic()
end
--- Determines whether in-combat lockdown restrictions are active.
--- [https://wowpedia.fandom.com/wiki/API_InCombatLockdown]
--- @return unknown @ inLockdown
function InCombatLockdown()
end
--- Returns whether or not you are in a guild party.
--- [https://wowpedia.fandom.com/wiki/API_InGuildParty]
--- @return boolean, number, number, number @ inGroup, numGuildPresent, numGuildRequired, xpMultiplier
function InGuildParty()
end
--- Lets you know if your cursor is in repair mode. When your cursor is in repair mode, you can click on equipped items as well as items in your inventory to repair them.
--- [https://wowpedia.fandom.com/wiki/API_InRepairMode]
--- @return unknown @ inRepairMode
function InRepairMode()
end
--- Boolean function for determining whether a message is returnable.
--- [https://wowpedia.fandom.com/wiki/API_InboxItemCanDelete]
--- @param index number @ the index of the message (1 is the first message)
--- @return number @ canDelete
function InboxItemCanDelete(index)
end
--- This function starts a role check.
--- [https://wowpedia.fandom.com/wiki/API_InitiateRolePoll]
--- @return void
function InitiateRolePoll()
end
--- Opens the Trade window with selected target.
--- [https://wowpedia.fandom.com/wiki/API_InitiateTrade]
--- @param unit string @ unitId to initiate trade with, e.g. target.
--- @return void
function InitiateTrade(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_InteractUnit?action=edit&redlink=1]
--- @return void
function InteractUnit()
end
--- [https://wowpedia.fandom.com/wiki/API_Is64BitClient?action=edit&redlink=1]
--- @return void
function Is64BitClient()
end
--- Returns if the account has been secured with Blizzard Mobile Authenticator.
--- [https://wowpedia.fandom.com/wiki/API_IsAccountSecured]
--- @return boolean @ accountSecured
function IsAccountSecured()
end
--- Indicates whether the specified achievement is eligible to be completed.
--- [https://wowpedia.fandom.com/wiki/API_IsAchievementEligible]
--- @param achievementID number @ ID of the achievement to query.
--- @return boolean @ eligible
function IsAchievementEligible(achievementID)
end
--- Returns whether an action is in range for use.
--- [https://wowpedia.fandom.com/wiki/API_IsActionInRange]
--- @param actionSlot number @ The action slot to test.
--- @return number @ inRange
function IsActionInRange(actionSlot)
end
--- Used for checking if the player is inside an arena or if it's a rated match[1]
--- [https://wowpedia.fandom.com/wiki/API_IsActiveBattlefieldArena]
--- @return boolean, boolean @ isArena, isRegistered
function IsActiveBattlefieldArena()
end
--- [https://wowpedia.fandom.com/wiki/API_IsActiveQuestLegendary?action=edit&redlink=1]
--- @return void
function IsActiveQuestLegendary()
end
--- [https://wowpedia.fandom.com/wiki/API_IsActiveQuestTrivial?action=edit&redlink=1]
--- @return void
function IsActiveQuestTrivial()
end
--- Determine if an AddOn is loaded on demand (via .toc file dependencies or LoadAddOn) rather than at startup
--- [https://wowpedia.fandom.com/wiki/API_IsAddOnLoadOnDemand]
--- @param index_or_name unknown
--- @return number @ loadDemand
function IsAddOnLoadOnDemand(index_or_name)
end
--- Returns whether an addon has been loaded.
--- [https://wowpedia.fandom.com/wiki/API_IsAddOnLoaded]
--- @param index_or_name unknown
--- @return number, number @ loaded, finished
function IsAddOnLoaded(index_or_name)
end
--- [https://wowpedia.fandom.com/wiki/API_IsAddonVersionCheckEnabled?action=edit&redlink=1]
--- @return void
function IsAddonVersionCheckEnabled()
end
--- Returns whether the player can teleport to/from an LFG instance.
--- [https://wowpedia.fandom.com/wiki/API_IsAllowedToUserTeleport]
--- @return boolean @ allowedToTeleport
function IsAllowedToUserTeleport()
end
--- [https://wowpedia.fandom.com/wiki/API_IsAltKeyDown]
--- @return void
function IsAltKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsArenaSkirmish?action=edit&redlink=1]
--- @return void
function IsArenaSkirmish()
end
--- [https://wowpedia.fandom.com/wiki/API_IsArenaTeamCaptain?action=edit&redlink=1]
--- @return void
function IsArenaTeamCaptain()
end
--- [https://wowpedia.fandom.com/wiki/API_IsArtifactCompletionHistoryAvailable?action=edit&redlink=1]
--- @return void
function IsArtifactCompletionHistoryAvailable()
end
--- [https://wowpedia.fandom.com/wiki/API_IsArtifactPowerItem?action=edit&redlink=1]
--- @return void
function IsArtifactPowerItem()
end
--- [https://wowpedia.fandom.com/wiki/API_IsArtifactRelicItem?action=edit&redlink=1]
--- @return void
function IsArtifactRelicItem()
end
--- [https://wowpedia.fandom.com/wiki/API_IsAtStableMaster?action=edit&redlink=1]
--- @return void
function IsAtStableMaster()
end
--- Determine whether action slot is an attack action.
--- [https://wowpedia.fandom.com/wiki/API_IsAttackAction]
--- @param actionSlot number @ The action slot to test.
--- @return number @ isAttack
function IsAttackAction(actionSlot)
end
--- Determine whether spell is the Attack spell.
--- [https://wowpedia.fandom.com/wiki/API_IsAttackSpell]
--- @param spellName string @ The spell name to test.
--- @return number @ isAttack
function IsAttackSpell(spellName)
end
--- Returns whether action slot is auto repeating.
--- [https://wowpedia.fandom.com/wiki/API_IsAutoRepeatAction]
--- @param actionSlot number @ The action slot to query.
--- @return boolean @ isRepeating
function IsAutoRepeatAction(actionSlot)
end
--- [https://wowpedia.fandom.com/wiki/API_IsAutoRepeatSpell?action=edit&redlink=1]
--- @return void
function IsAutoRepeatSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_IsAvailableQuestTrivial?action=edit&redlink=1]
--- @return void
function IsAvailableQuestTrivial()
end
--- [https://wowpedia.fandom.com/wiki/API_IsBNLogin?action=edit&redlink=1]
--- @return void
function IsBNLogin()
end
--- [https://wowpedia.fandom.com/wiki/API_IsBagSlotFlagEnabledOnOtherBags?action=edit&redlink=1]
--- @return void
function IsBagSlotFlagEnabledOnOtherBags()
end
--- [https://wowpedia.fandom.com/wiki/API_IsBagSlotFlagEnabledOnOtherBankBags?action=edit&redlink=1]
--- @return void
function IsBagSlotFlagEnabledOnOtherBankBags()
end
--- [https://wowpedia.fandom.com/wiki/API_IsBarberShopStyleValid?action=edit&redlink=1]
--- @return void
function IsBarberShopStyleValid()
end
--- Returns whether an item was purchased from the in-game store.
--- [https://wowpedia.fandom.com/wiki/API_IsBattlePayItem]
--- @param bag number @ bagID) - container ID, e.g. 0 for backpack.
--- @param slot number @ slot index within the container, ascending from 1.
--- @return boolean @ isPayItem
function IsBattlePayItem(bag, slot)
end
--- [https://wowpedia.fandom.com/wiki/API_IsBindingForGamePad?action=edit&redlink=1]
--- @return void
function IsBindingForGamePad()
end
--- [https://wowpedia.fandom.com/wiki/API_IsBreadcrumbQuest?action=edit&redlink=1]
--- @return void
function IsBreadcrumbQuest()
end
--- [https://wowpedia.fandom.com/wiki/API_IsCastingGlyph?action=edit&redlink=1]
--- @return void
function IsCastingGlyph()
end
--- [https://wowpedia.fandom.com/wiki/API_IsCemeterySelectionAvailable?action=edit&redlink=1]
--- @return void
function IsCemeterySelectionAvailable()
end
--- [https://wowpedia.fandom.com/wiki/API_IsCharacterNewlyBoosted?action=edit&redlink=1]
--- @return void
function IsCharacterNewlyBoosted()
end
--- [https://wowpedia.fandom.com/wiki/API_IsChatAFK?action=edit&redlink=1]
--- @return void
function IsChatAFK()
end
--- [https://wowpedia.fandom.com/wiki/API_IsChatChannelRaid?action=edit&redlink=1]
--- @return void
function IsChatChannelRaid()
end
--- [https://wowpedia.fandom.com/wiki/API_IsChatDND?action=edit&redlink=1]
--- @return void
function IsChatDND()
end
--- [https://wowpedia.fandom.com/wiki/API_IsCompetitiveModeEnabled?action=edit&redlink=1]
--- @return void
function IsCompetitiveModeEnabled()
end
--- Tests if the action is linked to a consumable item.
--- [https://wowpedia.fandom.com/wiki/API_IsConsumableAction]
--- @param slotID unknown
--- @return unknown @ isTrue
function IsConsumableAction(slotID)
end
--- Returns whether an item is consumed when used.
--- [https://wowpedia.fandom.com/wiki/API_IsConsumableItem]
--- @param itemID_or_itemLink_or_itemName unknown
--- @return number @ isConsumable
function IsConsumableItem(itemID_or_itemLink_or_itemName)
end
--- [https://wowpedia.fandom.com/wiki/API_IsConsumableSpell?action=edit&redlink=1]
--- @return void
function IsConsumableSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_IsContainerFiltered?action=edit&redlink=1]
--- @return void
function IsContainerFiltered()
end
--- [https://wowpedia.fandom.com/wiki/API_IsContainerItemAnUpgrade?action=edit&redlink=1]
--- @return void
function IsContainerItemAnUpgrade()
end
--- [https://wowpedia.fandom.com/wiki/API_IsControlKeyDown]
--- @return void
function IsControlKeyDown()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_IsCorruptedItem]
--- @param itemID_or_name_or_itemlink unknown
--- @return boolean @ isCorruptedItem
function IsCorruptedItem(itemID_or_name_or_itemlink)
end
--- [https://wowpedia.fandom.com/wiki/API_IsCosmeticItem?action=edit&redlink=1]
--- @return void
function IsCosmeticItem()
end
--- Determine whether an action is currently executing.
--- [https://wowpedia.fandom.com/wiki/API_IsCurrentAction]
--- @param actionSlot number @ action slot ID to query.
--- @return number @ isCurrent
function IsCurrentAction(actionSlot)
end
--- [https://wowpedia.fandom.com/wiki/API_IsCurrentItem?action=edit&redlink=1]
--- @return void
function IsCurrentItem()
end
--- [https://wowpedia.fandom.com/wiki/API_IsCurrentQuestFailed?action=edit&redlink=1]
--- @return void
function IsCurrentQuestFailed()
end
--- Returns whether a spell is currently is being casted by the player or is placed in the queue to be casted next. If spell is current then action bar indicates its slot with highlighted frame.
--- [https://wowpedia.fandom.com/wiki/API_IsCurrentSpell]
--- @param spellID boolean @ spell ID to query.
--- @return boolean @ isCurrent
function IsCurrentSpell(spellID)
end
--- [https://wowpedia.fandom.com/wiki/API_IsDebugBuild?action=edit&redlink=1]
--- @return void
function IsDebugBuild()
end
--- [https://wowpedia.fandom.com/wiki/API_IsDemonHunterAvailable?action=edit&redlink=1]
--- @return void
function IsDemonHunterAvailable()
end
--- [https://wowpedia.fandom.com/wiki/API_IsDesaturateSupported?action=edit&redlink=1]
--- @return void
function IsDesaturateSupported()
end
--- [https://wowpedia.fandom.com/wiki/API_IsDisplayChannelModerator?action=edit&redlink=1]
--- @return void
function IsDisplayChannelModerator()
end
--- [https://wowpedia.fandom.com/wiki/API_IsDisplayChannelOwner?action=edit&redlink=1]
--- @return void
function IsDisplayChannelOwner()
end
--- [https://wowpedia.fandom.com/wiki/API_IsDressableItem?action=edit&redlink=1]
--- @return void
function IsDressableItem()
end
--- Returns if your character is Dual wielding.
--- [https://wowpedia.fandom.com/wiki/API_IsDualWielding]
--- @return boolean @ isDualWield
function IsDualWielding()
end
--- [https://wowpedia.fandom.com/wiki/API_IsEncounterInProgress?action=edit&redlink=1]
--- @return void
function IsEncounterInProgress()
end
--- [https://wowpedia.fandom.com/wiki/API_IsEncounterLimitingResurrections?action=edit&redlink=1]
--- @return void
function IsEncounterLimitingResurrections()
end
--- [https://wowpedia.fandom.com/wiki/API_IsEncounterSuppressingRelease?action=edit&redlink=1]
--- @return void
function IsEncounterSuppressingRelease()
end
--- Returns 1 if item is an equip-able one at all, your character notwithstanding, or nil if not.
--- [https://wowpedia.fandom.com/wiki/API_IsEquippableItem]
--- @param itemId_or_itemName_or_itemLink unknown
--- @return unknown @ result
function IsEquippableItem(itemId_or_itemName_or_itemLink)
end
--- Returns whether the specified action slot contains a currently equipped item.
--- [https://wowpedia.fandom.com/wiki/API_IsEquippedAction]
--- @param slotID number @ actionSlot) : Action slot to query.
--- @return boolean @ isEquipped
function IsEquippedAction(slotID)
end
--- Determines if an item is equipped.
--- [https://wowpedia.fandom.com/wiki/API_IsEquippedItem]
--- @param itemID_or_itemName unknown
--- @return boolean @ isEquipped
function IsEquippedItem(itemID_or_itemName)
end
--- Determines if an item of a given type is equipped.
--- [https://wowpedia.fandom.com/wiki/API_IsEquippedItemType]
--- @param type string @ ItemType) - any valid inventory type, item class, or item subclass
--- @return boolean @ isEquipped
function IsEquippedItemType(type)
end
--- [https://wowpedia.fandom.com/wiki/API_IsEuropeanNumbers?action=edit&redlink=1]
--- @return void
function IsEuropeanNumbers()
end
--- [https://wowpedia.fandom.com/wiki/API_IsEveryoneAssistant?action=edit&redlink=1]
--- @return void
function IsEveryoneAssistant()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_IsExpansionTrial]
--- @return boolean @ isExpansionTrialAccount
function IsExpansionTrial()
end
--- Returns whether the player has flagged the specified faction as an inactive.
--- [https://wowpedia.fandom.com/wiki/API_IsFactionInactive]
--- @param index number @ index of the faction within the faction list, ascending from 1.
--- @return number @ inactive
function IsFactionInactive(index)
end
--- Checks if the character is currently falling.
--- [https://wowpedia.fandom.com/wiki/API_IsFalling]
--- @return unknown @ falling
function IsFalling()
end
--- This function is only for determining if the loot window is related to fishing.
--- [https://wowpedia.fandom.com/wiki/API_IsFishingLoot]
--- @return void
function IsFishingLoot()
end
--- Checks if the character's current location is classified as being a flyable area.
--- [https://wowpedia.fandom.com/wiki/API_IsFlyableArea]
--- @return unknown @ canFly
function IsFlyableArea()
end
--- Checks whether the player is currently flying.
--- [https://wowpedia.fandom.com/wiki/API_IsFlying]
--- @return unknown @ flying
function IsFlying()
end
--- Returns true if the client downloaded has the GM MPQs attached, returns false otherwise.
--- [https://wowpedia.fandom.com/wiki/API_IsGMClient]
--- @return void
function IsGMClient()
end
--- [https://wowpedia.fandom.com/wiki/API_IsGUIDInGroup?action=edit&redlink=1]
--- @return void
function IsGUIDInGroup()
end
--- [https://wowpedia.fandom.com/wiki/API_IsGamePadCursorControlEnabled?action=edit&redlink=1]
--- @return void
function IsGamePadCursorControlEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_IsGamePadFreelookEnabled?action=edit&redlink=1]
--- @return void
function IsGamePadFreelookEnabled()
end
--- This function checks if you are the guild master or not.
--- [https://wowpedia.fandom.com/wiki/API_IsGuildLeader]
--- @return boolean @ isGuildLeader
function IsGuildLeader()
end
--- [https://wowpedia.fandom.com/wiki/API_IsGuildMember?action=edit&redlink=1]
--- @return void
function IsGuildMember()
end
--- [https://wowpedia.fandom.com/wiki/API_IsGuildRankAssignmentAllowed?action=edit&redlink=1]
--- @return void
function IsGuildRankAssignmentAllowed()
end
--- [https://wowpedia.fandom.com/wiki/API_IsHarmfulItem?action=edit&redlink=1]
--- @return void
function IsHarmfulItem()
end
--- [https://wowpedia.fandom.com/wiki/API_IsHarmfulSpell?action=edit&redlink=1]
--- @return void
function IsHarmfulSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_IsHelpfulItem?action=edit&redlink=1]
--- @return void
function IsHelpfulItem()
end
--- [https://wowpedia.fandom.com/wiki/API_IsHelpfulSpell?action=edit&redlink=1]
--- @return void
function IsHelpfulSpell()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInActiveWorldPVP?action=edit&redlink=1]
--- @return void
function IsInActiveWorldPVP()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInArenaTeam?action=edit&redlink=1]
--- @return void
function IsInArenaTeam()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInAuthenticatedRank?action=edit&redlink=1]
--- @return void
function IsInAuthenticatedRank()
end
--- Returns true during cinematics produced dynamically by the game engine.[citation needed]
--- [https://wowpedia.fandom.com/wiki/API_IsInCinematicScene]
--- @return boolean @ inCinematicScene
function IsInCinematicScene()
end
--- Returns whether the player is in a [specific type of] group.
--- [https://wowpedia.fandom.com/wiki/API_IsInGroup]
--- @param groupType number @ To check for a specific type of group, provide one of:
--- @return boolean @ inGroup
function IsInGroup(groupType)
end
--- Lets you know whether you are in a guild.
--- [https://wowpedia.fandom.com/wiki/API_IsInGuild]
--- @return boolean @ isGuildMember
function IsInGuild()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInGuildGroup?action=edit&redlink=1]
--- @return void
function IsInGuildGroup()
end
--- Checks whether the player is in an instance and the type of instance.
--- [https://wowpedia.fandom.com/wiki/API_IsInInstance]
--- @return number, string @ inInstance, instanceType
function IsInInstance()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInJailersTower?action=edit&redlink=1]
--- @return void
function IsInJailersTower()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInLFGDungeon?action=edit&redlink=1]
--- @return void
function IsInLFGDungeon()
end
--- Indicates whether the player is in a [specific type of] raid group.
--- [https://wowpedia.fandom.com/wiki/API_IsInRaid]
--- @param groupType number @ To check for a specific type of group, provide one of:
--- @return boolean @ isInRaid
function IsInRaid(groupType)
end
--- [https://wowpedia.fandom.com/wiki/API_IsInScenarioGroup?action=edit&redlink=1]
--- @return void
function IsInScenarioGroup()
end
--- Returns whether the player's character is currently indoors. Most mounts are not usable indoors.
--- [https://wowpedia.fandom.com/wiki/API_IsIndoors]
--- @return unknown @ indoors
function IsIndoors()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInsane?action=edit&redlink=1]
--- @return void
function IsInsane()
end
--- [https://wowpedia.fandom.com/wiki/API_IsInventoryItemAnUpgrade?action=edit&redlink=1]
--- @return void
function IsInventoryItemAnUpgrade()
end
--- Returns whether an inventory item is locked, usually as it awaits pending action.
--- [https://wowpedia.fandom.com/wiki/API_IsInventoryItemLocked]
--- @param slotId number @ The slot ID used to refer to that slot in the other GetInventory functions.
--- @return number @ isLocked
function IsInventoryItemLocked(slotId)
end
--- [https://wowpedia.fandom.com/wiki/API_IsInventoryItemProfessionBag?action=edit&redlink=1]
--- @return void
function IsInventoryItemProfessionBag()
end
--- [https://wowpedia.fandom.com/wiki/API_IsItemAction?action=edit&redlink=1]
--- @return void
function IsItemAction()
end
--- Returns whether the item is in usable range of the unit.
--- [https://wowpedia.fandom.com/wiki/API_IsItemInRange]
--- @param item string @ ItemLink, Name or ID - If using an item name, requires the item to be in your inventory. Item IDs and links don't have this requirement.
--- @param unit string @ ? : UnitId - Defaults to target
--- @return boolean @ inRange
function IsItemInRange(item, unit)
end
--- [https://wowpedia.fandom.com/wiki/API_IsJailersTowerLayerTimeLocked?action=edit&redlink=1]
--- @return void
function IsJailersTowerLayerTimeLocked()
end
--- [https://wowpedia.fandom.com/wiki/API_IsKeyDown?action=edit&redlink=1]
--- @return void
function IsKeyDown()
end
--- Returns whether you have currently finished a Dungeon Finder instance. Used in the FrameXML whether to show a leave confirmation popup. [1]
--- [https://wowpedia.fandom.com/wiki/API_IsLFGComplete]
--- @return boolean @ isComplete
function IsLFGComplete()
end
--- [https://wowpedia.fandom.com/wiki/API_IsLFGDungeonJoinable?action=edit&redlink=1]
--- @return void
function IsLFGDungeonJoinable()
end
--- [https://wowpedia.fandom.com/wiki/API_IsLeftAltKeyDown]
--- @return void
function IsLeftAltKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsLeftControlKeyDown]
--- @return void
function IsLeftControlKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsLeftMetaKeyDown?action=edit&redlink=1]
--- @return void
function IsLeftMetaKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsLeftShiftKeyDown]
--- @return void
function IsLeftShiftKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsLegacyDifficulty?action=edit&redlink=1]
--- @return void
function IsLegacyDifficulty()
end
--- This is a boolean function which returns true if World of Warcraft is being run using the Linux client, it will return false with the Windows client under wine or OS X client run on other operating systems. Although there is no current official Linux client, the beta version of WoW had a Linux client, and the code retains a function to test for it.
--- [https://wowpedia.fandom.com/wiki/API_IsLinuxClient]
--- @return void
function IsLinuxClient()
end
--- [https://wowpedia.fandom.com/wiki/API_IsLoggedIn?action=edit&redlink=1]
--- @return void
function IsLoggedIn()
end
--- Checks to see if client is running on a Macintosh.
--- [https://wowpedia.fandom.com/wiki/API_IsMacClient]
--- @return boolean @ isMac
function IsMacClient()
end
--- [https://wowpedia.fandom.com/wiki/API_IsMasterLooter?action=edit&redlink=1]
--- @return void
function IsMasterLooter()
end
--- [https://wowpedia.fandom.com/wiki/API_IsMetaKeyDown?action=edit&redlink=1]
--- @return void
function IsMetaKeyDown()
end
--- Indicates whether the modifier keys for the selected action are pressed.
--- [https://wowpedia.fandom.com/wiki/API_IsModifiedClick]
--- @param action string @ The action to check for. Actions defined by Blizzard:
--- @return boolean @ isHeld
function IsModifiedClick(action)
end
--- There are three seperate levels of IsModifierKeyDown() type API functions but they all do the same basic function and return true if the specified key is currently pressed down.
--- [https://wowpedia.fandom.com/wiki/API_IsModifierKeyDown]
--- @return unknown @ anyModKeyIsDown
function IsModifierKeyDown()
end
--- Checks to see if the player is mounted or not.
--- [https://wowpedia.fandom.com/wiki/API_IsMounted]
--- @return void
function IsMounted()
end
--- Returns whether a mouse button is being held down.
--- [https://wowpedia.fandom.com/wiki/API_IsMouseButtonDown]
--- @param button string @ ? - Name of the button. If not passed, then it returns if any mouse button is pressed.
--- @return boolean @ isDown
function IsMouseButtonDown(button)
end
--- For checking whether mouselook mode is currently active.
--- [https://wowpedia.fandom.com/wiki/API_IsMouselooking]
--- @return void
function IsMouselooking()
end
--- [https://wowpedia.fandom.com/wiki/API_IsMovieLocal?action=edit&redlink=1]
--- @return void
function IsMovieLocal()
end
--- Returns if the movie exists and can be played. Exceptions apply.
--- [https://wowpedia.fandom.com/wiki/API_IsMoviePlayable]
--- @param movieID number
--- @return boolean @ playable
function IsMoviePlayable(movieID)
end
--- Returns whether the game is currently showing a GlueXML screen (i.e. no character is logged in).
--- [https://wowpedia.fandom.com/wiki/API_IsOnGlueScreen]
--- @return boolean @ isOnGlueScreen
function IsOnGlueScreen()
end
--- [https://wowpedia.fandom.com/wiki/API_IsOnGroundFloorInJailersTower?action=edit&redlink=1]
--- @return void
function IsOnGroundFloorInJailersTower()
end
--- [https://wowpedia.fandom.com/wiki/API_IsOnTournamentRealm?action=edit&redlink=1]
--- @return void
function IsOnTournamentRealm()
end
--- Returns whether the player's character is currently outside of the map.
--- [https://wowpedia.fandom.com/wiki/API_IsOutOfBounds]
--- @return number @ oob
function IsOutOfBounds()
end
--- Returns whether the player's character is currently outdoors.
--- [https://wowpedia.fandom.com/wiki/API_IsOutdoors]
--- @return unknown @ outdoors
function IsOutdoors()
end
--- [https://wowpedia.fandom.com/wiki/API_IsOutlineModeSupported?action=edit&redlink=1]
--- @return void
function IsOutlineModeSupported()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPVPTimerRunning?action=edit&redlink=1]
--- @return void
function IsPVPTimerRunning()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPartyLFG?action=edit&redlink=1]
--- @return void
function IsPartyLFG()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPartyWorldPVP?action=edit&redlink=1]
--- @return void
function IsPartyWorldPVP()
end
--- Returns whether the icon in your spellbook is a Passive ability (not necessarily a spell). (And actually noted as so in spellbook)
--- [https://wowpedia.fandom.com/wiki/API_IsPassiveSpell]
--- @param spellId_or_index unknown
--- @param bookType string @ Either BOOKTYPE_SPELL (spell) or BOOKTYPE_PET (pet). spell is linked to your General Spellbook tab.
--- @return number @ isPassive
function IsPassiveSpell(spellId_or_index, bookType)
end
--- [https://wowpedia.fandom.com/wiki/API_IsPendingGlyphRemoval?action=edit&redlink=1]
--- @return void
function IsPendingGlyphRemoval()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPetActive?action=edit&redlink=1]
--- @return void
function IsPetActive()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPetAttackAction?action=edit&redlink=1]
--- @return void
function IsPetAttackAction()
end
--- boolean attackStatus = IsPetAttackActive(integer index)
--- [https://wowpedia.fandom.com/wiki/API_IsPetAttackActive]
--- @return void
function IsPetAttackActive()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPlayerInWorld?action=edit&redlink=1]
--- @return void
function IsPlayerInWorld()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPlayerMoving?action=edit&redlink=1]
--- @return void
function IsPlayerMoving()
end
--- Returns whether the player is currently neutral (vs Alliance/Horde).
--- [https://wowpedia.fandom.com/wiki/API_IsPlayerNeutral]
--- @return boolean @ isNeutral
function IsPlayerNeutral()
end
--- Returns whether the player has learned a particular spell.
--- [https://wowpedia.fandom.com/wiki/API_IsPlayerSpell]
--- @param spellID number @ Spell ID of the spell to query, e.g. 1953 for [Blink].
--- @return boolean @ isKnown
function IsPlayerSpell(spellID)
end
--- [https://wowpedia.fandom.com/wiki/API_IsPossessBarVisible?action=edit&redlink=1]
--- @return void
function IsPossessBarVisible()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPublicBuild?action=edit&redlink=1]
--- @return void
function IsPublicBuild()
end
--- [https://wowpedia.fandom.com/wiki/API_IsPvpTalentSpell?action=edit&redlink=1]
--- @return void
function IsPvpTalentSpell()
end
--- Returns true if the currently loaded quest in the quest window is completable.
--- [https://wowpedia.fandom.com/wiki/API_IsQuestCompletable]
--- @return boolean @ isQuestCompletable
function IsQuestCompletable()
end
--- [https://wowpedia.fandom.com/wiki/API_IsQuestIDValidSpellTarget?action=edit&redlink=1]
--- @return void
function IsQuestIDValidSpellTarget()
end
--- [https://wowpedia.fandom.com/wiki/API_IsQuestItemHidden?action=edit&redlink=1]
--- @return void
function IsQuestItemHidden()
end
--- [https://wowpedia.fandom.com/wiki/API_IsQuestLogSpecialItemInRange?action=edit&redlink=1]
--- @return void
function IsQuestLogSpecialItemInRange()
end
--- [https://wowpedia.fandom.com/wiki/API_IsQuestSequenced?action=edit&redlink=1]
--- @return void
function IsQuestSequenced()
end
--- [https://wowpedia.fandom.com/wiki/API_IsRaidMarkerActive?action=edit&redlink=1]
--- @return void
function IsRaidMarkerActive()
end
--- [https://wowpedia.fandom.com/wiki/API_IsRangedWeapon?action=edit&redlink=1]
--- @return void
function IsRangedWeapon()
end
--- [https://wowpedia.fandom.com/wiki/API_IsReagentBankUnlocked?action=edit&redlink=1]
--- @return void
function IsReagentBankUnlocked()
end
--- Returns true if a given character name is recognized by the client.
--- [https://wowpedia.fandom.com/wiki/API_IsRecognizedName]
--- @param text string @ Name of the character to test.
--- @param includeBitfield number @ Bitfield of filters that the name must match at least one of.
--- @param excludeBitfield number @ Bitfield of filters that the name must not match at any of.
--- @return boolean @ isRecognized
function IsRecognizedName(text, includeBitfield, excludeBitfield)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_IsRecruitAFriendLinked]
--- @return boolean @ isRafLinked
function IsRecruitAFriendLinked()
end
--- [https://wowpedia.fandom.com/wiki/API_IsReplacingUnit?action=edit&redlink=1]
--- @return void
function IsReplacingUnit()
end
--- Checks to see if Player is resting.
--- [https://wowpedia.fandom.com/wiki/API_IsResting]
--- @return boolean @ resting
function IsResting()
end
--- [https://wowpedia.fandom.com/wiki/API_IsRestrictedAccount?action=edit&redlink=1]
--- @return void
function IsRestrictedAccount()
end
--- [https://wowpedia.fandom.com/wiki/API_IsRightAltKeyDown]
--- @return void
function IsRightAltKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsRightControlKeyDown]
--- @return void
function IsRightControlKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsRightMetaKeyDown?action=edit&redlink=1]
--- @return void
function IsRightMetaKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsRightShiftKeyDown]
--- @return void
function IsRightShiftKeyDown()
end
--- [https://wowpedia.fandom.com/wiki/API_IsSelectedSpellBookItem?action=edit&redlink=1]
--- @return void
function IsSelectedSpellBookItem()
end
--- [https://wowpedia.fandom.com/wiki/API_IsServerControlledBackfill?action=edit&redlink=1]
--- @return void
function IsServerControlledBackfill()
end
--- [https://wowpedia.fandom.com/wiki/API_IsShiftKeyDown]
--- @return void
function IsShiftKeyDown()
end
--- Returns whether a given spell is specific to a specialization and/or class.
--- [https://wowpedia.fandom.com/wiki/API_IsSpellClassOrSpec]
--- @param spellName_or_spellIndex unknown
--- @param bookType string @ spell book type, e.g. BOOKTYPE_SPELL (spell) for player's spell book.
--- @return string, string @ spec, class
function IsSpellClassOrSpec(spellName_or_spellIndex, bookType)
end
--- Returns whether a given spell is in range.
--- [https://wowpedia.fandom.com/wiki/API_IsSpellInRange]
--- @param index number @ spell book slot index, ascending from 1.
--- @param bookType string @ one of BOOKTYPE_SPELL (spell) or BOOKTYPE_PET (pet) specifying which spellbook to index.
--- @param target string @ unit to use as a target for the spell.
--- @return number @ inRange
function IsSpellInRange(index, bookType, target)
end
--- [https://wowpedia.fandom.com/wiki/API_IsSpellKnown]
--- @param spellID number @ the spell ID number
--- @param isPetSpell boolean @ optional) - if true, will check if the currently active pet knows the spell; if false or omitted, will check if the player knows the spell
--- @return boolean @ isKnown
function IsSpellKnown(spellID, isPetSpell)
end
--- [https://wowpedia.fandom.com/wiki/API_IsSpellKnownOrOverridesKnown?action=edit&redlink=1]
--- @return void
function IsSpellKnownOrOverridesKnown()
end
--- Returns whether spellID is using SpellActivationAlert (glowing-circle around it) currently, or not.
--- [https://wowpedia.fandom.com/wiki/API_IsSpellOverlayed]
--- @param spellID number @ the spell ID number
--- @return boolean @ isTrue
function IsSpellOverlayed(spellID)
end
--- [https://wowpedia.fandom.com/wiki/API_IsSpellValidForPendingGlyph?action=edit&redlink=1]
--- @return void
function IsSpellValidForPendingGlyph()
end
--- [https://wowpedia.fandom.com/wiki/API_IsSplashFramePrimaryFeatureUnlocked?action=edit&redlink=1]
--- @return void
function IsSplashFramePrimaryFeatureUnlocked()
end
--- [https://wowpedia.fandom.com/wiki/API_IsStackableAction?action=edit&redlink=1]
--- @return void
function IsStackableAction()
end
--- Indicates whether the player is stealthed.
--- [https://wowpedia.fandom.com/wiki/API_IsStealthed]
--- @return boolean @ stealthed
function IsStealthed()
end
--- [https://wowpedia.fandom.com/wiki/API_IsStoryQuest?action=edit&redlink=1]
--- @return void
function IsStoryQuest()
end
--- [https://wowpedia.fandom.com/wiki/API_IsSubZonePVPPOI?action=edit&redlink=1]
--- @return void
function IsSubZonePVPPOI()
end
--- Returns whether the player character is submerged in water.
--- [https://wowpedia.fandom.com/wiki/API_IsSubmerged]
--- @return unknown @ isSubmerged
function IsSubmerged()
end
--- Returns whether the player character is swimming.
--- [https://wowpedia.fandom.com/wiki/API_IsSwimming]
--- @return number @ isSwimming
function IsSwimming()
end
--- Indicates whether the given spell is learned from a talent.
--- [https://wowpedia.fandom.com/wiki/API_IsTalentSpell]
--- @param spellName_or_slotIndex unknown
--- @param bookType string @ one of BOOKTYPE_SPELL (spell) or BOOKTYPE_PET (pet).
--- @return boolean @ isTalentSpell
function IsTalentSpell(spellName_or_slotIndex, bookType)
end
--- [https://wowpedia.fandom.com/wiki/API_IsTestBuild?action=edit&redlink=1]
--- @return void
function IsTestBuild()
end
--- Returns whether threat warnings are currently enabled.
--- [https://wowpedia.fandom.com/wiki/API_IsThreatWarningEnabled]
--- @return boolean @ enabled
function IsThreatWarningEnabled()
end
--- Returns whether the player can use a title.
--- [https://wowpedia.fandom.com/wiki/API_IsTitleKnown]
--- @param titleId number @ Ranging from 1 to GetNumTitles.
--- @return boolean @ isKnown
function IsTitleKnown(titleId)
end
--- Returns if an achievement is currently being tracked.
--- [https://wowpedia.fandom.com/wiki/API_IsTrackedAchievement]
--- @return void
function IsTrackedAchievement()
end
--- Returns whether the player is currently tracking battle pets.
--- [https://wowpedia.fandom.com/wiki/API_IsTrackingBattlePets]
--- @return boolean @ isTracking
function IsTrackingBattlePets()
end
--- [https://wowpedia.fandom.com/wiki/API_IsTrackingHiddenQuests?action=edit&redlink=1]
--- @return void
function IsTrackingHiddenQuests()
end
--- Determine whether last opened trainer window offered trade skill (profession) abilities.
--- [https://wowpedia.fandom.com/wiki/API_IsTradeskillTrainer]
--- @return unknown @ isTradeskillTrainer
function IsTradeskillTrainer()
end
--- Returns whether the player is using a trial (free-to-play) account.
--- [https://wowpedia.fandom.com/wiki/API_IsTrialAccount]
--- @return boolean @ isTrialAccount
function IsTrialAccount()
end
--- [https://wowpedia.fandom.com/wiki/API_IsTutorialFlagged?action=edit&redlink=1]
--- @return void
function IsTutorialFlagged()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_IsUnitModelReadyForUI]
--- @param unitToken string
--- @return boolean @ isReady
function IsUnitModelReadyForUI(unitToken)
end
--- Determine if an action can be used (you have sufficient mana, reagents and the action is not on cooldown).
--- [https://wowpedia.fandom.com/wiki/API_IsUsableAction]
--- @param slot number @ Action slot to query
--- @return boolean, boolean @ isUsable, notEnoughMana
function IsUsableAction(slot)
end
--- [https://wowpedia.fandom.com/wiki/API_IsUsableItem?action=edit&redlink=1]
--- @return void
function IsUsableItem()
end
--- Determines whether a spell can be used by the player character.
--- [https://wowpedia.fandom.com/wiki/API_IsUsableSpell]
--- @param spellName_or_spellID_or_spellIndex unknown
--- @param bookType string @ Use the BOOKTYPE_SPELL constant if spellIndex refers to a spell in the player's spellbook or the BOOKTYPE_PET constant if the spellIndex refers to a spell in the pet's spellbook. Defaults to BOOKTYPE_SPELL.
--- @return boolean, boolean @ usable, noMana
function IsUsableSpell(spellName_or_spellID_or_spellIndex, bookType)
end
--- [https://wowpedia.fandom.com/wiki/API_IsUsingFixedTimeStep?action=edit&redlink=1]
--- @return void
function IsUsingFixedTimeStep()
end
--- [https://wowpedia.fandom.com/wiki/API_IsUsingVehicleControls?action=edit&redlink=1]
--- @return void
function IsUsingVehicleControls()
end
--- [https://wowpedia.fandom.com/wiki/API_IsVehicleAimAngleAdjustable?action=edit&redlink=1]
--- @return void
function IsVehicleAimAngleAdjustable()
end
--- [https://wowpedia.fandom.com/wiki/API_IsVehicleAimPowerAdjustable?action=edit&redlink=1]
--- @return void
function IsVehicleAimPowerAdjustable()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_IsVeteranTrialAccount]
--- @return boolean @ isVeteranTrialAccount
function IsVeteranTrialAccount()
end
--- [https://wowpedia.fandom.com/wiki/API_IsVoidStorageReady?action=edit&redlink=1]
--- @return void
function IsVoidStorageReady()
end
--- Returns whether the player is currently in a War Game.
--- [https://wowpedia.fandom.com/wiki/API_IsWargame]
--- @return boolean @ isWargame
function IsWargame()
end
--- Checks to see if client is running on Windows.
--- [https://wowpedia.fandom.com/wiki/API_IsWindowsClient]
--- @return void
function IsWindowsClient()
end
--- [https://wowpedia.fandom.com/wiki/API_IsXPUserDisabled?action=edit&redlink=1]
--- @return void
function IsXPUserDisabled()
end
--- [https://wowpedia.fandom.com/wiki/API_ItemAddedToArtifact?action=edit&redlink=1]
--- @return void
function ItemAddedToArtifact()
end
--- [https://wowpedia.fandom.com/wiki/API_ItemCanTargetGarrisonFollowerAbility?action=edit&redlink=1]
--- @return void
function ItemCanTargetGarrisonFollowerAbility()
end
--- [https://wowpedia.fandom.com/wiki/API_ItemHasRange?action=edit&redlink=1]
--- @return void
function ItemHasRange()
end
--- Get the creator of an item text.
--- [https://wowpedia.fandom.com/wiki/API_ItemTextGetCreator]
--- @return string @ creatorName
function ItemTextGetCreator()
end
--- Get the name of the current item text.
--- [https://wowpedia.fandom.com/wiki/API_ItemTextGetItem]
--- @return string @ textName
function ItemTextGetItem()
end
--- Get the material which an item text is written on.
--- [https://wowpedia.fandom.com/wiki/API_ItemTextGetMaterial]
--- @return string @ materialName
function ItemTextGetMaterial()
end
--- Get the number of the current item text page.
--- [https://wowpedia.fandom.com/wiki/API_ItemTextGetPage]
--- @return number @ pageNum
function ItemTextGetPage()
end
--- Get the page contents of the current item text.
--- [https://wowpedia.fandom.com/wiki/API_ItemTextGetText]
--- @return string @ pageBody
function ItemTextGetText()
end
--- Determine if there is a page after the current page.
--- [https://wowpedia.fandom.com/wiki/API_ItemTextHasNextPage]
--- @return number @ hasNext
function ItemTextHasNextPage()
end
--- [https://wowpedia.fandom.com/wiki/API_ItemTextIsFullPage?action=edit&redlink=1]
--- @return void
function ItemTextIsFullPage()
end
--- Request the next page of an Item Text
--- [https://wowpedia.fandom.com/wiki/API_ItemTextNextPage]
--- @return void
function ItemTextNextPage()
end
--- Request the previous page of an Item Text.
--- [https://wowpedia.fandom.com/wiki/API_ItemTextPrevPage]
--- @return void
function ItemTextPrevPage()
end
--- [https://wowpedia.fandom.com/wiki/API_JoinArena?action=edit&redlink=1]
--- @return void
function JoinArena()
end
--- Queues the player, or the player's group, for a battlefield instance.
--- [https://wowpedia.fandom.com/wiki/API_JoinBattlefield]
--- @param index number @ Which battlefield instance to queue for (0 for first available), or which arena bracket to queue for.
--- @param asGroup boolean @ If true-equivalent, the player's group is queued for the battlefield, otherwise, only the player is queued.
--- @param isRated boolean @ If true-equivalent, and queueing for an arena bracket, the group is queued for a rated match as opposed to a skirmish.
--- @return void
function JoinBattlefield(index, asGroup, isRated)
end
--- Joins the channel with the specified name. A player can be in a maximum of 10 chat channels.
--- [https://wowpedia.fandom.com/wiki/API_JoinChannelByName]
--- @param channelName string @ The name of the channel to join. You can't use the - character in channelName.
--- @param password string @ ?Optional. Could be nil. - The channel password, nil if none.
--- @param frameID number @ ?Optional. Could be nil. - The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects.
--- @param hasVoice boolean @ Enable voice chat for this channel.
--- @return number, string @ type, name
function JoinChannelByName(channelName, password, frameID, hasVoice)
end
--- [https://wowpedia.fandom.com/wiki/API_JoinLFG?action=edit&redlink=1]
--- @return void
function JoinLFG()
end
--- Seems to have the same effect as API_JoinChannelByName.
--- [https://wowpedia.fandom.com/wiki/API_JoinPermanentChannel]
--- @param channelName string @ The name of the channel to join
--- @param password string @ optional) - The channel password, nil if none.
--- @param frameID number @ optional) - The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects.
--- @param hasVoice boolean @ nil) - Enable voice chat for this channel.
--- @return number, string @ type, name
function JoinPermanentChannel(channelName, password, frameID, hasVoice)
end
--- [https://wowpedia.fandom.com/wiki/API_JoinRatedBattlefield?action=edit&redlink=1]
--- @return void
function JoinRatedBattlefield()
end
--- [https://wowpedia.fandom.com/wiki/API_JoinSingleLFG?action=edit&redlink=1]
--- @return void
function JoinSingleLFG()
end
--- Queue for a arena either solo or as a group.
--- [https://wowpedia.fandom.com/wiki/API_JoinSkirmish]
--- @param arenaID number
--- @param joinAsGroup boolean @ optional)
--- @return void
function JoinSkirmish(arenaID, joinAsGroup)
end
--- Seems to have the same effect as API_JoinChannelByName (except that a channel joined by JoinTemporaryChannel is left at logout).
--- [https://wowpedia.fandom.com/wiki/API_JoinTemporaryChannel]
--- @param channelName string @ The name of the channel to join
--- @param password string @ optional) - The channel password, nil if none.
--- @param frameID number @ optional) - The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects.
--- @param hasVoice boolean @ nil) - Enable voice chat for this channel.
--- @return number, string @ type, name
function JoinTemporaryChannel(channelName, password, frameID, hasVoice)
end
--- Makes the player jump, or travel upward when swimming or flying.
--- [https://wowpedia.fandom.com/wiki/API_JumpOrAscendStart]
--- @return void
function JumpOrAscendStart()
end
--- Starts the article load process.
--- [https://wowpedia.fandom.com/wiki/API_KBArticle_BeginLoading]
--- @param id number @ The article's ID
--- @param searchType number @ Search type for the loading process.
--- @return void
function KBArticle_BeginLoading(id, searchType)
end
--- Returns data for the current article.
--- [https://wowpedia.fandom.com/wiki/API_KBArticle_GetData]
--- @return number, string, string, string, string, number, boolean @ id, subject, subjectAlt, text, keywords, languageId, isHot
function KBArticle_GetData()
end
--- Determine if the article is loaded.
--- [https://wowpedia.fandom.com/wiki/API_KBArticle_IsLoaded]
--- @return boolean @ loaded
function KBArticle_IsLoaded()
end
--- [https://wowpedia.fandom.com/wiki/API_KBQuery_BeginLoading?action=edit&redlink=1]
--- @return void
function KBQuery_BeginLoading()
end
--- [https://wowpedia.fandom.com/wiki/API_KBQuery_GetArticleHeaderCount?action=edit&redlink=1]
--- @return void
function KBQuery_GetArticleHeaderCount()
end
--- [https://wowpedia.fandom.com/wiki/API_KBQuery_GetArticleHeaderData?action=edit&redlink=1]
--- @return void
function KBQuery_GetArticleHeaderData()
end
--- [https://wowpedia.fandom.com/wiki/API_KBQuery_GetTotalArticleCount?action=edit&redlink=1]
--- @return void
function KBQuery_GetTotalArticleCount()
end
--- [https://wowpedia.fandom.com/wiki/API_KBQuery_IsLoaded?action=edit&redlink=1]
--- @return void
function KBQuery_IsLoaded()
end
--- Starts the loading of articles.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_BeginLoading]
--- @param articlesPerPage number @ Number of articles shown on one page.
--- @param currentPage number @ The current page (starts at 1).
--- @return void
function KBSetup_BeginLoading(articlesPerPage, currentPage)
end
--- Returns the number of articles for the current page.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetArticleHeaderCount]
--- @return number @ count
function KBSetup_GetArticleHeaderCount()
end
--- Returns header information about an article.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetArticleHeaderData]
--- @param index number @ The articles index for that page.
--- @return number, string, boolean, boolean @ id, title, isHot, isNew
function KBSetup_GetArticleHeaderData(index)
end
--- Returns the number of categories.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetCategoryCount]
--- @return number @ count
function KBSetup_GetCategoryCount()
end
--- Returns information about a category.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetCategoryData]
--- @param index number @ Range from 1 to KBSetup_GetCategoryCount()
--- @return number, string @ id, caption
function KBSetup_GetCategoryData(index)
end
--- Returns the number of languages in the knowledge base.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetLanguageCount]
--- @return number @ count
function KBSetup_GetLanguageCount()
end
--- Returns information about a language.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetLanguageData]
--- @param index number @ Range from 1 to KBSetup_GetLanguageCount()
--- @return number, string @ id, caption
function KBSetup_GetLanguageData(index)
end
--- Returns the number of subcategories in a category.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetSubCategoryCount]
--- @param category number @ The category's index.
--- @return number @ count
function KBSetup_GetSubCategoryCount(category)
end
--- Returns information about a subcategory.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetSubCategoryData]
--- @param category unknown @ Intgeger - The category's index.
--- @param index number @ Range from 1 to KBSetup_GetSubCategoryCount(category)
--- @return number, string @ id, caption
function KBSetup_GetSubCategoryData(category, index)
end
--- Returns the number of articles.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_GetTotalArticleCount]
--- @return number @ count
function KBSetup_GetTotalArticleCount()
end
--- Determine if the article list is loaded.
--- [https://wowpedia.fandom.com/wiki/API_KBSetup_IsLoaded]
--- @return boolean @ loaded
function KBSetup_IsLoaded()
end
--- Returns the server message of the day.
--- [https://wowpedia.fandom.com/wiki/API_KBSystem_GetMOTD]
--- @return string @ motd
function KBSystem_GetMOTD()
end
--- Returns the current server notice.
--- [https://wowpedia.fandom.com/wiki/API_KBSystem_GetServerNotice]
--- @return string @ notice
function KBSystem_GetServerNotice()
end
--- Returns the current server status.
--- [https://wowpedia.fandom.com/wiki/API_KBSystem_GetServerStatus]
--- @return string @ status
function KBSystem_GetServerStatus()
end
--- Teleports the player to or from an LFG dungeon.
--- [https://wowpedia.fandom.com/wiki/API_LFGTeleport]
--- @param toSafety boolean @ false to teleport to the dungeon, true to teleport to where you were before you were teleported to the dungeon.
--- @return void
function LFGTeleport(toSafety)
end
--- Learns the name of a specified pvp talent in a specified tab.
--- [https://wowpedia.fandom.com/wiki/API_LearnPvpTalent]
--- @param talentID string @ Talent ID
--- @param slotIndex number
--- @return void
function LearnPvpTalent(talentID, slotIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_LearnPvpTalents?action=edit&redlink=1]
--- @return void
function LearnPvpTalents()
end
--- Learns the name of a specified talent in a specified tab.
--- [https://wowpedia.fandom.com/wiki/API_LearnTalent]
--- @param talentID string @ Talent ID
--- @return void
function LearnTalent(talentID)
end
--- [https://wowpedia.fandom.com/wiki/API_LearnTalents?action=edit&redlink=1]
--- @return void
function LearnTalents()
end
--- Leaves the current battlefield
--- [https://wowpedia.fandom.com/wiki/API_LeaveBattlefield]
--- @return void
function LeaveBattlefield()
end
--- [https://wowpedia.fandom.com/wiki/API_LeaveChannelByLocalID?action=edit&redlink=1]
--- @return void
function LeaveChannelByLocalID()
end
--- Leaves the channel with the specified name.
--- [https://wowpedia.fandom.com/wiki/API_LeaveChannelByName]
--- @param channelName string @ The name of the channel to leave
--- @return void
function LeaveChannelByName(channelName)
end
--- [https://wowpedia.fandom.com/wiki/API_LeaveLFG?action=edit&redlink=1]
--- @return void
function LeaveLFG()
end
--- [https://wowpedia.fandom.com/wiki/API_LeaveSingleLFG?action=edit&redlink=1]
--- @return void
function LeaveSingleLFG()
end
--- Lists members in the given channel to the chat window.
--- [https://wowpedia.fandom.com/wiki/API_ListChannelByName]
--- @param channelName string @ Number - Case-insensitive channel name or channel number from which to list the members, e.g. trade - city. If no argument is given, list all of the numbered channels you are a member of.
--- @return void
function ListChannelByName(channelName)
end
--- Lists all of the channels.
--- [https://wowpedia.fandom.com/wiki/API_ListChannels]
--- @return void
function ListChannels()
end
--- Request the loading of an On-Demand AddOn.
--- [https://wowpedia.fandom.com/wiki/API_LoadAddOn]
--- @param index_or_name unknown
--- @return number, string @ loaded, reason
function LoadAddOn(index_or_name)
end
--- Loads a binding set into memory, activating those bindings.
--- [https://wowpedia.fandom.com/wiki/API_LoadBindings]
--- @param bindingSet number @ Which binding set to load; one of the following three numeric constants:
--- @return void
function LoadBindings(bindingSet)
end
--- [https://wowpedia.fandom.com/wiki/API_LoadURLIndex?action=edit&redlink=1]
--- @return void
function LoadURLIndex()
end
--- Toggles the chat logging and returns the current state.
--- [https://wowpedia.fandom.com/wiki/API_LoggingChat]
--- @param newState boolean @ toggles chat logging
--- @return boolean @ isLogging
function LoggingChat(newState)
end
--- Toggles logging for the combat log and returns the current state.
--- [https://wowpedia.fandom.com/wiki/API_LoggingCombat]
--- @param newState boolean @ Toggles combat logging
--- @return unknown @ isLogging
function LoggingCombat(newState)
end
--- Logs the player character out of the game.
--- [https://wowpedia.fandom.com/wiki/API_Logout]
--- @return void
function Logout()
end
--- [https://wowpedia.fandom.com/wiki/API_LootMoneyNotify?action=edit&redlink=1]
--- @return void
function LootMoneyNotify()
end
--- This will attempt to loot the specified slot. If you must confirm that you want to loot the slot (BoP, loot rolls, etc), then a follow-up call to ConfirmLootSlot is needed.
--- [https://wowpedia.fandom.com/wiki/API_LootSlot]
--- @param slot number @ the loot slot.
--- @return void
function LootSlot(slot)
end
--- Returns whether a loot slot contains an item.
--- [https://wowpedia.fandom.com/wiki/API_LootSlotHasItem]
--- @param lootSlot number @ index of the loot slot, ascending from 1 to GetNumLootItems()
--- @return boolean @ isLootItem
function LootSlotHasItem(lootSlot)
end
--- [https://wowpedia.fandom.com/wiki/API_MouseOverrideCinematicDisable?action=edit&redlink=1]
--- @return void
function MouseOverrideCinematicDisable()
end
--- Enters mouse look mode, during which mouse movement is used to alter the character's movement/facing direction.
--- [https://wowpedia.fandom.com/wiki/API_MouselookStart]
--- @return void
function MouselookStart()
end
--- Exits mouse look mode; allows mouse input to move the mouse cursor.
--- [https://wowpedia.fandom.com/wiki/API_MouselookStop]
--- @return void
function MouselookStop()
end
--- [https://wowpedia.fandom.com/wiki/API_MoveAndSteerStart?action=edit&redlink=1]
--- @return void
function MoveAndSteerStart()
end
--- [https://wowpedia.fandom.com/wiki/API_MoveAndSteerStop?action=edit&redlink=1]
--- @return void
function MoveAndSteerStop()
end
--- The player begins moving backward at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_MoveBackwardStart]
--- @param startTime number @ Begin moving backward at this time, per GetTime * 1000.
--- @return void
function MoveBackwardStart(startTime)
end
--- The player stops moving backward at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_MoveBackwardStop]
--- @param startTime unknown
--- @return void
function MoveBackwardStop(startTime)
end
--- The player begins moving forward at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_MoveForwardStart]
--- @param startTime number @ Begin moving forward at this time, per GetTime * 1000.
--- @return void
function MoveForwardStart(startTime)
end
--- The player stops moving forward at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_MoveForwardStop]
--- @param startTime unknown
--- @return void
function MoveForwardStop(startTime)
end
--- Begins rotating the camera down around your character.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewDownStart]
--- @param speed number @ Speed at which to begin rotating.
--- @return void
function MoveViewDownStart(speed)
end
--- Stops rotating the camera Down.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewDownStop]
--- @return void
function MoveViewDownStop()
end
--- Begins zooming the camera in.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewInStart]
--- @param speed number @ Speed at which to begin zooming.
--- @return void
function MoveViewInStart(speed)
end
--- Stops moving the camera In.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewInStop]
--- @return void
function MoveViewInStop()
end
--- Begins rotating the camera to the left around your character.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewLeftStart]
--- @param speed number @ Speed at which to begin rotating.
--- @return void
function MoveViewLeftStart(speed)
end
--- Stops rotating the camera to the Left.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewLeftStop]
--- @return void
function MoveViewLeftStop()
end
--- Begins zooming the camera out.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewOutStart]
--- @param speed number @ Speed at which to begin zooming.
--- @return void
function MoveViewOutStart(speed)
end
--- Stops moving the camera out.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewOutStop]
--- @return void
function MoveViewOutStop()
end
--- Begins rotating the camera to the right around your character.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewRightStart]
--- @param speed number @ Speed at which to begin rotating.
--- @return void
function MoveViewRightStart(speed)
end
--- Stops rotating the camera to the Right.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewRightStop]
--- @return void
function MoveViewRightStop()
end
--- Begins rotating the camera up around your character.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewUpStart]
--- @param speed number @ Speed at which to begin rotating.
--- @return void
function MoveViewUpStart(speed)
end
--- Stops rotating the camera Up.
--- [https://wowpedia.fandom.com/wiki/API_MoveViewUpStop]
--- @return void
function MoveViewUpStop()
end
--- [https://wowpedia.fandom.com/wiki/API_MultiSampleAntiAliasingSupported?action=edit&redlink=1]
--- @return void
function MultiSampleAntiAliasingSupported()
end
--- Mutes a sound file.
--- [https://wowpedia.fandom.com/wiki/API_MuteSoundFile]
--- @param soundFile_or_fileDataID unknown
--- @return void
function MuteSoundFile(soundFile_or_fileDataID)
end
--- Aligns a Neutral player character with the Horde/Alliance.
--- [https://wowpedia.fandom.com/wiki/API_NeutralPlayerSelectFaction]
--- @param factionIndex number @ to choose the Horde, 2 to choose the Alliance.
--- @return void
function NeutralPlayerSelectFaction(factionIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_NextView?action=edit&redlink=1]
--- @return void
function NextView()
end
--- Indicates the player's account has reached a daily curfew of 90 minutes, imposed on children and any non-confirmed adults in China to comply with local law.[1]
--- [https://wowpedia.fandom.com/wiki/API_NoPlayTime]
--- @return number @ isUnhealthy
function NoPlayTime()
end
--- Generates an error message saying you cannot do that while dead.
--- [https://wowpedia.fandom.com/wiki/API_NotWhileDeadError]
--- @return void
function NotWhileDeadError()
end
--- Requests a unit's inventory and talent information from the server, allowing you to inspect the unit.
--- [https://wowpedia.fandom.com/wiki/API_NotifyInspect]
--- @param unit string @ unitId) - Unit to request information of.
--- @return void
function NotifyInspect(unit)
end
--- Returns the total number of flight points on the taxi map.
--- [https://wowpedia.fandom.com/wiki/API_NumTaxiNodes]
--- @return number @ numNodes
function NumTaxiNodes()
end
--- Offer the target to sign your petition (only if the petition frame is visible)
--- [https://wowpedia.fandom.com/wiki/API_OfferPetition]
--- @return void
function OfferPetition()
end
--- [https://wowpedia.fandom.com/wiki/API_OpenTrainer?action=edit&redlink=1]
--- @return void
function OpenTrainer()
end
--- [https://wowpedia.fandom.com/wiki/API_OpeningCinematic?action=edit&redlink=1]
--- @return void
function OpeningCinematic()
end
--- Returns whether the current billing unit is considered tired or not. This function is to limit players from playing the game for too long.
--- [https://wowpedia.fandom.com/wiki/API_PartialPlayTime]
--- @return void
function PartialPlayTime()
end
--- [https://wowpedia.fandom.com/wiki/API_PartyLFGStartBackfill?action=edit&redlink=1]
--- @return void
function PartyLFGStartBackfill()
end
--- Permanently abandons your pet.
--- [https://wowpedia.fandom.com/wiki/API_PetAbandon]
--- @return void
function PetAbandon()
end
--- Switches your pet to aggressive mode; does nothing.
--- [https://wowpedia.fandom.com/wiki/API_PetAggressiveMode]
--- @return void
function PetAggressiveMode()
end
--- Switches pet to Assist mode.
--- [https://wowpedia.fandom.com/wiki/API_PetAssistMode]
--- @return void
function PetAssistMode()
end
--- Instruct your pet to attack your target.
--- [https://wowpedia.fandom.com/wiki/API_PetAttack]
--- @return void
function PetAttack()
end
--- Retuns true if the pet is abandonable.
--- [https://wowpedia.fandom.com/wiki/API_PetCanBeAbandoned]
--- @return boolean @ canAbandon
function PetCanBeAbandoned()
end
--- [https://wowpedia.fandom.com/wiki/API_PetCanBeDismissed?action=edit&redlink=1]
--- @return void
function PetCanBeDismissed()
end
--- Retuns true if the pet can be renamed.
--- [https://wowpedia.fandom.com/wiki/API_PetCanBeRenamed]
--- @return boolean @ canRename
function PetCanBeRenamed()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_PetDefensiveAssistMode]
--- @return void
function PetDefensiveAssistMode()
end
--- Set your pet in defensive mode.
--- [https://wowpedia.fandom.com/wiki/API_PetDefensiveMode]
--- @return void
function PetDefensiveMode()
end
--- Dismiss your pet.
--- [https://wowpedia.fandom.com/wiki/API_PetDismiss]
--- @return void
function PetDismiss()
end
--- Instruct your pet to follow you.
--- [https://wowpedia.fandom.com/wiki/API_PetFollow]
--- @return void
function PetFollow()
end
--- Determine if player has a pet with an action bar.
--- [https://wowpedia.fandom.com/wiki/API_PetHasActionBar]
--- @return number @ hasActionBar
function PetHasActionBar()
end
--- [https://wowpedia.fandom.com/wiki/API_PetHasSpellbook?action=edit&redlink=1]
--- @return void
function PetHasSpellbook()
end
--- [https://wowpedia.fandom.com/wiki/API_PetMoveTo?action=edit&redlink=1]
--- @return void
function PetMoveTo()
end
--- Set your pet into passive mode.
--- [https://wowpedia.fandom.com/wiki/API_PetPassiveMode]
--- @return void
function PetPassiveMode()
end
--- Renames your pet.
--- [https://wowpedia.fandom.com/wiki/API_PetRename]
--- @param name string @ The new name of the pet
--- @return void
function PetRename(name)
end
--- Stops pet from attacking.
--- [https://wowpedia.fandom.com/wiki/API_PetStopAttack]
--- @return void
function PetStopAttack()
end
--- [https://wowpedia.fandom.com/wiki/API_PetUsesPetFrame?action=edit&redlink=1]
--- @return void
function PetUsesPetFrame()
end
--- Instruct your pet to remain still.
--- [https://wowpedia.fandom.com/wiki/API_PetWait]
--- @return void
function PetWait()
end
--- Pick up an action for drag-and-drop.
--- [https://wowpedia.fandom.com/wiki/API_PickupAction]
--- @param actionSlot number @ The action slot to pick the action up from.
--- @return void
function PickupAction(actionSlot)
end
--- Picks up the bag from the specified slot, placing it in the cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupBagFromSlot]
--- @param slot unknown @ InventorySlotID - the slot containing the bag.
--- @return void
function PickupBagFromSlot(slot)
end
--- Places a companion onto the mouse cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupCompanion]
--- @param type string @ companion type, either MOUNT or CRITTER.
--- @param index number @ index of the companion of the specified type to place on the cursor, ascending from 1.
--- @return void
function PickupCompanion(type, index)
end
--- Wildcard function usually called when a player left clicks on a slot in their bags. Functionality includes picking up the item from a specific bag slot, putting the item into a specific bag slot, and applying enchants (including poisons and sharpening stones) to the item in a specific bag slot, except if one of the Modifier Keys is pressed.
--- [https://wowpedia.fandom.com/wiki/API_PickupContainerItem]
--- @param bagID number @ id of the bag the slot is located in.
--- @param slot number @ slot inside the bag (top left slot is 1, slot to the right of it is 2).
--- @return void
function PickupContainerItem(bagID, slot)
end
--- [https://wowpedia.fandom.com/wiki/API_PickupGuildBankItem?action=edit&redlink=1]
--- @return void
function PickupGuildBankItem()
end
--- [https://wowpedia.fandom.com/wiki/API_PickupGuildBankMoney?action=edit&redlink=1]
--- @return void
function PickupGuildBankMoney()
end
--- Picks up an item from the player's worn inventory. This appears to be a kind of catch-all pick up/activate function.
--- [https://wowpedia.fandom.com/wiki/API_PickupInventoryItem]
--- @param slotId number @ the slot ID of the worn inventory slot.
--- @return void
function PickupInventoryItem(slotId)
end
--- Place the item on the cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupItem]
--- @param itemID_or_itemString_or_itemName_or_itemLink unknown
--- @return void
function PickupItem(itemID_or_itemString_or_itemName_or_itemLink)
end
--- Pick up a macro from the macro frame and place it on the cursor
--- [https://wowpedia.fandom.com/wiki/API_PickupMacro]
--- @param macroName_or_macroID unknown
--- @return void
function PickupMacro(macroName_or_macroID)
end
--- Places the specified merchant item on the cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupMerchantItem]
--- @param index number @ The index of the item in the merchant's inventory.
--- @return void
function PickupMerchantItem(index)
end
--- Pick up a pet action for drag-and-drop.
--- [https://wowpedia.fandom.com/wiki/API_PickupPetAction]
--- @param petActionSlot number @ The pet action slot to pick the action up from (1-10).
--- @return void
function PickupPetAction(petActionSlot)
end
--- Picks up a Combat Pet spell from the PlayerTalentFrame. [1]
--- [https://wowpedia.fandom.com/wiki/API_PickupPetSpell]
--- @param spellID number
--- @return void
function PickupPetSpell(spellID)
end
--- Picks up an amount of money from the player's bags, placing it on the cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupPlayerMoney]
--- @param copper number @ The amount of money, in copper, to place on the cursor.
--- @return void
function PickupPlayerMoney(copper)
end
--- [https://wowpedia.fandom.com/wiki/API_PickupPvpTalent?action=edit&redlink=1]
--- @return void
function PickupPvpTalent()
end
--- Puts the specified spell onto the mouse cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupSpell]
--- @param spellID number @ spell ID of the spell to pick up.
--- @return void
function PickupSpell(spellID)
end
--- Picks up a skill from spellbook so that it can subsequently be placed on an action bar.
--- [https://wowpedia.fandom.com/wiki/API_PickupSpellBookItem]
--- @param spellName_or_index unknown
--- @param bookType string @ Spell book type; one of the following global constants:
--- @return void
function PickupSpellBookItem(spellName_or_index, bookType)
end
--- Attaches a pet in your stable to your cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupStablePet]
--- @param index unknown
--- @return void
function PickupStablePet(index)
end
--- [https://wowpedia.fandom.com/wiki/API_PickupTalent?action=edit&redlink=1]
--- @return void
function PickupTalent()
end
--- Picks up an amount of money from the player's trading offer, placing it on the cursor.
--- [https://wowpedia.fandom.com/wiki/API_PickupTradeMoney]
--- @param copper number @ amount of money, in copper, to pick up.
--- @return void
function PickupTradeMoney(copper)
end
--- [https://wowpedia.fandom.com/wiki/API_PitchDownStart?action=edit&redlink=1]
--- @return void
function PitchDownStart()
end
--- [https://wowpedia.fandom.com/wiki/API_PitchDownStop?action=edit&redlink=1]
--- @return void
function PitchDownStop()
end
--- [https://wowpedia.fandom.com/wiki/API_PitchUpStart?action=edit&redlink=1]
--- @return void
function PitchUpStart()
end
--- [https://wowpedia.fandom.com/wiki/API_PitchUpStop?action=edit&redlink=1]
--- @return void
function PitchUpStop()
end
--- Place the drag-and-drop item as an action.
--- [https://wowpedia.fandom.com/wiki/API_PlaceAction]
--- @param actionSlot number @ The action slot to place the action into.
--- @return void
function PlaceAction(actionSlot)
end
--- [https://wowpedia.fandom.com/wiki/API_PlaceRaidMarker?action=edit&redlink=1]
--- @return void
function PlaceRaidMarker()
end
--- [https://wowpedia.fandom.com/wiki/API_PlayAutoAcceptQuestSound?action=edit&redlink=1]
--- @return void
function PlayAutoAcceptQuestSound()
end
--- Plays the specified sound file on loop to the Music sound channel.
--- [https://wowpedia.fandom.com/wiki/API_PlayMusic]
--- @param musicfile_or_fileDataID unknown
--- @return boolean @ willPlay
function PlayMusic(musicfile_or_fileDataID)
end
--- Play one of a set of built-in sounds. Other players will not hear the sound.
--- [https://wowpedia.fandom.com/wiki/API_PlaySound]
--- @param soundKitID number @ All sounds used by Blizzard's UI are defined in the SOUNDKIT table.
--- @param channel string @ ?Optional. Could be nil. - The sound volume slider setting the sound should use, one of: Master, SFX (Sound), Music, Ambience, Dialog. Individual channels (except Master) have user-configurable volume settings and may be muted, preventing playback. Defaults to SFX if not specified. There is also a Talking Head channel.[1]
--- @param forceNoDuplicates unknown
--- @param runFinishCallback boolean @ ?Optional. Could be nil. - Fires SOUNDKIT_FINISHED when sound is done, arg1 will be soundHandle given below. Defaults to false.
--- @return boolean, number @ willPlay, soundHandle
function PlaySound(soundKitID, channel, forceNoDuplicates, runFinishCallback)
end
--- Plays the specified audio file once.
--- [https://wowpedia.fandom.com/wiki/API_PlaySoundFile]
--- @param soundFile_or_soundFileID unknown
--- @param channel string @ optional) - The sound volume slider setting the sound should use, one of: Master, SFX (Sound), Music, Ambience, Dialog. Individual channels (except Master) have user-configurable volume settings and may be muted, preventing playback. Defaults to SFX if not specified.
--- @return boolean, number @ willPlay, soundHandle
function PlaySoundFile(soundFile_or_soundFileID, channel)
end
--- [https://wowpedia.fandom.com/wiki/API_PlayVocalErrorSoundID?action=edit&redlink=1]
--- @return void
function PlayVocalErrorSoundID()
end
--- [https://wowpedia.fandom.com/wiki/API_PlayerCanTeleport?action=edit&redlink=1]
--- @return void
function PlayerCanTeleport()
end
--- [https://wowpedia.fandom.com/wiki/API_PlayerEffectiveAttackPower?action=edit&redlink=1]
--- @return void
function PlayerEffectiveAttackPower()
end
--- [https://wowpedia.fandom.com/wiki/API_PlayerHasHearthstone?action=edit&redlink=1]
--- @return void
function PlayerHasHearthstone()
end
--- Determines if player has a specific toy in their toybox
--- [https://wowpedia.fandom.com/wiki/API_PlayerHasToy]
--- @param itemId number @ itemId of a toy.
--- @return unknown @ hasToy
function PlayerHasToy(itemId)
end
--- [https://wowpedia.fandom.com/wiki/API_PlayerIsPVPInactive?action=edit&redlink=1]
--- @return void
function PlayerIsPVPInactive()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_PlayerVehicleHasComboPoints]
--- @return boolean @ vehicleHasComboPoints
function PlayerVehicleHasComboPoints()
end
--- /script PortGraveyard() returns the player to the graveyard, same as clicking the button while dead.
--- [https://wowpedia.fandom.com/wiki/API_PortGraveyard]
--- @return void
function PortGraveyard()
end
--- [https://wowpedia.fandom.com/wiki/API_PreloadMovie?action=edit&redlink=1]
--- @return void
function PreloadMovie()
end
--- [https://wowpedia.fandom.com/wiki/API_PrevView?action=edit&redlink=1]
--- @return void
function PrevView()
end
--- [https://wowpedia.fandom.com/wiki/API_ProcessExceptionClient?action=edit&redlink=1]
--- @return void
function ProcessExceptionClient()
end
--- [https://wowpedia.fandom.com/wiki/API_ProcessQuestLogRewardFactions?action=edit&redlink=1]
--- @return void
function ProcessQuestLogRewardFactions()
end
--- [https://wowpedia.fandom.com/wiki/API_PromoteToAssistant?action=edit&redlink=1]
--- @return void
function PromoteToAssistant()
end
--- Promotes a unit to party leader.
--- [https://wowpedia.fandom.com/wiki/API_PromoteToLeader]
--- @param unitId_or_playerName unknown
--- @return void
function PromoteToLeader(unitId_or_playerName)
end
--- [https://wowpedia.fandom.com/wiki/API_PurchaseSlot?action=edit&redlink=1]
--- @return void
function PurchaseSlot()
end
--- Places the item currently on the cursor into the player's backpack otherwise it has no effect. If there is already a partial stack of the item in the backpack, it will attempt to stack them together.
--- [https://wowpedia.fandom.com/wiki/API_PutItemInBackpack]
--- @return void
function PutItemInBackpack()
end
--- Puts the item on the cursor into the specified bag slot on the main bar, if it's a bag. Otherwise, attempts to place the item inside the bag in that slot. Note that to place an item in the backpack, you must use PutItemInBackpack.
--- [https://wowpedia.fandom.com/wiki/API_PutItemInBag]
--- @param slotId number @ Inventory slot id containing the bag in which you wish to put the item. Values 20 to 23 correspond to the player's bag slots, right-to-left from the first bag after the backpack.
--- @return void
function PutItemInBag(slotId)
end
--- [https://wowpedia.fandom.com/wiki/API_QueryGuildBankLog?action=edit&redlink=1]
--- @return void
function QueryGuildBankLog()
end
--- [https://wowpedia.fandom.com/wiki/API_QueryGuildBankTab?action=edit&redlink=1]
--- @return void
function QueryGuildBankTab()
end
--- [https://wowpedia.fandom.com/wiki/API_QueryGuildBankText?action=edit&redlink=1]
--- @return void
function QueryGuildBankText()
end
--- [https://wowpedia.fandom.com/wiki/API_QueryGuildEventLog?action=edit&redlink=1]
--- @return void
function QueryGuildEventLog()
end
--- [https://wowpedia.fandom.com/wiki/API_QueryGuildMembersForRecipe?action=edit&redlink=1]
--- @return void
function QueryGuildMembersForRecipe()
end
--- [https://wowpedia.fandom.com/wiki/API_QueryGuildNews?action=edit&redlink=1]
--- @return void
function QueryGuildNews()
end
--- [https://wowpedia.fandom.com/wiki/API_QueryGuildRecipes?action=edit&redlink=1]
--- @return void
function QueryGuildRecipes()
end
--- Throws an error when the choose reward method doesn't work.
--- [https://wowpedia.fandom.com/wiki/API_QuestChooseRewardError]
--- @return void
function QuestChooseRewardError()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestFlagsPVP?action=edit&redlink=1]
--- @return void
function QuestFlagsPVP()
end
--- Returns whether the last-offered quest was automatically accepted.
--- [https://wowpedia.fandom.com/wiki/API_QuestGetAutoAccept]
--- @return unknown @ isAutoAccepted
function QuestGetAutoAccept()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestGetAutoLaunched?action=edit&redlink=1]
--- @return void
function QuestGetAutoLaunched()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestHasPOIInfo?action=edit&redlink=1]
--- @return void
function QuestHasPOIInfo()
end
--- Returns whether the currently offered quest is a daily quest.
--- [https://wowpedia.fandom.com/wiki/API_QuestIsDaily]
--- @return number @ isDaily
function QuestIsDaily()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestIsFromAdventureMap?action=edit&redlink=1]
--- @return void
function QuestIsFromAdventureMap()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestIsFromAreaTrigger?action=edit&redlink=1]
--- @return void
function QuestIsFromAreaTrigger()
end
--- Returns whether the currently offered quest is a weekly quest.
--- [https://wowpedia.fandom.com/wiki/API_QuestIsWeekly]
--- @return number @ isWeekly
function QuestIsWeekly()
end
--- Initiates the sharing of the currently viewed quest in the quest log with other players.
--- [https://wowpedia.fandom.com/wiki/API_QuestLogPushQuest]
--- @return void
function QuestLogPushQuest()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestLogRewardHasTreasurePicker?action=edit&redlink=1]
--- @return void
function QuestLogRewardHasTreasurePicker()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestLogShouldShowPortrait?action=edit&redlink=1]
--- @return void
function QuestLogShouldShowPortrait()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestMapUpdateAllQuests?action=edit&redlink=1]
--- @return void
function QuestMapUpdateAllQuests()
end
--- Returns WorldMap POI icon information for the given quest.
--- [https://wowpedia.fandom.com/wiki/API_QuestPOIGetIconInfo]
--- @param questId number @ you can get this from the quest link or from GetQuestLogTitle(questLogIndex).
--- @return boolean, number, number, number @ completed, posX, posY, objective
function QuestPOIGetIconInfo(questId)
end
--- [https://wowpedia.fandom.com/wiki/API_QuestPOIGetSecondaryLocations?action=edit&redlink=1]
--- @return void
function QuestPOIGetSecondaryLocations()
end
--- [https://wowpedia.fandom.com/wiki/API_QuestPOIUpdateIcons?action=edit&redlink=1]
--- @return void
function QuestPOIUpdateIcons()
end
--- Quits the game.
--- [https://wowpedia.fandom.com/wiki/API_Quit]
--- @return void
function Quit()
end
--- [https://wowpedia.fandom.com/wiki/API_RaidProfileExists?action=edit&redlink=1]
--- @return void
function RaidProfileExists()
end
--- [https://wowpedia.fandom.com/wiki/API_RaidProfileHasUnsavedChanges?action=edit&redlink=1]
--- @return void
function RaidProfileHasUnsavedChanges()
end
--- Performs a random roll between two numbers.
--- [https://wowpedia.fandom.com/wiki/API_RandomRoll]
--- @param low number @ lowest number (default 1)
--- @param high number @ highest number (default 100)
--- @return void
function RandomRoll(low, high)
end
--- [https://wowpedia.fandom.com/wiki/API_ReagentBankButtonIDToInvSlotID?action=edit&redlink=1]
--- @return void
function ReagentBankButtonIDToInvSlotID()
end
--- [https://wowpedia.fandom.com/wiki/API_RedockChatWindows?action=edit&redlink=1]
--- @return void
function RedockChatWindows()
end
--- [https://wowpedia.fandom.com/wiki/API_RefreshLFGList?action=edit&redlink=1]
--- @return void
function RefreshLFGList()
end
--- [https://wowpedia.fandom.com/wiki/API_RegisterStaticConstants?action=edit&redlink=1]
--- @return void
function RegisterStaticConstants()
end
--- Rejects an Dungeon Finder group invitation and leaves the queue.
--- [https://wowpedia.fandom.com/wiki/API_RejectProposal]
--- @return void
function RejectProposal()
end
--- [https://wowpedia.fandom.com/wiki/API_RemoveAutoQuestPopUp?action=edit&redlink=1]
--- @return void
function RemoveAutoQuestPopUp()
end
--- Blocks further messages from a specified chat channel from appearing in a specific chat frame.
--- [https://wowpedia.fandom.com/wiki/API_RemoveChatWindowChannel]
--- @param windowId number @ index of the chat window/frame (ascending from 1) to remove the channel from.
--- @param channelName string @ name of the chat channel to remove from the frame.
--- @return void
function RemoveChatWindowChannel(windowId, channelName)
end
--- Stops the specified chat window from displaying a specified type of messages.
--- [https://wowpedia.fandom.com/wiki/API_RemoveChatWindowMessages]
--- @param index number @ chat window index, ascending from 1.
--- @param messageGroup string @ message type the chat window should no longer receive, e.g. EMOTE, SAY, RAID.
--- @return void
function RemoveChatWindowMessages(index, messageGroup)
end
--- Remove a Keystone from the selected artifact.
--- [https://wowpedia.fandom.com/wiki/API_RemoveItemFromArtifact]
--- @return boolean @ keystoneRemoved
function RemoveItemFromArtifact()
end
--- [https://wowpedia.fandom.com/wiki/API_RemovePvpTalent?action=edit&redlink=1]
--- @return void
function RemovePvpTalent()
end
--- [https://wowpedia.fandom.com/wiki/API_RemoveTalent?action=edit&redlink=1]
--- @return void
function RemoveTalent()
end
--- Un-marks an achievement for tracking in the WatchFrame.
--- [https://wowpedia.fandom.com/wiki/API_RemoveTrackedAchievement]
--- @param achievementId number @ ID of the achievement to add to tracking.
--- @return void
function RemoveTrackedAchievement(achievementId)
end
--- Renames the group being created by the current petition.
--- [https://wowpedia.fandom.com/wiki/API_RenamePetition]
--- @param name string @ The new name of the group being created by the petition
--- @return void
function RenamePetition(name)
end
--- [https://wowpedia.fandom.com/wiki/API_ReopenInteraction?action=edit&redlink=1]
--- @return void
function ReopenInteraction()
end
--- Repairs all equipped and inventory items.
--- [https://wowpedia.fandom.com/wiki/API_RepairAllItems]
--- @param guildBankRepair boolean @ If true, use guild funds to repair. If false or missing, use player funds.
--- @return void
function RepairAllItems(guildBankRepair)
end
--- Confirms the Replace Enchant dialog.
--- [https://wowpedia.fandom.com/wiki/API_ReplaceEnchant]
--- @return void
function ReplaceEnchant()
end
--- Impeaches the current Guild Master.
--- [https://wowpedia.fandom.com/wiki/API_ReplaceGuildMaster]
--- @return void
function ReplaceGuildMaster()
end
--- Confirms that an enchant applied to the trade frame should replace an existing enchant.
--- [https://wowpedia.fandom.com/wiki/API_ReplaceTradeEnchant]
--- @return void
function ReplaceTradeEnchant()
end
--- Releases your ghost to the graveyard.
--- [https://wowpedia.fandom.com/wiki/API_RepopMe]
--- @return void
function RepopMe()
end
--- [https://wowpedia.fandom.com/wiki/API_ReportBug?action=edit&redlink=1]
--- @return void
function ReportBug()
end
--- [https://wowpedia.fandom.com/wiki/API_ReportPlayerIsPVPAFK?action=edit&redlink=1]
--- @return void
function ReportPlayerIsPVPAFK()
end
--- [https://wowpedia.fandom.com/wiki/API_ReportSuggestion?action=edit&redlink=1]
--- @return void
function ReportSuggestion()
end
--- Queries the server for archeology data. RESEARCH_ARTIFACT_HISTORY_READY is fired when data is available.
--- [https://wowpedia.fandom.com/wiki/API_RequestArtifactCompletionHistory]
--- @return void
function RequestArtifactCompletionHistory()
end
--- Requests the lastest battlefield score data from the server.
--- [https://wowpedia.fandom.com/wiki/API_RequestBattlefieldScoreData]
--- @return void
function RequestBattlefieldScoreData()
end
--- Requests information about the available instances of a particular battleground.
--- [https://wowpedia.fandom.com/wiki/API_RequestBattlegroundInstanceInfo]
--- @param index number @ Index of the battleground type to request instance information for; valid indices start from 1 and go up to GetNumBattlegroundTypes().
--- @return void
function RequestBattlegroundInstanceInfo(index)
end
--- [https://wowpedia.fandom.com/wiki/API_RequestBottomLeftActionBar?action=edit&redlink=1]
--- @return void
function RequestBottomLeftActionBar()
end
--- Requests information about guild applicants received trough the Guild Finder.
--- [https://wowpedia.fandom.com/wiki/API_RequestGuildApplicantsList]
--- @return void
function RequestGuildApplicantsList()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestGuildChallengeInfo?action=edit&redlink=1]
--- @return void
function RequestGuildChallengeInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestGuildMembership?action=edit&redlink=1]
--- @return void
function RequestGuildMembership()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestGuildMembershipList?action=edit&redlink=1]
--- @return void
function RequestGuildMembershipList()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestGuildPartyState?action=edit&redlink=1]
--- @return void
function RequestGuildPartyState()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestGuildRecruitmentSettings?action=edit&redlink=1]
--- @return void
function RequestGuildRecruitmentSettings()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestGuildRewards?action=edit&redlink=1]
--- @return void
function RequestGuildRewards()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestLFDPartyLockInfo?action=edit&redlink=1]
--- @return void
function RequestLFDPartyLockInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestLFDPlayerLockInfo?action=edit&redlink=1]
--- @return void
function RequestLFDPlayerLockInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestPVPOptionsEnabled?action=edit&redlink=1]
--- @return void
function RequestPVPOptionsEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestPVPRewards?action=edit&redlink=1]
--- @return void
function RequestPVPRewards()
end
--- Sends a request to the server to send back information about the instance.
--- [https://wowpedia.fandom.com/wiki/API_RequestRaidInfo]
--- @return void
function RequestRaidInfo()
end
--- Requests information about battleground rewards.
--- [https://wowpedia.fandom.com/wiki/API_RequestRandomBattlegroundInstanceInfo]
--- @return void
function RequestRandomBattlegroundInstanceInfo()
end
--- Requests information about the player's rated PvP stats from the server.
--- [https://wowpedia.fandom.com/wiki/API_RequestRatedInfo]
--- @return void
function RequestRatedInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_RequestRecruitingGuildsList?action=edit&redlink=1]
--- @return void
function RequestRecruitingGuildsList()
end
--- Send a request to the server to get an update of the time played.
--- [https://wowpedia.fandom.com/wiki/API_RequestTimePlayed]
--- @return void
function RequestTimePlayed()
end
--- [https://wowpedia.fandom.com/wiki/API_RequeueSkirmish?action=edit&redlink=1]
--- @return void
function RequeueSkirmish()
end
--- [https://wowpedia.fandom.com/wiki/API_ResetAddOns?action=edit&redlink=1]
--- @return void
function ResetAddOns()
end
--- [https://wowpedia.fandom.com/wiki/API_ResetCPUUsage?action=edit&redlink=1]
--- @return void
function ResetCPUUsage()
end
--- [https://wowpedia.fandom.com/wiki/API_ResetChatColors?action=edit&redlink=1]
--- @return void
function ResetChatColors()
end
--- [https://wowpedia.fandom.com/wiki/API_ResetChatWindows?action=edit&redlink=1]
--- @return void
function ResetChatWindows()
end
--- Resets mouse cursor.
--- [https://wowpedia.fandom.com/wiki/API_ResetCursor]
--- @return void
function ResetCursor()
end
--- [https://wowpedia.fandom.com/wiki/API_ResetDisabledAddOns?action=edit&redlink=1]
--- @return void
function ResetDisabledAddOns()
end
--- Resets all instances the currently playing character is associated with.
--- [https://wowpedia.fandom.com/wiki/API_ResetInstances]
--- @return void
function ResetInstances()
end
--- [https://wowpedia.fandom.com/wiki/API_ResetSetMerchantFilter?action=edit&redlink=1]
--- @return void
function ResetSetMerchantFilter()
end
--- Starts with the first tutorial again
--- [https://wowpedia.fandom.com/wiki/API_ResetTutorials]
--- @return void
function ResetTutorials()
end
--- [https://wowpedia.fandom.com/wiki/API_ResetView?action=edit&redlink=1]
--- @return void
function ResetView()
end
--- [https://wowpedia.fandom.com/wiki/API_ResistancePercent?action=edit&redlink=1]
--- @return void
function ResistancePercent()
end
--- [https://wowpedia.fandom.com/wiki/API_RespondInstanceLock?action=edit&redlink=1]
--- @return void
function RespondInstanceLock()
end
--- [https://wowpedia.fandom.com/wiki/API_RespondMailLockSendItem?action=edit&redlink=1]
--- @return void
function RespondMailLockSendItem()
end
--- [https://wowpedia.fandom.com/wiki/API_RespondToInviteConfirmation?action=edit&redlink=1]
--- @return void
function RespondToInviteConfirmation()
end
--- Requests the graphics engine to restart.
--- [https://wowpedia.fandom.com/wiki/API_RestartGx]
--- @return void
function RestartGx()
end
--- [https://wowpedia.fandom.com/wiki/API_RestoreRaidProfileFromCopy?action=edit&redlink=1]
--- @return void
function RestoreRaidProfileFromCopy()
end
--- [https://wowpedia.fandom.com/wiki/API_ResurrectGetOfferer?action=edit&redlink=1]
--- @return void
function ResurrectGetOfferer()
end
--- [https://wowpedia.fandom.com/wiki/API_ResurrectHasSickness?action=edit&redlink=1]
--- @return void
function ResurrectHasSickness()
end
--- [https://wowpedia.fandom.com/wiki/API_ResurrectHasTimer?action=edit&redlink=1]
--- @return void
function ResurrectHasTimer()
end
--- Resurrects when the player is standing near its corpse.
--- [https://wowpedia.fandom.com/wiki/API_RetrieveCorpse]
--- @return void
function RetrieveCorpse()
end
--- [https://wowpedia.fandom.com/wiki/API_ReturnInboxItem?action=edit&redlink=1]
--- @return void
function ReturnInboxItem()
end
--- Roll on the Loot roll identified by rollID; rollType is nil when passing, otherwise it uses 1 to roll on loot.
--- [https://wowpedia.fandom.com/wiki/API_RollOnLoot]
--- @param rollID number @ The number increases with every roll you have in a party. Maximum value is unknown.
--- @param rollType number @ nil - 0 or nil to pass, 1 to roll Need, 2 to roll Greed, or 3 to roll Disenchant.
--- @return void
function RollOnLoot(rollID, rollType)
end
--- Executes a key binding as if a key was pressed.
--- [https://wowpedia.fandom.com/wiki/API_RunBinding]
--- @param command string @ Name of the key binding to be executed
--- @param up string @ Optional, if up, the binding is run as if the key was released.
--- @return void
function RunBinding(command, up)
end
--- Execute a macro from the macro frame.
--- [https://wowpedia.fandom.com/wiki/API_RunMacro]
--- @param macroID_or_macroName unknown
--- @return void
function RunMacro(macroID_or_macroName)
end
--- Execute a string as if it was a macro.
--- [https://wowpedia.fandom.com/wiki/API_RunMacroText]
--- @param macro string @ the string is interpreted as a macro and then executed
--- @return void
function RunMacroText(macro)
end
--- Execute a string as LUA code.
--- [https://wowpedia.fandom.com/wiki/API_RunScript]
--- @param script string @ The code which is to be executed.
--- @return void
function RunScript(script)
end
--- [https://wowpedia.fandom.com/wiki/API_SaveAddOns?action=edit&redlink=1]
--- @return void
function SaveAddOns()
end
--- Writes the current in-memory key bindings to disk.
--- [https://wowpedia.fandom.com/wiki/API_SaveBindings]
--- @param which number @ This value indicates whether the current key bindings set should be saved as account or character specific. One of following constants should be used:
--- @return void
function SaveBindings(which)
end
--- [https://wowpedia.fandom.com/wiki/API_SaveRaidProfileCopy?action=edit&redlink=1]
--- @return void
function SaveRaidProfileCopy()
end
--- Saves a camera angle for later retrieval with SetView. The last position loaded is stored in the CVar cameraView.
--- [https://wowpedia.fandom.com/wiki/API_SaveView]
--- @param viewIndex number @ The index (2-5) to save the camera angle to. (1 is reserved for first person view)
--- @return void
function SaveView(viewIndex)
end
--- This function will take a screenshot.
--- [https://wowpedia.fandom.com/wiki/API_Screenshot]
--- @return void
function Screenshot()
end
--- [https://wowpedia.fandom.com/wiki/API_ScriptsDisallowedForBeta?action=edit&redlink=1]
--- @return void
function ScriptsDisallowedForBeta()
end
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGGetEncounterResults?action=edit&redlink=1]
--- @return void
function SearchLFGGetEncounterResults()
end
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGGetJoinedID?action=edit&redlink=1]
--- @return void
function SearchLFGGetJoinedID()
end
--- Returns how many players listed in raid browser for selected LFG id.
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGGetNumResults]
--- @return number, number @ numResults, totalResults
function SearchLFGGetNumResults()
end
--- Returns information about the party player listed in raid browser.
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGGetPartyResults]
--- @param index number @ Index of the player to query, ascending from 1 to totalResults return value from SearchLFGGetNumResults.
--- @param partyIndex number @ Index of the party player to query, ascending from 1 to partyMembers return value from SearchLFGGetResults.
--- @return string, number, unknown, unknown, string, string, unknown, unknown, unknown, unknown, number, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, number, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ name, level, relationship, className, areaName, comment, isLeader, isTank, isHealer, isDamage, bossKills, specID, isGroupLeader, armor, spellDamage, plusHealing, CritMelee, CritRanged, critSpell, mp5, mp5Combat, attackPower, agility, maxHealth, maxMana, gearRating, avgILevel, defenseRating, dodgeRating, BlockRating, ParryRating, HasteRating, expertise
function SearchLFGGetPartyResults(index, partyIndex)
end
--- Returns information about the player listed in raid browser.
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGGetResults]
--- @param index number @ Index of the player to query, ascending from 1 to totalResults return value from SearchLFGGetNumResults.
--- @return string, number, string, string, string, number, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, number, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, number, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ name, level, areaName, className, comment, partyMembers, status, class, encountersTotal, encountersComplete, isIneligible, isLeader, isTank, isHealer, isDamage, bossKills, specID, isGroupLeader, armor, spellDamage, plusHealing, CritMelee, CritRanged, critSpell, mp5, mp5Combat, attackPower, agility, maxHealth, maxMana, gearRating, avgILevel, defenseRating, dodgeRating, BlockRating, ParryRating, HasteRating, expertise
function SearchLFGGetResults(index)
end
--- Allows a player to join Raid Browser list..
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGJoin]
--- @param typeID number @ LFG typeid
--- @param lfgID number @ ID of LFG dungeon
--- @return void
function SearchLFGJoin(typeID, lfgID)
end
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGLeave?action=edit&redlink=1]
--- @return void
function SearchLFGLeave()
end
--- [https://wowpedia.fandom.com/wiki/API_SearchLFGSort?action=edit&redlink=1]
--- @return void
function SearchLFGSort()
end
--- Evaluates macro options in the string and returns the appropriate sub-string or nil
--- [https://wowpedia.fandom.com/wiki/API_SecureCmdOptionParse]
--- @param options string @ a secure command options string to be parsed, e.g. [mod:alt] ALT is held down; [mod:ctrl] CTRL is held down, but ALT is not; neither ALT nor CTRL is held down.
--- @return string, string @ result, target
function SecureCmdOptionParse(options)
end
--- [https://wowpedia.fandom.com/wiki/API_SelectActiveQuest?action=edit&redlink=1]
--- @return void
function SelectActiveQuest()
end
--- [https://wowpedia.fandom.com/wiki/API_SelectAvailableQuest?action=edit&redlink=1]
--- @return void
function SelectAvailableQuest()
end
--- Notifies the server that a trainer service has been selected.
--- [https://wowpedia.fandom.com/wiki/API_SelectTrainerService]
--- @param index number @ Index of the trainer service being selected. Note that indices are affected by the trainer filter. (See GetTrainerServiceTypeFilter and SetTrainerServiceTypeFilter.)
--- @return void
function SelectTrainerService(index)
end
--- Returns the realm name that will be used in Recruit-a-Friend invitations.
--- [https://wowpedia.fandom.com/wiki/API_SelectedRealmName]
--- @return string @ realmName
function SelectedRealmName()
end
--- [https://wowpedia.fandom.com/wiki/API_SellCursorItem?action=edit&redlink=1]
--- @return void
function SellCursorItem()
end
--- Sends a chat message.
--- [https://wowpedia.fandom.com/wiki/API_SendChatMessage]
--- @param msg string @ The message to be sent. Large messages are truncated to max 255 characters, and only valid chat message characters are permitted.
--- @param chatType string @ ? - The type of message to be sent, e.g. PARTY. If omitted, this defaults to SAY
--- @param languageID number @ ? - The languageID used for the message. If omitted the default language will be used: Orcish for the Horde and Common for the Alliance, as returned by GetDefaultLanguage()
--- @param target string @ |number? - The player name or channel number receiving the message for WHISPER or CHANNEL chatTypes.
--- @return void
function SendChatMessage(msg, chatType, languageID, target)
end
--- Sends in-game mail, if your mailbox is open.
--- [https://wowpedia.fandom.com/wiki/API_SendMail]
--- @param recipient string @ intended recipient of the mail
--- @param subject string @ subject of the mail, that cannot be empty or nil (but may be whitespace)
--- @param body string @ ?Optional. Could be nil. - body of the mail
--- @return void
function SendMail(recipient, subject, body)
end
--- Selects a quest option to pursue.
--- [https://wowpedia.fandom.com/wiki/API_SendPlayerChoiceResponse]
--- @param responseID number @ Response ID of the option the player wishes to pursue, as returned by C_QuestChoice.GetQuestChoiceOptionInfo()
--- @return void
function SendPlayerChoiceResponse(responseID)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_SendSubscriptionInterstitialResponse]
--- @param response unknown @ Enum.SubscriptionInterstitialResponseType
--- @return void
function SendSubscriptionInterstitialResponse(response)
end
--- Sends a system message to the system message box (mostly written in yellow color)
--- [https://wowpedia.fandom.com/wiki/API_SendSystemMessage]
--- @param msg string @ The message to be sent
--- @return void
function SendSystemMessage(msg)
end
--- Sets the unit to be compared to.
--- [https://wowpedia.fandom.com/wiki/API_SetAchievementComparisonUnit]
--- @return void
function SetAchievementComparisonUnit()
end
--- Starts a search for achievements containing the specified text.
--- [https://wowpedia.fandom.com/wiki/API_SetAchievementSearchString]
--- @param searchText string @ Text to search for in the achievements.
--- @return boolean @ searchFinished
function SetAchievementSearchString(searchText)
end
--- Set the desired state of the extra action bars.
--- [https://wowpedia.fandom.com/wiki/API_SetActionBarToggles]
--- @param bottomLeftState number @ if the left-hand bottom action bar is to be shown, 0 or nil otherwise.
--- @param bottomRightState number @ if the right-hand bottom action bar is to be shown, 0 or nil otherwise.
--- @param sideRightState number @ if the first (outer) right side action bar is to be shown, 0 or nil otherwise.
--- @param sideRight2State number @ if the second (inner) right side action bar is to be shown, 0 or nil otherwise.
--- @param alwaysShow number @ if the bars are always shown, 0 or nil otherwise.
--- @return void
function SetActionBarToggles(bottomLeftState, bottomRightState, sideRightState, sideRight2State, alwaysShow)
end
--- [https://wowpedia.fandom.com/wiki/API_SetActionUIButton?action=edit&redlink=1]
--- @return void
function SetActionUIButton()
end
--- [https://wowpedia.fandom.com/wiki/API_SetAddonVersionCheck?action=edit&redlink=1]
--- @return void
function SetAddonVersionCheck()
end
--- [https://wowpedia.fandom.com/wiki/API_SetAllowDangerousScripts?action=edit&redlink=1]
--- @return void
function SetAllowDangerousScripts()
end
--- [https://wowpedia.fandom.com/wiki/API_SetAllowLowLevelRaid?action=edit&redlink=1]
--- @return void
function SetAllowLowLevelRaid()
end
--- Sets whether guild invitations should be automatically declined.
--- [https://wowpedia.fandom.com/wiki/API_SetAutoDeclineGuildInvites]
--- @param decline string @ Number - 1 or 1 if guild invitations should be automatically declined, or 0 or 0 if invitations should be shown to the user.
--- @return void
function SetAutoDeclineGuildInvites(decline)
end
--- [https://wowpedia.fandom.com/wiki/API_SetBackpackAutosortDisabled?action=edit&redlink=1]
--- @return void
function SetBackpackAutosortDisabled()
end
--- [https://wowpedia.fandom.com/wiki/API_SetBagPortraitTexture?action=edit&redlink=1]
--- @return void
function SetBagPortraitTexture()
end
--- [https://wowpedia.fandom.com/wiki/API_SetBagSlotFlag?action=edit&redlink=1]
--- @return void
function SetBagSlotFlag()
end
--- [https://wowpedia.fandom.com/wiki/API_SetBankAutosortDisabled?action=edit&redlink=1]
--- @return void
function SetBankAutosortDisabled()
end
--- [https://wowpedia.fandom.com/wiki/API_SetBankBagSlotFlag?action=edit&redlink=1]
--- @return void
function SetBankBagSlotFlag()
end
--- [https://wowpedia.fandom.com/wiki/API_SetBarSlotFromIntro?action=edit&redlink=1]
--- @return void
function SetBarSlotFromIntro()
end
--- [https://wowpedia.fandom.com/wiki/API_SetBarberShopAlternateFormFrame?action=edit&redlink=1]
--- @return void
function SetBarberShopAlternateFormFrame()
end
--- Set the faction to show on the battlefield scoreboard
--- [https://wowpedia.fandom.com/wiki/API_SetBattlefieldScoreFaction]
--- @param faction number @ nil = All, 0 = Horde, 1 = Alliance
--- @return void
function SetBattlefieldScoreFaction(faction)
end
--- Alters the action performed by a binding.
--- [https://wowpedia.fandom.com/wiki/API_SetBinding]
--- @param key string @ Any binding string accepted by World of Warcraft. For example: ALT-CTRL-F, SHIFT-T, W, BUTTON4.
--- @param command string @ nil - Any name attribute value of a Bindings.xml-defined binding, or an action command string, or nil to unbind all bindings from key. For example:
--- @param mode number @ if the binding should be saved to the currently loaded binding set (default), or 2 if to the alternative.
--- @return number @ ok
function SetBinding(key, command, mode)
end
--- Sets a binding to click the specified button widget.
--- [https://wowpedia.fandom.com/wiki/API_SetBindingClick]
--- @param key string @ Any binding string accepted by World of Warcraft. For example: ALT-CTRL-F, SHIFT-T, W, BUTTON4.
--- @param buttonName string @ Name of the button you wish to click.
--- @param button string @ Value of the button argument you wish to pass to the OnClick handler with the click; LeftButton by default.
--- @return number @ ok
function SetBindingClick(key, buttonName, button)
end
--- Sets a binding to use a specified item.
--- [https://wowpedia.fandom.com/wiki/API_SetBindingItem]
--- @param key string @ Any binding string accepted by World of Warcraft. For example: ALT-CTRL-F, SHIFT-T, W, BUTTON4.
--- @param item string @ Item name (or item string) you want the binding to use. For example: Hearthstone, item:6948
--- @return number @ ok
function SetBindingItem(key, item)
end
--- Sets a binding to click the specified button object.
--- [https://wowpedia.fandom.com/wiki/API_SetBindingMacro]
--- @param key string @ Any binding string accepted by World of Warcraft. For example: ALT-CTRL-F, SHIFT-T, W, BUTTON4.
--- @param macroName_or_macroId unknown
--- @return number @ ok
function SetBindingMacro(key, macroName_or_macroId)
end
--- Sets a binding to cast the specified spell.
--- [https://wowpedia.fandom.com/wiki/API_SetBindingSpell]
--- @param key string @ Any binding string accepted by World of Warcraft. For example: ALT-CTRL-F, SHIFT-T, W, BUTTON4.
--- @param spell string @ Name of the spell you wish to cast when the binding is pressed.
--- @return number @ ok
function SetBindingSpell(key, spell)
end
--- [https://wowpedia.fandom.com/wiki/API_SetCemeteryPreference?action=edit&redlink=1]
--- @return void
function SetCemeteryPreference()
end
--- Sets the channel owner.
--- [https://wowpedia.fandom.com/wiki/API_SetChannelOwner]
--- @param channel unknown @ channel name to be changed
--- @param newowner unknown @ the new owner of the channel
--- @return void
function SetChannelOwner(channel, newowner)
end
--- Changes the password of the current channel.
--- [https://wowpedia.fandom.com/wiki/API_SetChannelPassword]
--- @param channelName string @ The name of the channel.
--- @param password any @ The password to assign to the channel.
--- @return void
function SetChannelPassword(channelName, password)
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatColorNameByClass?action=edit&redlink=1]
--- @return void
function SetChatColorNameByClass()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowAlpha?action=edit&redlink=1]
--- @return void
function SetChatWindowAlpha()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowColor?action=edit&redlink=1]
--- @return void
function SetChatWindowColor()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowDocked?action=edit&redlink=1]
--- @return void
function SetChatWindowDocked()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowLocked?action=edit&redlink=1]
--- @return void
function SetChatWindowLocked()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowName?action=edit&redlink=1]
--- @return void
function SetChatWindowName()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowSavedDimensions?action=edit&redlink=1]
--- @return void
function SetChatWindowSavedDimensions()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowSavedPosition?action=edit&redlink=1]
--- @return void
function SetChatWindowSavedPosition()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowShown?action=edit&redlink=1]
--- @return void
function SetChatWindowShown()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowSize?action=edit&redlink=1]
--- @return void
function SetChatWindowSize()
end
--- [https://wowpedia.fandom.com/wiki/API_SetChatWindowUninteractable?action=edit&redlink=1]
--- @return void
function SetChatWindowUninteractable()
end
--- Sets the key used to open the console overlay for the current session.
--- [https://wowpedia.fandom.com/wiki/API_SetConsoleKey]
--- @param key string @ The character to bind to opening the console overlay, or nil to disable the console binding.
--- @return void
function SetConsoleKey(key)
end
--- [https://wowpedia.fandom.com/wiki/API_SetCurrentGraphicsSetting?action=edit&redlink=1]
--- @return void
function SetCurrentGraphicsSetting()
end
--- [https://wowpedia.fandom.com/wiki/API_SetCurrentGuildBankTab?action=edit&redlink=1]
--- @return void
function SetCurrentGuildBankTab()
end
--- Changes your character's displayed title.
--- [https://wowpedia.fandom.com/wiki/API_SetCurrentTitle]
--- @param titleId number @ ID of the title you want to set. The identifiers are global and therefore do not depend on which titles you have learned. Invalid or unlearned values clear your title. See TitleId for a list.
--- @return void
function SetCurrentTitle(titleId)
end
--- Changes the current cursor graphic.
--- [https://wowpedia.fandom.com/wiki/API_SetCursor]
--- @param cursor string @ cursor to switch to; either a built-in cursor identifier (like ATTACK_CURSOR), path to a cursor texture (e.g. Interface/Cursor/Taxi), or nil to reset to a default cursor.
--- @return number @ changed
function SetCursor(cursor)
end
--- [https://wowpedia.fandom.com/wiki/API_SetCursorVirtualItem?action=edit&redlink=1]
--- @return void
function SetCursorVirtualItem()
end
--- [https://wowpedia.fandom.com/wiki/API_SetDefaultVideoOptions?action=edit&redlink=1]
--- @return void
function SetDefaultVideoOptions()
end
--- Changes the player's current dungeon difficulty.
--- [https://wowpedia.fandom.com/wiki/API_SetDungeonDifficultyID]
--- @param difficultyIndex number @ 1 → 5 Player
--- @return void
function SetDungeonDifficultyID(difficultyIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_SetEuropeanNumbers?action=edit&redlink=1]
--- @return void
function SetEuropeanNumbers()
end
--- [https://wowpedia.fandom.com/wiki/API_SetEveryoneIsAssistant?action=edit&redlink=1]
--- @return void
function SetEveryoneIsAssistant()
end
--- Clears the inactive flag on the specified faction.
--- [https://wowpedia.fandom.com/wiki/API_SetFactionActive]
--- @param index number @ The index of the faction to mark active, ascending from 1.
--- @return void
function SetFactionActive(index)
end
--- Flags the specified faction as inactive.
--- [https://wowpedia.fandom.com/wiki/API_SetFactionInactive]
--- @param index number @ The index of the faction to mark inactive, ascending from 1.
--- @return void
function SetFactionInactive(index)
end
--- [https://wowpedia.fandom.com/wiki/API_SetFocusedAchievement?action=edit&redlink=1]
--- @return void
function SetFocusedAchievement()
end
--- [https://wowpedia.fandom.com/wiki/API_SetGamePadCursorControl?action=edit&redlink=1]
--- @return void
function SetGamePadCursorControl()
end
--- [https://wowpedia.fandom.com/wiki/API_SetGamePadFreeLook?action=edit&redlink=1]
--- @return void
function SetGamePadFreeLook()
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildApplicantSelection?action=edit&redlink=1]
--- @return void
function SetGuildApplicantSelection()
end
--- Sets a guild bank tab's name and icon.
--- [https://wowpedia.fandom.com/wiki/API_SetGuildBankTabInfo]
--- @param tab number @ Bank Tab to edit.
--- @param name string @ New tab name.
--- @param icon number @ FileID of the new icon texture.
--- @return void
function SetGuildBankTabInfo(tab, name, icon)
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildBankTabItemWithdraw?action=edit&redlink=1]
--- @return void
function SetGuildBankTabItemWithdraw()
end
--- Edits permissions for a bank tab.
--- [https://wowpedia.fandom.com/wiki/API_SetGuildBankTabPermissions]
--- @param tab number @ Bank Tab to edit.
--- @param index number @ Index of Permission to edit.
--- @param enabled boolean @ true or false to Enable or Disable permission.
--- @return void
function SetGuildBankTabPermissions(tab, index, enabled)
end
--- Modifies info text for a tab.
--- [https://wowpedia.fandom.com/wiki/API_SetGuildBankText]
--- @param tab number @ Bank Tab to edit.
--- @param infoText string @ Text to set, at most 2047 characters
--- @return void
function SetGuildBankText(tab, infoText)
end
--- Sets the gold withdrawl limit for the current. Current rank is set using GuildControlSetRank().
--- [https://wowpedia.fandom.com/wiki/API_SetGuildBankWithdrawGoldLimit]
--- @param amount number @ the amount of gold to withdraw per day
--- @return void
function SetGuildBankWithdrawGoldLimit(amount)
end
--- Changes the Guild Info to selected text.
--- [https://wowpedia.fandom.com/wiki/API_SetGuildInfoText]
--- @param text unknown
--- @return void
function SetGuildInfoText(text)
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildMemberRank?action=edit&redlink=1]
--- @return void
function SetGuildMemberRank()
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildNewsFilter?action=edit&redlink=1]
--- @return void
function SetGuildNewsFilter()
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildRecruitmentComment?action=edit&redlink=1]
--- @return void
function SetGuildRecruitmentComment()
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildRecruitmentSettings?action=edit&redlink=1]
--- @return void
function SetGuildRecruitmentSettings()
end
--- Sets the the current selected guild member in the guild roster according the active sorting.
--- [https://wowpedia.fandom.com/wiki/API_SetGuildRosterSelection]
--- @param index unknown
--- @return void
function SetGuildRosterSelection(index)
end
--- Shows offline guild members in subsequent calls to the guild roster API.
--- [https://wowpedia.fandom.com/wiki/API_SetGuildRosterShowOffline]
--- @param enabled boolean @ True includes all guild members; false filters out offline guild members.
--- @return void
function SetGuildRosterShowOffline(enabled)
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildTradeSkillCategoryFilter?action=edit&redlink=1]
--- @return void
function SetGuildTradeSkillCategoryFilter()
end
--- [https://wowpedia.fandom.com/wiki/API_SetGuildTradeSkillItemNameFilter?action=edit&redlink=1]
--- @return void
function SetGuildTradeSkillItemNameFilter()
end
--- [https://wowpedia.fandom.com/wiki/API_SetInWorldUIVisibility?action=edit&redlink=1]
--- @return void
function SetInWorldUIVisibility()
end
--- [https://wowpedia.fandom.com/wiki/API_SetInsertItemsLeftToRight?action=edit&redlink=1]
--- @return void
function SetInsertItemsLeftToRight()
end
--- [https://wowpedia.fandom.com/wiki/API_SetInventoryPortraitTexture?action=edit&redlink=1]
--- @return void
function SetInventoryPortraitTexture()
end
--- [https://wowpedia.fandom.com/wiki/API_SetItemSearch?action=edit&redlink=1]
--- @return void
function SetItemSearch()
end
--- [https://wowpedia.fandom.com/wiki/API_SetItemUpgradeFromCursorItem?action=edit&redlink=1]
--- @return void
function SetItemUpgradeFromCursorItem()
end
--- [https://wowpedia.fandom.com/wiki/API_SetLFGBootVote?action=edit&redlink=1]
--- @return void
function SetLFGBootVote()
end
--- Sets your comment in the LFG interface.
--- [https://wowpedia.fandom.com/wiki/API_SetLFGComment]
--- @param comment unknown
--- @return void
function SetLFGComment(comment)
end
--- [https://wowpedia.fandom.com/wiki/API_SetLFGDungeon?action=edit&redlink=1]
--- @return void
function SetLFGDungeon()
end
--- [https://wowpedia.fandom.com/wiki/API_SetLFGDungeonEnabled?action=edit&redlink=1]
--- @return void
function SetLFGDungeonEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_SetLFGHeaderCollapsed?action=edit&redlink=1]
--- @return void
function SetLFGHeaderCollapsed()
end
--- [https://wowpedia.fandom.com/wiki/API_SetLFGRoles?action=edit&redlink=1]
--- @return void
function SetLFGRoles()
end
--- [https://wowpedia.fandom.com/wiki/API_SetLegacyRaidDifficultyID?action=edit&redlink=1]
--- @return void
function SetLegacyRaidDifficultyID()
end
--- [https://wowpedia.fandom.com/wiki/API_SetLookingForGuildComment?action=edit&redlink=1]
--- @return void
function SetLookingForGuildComment()
end
--- [https://wowpedia.fandom.com/wiki/API_SetLookingForGuildSettings?action=edit&redlink=1]
--- @return void
function SetLookingForGuildSettings()
end
--- method may be any one of the following self-explanatory and case insensitive arguments: group, freeforall, master, needbeforegreed, roundrobin.
--- [https://wowpedia.fandom.com/wiki/API_SetLootMethod]
--- @param method unknown
--- @param masterPlayer_or_threshold unknown
--- @return void
function SetLootMethod(method, masterPlayer_or_threshold)
end
--- [https://wowpedia.fandom.com/wiki/API_SetLootPortrait?action=edit&redlink=1]
--- @return void
function SetLootPortrait()
end
--- Sets the player's loot specialization.
--- [https://wowpedia.fandom.com/wiki/API_SetLootSpecialization]
--- @param specID number @ specialization ID of the specialization to receive loot for, regardless of current specialization; or 0 to receive loot for the current specialization.
--- @return void
function SetLootSpecialization(specID)
end
--- Sets the loot quality threshold as a number for the party or raid.
--- [https://wowpedia.fandom.com/wiki/API_SetLootThreshold]
--- @param threshold number @ The loot quality to start using the current loot method with.
--- @return void
function SetLootThreshold(threshold)
end
--- [https://wowpedia.fandom.com/wiki/API_SetMacroItem?action=edit&redlink=1]
--- @return void
function SetMacroItem()
end
--- Changes the spell used for dynamic feedback for a macro.
--- [https://wowpedia.fandom.com/wiki/API_SetMacroSpell]
--- @param index number @ Index of the macro, using the values 1-36 for the first page and 37-54 for the second.
--- @param spell string @ Localized name of a spell to assign.
--- @param target string @ UnitId to assign (for range indication).
--- @return void
function SetMacroSpell(index, spell, target)
end
--- [https://wowpedia.fandom.com/wiki/API_SetMerchantFilter?action=edit&redlink=1]
--- @return void
function SetMerchantFilter()
end
--- Assigns the given modifier key to the given action.
--- [https://wowpedia.fandom.com/wiki/API_SetModifiedClick]
--- @param action string @ The action to set a key for. Actions defined by Blizzard:
--- @param key string @ The key to assign. Must be one of:
--- @return void
function SetModifiedClick(action, key)
end
--- [https://wowpedia.fandom.com/wiki/API_SetMouselookOverrideBinding?action=edit&redlink=1]
--- @return void
function SetMouselookOverrideBinding()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_SetMoveEnabled]
--- @return void
function SetMoveEnabled()
end
--- Sets the totem spell for a specific totem bar slot.
--- [https://wowpedia.fandom.com/wiki/API_SetMultiCastSpell]
--- @param actionID number @ The totem bar slot number.
--- @param spellID number @ The global spell number, found on Wowhead or through COMBAT_LOG_EVENT.
--- @return void
function SetMultiCastSpell(actionID, spellID)
end
--- Alters style selection in a particular customization category.
--- [https://wowpedia.fandom.com/wiki/API_SetNextBarberShopStyle]
--- @param catId number @ Ascending index of the customization category that should be changed to the next/previous style.
--- @param reverse number @ if the selection should be changed to the previous style, nil if to the next.
--- @return void
function SetNextBarberShopStyle(catId, reverse)
end
--- Controls whether the player is automatically passing on all loot.
--- [https://wowpedia.fandom.com/wiki/API_SetOptOutOfLoot]
--- @param optOut number @ to make the player pass on all loot, nil otherwise.
--- @return void
function SetOptOutOfLoot(optOut)
end
--- Alters an override binding.
--- [https://wowpedia.fandom.com/wiki/API_SetOverrideBinding]
--- @param owner Frame @ The frame this binding belongs to; this can later be used to clear all override bindings belonging to a particular frame.
--- @param isPriority boolean @ true if this is a priority binding, false otherwise. Both types of override bindings take precedence over normal bindings.
--- @param key string @ Binding to bind the command to. For example, Q, ALT-Q, ALT-CTRL-SHIFT-Q, BUTTON5
--- @param command string @ nil - Any name attribute value of a Bindings.xml-defined binding, or an action command string; nil to remove an override binding. For example:
--- @return void
function SetOverrideBinding(owner, isPriority, key, command)
end
--- Creates an override binding that performs a button click.
--- [https://wowpedia.fandom.com/wiki/API_SetOverrideBindingClick]
--- @param owner Frame @ The frame this binding belongs to; this can later be used to clear all override bindings belonging to a particular frame.
--- @param isPriority boolean @ true if this is a priority binding, false otherwise. Both types of override bindings take precedence over normal bindings.
--- @param key string @ Binding to bind the command to. For example, Q, ALT-Q, ALT-CTRL-SHIFT-Q, BUTTON5
--- @param buttonName string @ Name of the button widget this binding should fire a click event for.
--- @param mouseClick string @ Mouse button name argument passed to the OnClick handlers.
--- @return void
function SetOverrideBindingClick(owner, isPriority, key, buttonName, mouseClick)
end
--- Creates an override binding that uses an item when triggered.
--- [https://wowpedia.fandom.com/wiki/API_SetOverrideBindingItem]
--- @param owner Frame @ The frame this binding belongs to; this can later be used to clear all override bindings belonging to a particular frame.
--- @param isPriority boolean @ true if this is a priority binding, false otherwise. Both types of override bindings take precedence over normal bindings.
--- @param key string @ Binding to bind the command to. For example, Q, ALT-Q, ALT-CTRL-SHIFT-Q, BUTTON5
--- @param item string @ Name or item link of the item to use when binding is triggered.
--- @return void
function SetOverrideBindingItem(owner, isPriority, key, item)
end
--- Creates an override binding that runs a macro.
--- [https://wowpedia.fandom.com/wiki/API_SetOverrideBindingMacro]
--- @param owner Frame @ The frame this binding belongs to; this can later be used to clear all override bindings belonging to a particular frame.
--- @param isPriority boolean @ true if this is a priority binding, false otherwise. Both types of override bindings take precedence over normal bindings.
--- @param key string @ Binding to bind the command to. For example, Q, ALT-Q, ALT-CTRL-SHIFT-Q, BUTTON5
--- @param macro string @ Name or index of the macro to run.
--- @return void
function SetOverrideBindingMacro(owner, isPriority, key, macro)
end
--- Creates an override binding that casts a spell
--- [https://wowpedia.fandom.com/wiki/API_SetOverrideBindingSpell]
--- @param owner Frame @ The frame this binding belongs to; this can later be used to clear all override bindings belonging to a particular frame.
--- @param isPriority boolean @ true if this is a priority binding, false otherwise. Both types of override bindings take precedence over normal bindings.
--- @param key string @ Binding to bind the command to. For example, Q, ALT-Q, ALT-CTRL-SHIFT-Q, BUTTON5
--- @param spell string @ Name of the spell you want to cast when this binding is triggered.
--- @return void
function SetOverrideBindingSpell(owner, isPriority, key, spell)
end
--- [https://wowpedia.fandom.com/wiki/API_SetPOIIconOverlapDistance?action=edit&redlink=1]
--- @return void
function SetPOIIconOverlapDistance()
end
--- [https://wowpedia.fandom.com/wiki/API_SetPOIIconOverlapPushDistance?action=edit&redlink=1]
--- @return void
function SetPOIIconOverlapPushDistance()
end
--- Permaflags the player for PvP combat.
--- [https://wowpedia.fandom.com/wiki/API_SetPVP]
--- @param flag number @ to enable, nil to disable.
--- @return void
function SetPVP(flag)
end
--- Sets which roles the player is willing to perform in PvP battlegrounds.
--- [https://wowpedia.fandom.com/wiki/API_SetPVPRoles]
--- @param tank boolean @ true if the player is willing to tank, false otherwise.
--- @param healer boolean @ true if the player is willing to heal, false otherwise.
--- @param dps boolean @ true if the player is willing to deal damage, false otherwise.
--- @return void
function SetPVPRoles(tank, healer, dps)
end
--- [https://wowpedia.fandom.com/wiki/API_SetPartyAssignment?action=edit&redlink=1]
--- @return void
function SetPartyAssignment()
end
--- [https://wowpedia.fandom.com/wiki/API_SetPetSlot?action=edit&redlink=1]
--- @return void
function SetPetSlot()
end
--- Sets the paperdoll model in the pet stable to a new player model.
--- [https://wowpedia.fandom.com/wiki/API_SetPetStablePaperdoll]
--- @param modelObject unknown @ PlayerModel - The model of the pet to display.
--- @return void
function SetPetStablePaperdoll(modelObject)
end
--- Sets a texture to a unit's 2D portrait.
--- [https://wowpedia.fandom.com/wiki/API_SetPortraitTexture]
--- @param textureObject unknown @ widget : Texture
--- @param unitToken string @ UnitId
--- @return void
function SetPortraitTexture(textureObject, unitToken)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_SetPortraitTextureFromCreatureDisplayID]
--- @param textureObject unknown @ widget : Texture
--- @param creatureDisplayID number @ CreatureDisplayID
--- @return void
function SetPortraitTextureFromCreatureDisplayID(textureObject, creatureDisplayID)
end
--- Applies a circular mask to a texture, making it resemble a portrait.
--- [https://wowpedia.fandom.com/wiki/API_SetPortraitToTexture]
--- @param textureObject unknown
--- @param texturePath string
--- @return void
function SetPortraitToTexture(textureObject, texturePath)
end
--- Changes the player's preferred raid difficulty.
--- [https://wowpedia.fandom.com/wiki/API_SetRaidDifficultyID]
--- @param difficultyIndex number @ 3 → 10 Player
--- @return void
function SetRaidDifficultyID(difficultyIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_SetRaidProfileOption?action=edit&redlink=1]
--- @return void
function SetRaidProfileOption()
end
--- [https://wowpedia.fandom.com/wiki/API_SetRaidProfileSavedPosition?action=edit&redlink=1]
--- @return void
function SetRaidProfileSavedPosition()
end
--- Move a raid member from his current subgroup into a different (non-full) subgroup.
--- [https://wowpedia.fandom.com/wiki/API_SetRaidSubgroup]
--- @param index unknown
--- @param subgroup unknown
--- @return void
function SetRaidSubgroup(index, subgroup)
end
--- Set which raid target will be shown over a mob or raid member.
--- [https://wowpedia.fandom.com/wiki/API_SetRaidTarget]
--- @param unit string @ UnitId
--- @param index number @ Raid target index to assign to the specified unit:
--- @return void
function SetRaidTarget(unit, index)
end
--- [https://wowpedia.fandom.com/wiki/API_SetRaidTargetProtected?action=edit&redlink=1]
--- @return void
function SetRaidTargetProtected()
end
--- [https://wowpedia.fandom.com/wiki/API_SetRecruitingGuildSelection?action=edit&redlink=1]
--- @return void
function SetRecruitingGuildSelection()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSavedInstanceExtend?action=edit&redlink=1]
--- @return void
function SetSavedInstanceExtend()
end
--- Returns the index of the current resolution in effect
--- [https://wowpedia.fandom.com/wiki/API_SetScreenResolution]
--- @param index unknown
--- @return void
function SetScreenResolution(index)
end
--- Set the artifact-pointer to raceIndex.
--- [https://wowpedia.fandom.com/wiki/API_SetSelectedArtifact]
--- @param raceIndex unknown @ int - Index of the race to select.
--- @return void
function SetSelectedArtifact(raceIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_SetSelectedDisplayChannel?action=edit&redlink=1]
--- @return void
function SetSelectedDisplayChannel()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSelectedFaction?action=edit&redlink=1]
--- @return void
function SetSelectedFaction()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSelectedScreenResolutionIndex?action=edit&redlink=1]
--- @return void
function SetSelectedScreenResolutionIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSelectedWarGameType?action=edit&redlink=1]
--- @return void
function SetSelectedWarGameType()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSendMailCOD?action=edit&redlink=1]
--- @return void
function SetSendMailCOD()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSendMailMoney?action=edit&redlink=1]
--- @return void
function SetSendMailMoney()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSendMailShowing?action=edit&redlink=1]
--- @return void
function SetSendMailShowing()
end
--- [https://wowpedia.fandom.com/wiki/API_SetSortBagsRightToLeft?action=edit&redlink=1]
--- @return void
function SetSortBagsRightToLeft()
end
--- Selects a specialization.
--- [https://wowpedia.fandom.com/wiki/API_SetSpecialization]
--- @param specIndex number @ Index of the specialization to select, ascending from 1.
--- @param isPet boolean @ if true, set the select a specialization for the player's pet, otherwise, select a specialization for the player.
--- @return void
function SetSpecialization(specIndex, isPet)
end
--- [https://wowpedia.fandom.com/wiki/API_SetSpellbookPetAction?action=edit&redlink=1]
--- @return void
function SetSpellbookPetAction()
end
--- [https://wowpedia.fandom.com/wiki/API_SetTaxiBenchmarkMode?action=edit&redlink=1]
--- @return void
function SetTaxiBenchmarkMode()
end
--- Sets the texture to use for the taxi map.
--- [https://wowpedia.fandom.com/wiki/API_SetTaxiMap]
--- @param texture string @ The path to the texture to use for the taxi map.
--- @return void
function SetTaxiMap(texture)
end
--- Enables or disables a tracking method with a specified id.
--- [https://wowpedia.fandom.com/wiki/API_SetTracking]
--- @param id unknown @ The id of the tracking you would like to change. The id is assigned by the client, 1 is the first tracking method available on the tracking list, 2 is the next and so on. To get Information about a specific id, use GetTrackingInfo.
--- @param enabled boolean @ flag if the specified tracking id is to be enabled or disabled.
--- @return void
function SetTracking(id, enabled)
end
--- [https://wowpedia.fandom.com/wiki/API_SetTradeCurrency?action=edit&redlink=1]
--- @return void
function SetTradeCurrency()
end
--- Sets the amount of money offered as part of the player's trade offer.
--- [https://wowpedia.fandom.com/wiki/API_SetTradeMoney]
--- @param copper unknown @ Amount of money, in copper, to offer for trade.
--- @return void
function SetTradeMoney(copper)
end
--- Sets the status of a skill filter in the trainer window.
--- [https://wowpedia.fandom.com/wiki/API_SetTrainerServiceTypeFilter]
--- @param type string @ filter to set the status for:
--- @param status number @ to show, 0 to hide items matching the specified filter. (Note that this is likely a bug as GetTrainerServiceTypeFilter returns a boolean now.)
--- @param exclusive unknown @ ? - ?
--- @return void
function SetTrainerServiceTypeFilter(type, status, exclusive)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_SetTurnEnabled]
--- @return void
function SetTurnEnabled()
end
--- [https://wowpedia.fandom.com/wiki/API_SetUIVisibility?action=edit&redlink=1]
--- @return void
function SetUIVisibility()
end
--- Sets a camera perspective from one previously saved with SaveView. The last position loaded is stored in the CVar cameraView.
--- [https://wowpedia.fandom.com/wiki/API_SetView]
--- @param viewIndex number @ The view index (1-5) to return to (1 is always first person, and cannot be saved with SaveView)
--- @return void
function SetView(viewIndex)
end
--- Sets the faction to be watched.
--- [https://wowpedia.fandom.com/wiki/API_SetWatchedFactionIndex]
--- @param index number @ The index of the faction to watch, ascending from 1; out-of-range values will clear the watched faction.
--- @return void
function SetWatchedFactionIndex(index)
end
--- The purpose of this function isn't exactly clear, but from the way it's used it would appear to be a function that appropriately scales a frame for full-screen views, such as the world map frame, to fit on the screen maximally depending on the aspect ratio. Why this wasn't implemented in lua isn't entirely clear, though it may require information about the screen geometry which isn't exposed through the standard UI.
--- [https://wowpedia.fandom.com/wiki/API_SetupFullscreenScale]
--- @return void
function SetupFullscreenScale()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_ShouldShowIslandsWeeklyPOI]
--- @return boolean @ show
function ShouldShowIslandsWeeklyPOI()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_ShouldShowSpecialSplashScreen]
--- @return boolean @ show
function ShouldShowSpecialSplashScreen()
end
--- Sets whether account-wide achievements are shown to other players.
--- [https://wowpedia.fandom.com/wiki/API_ShowAccountAchievements]
--- @param show boolean @ true to allow other players to view all achievements your account has achieved, false to only allow viewing achievements for individual characters.
--- @return void
function ShowAccountAchievements(show)
end
--- [https://wowpedia.fandom.com/wiki/API_ShowBossFrameWhenUninteractable?action=edit&redlink=1]
--- @return void
function ShowBossFrameWhenUninteractable()
end
--- [https://wowpedia.fandom.com/wiki/API_ShowBuybackSellCursor?action=edit&redlink=1]
--- @return void
function ShowBuybackSellCursor()
end
--- [https://wowpedia.fandom.com/wiki/API_ShowContainerSellCursor?action=edit&redlink=1]
--- @return void
function ShowContainerSellCursor()
end
--- [https://wowpedia.fandom.com/wiki/API_ShowInventorySellCursor?action=edit&redlink=1]
--- @return void
function ShowInventorySellCursor()
end
--- Shows the completion dialog for a complete, auto-completable quest.
--- [https://wowpedia.fandom.com/wiki/API_ShowQuestComplete]
--- @param questLogIndex number @ index of the quest log line containing a complete, auto-completable quest.
--- @return void
function ShowQuestComplete(questLogIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_ShowQuestOffer?action=edit&redlink=1]
--- @return void
function ShowQuestOffer()
end
--- Puts the cursor in repair mode.
--- [https://wowpedia.fandom.com/wiki/API_ShowRepairCursor]
--- @return void
function ShowRepairCursor()
end
--- Adds the player's signature to the currently viewed petition.
--- [https://wowpedia.fandom.com/wiki/API_SignPetition]
--- @return void
function SignPetition()
end
--- The player sits, stands, or begins to descend (while swimming or flying)
--- [https://wowpedia.fandom.com/wiki/API_SitStandOrDescendStart]
--- @return void
function SitStandOrDescendStart()
end
--- [https://wowpedia.fandom.com/wiki/API_SocketContainerItem?action=edit&redlink=1]
--- @return void
function SocketContainerItem()
end
--- [https://wowpedia.fandom.com/wiki/API_SocketInventoryItem?action=edit&redlink=1]
--- @return void
function SocketInventoryItem()
end
--- Socked a Keystone to the selected artifact.
--- [https://wowpedia.fandom.com/wiki/API_SocketItemToArtifact]
--- @return boolean @ keystoneAdded
function SocketItemToArtifact()
end
--- [https://wowpedia.fandom.com/wiki/API_SolveArtifact?action=edit&redlink=1]
--- @return void
function SolveArtifact()
end
--- [https://wowpedia.fandom.com/wiki/API_SortBGList?action=edit&redlink=1]
--- @return void
function SortBGList()
end
--- [https://wowpedia.fandom.com/wiki/API_SortBags?action=edit&redlink=1]
--- @return void
function SortBags()
end
--- [https://wowpedia.fandom.com/wiki/API_SortBankBags?action=edit&redlink=1]
--- @return void
function SortBankBags()
end
--- [https://wowpedia.fandom.com/wiki/API_SortBattlefieldScoreData?action=edit&redlink=1]
--- @return void
function SortBattlefieldScoreData()
end
--- Sorts the guild roster on a certain column. Sorts by name by default. Repeating the same sort will revert sorting.
--- [https://wowpedia.fandom.com/wiki/API_SortGuildRoster]
--- @param level unknown
--- @return void
function SortGuildRoster(level)
end
--- [https://wowpedia.fandom.com/wiki/API_SortGuildTradeSkill?action=edit&redlink=1]
--- @return void
function SortGuildTradeSkill()
end
--- [https://wowpedia.fandom.com/wiki/API_SortQuestSortTypes?action=edit&redlink=1]
--- @return void
function SortQuestSortTypes()
end
--- [https://wowpedia.fandom.com/wiki/API_SortQuests?action=edit&redlink=1]
--- @return void
function SortQuests()
end
--- [https://wowpedia.fandom.com/wiki/API_SortReagentBankBags?action=edit&redlink=1]
--- @return void
function SortReagentBankBags()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_ChatSystem_GetInputDriverNameByIndex?action=edit&redlink=1]
--- @return void
function Sound_ChatSystem_GetInputDriverNameByIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_ChatSystem_GetNumInputDrivers?action=edit&redlink=1]
--- @return void
function Sound_ChatSystem_GetNumInputDrivers()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_ChatSystem_GetNumOutputDrivers?action=edit&redlink=1]
--- @return void
function Sound_ChatSystem_GetNumOutputDrivers()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_ChatSystem_GetOutputDriverNameByIndex?action=edit&redlink=1]
--- @return void
function Sound_ChatSystem_GetOutputDriverNameByIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_GameSystem_GetInputDriverNameByIndex?action=edit&redlink=1]
--- @return void
function Sound_GameSystem_GetInputDriverNameByIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_GameSystem_GetNumInputDrivers?action=edit&redlink=1]
--- @return void
function Sound_GameSystem_GetNumInputDrivers()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_GameSystem_GetNumOutputDrivers?action=edit&redlink=1]
--- @return void
function Sound_GameSystem_GetNumOutputDrivers()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_GameSystem_GetOutputDriverNameByIndex?action=edit&redlink=1]
--- @return void
function Sound_GameSystem_GetOutputDriverNameByIndex()
end
--- [https://wowpedia.fandom.com/wiki/API_Sound_GameSystem_RestartSoundSystem?action=edit&redlink=1]
--- @return void
function Sound_GameSystem_RestartSoundSystem()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellCanTargetGarrisonFollower?action=edit&redlink=1]
--- @return void
function SpellCanTargetGarrisonFollower()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellCanTargetGarrisonFollowerAbility?action=edit&redlink=1]
--- @return void
function SpellCanTargetGarrisonFollowerAbility()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellCanTargetGarrisonMission?action=edit&redlink=1]
--- @return void
function SpellCanTargetGarrisonMission()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellCanTargetItem?action=edit&redlink=1]
--- @return void
function SpellCanTargetItem()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellCanTargetItemID?action=edit&redlink=1]
--- @return void
function SpellCanTargetItemID()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellCanTargetQuest?action=edit&redlink=1]
--- @return void
function SpellCanTargetQuest()
end
--- Checks if the spell awaiting target selection can be cast on a specified unit.
--- [https://wowpedia.fandom.com/wiki/API_SpellCanTargetUnit]
--- @param unitId string @ UnitId) - The unit to check.
--- @return boolean @ canTarget
function SpellCanTargetUnit(unitId)
end
--- [https://wowpedia.fandom.com/wiki/API_SpellCancelQueuedSpell?action=edit&redlink=1]
--- @return void
function SpellCancelQueuedSpell()
end
--- Checks if the spell should be visible, depending on spellId and raid combat status
--- [https://wowpedia.fandom.com/wiki/API_SpellGetVisibilityInfo]
--- @param spellId number @ The ID of the spell to check
--- @param visType string @ either RAID_INCOMBAT if in combat, RAID_OUTOFCOMBAT otherwise
--- @return boolean, boolean, boolean @ hasCustom, alwaysShowMine, showForMySpec
function SpellGetVisibilityInfo(spellId, visType)
end
--- [https://wowpedia.fandom.com/wiki/API_SpellHasRange?action=edit&redlink=1]
--- @return void
function SpellHasRange()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellIsAlwaysShown?action=edit&redlink=1]
--- @return void
function SpellIsAlwaysShown()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellIsSelfBuff?action=edit&redlink=1]
--- @return void
function SpellIsSelfBuff()
end
--- Returns whether a spell is about to be cast, waiting for the player to select a target.
--- [https://wowpedia.fandom.com/wiki/API_SpellIsTargeting]
--- @return number @ isTargeting
function SpellIsTargeting()
end
--- Stops the current spellcasting.
--- [https://wowpedia.fandom.com/wiki/API_SpellStopCasting]
--- @return number @ stopped
function SpellStopCasting()
end
--- Cancels the spell awaiting target selection.
--- [https://wowpedia.fandom.com/wiki/API_SpellStopTargeting]
--- @return void
function SpellStopTargeting()
end
--- [https://wowpedia.fandom.com/wiki/API_SpellTargetItem?action=edit&redlink=1]
--- @return void
function SpellTargetItem()
end
--- This specifies the target that the spell should use without needing you to click the target or make it your main target.
--- [https://wowpedia.fandom.com/wiki/API_SpellTargetUnit]
--- @param unitId string @ unit you wish to cast the spell on.
--- @return void
function SpellTargetUnit(unitId)
end
--- [https://wowpedia.fandom.com/wiki/API_SplashFrameCanBeShown?action=edit&redlink=1]
--- @return void
function SplashFrameCanBeShown()
end
--- Picks up part of a stack of items from a container, placing them on the cursor.
--- [https://wowpedia.fandom.com/wiki/API_SplitContainerItem]
--- @param bagID number @ bagID) - id of the bag the slot is located in.
--- @param slot number @ slot inside the bag (top left slot is 1, slot to the right of it is 2).
--- @param count number @ Quantity to pick up.
--- @return void
function SplitContainerItem(bagID, slot, count)
end
--- [https://wowpedia.fandom.com/wiki/API_SplitGuildBankItem?action=edit&redlink=1]
--- @return void
function SplitGuildBankItem()
end
--- [https://wowpedia.fandom.com/wiki/API_StartAttack?action=edit&redlink=1]
--- @return void
function StartAttack()
end
--- [https://wowpedia.fandom.com/wiki/API_StartAutoRun?action=edit&redlink=1]
--- @return void
function StartAutoRun()
end
--- Invites the specified player to a duel.
--- [https://wowpedia.fandom.com/wiki/API_StartDuel]
--- @param playerName_or_unit unknown
--- @param exactMatch boolean
--- @return void
function StartDuel(playerName_or_unit, exactMatch)
end
--- [https://wowpedia.fandom.com/wiki/API_StartSpectatorWarGame?action=edit&redlink=1]
--- @return void
function StartSpectatorWarGame()
end
--- [https://wowpedia.fandom.com/wiki/API_StartWarGame?action=edit&redlink=1]
--- @return void
function StartWarGame()
end
--- [https://wowpedia.fandom.com/wiki/API_StartWarGameByName?action=edit&redlink=1]
--- @return void
function StartWarGameByName()
end
--- [https://wowpedia.fandom.com/wiki/API_StopAttack?action=edit&redlink=1]
--- @return void
function StopAttack()
end
--- [https://wowpedia.fandom.com/wiki/API_StopAutoRun?action=edit&redlink=1]
--- @return void
function StopAutoRun()
end
--- [https://wowpedia.fandom.com/wiki/API_StopCinematic?action=edit&redlink=1]
--- @return void
function StopCinematic()
end
--- [https://wowpedia.fandom.com/wiki/API_StopMacro?action=edit&redlink=1]
--- @return void
function StopMacro()
end
--- Stops the currently played music file.
--- [https://wowpedia.fandom.com/wiki/API_StopMusic]
--- @return void
function StopMusic()
end
--- Stops playing the specified sound.
--- [https://wowpedia.fandom.com/wiki/API_StopSound]
--- @param soundHandle number @ Playing sound handle, as returned by PlaySound or PlaySoundFile.
--- @param fadeoutTime number @ In milliseconds.
--- @return void
function StopSound(soundHandle, fadeoutTime)
end
--- [https://wowpedia.fandom.com/wiki/API_StoreSecureReference?action=edit&redlink=1]
--- @return void
function StoreSecureReference()
end
--- The player begins strafing left at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_StrafeLeftStart]
--- @param startTime unknown @ Begin strafing left at this time.
--- @return void
function StrafeLeftStart(startTime)
end
--- The player stops strafing left at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_StrafeLeftStop]
--- @param startTime unknown
--- @return void
function StrafeLeftStop(startTime)
end
--- The player begins strafing right at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_StrafeRightStart]
--- @param startTime number @ Begin strafing right at this time, per GetTime * 1000.
--- @return void
function StrafeRightStart(startTime)
end
--- The player stops strafing right at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_StrafeRightStop]
--- @param startTime unknown
--- @return void
function StrafeRightStop(startTime)
end
--- Notifies the game engine that the player is stuck.
--- [https://wowpedia.fandom.com/wiki/API_Stuck]
--- @return void
function Stuck()
end
--- [https://wowpedia.fandom.com/wiki/API_SubmitRequiredGuildRename?action=edit&redlink=1]
--- @return void
function SubmitRequiredGuildRename()
end
--- Summons a player using the RaF system.
--- [https://wowpedia.fandom.com/wiki/API_SummonFriend]
--- @param unit string @ UnitId) - player you wish to summon to you.
--- @return void
function SummonFriend(unit)
end
--- Summons a random non-combat pet companion.
--- [https://wowpedia.fandom.com/wiki/API_SummonRandomCritter]
--- @return void
function SummonRandomCritter()
end
--- [https://wowpedia.fandom.com/wiki/API_SupportsClipCursor?action=edit&redlink=1]
--- @return void
function SupportsClipCursor()
end
--- [https://wowpedia.fandom.com/wiki/API_SurrenderArena?action=edit&redlink=1]
--- @return void
function SurrenderArena()
end
--- Swaps two players in a raid.
--- [https://wowpedia.fandom.com/wiki/API_SwapRaidSubgroup]
--- @param index1 number @ ID of first raid member (1 to MAX_RAID_MEMBERS)
--- @param index2 number @ ID of second raid member (1 to MAX_RAID_MEMBERS)
--- @return void
function SwapRaidSubgroup(index1, index2)
end
--- [https://wowpedia.fandom.com/wiki/API_SwitchAchievementSearchTab?action=edit&redlink=1]
--- @return void
function SwitchAchievementSearchTab()
end
--- Take all money attached in a given letter in your inbox.
--- [https://wowpedia.fandom.com/wiki/API_TakeInboxItem]
--- @param index unknown
--- @param itemIndex unknown
--- @return void
function TakeInboxItem(index, itemIndex)
end
--- Take all money attached in a given letter in your inbox
--- [https://wowpedia.fandom.com/wiki/API_TakeInboxMoney]
--- @param index number @ a number representing a message in the inbox
--- @return void
function TakeInboxMoney(index)
end
--- [https://wowpedia.fandom.com/wiki/API_TakeInboxTextItem?action=edit&redlink=1]
--- @return void
function TakeInboxTextItem()
end
--- Begins travelling to the specified taxi map node, if possible.
--- [https://wowpedia.fandom.com/wiki/API_TakeTaxiNode]
--- @param index number @ Taxi node index to begin travelling to, ascending from 1 to NumTaxiNodes().
--- @return void
function TakeTaxiNode(index)
end
--- [https://wowpedia.fandom.com/wiki/API_TargetDirectionEnemy?action=edit&redlink=1]
--- @return void
function TargetDirectionEnemy()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetDirectionFinished?action=edit&redlink=1]
--- @return void
function TargetDirectionFinished()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetDirectionFriend?action=edit&redlink=1]
--- @return void
function TargetDirectionFriend()
end
--- Selects the last targeted enemy as the current target.
--- [https://wowpedia.fandom.com/wiki/API_TargetLastEnemy]
--- @return void
function TargetLastEnemy()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetLastFriend?action=edit&redlink=1]
--- @return void
function TargetLastFriend()
end
--- Selects the last target as the current target.
--- [https://wowpedia.fandom.com/wiki/API_TargetLastTarget]
--- @return void
function TargetLastTarget()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetNearest?action=edit&redlink=1]
--- @return void
function TargetNearest()
end
--- Selects the nearest enemy as the current target.
--- [https://wowpedia.fandom.com/wiki/API_TargetNearestEnemy]
--- @param reverse number @ true to cycle backwards; false to cycle forwards.
--- @return void
function TargetNearestEnemy(reverse)
end
--- [https://wowpedia.fandom.com/wiki/API_TargetNearestEnemyPlayer?action=edit&redlink=1]
--- @return void
function TargetNearestEnemyPlayer()
end
--- This function will select the nearest friendly unit.
--- [https://wowpedia.fandom.com/wiki/API_TargetNearestFriend]
--- @param reverse boolean @ if true, reverses the order of targetting units.
--- @return void
function TargetNearestFriend(reverse)
end
--- [https://wowpedia.fandom.com/wiki/API_TargetNearestFriendPlayer?action=edit&redlink=1]
--- @return void
function TargetNearestFriendPlayer()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetNearestPartyMember?action=edit&redlink=1]
--- @return void
function TargetNearestPartyMember()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetNearestRaidMember?action=edit&redlink=1]
--- @return void
function TargetNearestRaidMember()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetPriorityHighlightEnd?action=edit&redlink=1]
--- @return void
function TargetPriorityHighlightEnd()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetPriorityHighlightStart?action=edit&redlink=1]
--- @return void
function TargetPriorityHighlightStart()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetSpellReplacesBonusTree?action=edit&redlink=1]
--- @return void
function TargetSpellReplacesBonusTree()
end
--- [https://wowpedia.fandom.com/wiki/API_TargetTotem?action=edit&redlink=1]
--- @return void
function TargetTotem()
end
--- Targets the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_TargetUnit]
--- @param unit_or_name unknown
--- @param exactMatch boolean @ Whether to treat name as an exact match or not.
--- @return void
function TargetUnit(unit_or_name, exactMatch)
end
--- Returns the horizontal position of the destination node of a given route to the destination.
--- [https://wowpedia.fandom.com/wiki/API_TaxiGetDestX]
--- @param destinationIndex number @ The final destination taxi node.
--- @param routeIndex number @ The index of the route to get the source from.
--- @return number @ dX
function TaxiGetDestX(destinationIndex, routeIndex)
end
--- Returns the vertical position of the destination node of a given route to the destination.
--- [https://wowpedia.fandom.com/wiki/API_TaxiGetDestY]
--- @return void
function TaxiGetDestY()
end
--- [https://wowpedia.fandom.com/wiki/API_TaxiGetNodeSlot?action=edit&redlink=1]
--- @return void
function TaxiGetNodeSlot()
end
--- Returns the horizontal position of the source node of a given route to the destination.
--- [https://wowpedia.fandom.com/wiki/API_TaxiGetSrcX]
--- @param destinationIndex number @ The final destination taxi node.
--- @param routeIndex number @ The index of the route to get the source from.
--- @return number @ sX
function TaxiGetSrcX(destinationIndex, routeIndex)
end
--- Returns the vertical position of the source node of a given route to the destination.
--- [https://wowpedia.fandom.com/wiki/API_TaxiGetSrcY]
--- @param destinationIndex number @ The final destination taxi node.
--- @param routeIndex number @ The index of the route to get the source from.
--- @return number @ sY
function TaxiGetSrcY(destinationIndex, routeIndex)
end
--- [https://wowpedia.fandom.com/wiki/API_TaxiIsDirectFlight?action=edit&redlink=1]
--- @return void
function TaxiIsDirectFlight()
end
--- Returns the cost of a flight point in copper, unconfirmed if it is before faction cost reductions.
--- [https://wowpedia.fandom.com/wiki/API_TaxiNodeCost]
--- @param slot number @ ascending to NumTaxiNodes(), out of bound numbers triggers lua error.
--- @return number @ cost
function TaxiNodeCost(slot)
end
--- Returns the type of a taxi map node.
--- [https://wowpedia.fandom.com/wiki/API_TaxiNodeGetType]
--- @param index number @ Taxi map node index, ascending from 1 to NumTaxiNodes().
--- @return string @ type
function TaxiNodeGetType(index)
end
--- Returns the name of a node on the taxi map.
--- [https://wowpedia.fandom.com/wiki/API_TaxiNodeName]
--- @param index number @ Index of the taxi map node, ascending from 1 to NumTaxiNodes()
--- @return string @ name
function TaxiNodeName(index)
end
--- Returns the position of a flight point on the taxi map.
--- [https://wowpedia.fandom.com/wiki/API_TaxiNodePosition]
--- @param index unknown
--- @return unknown, unknown @ x, y
function TaxiNodePosition(index)
end
--- [https://wowpedia.fandom.com/wiki/API_TaxiRequestEarlyLanding?action=edit&redlink=1]
--- @return void
function TaxiRequestEarlyLanding()
end
--- Signals the client that an offer to resurrect the player has expired.
--- [https://wowpedia.fandom.com/wiki/API_TimeoutResurrect]
--- @return void
function TimeoutResurrect()
end
--- [https://wowpedia.fandom.com/wiki/API_ToggleAnimKitDisplay?action=edit&redlink=1]
--- @return void
function ToggleAnimKitDisplay()
end
--- Turns auto-run on or off.
--- [https://wowpedia.fandom.com/wiki/API_ToggleAutoRun]
--- @return void
function ToggleAutoRun()
end
--- [https://wowpedia.fandom.com/wiki/API_ToggleDebugAIDisplay?action=edit&redlink=1]
--- @return void
function ToggleDebugAIDisplay()
end
--- [https://wowpedia.fandom.com/wiki/API_TogglePVP]
--- @return void
function TogglePVP()
end
--- [https://wowpedia.fandom.com/wiki/API_TogglePetAutocast?action=edit&redlink=1]
--- @return void
function TogglePetAutocast()
end
--- Toggle between running and walking.
--- [https://wowpedia.fandom.com/wiki/API_ToggleRun]
--- @param theTime unknown @ Toggle between running and walking at the specified time, per GetTime * 1000.
--- @return void
function ToggleRun(theTime)
end
--- [https://wowpedia.fandom.com/wiki/API_ToggleSelfHighlight?action=edit&redlink=1]
--- @return void
function ToggleSelfHighlight()
end
--- Toggles sheathed or unsheathed weapons.
--- [https://wowpedia.fandom.com/wiki/API_ToggleSheath]
--- @return void
function ToggleSheath()
end
--- [https://wowpedia.fandom.com/wiki/API_ToggleSpellAutocast?action=edit&redlink=1]
--- @return void
function ToggleSpellAutocast()
end
--- [https://wowpedia.fandom.com/wiki/API_ToggleWindowed?action=edit&redlink=1]
--- @return void
function ToggleWindowed()
end
--- [https://wowpedia.fandom.com/wiki/API_TriggerTutorial?action=edit&redlink=1]
--- @return void
function TriggerTutorial()
end
--- [https://wowpedia.fandom.com/wiki/API_TurnInGuildCharter?action=edit&redlink=1]
--- @return void
function TurnInGuildCharter()
end
--- The player begins turning left at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_TurnLeftStart]
--- @param startTime number @ Begin turning left at this time, per GetTime * 1000.
--- @return void
function TurnLeftStart(startTime)
end
--- The player stops turning left at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_TurnLeftStop]
--- @param stopTime unknown @ Stop turning left at this time, per GetTime * 1000.
--- @return void
function TurnLeftStop(stopTime)
end
--- Begin Right click in the 3D game world.
--- [https://wowpedia.fandom.com/wiki/API_TurnOrActionStart]
--- @return void
function TurnOrActionStart()
end
--- End Right click in the 3D game world.
--- [https://wowpedia.fandom.com/wiki/API_TurnOrActionStop]
--- @return void
function TurnOrActionStop()
end
--- The player begins turning right at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_TurnRightStart]
--- @param startTime number @ Begin turning right at this time, per GetTime * 1000
--- @return void
function TurnRightStart(startTime)
end
--- The player stops turning right at the specified time.
--- [https://wowpedia.fandom.com/wiki/API_TurnRightStop]
--- @param startTime unknown
--- @return void
function TurnRightStop(startTime)
end
--- Removes a player from the party/raid group if you're the party leader, or initiates a vote to kick a player from a Dungeon Finder group.
--- [https://wowpedia.fandom.com/wiki/API_UninviteUnit]
--- @param name string @ Name of the player to remove from group. When removing cross-server players, it is important to include the server name: Ygramul-Emerald Dream.
--- @param reason string @ Optional) - Used when initiating a kick vote against the player.
--- @return void
function UninviteUnit(name, reason)
end
--- Determine whether a unit is in combat or has aggro.
--- [https://wowpedia.fandom.com/wiki/API_UnitAffectingCombat]
--- @param unit string @ The UnitId of the unit to check (Tested with player, pet, party1, hostile target)
--- @return boolean @ affectingCombat
function UnitAffectingCombat(unit)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_UnitAlliedRaceInfo]
--- @param unit string
--- @return boolean, boolean @ isAlliedRace, hasHeritageArmorUnlocked
function UnitAlliedRaceInfo(unit)
end
--- Returns the armor statistics relevant to the specified target.
--- [https://wowpedia.fandom.com/wiki/API_UnitArmor]
--- @param unit string @ The unitId to get information from. Normally only works for player and pet, but also for target if the target is a beast upon which the hunter player has cast Beast Lore.
--- @return unknown, number, number, unknown, unknown @ base, effectiveArmor, armor, posBuff, negBuff
function UnitArmor(unit)
end
--- Returns the unit's melee attack power and modifiers.
--- [https://wowpedia.fandom.com/wiki/API_UnitAttackPower]
--- @param unit unknown @ UnitId - The unit to get information from. (Does not work for target - Possibly only player and pet)
--- @return number, number, number @ base, posBuff, negBuff
function UnitAttackPower(unit)
end
--- Returns the unit's melee attack speed for each hand.
--- [https://wowpedia.fandom.com/wiki/API_UnitAttackSpeed]
--- @param unit unknown @ UnitId - The unit to get information from. (Verified for player and target)
--- @return number, number @ mainSpeed, offSpeed
function UnitAttackSpeed(unit)
end
--- Retrieve info about an aura (a buff or debuff).
--- [https://wowpedia.fandom.com/wiki/API_UnitAura]
--- @param unit string @ UnitId to query.
--- @param index number @ Index incremented from 1 until no more results.
--- @param filter string @ ?Optional. Could be nil. - Optional, case-insensitive filters separated by spaces or pipes.
--- @return void
function UnitAura(unit, index, filter)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_UnitAuraBySlot]
--- @param unit string
--- @param slot number @ aura slot from UnitAuraSlots()
--- @return unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown @ nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, ...
function UnitAuraBySlot(unit, slot)
end
--- Returns an ordered list of auras used with UnitAuraBySlot()
--- [https://wowpedia.fandom.com/wiki/API_UnitAuraSlots]
--- @param unit string @ UnitId to query.
--- @param filter string @ Similar to UnitAura; however, either HELPFUL or HARMFUL is required.
--- @param maxSlots number @ ?Optional. Could be nil. - The maximum number of slots to return
--- @param continuationToken number @ ?Optional. Could be nil. - The number of slots to skip (see details).
--- @return number, number @ continuationToken, ...
function UnitAuraSlots(unit, filter, maxSlots, continuationToken)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitBattlePetLevel?action=edit&redlink=1]
--- @return void
function UnitBattlePetLevel()
end
--- Returns the battle pet species ID of a specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitBattlePetSpeciesID]
--- @param unit string @ UnitId) - unit to return the species ID of.
--- @return number @ speciesID
function UnitBattlePetSpeciesID(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitBattlePetType?action=edit&redlink=1]
--- @return void
function UnitBattlePetType()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitBuff]
--- @return void
function UnitBuff()
end
--- Indicates whether the first unit can assist the second unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitCanAssist]
--- @param unitToAssist unknown @ UnitId - the unit that would assist (e.g., player or target)
--- @param unitToBeAssisted unknown @ UnitId - the unit that would be assisted (e.g., player or target)
--- @return unknown @ canAssist
function UnitCanAssist(unitToAssist, unitToBeAssisted)
end
--- Returns 1 if the first unit can attack the second, nil otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitCanAttack]
--- @param attacker unknown @ UnitId - the unit that would initiate the attack (e.g., player or target)
--- @param attacked unknown @ UnitId - the unit that would be attacked (e.g., player or target)
--- @return unknown @ canAttack
function UnitCanAttack(attacker, attacked)
end
--- Returns true if the first unit can cooperate with the second, false otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitCanCooperate]
--- @param unit1 string @ The UnitId of the unit to check (Tested with player, pet, party1, hostile target)
--- @param unit2 string @ The UnitId of the unit to check (Tested with player, pet, party1, hostile target)
--- @return void
function UnitCanCooperate(unit1, unit2)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitCanPetBattle?action=edit&redlink=1]
--- @return void
function UnitCanPetBattle()
end
--- Returns information about the spell currently being cast by the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitCastingInfo]
--- @param unit string @ UnitId
--- @return string, string, string, number, number, boolean, string, number @ name, text, texture, startTimeMS, endTimeMS, isTradeSkill, castID, spellId
function UnitCastingInfo(unit)
end
--- Returns information about the spell currently being channeled by the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitChannelInfo]
--- @param unit string @ UnitId
--- @return string, string, string, number, number, boolean, number @ name, text, texture, startTimeMS, endTimeMS, isTradeSkill, spellId
function UnitChannelInfo(unit)
end
--- Returns the Timewalking Campaign ID that a specified unit is in.
--- [https://wowpedia.fandom.com/wiki/API_UnitChromieTimeID]
--- @param unit string
--- @return number @ ID
function UnitChromieTimeID(unit)
end
--- Returns the class of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitClass]
--- @param unit string @ UnitId
--- @return string, string, number @ className, classFilename, classId
function UnitClass(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitClassBase]
--- @return void
function UnitClassBase()
end
--- Returns the classification of the specified unit (e.g., elite or worldboss).
--- [https://wowpedia.fandom.com/wiki/API_UnitClassification]
--- @param unit string @ unitId of the unit to query, e.g. target
--- @return string @ classification
function UnitClassification(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitControllingVehicle?action=edit&redlink=1]
--- @return void
function UnitControllingVehicle()
end
--- Returns the creature family of the specified unit (e.g., Crab or Wolf). Only works on Beasts and Demons, since the family's only function is to determine what abilities the unit will have if a hunter or warlock tames it; however, works on most currently untameable Beasts for reasons of backward and forward compatibility. Returns nil if the creature isn't a Beast or doesn't belong to a family that includes a tameable creature.
--- [https://wowpedia.fandom.com/wiki/API_UnitCreatureFamily]
--- @param unit unknown @ UnitId - unit you wish to query.
--- @return string @ creatureFamily
function UnitCreatureFamily(unit)
end
--- Returns the creature type of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitCreatureType]
--- @param unit string @ The UnitId the unit to query creature type of.
--- @return string @ creatureType
function UnitCreatureType(unit)
end
--- Unit damage returns information about your current damage stats. Doesn't seem to return usable values for mobs, NPCs, or other players. The method returns 7 values, only some of which appear to be useful.
--- [https://wowpedia.fandom.com/wiki/API_UnitDamage]
--- @param unit string @ The unitId to get information for. (Likely only works for player and pet. Possibly for [Beast Lore]'d targets. -- unconfirmed)
--- @return number, number, number, number, number, number, number @ lowDmg, hiDmg, offlowDmg, offhiDmg, posBuff, negBuff, percentmod
function UnitDamage(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitDebuff]
--- @return void
function UnitDebuff()
end
--- Returns detailed information about the threat status of one unit against another.
--- [https://wowpedia.fandom.com/wiki/API_UnitDetailedThreatSituation]
--- @param unit string @ UnitId of the player or pet whose threat to request.
--- @param mobUnit string @ UnitId of the NPC whose threat table to query.
--- @return boolean, number, number, number, number @ isTanking, status, scaledPercentage, rawPercentage, threatValue
function UnitDetailedThreatSituation(unit, mobUnit)
end
--- Returns the squared distance to a unit in your group
--- [https://wowpedia.fandom.com/wiki/API_UnitDistanceSquared]
--- @param unit string @ The unitId for the player in your group
--- @return number, boolean @ distanceSquared, checkedDistance
function UnitDistanceSquared(unit)
end
--- Returns the unit's effective (scaled) level.
--- [https://wowpedia.fandom.com/wiki/API_UnitEffectiveLevel]
--- @return void
function UnitEffectiveLevel()
end
--- Determines if the unit exists.
--- [https://wowpedia.fandom.com/wiki/API_UnitExists]
--- @param unit string @ The UnitId of the unit to check (Tested with player, pet, party1, hostile target)
--- @return boolean @ exists
function UnitExists(unit)
end
--- Get the name of the faction (Horde/Alliance) a unit belongs to.
--- [https://wowpedia.fandom.com/wiki/API_UnitFactionGroup]
--- @param unit string @ The UnitId of the unit to check (Tested with player, pet, party1, hostile target)
--- @return string, unknown @ englishFaction, izedFaction
function UnitFactionGroup(unit)
end
--- Returns the player's (unit's) name and server.
--- [https://wowpedia.fandom.com/wiki/API_UnitFullName]
--- @param unit string @ unitId to query; the only intended value is player.
--- @return unknown, string @ fullName, realm
function UnitFullName(unit)
end
--- Returns the GUID of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitGUID]
--- @param unit unknown @ UnitId - unit to look up the GUID of.
--- @return string @ guid
function UnitGUID(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitGetAvailableRoles?action=edit&redlink=1]
--- @return void
function UnitGetAvailableRoles()
end
--- Returns the predicted heals cast on the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitGetIncomingHeals]
--- @param unit unknown @ UnitId - The UnitId to query healing for
--- @param healer unknown @ UnitId - Only include incoming heals by a single UnitId (Optional)
--- @return number @ heal
function UnitGetIncomingHeals(unit, healer)
end
--- Returns the total amount of damage the unit can absorb before losing health.
--- [https://wowpedia.fandom.com/wiki/API_UnitGetTotalAbsorbs]
--- @param unit string @ unit to query absorption shields of.
--- @return number @ totalAbsorbs
function UnitGetTotalAbsorbs(unit)
end
--- Returns the total amount of healing the unit can absorb without gaining health.
--- [https://wowpedia.fandom.com/wiki/API_UnitGetTotalHealAbsorbs]
--- @param unit string @ unit to query information about.
--- @return number @ totalHealAbsorbs
function UnitGetTotalHealAbsorbs(unit)
end
--- Returns the assigned role in a group formed via the Dungeon Finder Tool.
--- [https://wowpedia.fandom.com/wiki/API_UnitGroupRolesAssigned]
--- @param Unit string @ the unit to be queried (player, party1 .. party4, target, raid1 .. raid40)
--- @return string @ role
function UnitGroupRolesAssigned(Unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitHPPerStamina?action=edit&redlink=1]
--- @return void
function UnitHPPerStamina()
end
--- Checks if the unit is currently being resurrected.
--- [https://wowpedia.fandom.com/wiki/API_UnitHasIncomingResurrection]
--- @param unitID_or_UnitName unknown
--- @return boolean @ isBeingResurrected
function UnitHasIncomingResurrection(unitID_or_UnitName)
end
--- Returns whether the unit is currently unable to use the dungeon finder due to leaving a group prematurely.
--- [https://wowpedia.fandom.com/wiki/API_UnitHasLFGDeserter]
--- @param unit unknown @ UnitId - the unit that would assist (e.g., player or target)
--- @return boolean @ isDeserter
function UnitHasLFGDeserter(unit)
end
--- Returns whether the unit is currently under the effects of the random dungeon cooldown.
--- [https://wowpedia.fandom.com/wiki/API_UnitHasLFGRandomCooldown]
--- @param unit unknown @ UnitId - the unit that would assist (e.g., player or target)
--- @return boolean @ hasRandomCooldown
function UnitHasLFGRandomCooldown(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitHasRelicSlot?action=edit&redlink=1]
--- @return void
function UnitHasRelicSlot()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitHasVehiclePlayerFrameUI?action=edit&redlink=1]
--- @return void
function UnitHasVehiclePlayerFrameUI()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitHasVehicleUI?action=edit&redlink=1]
--- @return void
function UnitHasVehicleUI()
end
--- Returns the current health of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitHealth]
--- @param unit unknown @ UnitId - identifies the unit to query health for
--- @return number @ health
function UnitHealth(unit)
end
--- Returns the maximum health of the specified unit; however, this function behaves differently between Retail and Classic.
--- [https://wowpedia.fandom.com/wiki/API_UnitHealthMax]
--- @param unit unknown @ UnitId - the unit whose max health to query.
--- @return number @ max_health
function UnitHealthMax(unit)
end
--- Returns the current amount of honor the unit has for the current rank.
--- [https://wowpedia.fandom.com/wiki/API_UnitHonor]
--- @param unitID_or_unitName unknown
--- @return number @ currentHonor
function UnitHonor(unitID_or_unitName)
end
--- Returns the current honor level of a unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitHonorLevel]
--- @param unitID_or_PlayerName unknown
--- @return number @ honorLevel
function UnitHonorLevel(unitID_or_PlayerName)
end
--- Returns the amount of honor the current rank maxes out.
--- [https://wowpedia.fandom.com/wiki/API_UnitHonorMax]
--- @param unitID_or_playerName unknown
--- @return number @ maxHonor
function UnitHonorMax(unitID_or_playerName)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitInAnyGroup?action=edit&redlink=1]
--- @return void
function UnitInAnyGroup()
end
--- Used to determine the position number of the specified unit in the battleground raid.
--- [https://wowpedia.fandom.com/wiki/API_UnitInBattleground]
--- @param unit string @ The UnitId to query (e.g. player, party2, pet, target etc.)
--- @return number @ position
function UnitInBattleground(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitInOtherParty?action=edit&redlink=1]
--- @return void
function UnitInOtherParty()
end
--- Returns 1 if the unit is a player in your party, nil otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitInParty]
--- @param unit string @ unitId who should be checked
--- @return boolean @ inParty
function UnitInParty(unit)
end
--- Returns true if the specified unit is in the primary phase of the party.
--- [https://wowpedia.fandom.com/wiki/API_UnitInPartyShard]
--- @param unit string
--- @return boolean @ inPartyShard
function UnitInPartyShard(unit)
end
--- Returns a number if the unit is in your raid group, nil otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitInRaid]
--- @param unit string @ unitId to check.
--- @return unknown @ index
function UnitInRaid(unit)
end
--- Returns whether a unit is close to the player.
--- [https://wowpedia.fandom.com/wiki/API_UnitInRange]
--- @param unit string @ unitId) - unit to query; information is only available for members of the player's group.
--- @return boolean, boolean @ inRange, checkedRange
function UnitInRange(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitInSubgroup?action=edit&redlink=1]
--- @return void
function UnitInSubgroup()
end
--- Checks whether a specified unit is within an vehicle.
--- [https://wowpedia.fandom.com/wiki/API_UnitInVehicle]
--- @param target unknown
--- @return unknown @ inVehicle
function UnitInVehicle(target)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitInVehicleControlSeat?action=edit&redlink=1]
--- @return void
function UnitInVehicleControlSeat()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitInVehicleHidesPetFrame?action=edit&redlink=1]
--- @return void
function UnitInVehicleHidesPetFrame()
end
--- Checks if a unit is AFK.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsAFK]
--- @param unit unknown @ The UnitId to return AFK status of.
--- @return unknown @ isAFK
function UnitIsAFK(unit)
end
--- Returns if the unit is a battle pet.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsBattlePet]
--- @param unit string @ UnitId
--- @return boolean @ isBattlePet
function UnitIsBattlePet(unit)
end
--- Returns if the unit is a battle pet summoned by a player.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsBattlePetCompanion]
--- @param unit string @ UnitId
--- @return boolean @ isCompanion
function UnitIsBattlePetCompanion(unit)
end
--- Checks if a specified unit is currently charmed.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsCharmed]
--- @param unit string @ UnitId of the unit to check.
--- @return boolean @ isTrue
function UnitIsCharmed(unit)
end
--- Returns true if the unit is connected to the game (i.e. not offline), false otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsConnected]
--- @param unit string
--- @return unknown @ isOnline
function UnitIsConnected(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsControlling?action=edit&redlink=1]
--- @return void
function UnitIsControlling()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsCorpse?action=edit&redlink=1]
--- @return void
function UnitIsCorpse()
end
--- Checks if a unit is DND (Do Not Disturb).
--- [https://wowpedia.fandom.com/wiki/API_UnitIsDND]
--- @param unit unknown @ The UnitId to return DND status of.
--- @return unknown @ isDND
function UnitIsDND(unit)
end
--- Returns a value indicating whether the specified unit is dead.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsDead]
--- @param unit string @ the UnitId to query
--- @return unknown @ isDead
function UnitIsDead(unit)
end
--- Returns a value indicating whether the specified unit is dead or in ghost form.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsDeadOrGhost]
--- @param unit string @ the UnitId to query
--- @return unknown @ isDeadOrGhost
function UnitIsDeadOrGhost(unit)
end
--- This function will determine if the target is hostile towards you.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsEnemy]
--- @return void
function UnitIsEnemy()
end
--- Returns whether a unit is feigning death.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsFeignDeath]
--- @param unit string @ unit to check.
--- @return number @ isFeign
function UnitIsFeignDeath(unit)
end
--- This function will determine whether two units are friendly to each other (i.e. able to help each other in combat).
--- [https://wowpedia.fandom.com/wiki/API_UnitIsFriend]
--- @param unit string @ A valid unit.
--- @param otherunit string @ A valid unit.
--- @return boolean @ isFriend
function UnitIsFriend(unit, otherunit)
end
--- Returns a value indicating whether the specified unit is in ghost form.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsGhost]
--- @param unit string @ the UnitId to query
--- @return unknown @ isGhost
function UnitIsGhost(unit)
end
--- Returns whether the unit is an assistant in your current group.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsGroupAssistant]
--- @param unit string @ unitId) - unit to query.
--- @return boolean @ isAssistant
function UnitIsGroupAssistant(unit)
end
--- Returns whether the unit is the leader of a party or raid.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsGroupLeader]
--- @param unit string @ UnitId
--- @param partyCategory number @ ?
--- @return boolean @ isLeader
function UnitIsGroupLeader(unit, partyCategory)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsInMyGuild?action=edit&redlink=1]
--- @return void
function UnitIsInMyGuild()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsMercenary?action=edit&redlink=1]
--- @return void
function UnitIsMercenary()
end
--- Returns if the unit is a battle pet summoned by another player.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsOtherPlayersBattlePet]
--- @param unit string @ UnitId
--- @return boolean @ isOther
function UnitIsOtherPlayersBattlePet(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsOtherPlayersPet?action=edit&redlink=1]
--- @return void
function UnitIsOtherPlayersPet()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsOwnerOrControllerOfUnit]
--- @param controllingUnit string
--- @param controlledUnit string
--- @return boolean @ unitIsOwnerOrControllerOfUnit
function UnitIsOwnerOrControllerOfUnit(controllingUnit, controlledUnit)
end
--- Checks to see if a unit is flagged for PvP or not.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsPVP]
--- @param unit unknown
--- @return unknown @ ispvp
function UnitIsPVP(unit)
end
--- Checks if a unit is flagged for free-for-all PVP. (ex. from being in a world arena)
--- [https://wowpedia.fandom.com/wiki/API_UnitIsPVPFreeForAll]
--- @param unitId string @ UnitId) - The unit to check
--- @return boolean @ isFreeForAll
function UnitIsPVPFreeForAll(unitId)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsPVPSanctuary?action=edit&redlink=1]
--- @return void
function UnitIsPVPSanctuary()
end
--- Checks if a specified unit is a player.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsPlayer]
--- @param unit string @ UnitId of the unit to check.
--- @return boolean @ isTrue
function UnitIsPlayer(unit)
end
--- Checks if a specified unit is possessed.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsPossessed]
--- @param unit string @ UnitId of the unit to check.
--- @return boolean @ isTrue
function UnitIsPossessed(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsQuestBoss?action=edit&redlink=1]
--- @return void
function UnitIsQuestBoss()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsRaidOfficer?action=edit&redlink=1]
--- @return void
function UnitIsRaidOfficer()
end
--- Returns whether the specified unit is from the player's own realm (or, equivalently, a linked Connected Realm).
--- [https://wowpedia.fandom.com/wiki/API_UnitIsSameServer]
--- @param unit string @ unitId of a unit to query.
--- @return number @ sameServer
function UnitIsSameServer(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsTapDenied?action=edit&redlink=1]
--- @return void
function UnitIsTapDenied()
end
--- Indicates whether a unit is trivial.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsTrivial]
--- @param unit string @ The UnitId (e.g., target)
--- @return boolean @ isTrivial
function UnitIsTrivial(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitIsUnconscious?action=edit&redlink=1]
--- @return void
function UnitIsUnconscious()
end
--- Returns true if the two specified units are the same, false otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsUnit]
--- @param unit1 unknown @ UnitId - The first unit to query (e.g. party1, pet, player)
--- @param unit2 unknown @ UnitId - The second unit to compare it to (e.g. target)
--- @return boolean @ isSame
function UnitIsUnit(unit1, unit2)
end
--- Indicates whether the game client (rather than the player) can see unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsVisible]
--- @return void
function UnitIsVisible()
end
--- Returns if the unit is a wild battle pet or tamer battle pet.
--- [https://wowpedia.fandom.com/wiki/API_UnitIsWildBattlePet]
--- @param unit string @ UnitId
--- @return boolean @ isWild
function UnitIsWildBattlePet(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitLeadsAnyGroup?action=edit&redlink=1]
--- @return void
function UnitLeadsAnyGroup()
end
--- Returns the unit's level.
--- [https://wowpedia.fandom.com/wiki/API_UnitLevel]
--- @param unit string @ The unitId to get information from. (e.g. player, target)
--- @return number @ level
function UnitLevel(unit)
end
--- Returns the name and realm of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitName]
--- @param unit string @ The UnitId to query (e.g. player, party2, pet, target etc.)
--- @return string, string @ name, realm
function UnitName(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitNameUnmodified?action=edit&redlink=1]
--- @return void
function UnitNameUnmodified()
end
--- Returns true if a units' nameplate should appear in a widgets-only mode.
--- [https://wowpedia.fandom.com/wiki/API_UnitNameplateShowsWidgetsOnly]
--- @param unit string
--- @return boolean @ nameplateShowsWidgetsOnly
function UnitNameplateShowsWidgetsOnly(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitNumPowerBarTimers?action=edit&redlink=1]
--- @return void
function UnitNumPowerBarTimers()
end
--- Returns 1 if unit is on a taxi, nil otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitOnTaxi]
--- @param unit string @ the Unit ID to check.
--- @return boolean @ onTaxi
function UnitOnTaxi(unit)
end
--- Returns the unit's conjoined title and name.
--- [https://wowpedia.fandom.com/wiki/API_UnitPVPName]
--- @param unit string @ visible unit to retrieve the name and title of.
--- @return string @ titleName
function UnitPVPName(unit)
end
--- Returns the reason if a unit is NOT in the same phase.
--- [https://wowpedia.fandom.com/wiki/API_UnitPhaseReason]
--- @param unit string @ UnitId
--- @return unknown @ reason
function UnitPhaseReason(unit)
end
--- Return whether the unit is controlled by a player or an NPC.
--- [https://wowpedia.fandom.com/wiki/API_UnitPlayerControlled]
--- @param unit string @ The UnitId to select as a target. Using a unit's name as the unit ID only works if the unit is a member of your party.
--- @return boolean @ UnitIsPlayerControlled
function UnitPlayerControlled(unit)
end
--- Returns whether a unit is another player in your party or the pet of another player in your party.
--- [https://wowpedia.fandom.com/wiki/API_UnitPlayerOrPetInParty]
--- @param unit string @ unitId) - Unit to check for party membership.
--- @return number @ inMyParty
function UnitPlayerOrPetInParty(unit)
end
--- Returns 1 if the unit is in your raid group, nil otherwise.
--- [https://wowpedia.fandom.com/wiki/API_UnitPlayerOrPetInRaid]
--- @param unit unknown
--- @return unknown @ isTrue
function UnitPlayerOrPetInRaid(unit)
end
--- Returns the position of a unit within the current world area. Does not work in raids, dungeons and competitive instances.
--- [https://wowpedia.fandom.com/wiki/API_UnitPosition]
--- @param unit string @ UnitId for which the position is returned. Does not work with all unit types. Works with player, partyN or raidN as unit type. In particular, it does not work on pets or any unit not in your group.
--- @return number, number, number, number @ posY, posX, posZ, instanceID
function UnitPosition(unit)
end
--- Returns the current power of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitPower]
--- @param unitToken string @ UnitId
--- @param powerType unknown @ Enum.PowerType? - Type of resource (mana/rage/energy/etc) to query
--- @param unmodified boolean @ ? - Return the higher precision internal value (for graphical use only)
--- @return number @ power
function UnitPower(unitToken, powerType, unmodified)
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_UnitPowerBarID]
--- @param unitToken string @ UnitId
--- @return number @ barID
function UnitPowerBarID(unitToken)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitPowerBarTimerInfo?action=edit&redlink=1]
--- @return void
function UnitPowerBarTimerInfo()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_UnitPowerDisplayMod]
--- @param powerType unknown @ Enum.PowerType
--- @return number @ displayMod
function UnitPowerDisplayMod(powerType)
end
--- Returns the maximum power of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitPowerMax]
--- @param unitToken string @ UnitId
--- @param powerType unknown @ Enum.PowerType? - Type of resource (mana/rage/energy/etc) to query
--- @param unmodified boolean @ ? - Return the higher precision internal value (for graphical use only)
--- @return number @ maxPower
function UnitPowerMax(unitToken, powerType, unmodified)
end
--- Returns a number corresponding to the power type (e.g., mana, rage or energy) of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitPowerType]
--- @param unit string @ unitId) - The unit whose power type to query.
--- @param index number @ Optional value for classes with multiple powerTypes. If not specified, information about the first (currently active) power type will be returned.
--- @return unknown, string, number, number, number @ powerType, powerToken, altR, altG, altB
function UnitPowerType(unit, index)
end
--- Returns whether the unit is a flag/orb carrier or cart runner.
--- [https://wowpedia.fandom.com/wiki/API_UnitPvpClassification]
--- @param unit string @ UnitId
--- @return unknown @ classification
function UnitPvpClassification(unit)
end
--- Returns the difference between the units' current level and the level at which fixed-level quests are of trivial difficulty.
--- [https://wowpedia.fandom.com/wiki/API_UnitQuestTrivialLevelRange]
--- @param unit string
--- @return number @ levelRange
function UnitQuestTrivialLevelRange(unit)
end
--- Returns the difference between the units' current level and the level at which scaling-level quests are of trivial difficulty.
--- [https://wowpedia.fandom.com/wiki/API_UnitQuestTrivialLevelRangeScaling]
--- @param unit string
--- @return number @ levelRange
function UnitQuestTrivialLevelRangeScaling(unit)
end
--- Returns the race of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitRace]
--- @param unit string @ UnitId
--- @return string, string, number @ raceName, raceFile, raceID
function UnitRace(unit)
end
--- Returns the unit's ranged attack power and modifiers.
--- [https://wowpedia.fandom.com/wiki/API_UnitRangedAttackPower]
--- @param unit string @ The UnitId to get information from. (Likely only works for player and pet)
--- @return number, number, number @ base, posBuff, negBuff
function UnitRangedAttackPower(unit)
end
--- Returns the unit's ranged damage and speed.
--- [https://wowpedia.fandom.com/wiki/API_UnitRangedDamage]
--- @param player unknown
--- @return number, number, number, number, number, number @ speed, lowDmg, hiDmg, posBuff, negBuff, percent
function UnitRangedDamage(player)
end
--- Determine the reaction of the specified unit to the other specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitReaction]
--- @param unit string @ The UnitId of the unit whose reaction is to be determined.
--- @param otherUnit string @ The UnitId of the unit towards whom the reaction is to be measured.
--- @return number @ reaction
function UnitReaction(unit, otherUnit)
end
--- Returns information about the player's relation to the specified unit's realm.
--- [https://wowpedia.fandom.com/wiki/API_UnitRealmRelationship]
--- @param unit string @ unit to query the realm relationship with.
--- @return number @ realmRelationship
function UnitRealmRelationship(unit)
end
--- Returns RGBA values for the color of the unit's selection (the outline around and the circle underneath a player character or an NPC).
--- [https://wowpedia.fandom.com/wiki/API_UnitSelectionColor]
--- @param UnitId string @ The unit whose selection colour should be returned.
--- @param useExtendedColors boolean @ optional) - If true, a more appropriate colour of the unit's selection will be returned. For instance, if used on a dead hostile target, the default return will red (hostile), but the extended return will be grey (dead).
--- @return number, number, number, number @ red, green, blue, alpha
function UnitSelectionColor(UnitId, useExtendedColors)
end
--- Returns a number corresponding to the type of the unit's selection (the outline around and the circle underneath a player character or an NPC).
--- [https://wowpedia.fandom.com/wiki/API_UnitSelectionType]
--- @param UnitId string @ The unit whose selection type should be returned.
--- @param useExtendedColors boolean @ optional) - If true, a more appropriate type of the unit's selection will be returned. For instance, if used on a dead hostile target, the default return will be 0 (hostile), but the extended return will be 9 (dead).
--- @return number @ type
function UnitSelectionType(UnitId, useExtendedColors)
end
--- Sets the player role in the group as Tank, Dps, Healer or None.
--- [https://wowpedia.fandom.com/wiki/API_UnitSetRole]
--- @param target string @ The affected group member. i.e. player or player name
--- @param role string @ The role for the player. (known values TANK, HEALER, DAMAGER, NONE)
--- @return void
function UnitSetRole(target, role)
end
--- Returns the gender of the specified unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitSex]
--- @param unit string @ UnitId
--- @return unknown @ gender
function UnitSex(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitShouldDisplayName?action=edit&redlink=1]
--- @return void
function UnitShouldDisplayName()
end
--- Returns the current spell haste percentage for a unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitSpellHaste]
--- @param unit string @ UnitId
--- @return number @ spellHastePercent
function UnitSpellHaste(unit)
end
--- Returns the amount of staggered damage on the unit.
--- [https://wowpedia.fandom.com/wiki/API_UnitStagger]
--- @param unit string @ unit to query the staggered damage of.
--- @return number @ damage
function UnitStagger(unit)
end
--- Returns info about one of the unit's stats (strength, agility, stamina, intellect, spirit).
--- [https://wowpedia.fandom.com/wiki/API_UnitStat]
--- @param unit string @ The UnitId to get information from. (Only works for player and pet. Will work on target as long as it is equal to player)
--- @param statID number @ An internal id corresponding to one of the stats.
--- @return number, number, number, number @ stat, effectiveStat, posBuff, negBuff
function UnitStat(unit, statID)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitSwitchToVehicleSeat?action=edit&redlink=1]
--- @return void
function UnitSwitchToVehicleSeat()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitTargetsVehicleInRaidUI?action=edit&redlink=1]
--- @return void
function UnitTargetsVehicleInRaidUI()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_UnitThreatPercentageOfLead]
--- @param unit string @ UnitId of the player or pet whose threat to request.
--- @param mobUnit string @ UnitId of the NPC whose threat table to query.
--- @return number @ percentage
function UnitThreatPercentageOfLead(unit, mobUnit)
end
--- Returns the threat status of one unit against another.
--- [https://wowpedia.fandom.com/wiki/API_UnitThreatSituation]
--- @param unit string @ UnitId of the player or pet whose threat to request.
--- @param mobUnit string @ ? - UnitId of the NPC whose threat table to query.
--- @return number @ status
function UnitThreatSituation(unit, mobUnit)
end
--- Whether a unit should be treated as if it was an actual player.
--- [https://wowpedia.fandom.com/wiki/API_UnitTreatAsPlayerForDisplay]
--- @param unit string
--- @return boolean @ treatAsPlayer
function UnitTreatAsPlayerForDisplay(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitTrialBankedLevels?action=edit&redlink=1]
--- @return void
function UnitTrialBankedLevels()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitTrialXP?action=edit&redlink=1]
--- @return void
function UnitTrialXP()
end
--- Checks if a specified unit is currently in a vehicle, including transitioning between seats.
--- [https://wowpedia.fandom.com/wiki/API_UnitUsingVehicle]
--- @param unit string @ UnitId of the unit to check.
--- @return boolean @ isTrue
function UnitUsingVehicle(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnitVehicleSeatCount?action=edit&redlink=1]
--- @return void
function UnitVehicleSeatCount()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitVehicleSeatInfo?action=edit&redlink=1]
--- @return void
function UnitVehicleSeatInfo()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitVehicleSkin?action=edit&redlink=1]
--- @return void
function UnitVehicleSkin()
end
--- [https://wowpedia.fandom.com/wiki/API_UnitWeaponAttackPower?action=edit&redlink=1]
--- @return void
function UnitWeaponAttackPower()
end
--- Needs summary.
--- [https://wowpedia.fandom.com/wiki/API_UnitWidgetSet]
--- @param unit string @ UnitId
--- @return number @ uiWidgetSet
function UnitWidgetSet(unit)
end
--- Return the current XP of a unit - only works if the unit is the player.
--- [https://wowpedia.fandom.com/wiki/API_UnitXP]
--- @param unit string @ The UnitId to select as a target.
--- @return number @ XP
function UnitXP(unit)
end
--- Return the max XP of a unit - only works if the unit is the player.
--- [https://wowpedia.fandom.com/wiki/API_UnitXPMax]
--- @param unit string @ The UnitId to select as a target.
--- @return number @ XP
function UnitXPMax(unit)
end
--- [https://wowpedia.fandom.com/wiki/API_UnlearnSpecialization?action=edit&redlink=1]
--- @return void
function UnlearnSpecialization()
end
--- Pays for, and unlocks the Void Storage [1]
--- [https://wowpedia.fandom.com/wiki/API_UnlockVoidStorage]
--- @return void
function UnlockVoidStorage()
end
--- Unmutes a sound file.
--- [https://wowpedia.fandom.com/wiki/API_UnmuteSoundFile]
--- @param soundFile_or_fileDataID unknown
--- @return void
function UnmuteSoundFile(soundFile_or_fileDataID)
end
--- [https://wowpedia.fandom.com/wiki/API_UpdateAddOnCPUUsage?action=edit&redlink=1]
--- @return void
function UpdateAddOnCPUUsage()
end
--- [https://wowpedia.fandom.com/wiki/API_UpdateAddOnMemoryUsage?action=edit&redlink=1]
--- @return void
function UpdateAddOnMemoryUsage()
end
--- [https://wowpedia.fandom.com/wiki/API_UpdateInventoryAlertStatus?action=edit&redlink=1]
--- @return void
function UpdateInventoryAlertStatus()
end
--- [https://wowpedia.fandom.com/wiki/API_UpdateWarGamesList?action=edit&redlink=1]
--- @return void
function UpdateWarGamesList()
end
--- When in windowed mode, updates the window. This also aligns it to the top of the screen and increases the size to max widowed size.
--- [https://wowpedia.fandom.com/wiki/API_UpdateWindow]
--- @return void
function UpdateWindow()
end
--- [https://wowpedia.fandom.com/wiki/API_UpgradeItem?action=edit&redlink=1]
--- @return void
function UpgradeItem()
end
--- Perform the action in the specified action slot.
--- [https://wowpedia.fandom.com/wiki/API_UseAction]
--- @param slot number @ The action action slot to use.
--- @param checkCursor number @ optional) - Can be 0, 1, or nil. Appears to indicate whether the action button was clicked (1) or used via hotkey (0); probably involved in placing skills/items in the action bar after they've been picked up. I can confirm this. If you pass 0 for checkCursor, it will use the action regardless of whether another item/skill is on the cursor. If you pass 1 for checkCursor, it will replace the spell/action on the slot with the new one.
--- @param onSelf number @ optional) - Can be 0, 1, or nil. If present and 1, then the action is performed on the player, not the target. If true is passed instead of 1, Blizzard produces a Lua error.
--- @return void
function UseAction(slot, checkCursor, onSelf)
end
--- Use an item from a container. If Merchant window is open, this will sell the item.
--- [https://wowpedia.fandom.com/wiki/API_UseContainerItem]
--- @param bagID number @ The bag id, where the item to use is located
--- @param slot number @ The slot in the bag, where the item to use is located
--- @param target string @ optional) - unit the item should be used on. If omitted, defaults to target if a the item must target someone.
--- @param reagentBankAccessible boolean @ optional) - This indicates, for cases where no target is given, if the item reagent bank is accessible (so bank frame is shown and switched to the reagent bank tab).
--- @return void
function UseContainerItem(bagID, slot, target, reagentBankAccessible)
end
--- [https://wowpedia.fandom.com/wiki/API_UseHearthstone?action=edit&redlink=1]
--- @return void
function UseHearthstone()
end
--- Use an item in a specific inventory slot.
--- [https://wowpedia.fandom.com/wiki/API_UseInventoryItem]
--- @param slotID unknown @ The inventory slot ID
--- @return void
function UseInventoryItem(slotID)
end
--- Uses an item, optionally on a specified target.
--- [https://wowpedia.fandom.com/wiki/API_UseItemByName]
--- @param name string @ name of the item to use.
--- @param target string @ optional) - unit to use the item on, defaults to target for items that can be used on others.
--- @return void
function UseItemByName(name, target)
end
--- [https://wowpedia.fandom.com/wiki/API_UseQuestLogSpecialItem?action=edit&redlink=1]
--- @return void
function UseQuestLogSpecialItem()
end
--- Use a toy in player's toybox.
--- [https://wowpedia.fandom.com/wiki/API_UseToy]
--- @param itemId number @ itemId of a toy.
--- @return void
function UseToy(itemId)
end
--- Use a toy in player's toybox.
--- [https://wowpedia.fandom.com/wiki/API_UseToyByName]
--- @param name string @ localized?) name of a toy.
--- @return void
function UseToyByName(name)
end
--- [https://wowpedia.fandom.com/wiki/API_UseWorldMapActionButtonSpellOnQuest?action=edit&redlink=1]
--- @return void
function UseWorldMapActionButtonSpellOnQuest()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimDecrement?action=edit&redlink=1]
--- @return void
function VehicleAimDecrement()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimDownStart?action=edit&redlink=1]
--- @return void
function VehicleAimDownStart()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimDownStop?action=edit&redlink=1]
--- @return void
function VehicleAimDownStop()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimGetAngle?action=edit&redlink=1]
--- @return void
function VehicleAimGetAngle()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimGetNormAngle?action=edit&redlink=1]
--- @return void
function VehicleAimGetNormAngle()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimGetNormPower?action=edit&redlink=1]
--- @return void
function VehicleAimGetNormPower()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimIncrement?action=edit&redlink=1]
--- @return void
function VehicleAimIncrement()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimRequestAngle?action=edit&redlink=1]
--- @return void
function VehicleAimRequestAngle()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimRequestNormAngle?action=edit&redlink=1]
--- @return void
function VehicleAimRequestNormAngle()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimSetNormPower?action=edit&redlink=1]
--- @return void
function VehicleAimSetNormPower()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimUpStart?action=edit&redlink=1]
--- @return void
function VehicleAimUpStart()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleAimUpStop?action=edit&redlink=1]
--- @return void
function VehicleAimUpStop()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleExit?action=edit&redlink=1]
--- @return void
function VehicleExit()
end
--- [https://wowpedia.fandom.com/wiki/API_VehicleNextSeat?action=edit&redlink=1]
--- @return void
function VehicleNextSeat()
end
--- [https://wowpedia.fandom.com/wiki/API_VehiclePrevSeat?action=edit&redlink=1]
--- @return void
function VehiclePrevSeat()
end
--- [https://wowpedia.fandom.com/wiki/API_ViewGuildRecipes?action=edit&redlink=1]
--- @return void
function ViewGuildRecipes()
end
--- [https://wowpedia.fandom.com/wiki/API_WarGameRespond?action=edit&redlink=1]
--- @return void
function WarGameRespond()
end
--- [https://wowpedia.fandom.com/wiki/API_WithdrawGuildBankMoney?action=edit&redlink=1]
--- @return void
function WithdrawGuildBankMoney()
end
--- Returns the absolue value of the number.
--- [https://wowpedia.fandom.com/wiki/API_abs]
--- @param num number @ number to return numeric (absolute) value of.
--- @return number @ absoluteValue
function abs(num)
end
--- [https://wowpedia.fandom.com/wiki/API_acos]
--- @return void
function acos()
end
--- [https://wowpedia.fandom.com/wiki/API_addframetext?action=edit&redlink=1]
--- @return void
function addframetext()
end
--- [https://wowpedia.fandom.com/wiki/API_asin]
--- @return void
function asin()
end
--- [https://wowpedia.fandom.com/wiki/API_assert?action=edit&redlink=1]
--- @return void
function assert()
end
--- [https://wowpedia.fandom.com/wiki/API_atan]
--- @return void
function atan()
end
--- [https://wowpedia.fandom.com/wiki/API_atan2?action=edit&redlink=1]
--- @return void
function atan2()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.arshift?action=edit&redlink=1]
--- @return void
function bit.arshift()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.band?action=edit&redlink=1]
--- @return void
function bit.band()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.bnot?action=edit&redlink=1]
--- @return void
function bit.bnot()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.bor?action=edit&redlink=1]
--- @return void
function bit.bor()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.bxor?action=edit&redlink=1]
--- @return void
function bit.bxor()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.lshift?action=edit&redlink=1]
--- @return void
function bit.lshift()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.mod?action=edit&redlink=1]
--- @return void
function bit.mod()
end
--- [https://wowpedia.fandom.com/wiki/API_bit.rshift?action=edit&redlink=1]
--- @return void
function bit.rshift()
end
--- ceil(value) returns the ceiling of the value (the next highest whole number) i.e. rounds value up
--- [https://wowpedia.fandom.com/wiki/API_ceil]
--- @param n unknown
--- @return unknown @ int
function ceil(n)
end
--- Control the garbage collector and query it for information. As of WoW 2.0, this is the same as the standard collectgarbage() in Lua, but prior to that it was quite different.
--- [https://wowpedia.fandom.com/wiki/API_collectgarbage]
--- @param opt string @ This function is a generic interface to the garbage collector. It performs different functions according to its first argument:
--- @param arg number @ used as an argument for the step, setpause and setstepmul calls.
--- @return void
function collectgarbage(opt, arg)
end
--- [https://wowpedia.fandom.com/wiki/API_coroutine.create?action=edit&redlink=1]
--- @return void
function coroutine.create()
end
--- [https://wowpedia.fandom.com/wiki/API_coroutine.resume?action=edit&redlink=1]
--- @return void
function coroutine.resume()
end
--- [https://wowpedia.fandom.com/wiki/API_coroutine.running?action=edit&redlink=1]
--- @return void
function coroutine.running()
end
--- [https://wowpedia.fandom.com/wiki/API_coroutine.status?action=edit&redlink=1]
--- @return void
function coroutine.status()
end
--- [https://wowpedia.fandom.com/wiki/API_coroutine.wrap?action=edit&redlink=1]
--- @return void
function coroutine.wrap()
end
--- [https://wowpedia.fandom.com/wiki/API_coroutine.yield?action=edit&redlink=1]
--- @return void
function coroutine.yield()
end
--- [https://wowpedia.fandom.com/wiki/API_cos]
--- @return void
function cos()
end
--- date() is a reference to the os.date function. It is put in the global table as the os module is not available.
--- [https://wowpedia.fandom.com/wiki/API_date]
--- @param format unknown
--- @param time unknown
--- @return void
function date(format, time)
end
--- [https://wowpedia.fandom.com/wiki/API_debuglocals?action=edit&redlink=1]
--- @return void
function debuglocals()
end
--- Starts the profiling timer.
--- [https://wowpedia.fandom.com/wiki/API_debugprofilestart]
--- @return void
function debugprofilestart()
end
--- Returns the amount of time since profiling was started.
--- [https://wowpedia.fandom.com/wiki/API_debugprofilestop]
--- @return number @ elapsedMilliseconds
function debugprofilestop()
end
--- Output a string representation of the current calling stack, similar to the standard Lua debug.traceback() call, which is not present in WoW.
--- [https://wowpedia.fandom.com/wiki/API_debugstack]
--- @param coroutine unknown @ Thread - The thread with the stack to examine (default - the calling thread)
--- @param start number @ the stack depth at which to start the stack trace (default 1 - the function calling debugstack, or the top of coroutine's stack)
--- @param count1 number @ the number of functions to output at the top of the stack (default 12)
--- @param count2 number @ the number of functions to output at the bottom of the stack (default 10)
--- @return string @ description
function debugstack(coroutine, start, count1, count2)
end
--- [https://wowpedia.fandom.com/wiki/API_deg?action=edit&redlink=1]
--- @return void
function deg()
end
--- [https://wowpedia.fandom.com/wiki/API_difftime?action=edit&redlink=1]
--- @return void
function difftime()
end
--- [https://wowpedia.fandom.com/wiki/API_error?action=edit&redlink=1]
--- @return void
function error()
end
--- [https://wowpedia.fandom.com/wiki/API_exp?action=edit&redlink=1]
--- @return void
function exp()
end
--- Returns a random number within the specified interval.
--- [https://wowpedia.fandom.com/wiki/API_fastrandom]
--- @param low number @ lower integer limit on the returned random value.
--- @param high number @ upper integer limit on the returned random value.
--- @return number @ rand
function fastrandom(low, high)
end
--- floor(value) returns the floor of the value (essentially it returns the whole part of the value) i.e. rounds value down
--- [https://wowpedia.fandom.com/wiki/API_floor]
--- @param value unknown
--- @return unknown @ val
function floor(value)
end
--- Taints the current execution path.
--- [https://wowpedia.fandom.com/wiki/API_forceinsecure]
--- @return void
function forceinsecure()
end
--- Apply the function f to the elements of the table passed. On each iteration the function f is passed the key-value pair of that element in the table.
--- [https://wowpedia.fandom.com/wiki/API_foreach]
--- @param tab unknown
--- @param func unknown
--- @return void
function foreach(tab, func)
end
--- From TableLibraryTutorial of lua-users.org.
--- [https://wowpedia.fandom.com/wiki/API_foreachi]
--- @param table unknown
--- @param f unknown
--- @return void
function foreachi(table, f)
end
--- Create a formatted string from the format and arguments provided. This is similar to the printf(format,...) function in C. An additional option %q returns string in a format that can safely be read back by Lua interpreter (puts quotes around a string and escapes special characters), but used by World of Warcraft to preparse all strings before saving them between sessions.
--- [https://wowpedia.fandom.com/wiki/API_format]
--- @param formatstring unknown
--- @param e1 unknown
--- @param e2 unknown
--- @param ... unknown
--- @return void
function format(formatstring, e1, e2, ...)
end
--- [https://wowpedia.fandom.com/wiki/API_frexp?action=edit&redlink=1]
--- @return void
function frexp()
end
--- Returns the amount of memory in use by Lua (in kilobytes).
--- [https://wowpedia.fandom.com/wiki/API_gcinfo]
--- @return number @ memoryInUse
function gcinfo()
end
--- [https://wowpedia.fandom.com/wiki/API_geterrorhandler?action=edit&redlink=1]
--- @return void
function geterrorhandler()
end
--- [https://wowpedia.fandom.com/wiki/API_getfenv?action=edit&redlink=1]
--- @return void
function getfenv()
end
--- [https://wowpedia.fandom.com/wiki/API_getmetatable?action=edit&redlink=1]
--- @return void
function getmetatable()
end
--- This is used to determine the size of a table. The size of a table is discussed at the top of this page.
--- [https://wowpedia.fandom.com/wiki/API_getn]
--- @param table unknown
--- @return unknown @ size
function getn(table)
end
--- [https://wowpedia.fandom.com/wiki/API_gmatch?action=edit&redlink=1]
--- @return void
function gmatch()
end
--- Substitutes text matching a pattern with a replacement.
--- [https://wowpedia.fandom.com/wiki/API_gsub]
--- @param s string @ String to search.
--- @param pattern string @ Pattern matching expression, covered in HOWTO: Use Pattern Matching or the Patterns Tutorial on Lua-Users.org.
--- @param replace string @ |function|table - Replacement text, or a function which may return replacement text, or a lookup table which may contain replacements (see details).
--- @param n number @ ?Optional. Could be nil. - The maximum number of substitutions (unlimited if omitted).
--- @return string, number @ text, count
function gsub(s, pattern, replace, n)
end
--- Creates a secure post hook for the specified function. Your hook will be called with the same arguments after the original call is performed.
--- [https://wowpedia.fandom.com/wiki/API_hooksecurefunc]
--- @param table unknown @ Optional Table - Table to hook the functionName key in; if omitted, defaults to the global table (_G).
--- @param functionName string @ name of the function being hooked.
--- @param hookfunc unknown @ Function - your hook function.
--- @return void
function hooksecurefunc(table, functionName, hookfunc)
end
--- Returns an iterator triple that allows the Lua for loop to iterate over the array portion of a table.
--- [https://wowpedia.fandom.com/wiki/API_ipairs]
--- @param table unknown
--- @return unknown, unknown, unknown @ iteratorFunc, table, startState
function ipairs(table)
end
--- Determines whether the current execution path is secure.
--- [https://wowpedia.fandom.com/wiki/API_issecure]
--- @return boolean @ secure
function issecure()
end
--- Determines whether the given globally-accessible variable is secure. A variable in this context could be any of the basic lua types such as functions or userdata.
--- [https://wowpedia.fandom.com/wiki/API_issecurevariable]
--- @param table table @ ?Optional. Could be nil. - table to check the the key in; if omitted, defaults to the globals table (_G).
--- @param variable string @ string key to check the taint of. Numbers will be converted to a string; other types will throw an error.
--- @return boolean, string @ isSecure, taint
function issecurevariable(table, variable)
end
--- [https://wowpedia.fandom.com/wiki/API_ldexp?action=edit&redlink=1]
--- @return void
function ldexp()
end
--- Parse a string as Lua code and return it as a reference to a function.
--- [https://wowpedia.fandom.com/wiki/API_loadstring]
--- @param luaCodeBlock string @ a string of Lua code. Can be very long.
--- @param chunkName string @ optionally name the code block. Will be shown as the file name in error messages. If not given, the file name will be [string: first line of your Lua code here...].
--- @return unknown, string @ func, errorMessage
function loadstring(luaCodeBlock, chunkName)
end
--- [https://wowpedia.fandom.com/wiki/API_log?action=edit&redlink=1]
--- @return void
function log()
end
--- [https://wowpedia.fandom.com/wiki/API_log10?action=edit&redlink=1]
--- @return void
function log10()
end
--- [https://wowpedia.fandom.com/wiki/API_math.abs?action=edit&redlink=1]
--- @return void
function math.abs()
end
--- [https://wowpedia.fandom.com/wiki/API_math.acos?action=edit&redlink=1]
--- @return void
function math.acos()
end
--- [https://wowpedia.fandom.com/wiki/API_math.asin?action=edit&redlink=1]
--- @return void
function math.asin()
end
--- [https://wowpedia.fandom.com/wiki/API_math.atan?action=edit&redlink=1]
--- @return void
function math.atan()
end
--- [https://wowpedia.fandom.com/wiki/API_math.atan2?action=edit&redlink=1]
--- @return void
function math.atan2()
end
--- [https://wowpedia.fandom.com/wiki/API_math.ceil?action=edit&redlink=1]
--- @return void
function math.ceil()
end
--- [https://wowpedia.fandom.com/wiki/API_math.cos?action=edit&redlink=1]
--- @return void
function math.cos()
end
--- [https://wowpedia.fandom.com/wiki/API_math.cosh?action=edit&redlink=1]
--- @return void
function math.cosh()
end
--- [https://wowpedia.fandom.com/wiki/API_math.deg?action=edit&redlink=1]
--- @return void
function math.deg()
end
--- [https://wowpedia.fandom.com/wiki/API_math.exp?action=edit&redlink=1]
--- @return void
function math.exp()
end
--- [https://wowpedia.fandom.com/wiki/API_math.floor?action=edit&redlink=1]
--- @return void
function math.floor()
end
--- [https://wowpedia.fandom.com/wiki/API_math.fmod?action=edit&redlink=1]
--- @return void
function math.fmod()
end
--- [https://wowpedia.fandom.com/wiki/API_math.frexp?action=edit&redlink=1]
--- @return void
function math.frexp()
end
--- [https://wowpedia.fandom.com/wiki/API_math.ldexp?action=edit&redlink=1]
--- @return void
function math.ldexp()
end
--- [https://wowpedia.fandom.com/wiki/API_math.log?action=edit&redlink=1]
--- @return void
function math.log()
end
--- [https://wowpedia.fandom.com/wiki/API_math.log10?action=edit&redlink=1]
--- @return void
function math.log10()
end
--- [https://wowpedia.fandom.com/wiki/API_math.max?action=edit&redlink=1]
--- @return void
function math.max()
end
--- [https://wowpedia.fandom.com/wiki/API_math.min?action=edit&redlink=1]
--- @return void
function math.min()
end
--- [https://wowpedia.fandom.com/wiki/API_math.modf?action=edit&redlink=1]
--- @return void
function math.modf()
end
--- [https://wowpedia.fandom.com/wiki/API_math.pow?action=edit&redlink=1]
--- @return void
function math.pow()
end
--- [https://wowpedia.fandom.com/wiki/API_math.rad?action=edit&redlink=1]
--- @return void
function math.rad()
end
--- [https://wowpedia.fandom.com/wiki/API_math.random?action=edit&redlink=1]
--- @return void
function math.random()
end
--- [https://wowpedia.fandom.com/wiki/API_math.sin?action=edit&redlink=1]
--- @return void
function math.sin()
end
--- [https://wowpedia.fandom.com/wiki/API_math.sinh?action=edit&redlink=1]
--- @return void
function math.sinh()
end
--- [https://wowpedia.fandom.com/wiki/API_math.sqrt?action=edit&redlink=1]
--- @return void
function math.sqrt()
end
--- [https://wowpedia.fandom.com/wiki/API_math.tan?action=edit&redlink=1]
--- @return void
function math.tan()
end
--- [https://wowpedia.fandom.com/wiki/API_math.tanh?action=edit&redlink=1]
--- @return void
function math.tanh()
end
--- [https://wowpedia.fandom.com/wiki/API_max?action=edit&redlink=1]
--- @return void
function max()
end
--- [https://wowpedia.fandom.com/wiki/API_min?action=edit&redlink=1]
--- @return void
function min()
end
--- [https://wowpedia.fandom.com/wiki/API_mod?action=edit&redlink=1]
--- @return void
function mod()
end
--- Creates a zero-size userdata object, optionally with a sharable empty metatable.
--- [https://wowpedia.fandom.com/wiki/API_newproxy]
--- @param boolean_or_otherproxy unknown
--- @return unknown @ obj
function newproxy(boolean_or_otherproxy)
end
--- Returns the next key/value pair for a given table and key.
--- [https://wowpedia.fandom.com/wiki/API_next]
--- @param table unknown
--- @param current unknown
--- @return unknown, unknown @ key, value
function next(table, current)
end
--- Returns an iterator triple that allows for loops to iterate over all key/value pairs in a table.
--- [https://wowpedia.fandom.com/wiki/API_pairs]
--- @param table unknown
--- @return unknown, unknown, unknown @ iteratorFunc, table, startState
function pairs(table)
end
--- Calls a function, returning a boolean indicating success as the first return value, and error text / return values as the following values.
--- [https://wowpedia.fandom.com/wiki/API_pcall]
--- @param func unknown @ Function - The function that will be called (from within) pcall().
--- @param arg1 unknown @ Variable - Any variable that is also to be passed with the function when its called (Optional).
--- @param arg2 unknown
--- @param ... unknown
--- @return boolean, string, unknown, unknown @ retOK, ret1, ret2, ...
function pcall(func, arg1, arg2, ...)
end
--- [https://wowpedia.fandom.com/wiki/API_rad?action=edit&redlink=1]
--- @return void
function rad()
end
--- Returns a random number within the specified interval.
--- [https://wowpedia.fandom.com/wiki/API_random]
--- @param low number @ lower integer limit on the returned random value.
--- @param high number @ upper integer limit on the returned random value.
--- @return number @ rand
function random(low, high)
end
--- [https://wowpedia.fandom.com/wiki/API_rawequal?action=edit&redlink=1]
--- @return void
function rawequal()
end
--- [https://wowpedia.fandom.com/wiki/API_rawget?action=edit&redlink=1]
--- @return void
function rawget()
end
--- Assigns a value to a key in the table, without invoking metamethods.
--- [https://wowpedia.fandom.com/wiki/API_rawset]
--- @param table table @ any valid table.
--- @param index unknown @ non-nil - any valid table index.
--- @param value any @ any value.
--- @return table @ table
function rawset(table, index, value)
end
--- [https://wowpedia.fandom.com/wiki/API_scrub?action=edit&redlink=1]
--- @return void
function scrub()
end
--- Calls the specified function without propagating taint to the caller.
--- [https://wowpedia.fandom.com/wiki/API_securecall]
--- @param func_or_functionName unknown
--- @param ... any @ any number of arguments to pass the function.
--- @return any @ ...
function securecall(func_or_functionName, ...)
end
--- Used to traverse a list. This function is usually used to capture the arguments passed to an ellipsis (...). The official usage of this function is to return a list (retN) starting from index to the end of the list (list).
--- [https://wowpedia.fandom.com/wiki/API_select]
--- @param index any @ non-zero number or the string #.
--- @param list unknown @ Usually an ellipsis (...).
--- @return unknown, unknown, unknown @ ret1, ret2, retN
function select(index, list)
end
--- Sets the function to be called when WoW encounters an error.
--- [https://wowpedia.fandom.com/wiki/API_seterrorhandler]
--- @param errFunc unknown @ function - The function to call when an error occurs. The function is passed a single argument containing the error message.
--- @return void
function seterrorhandler(errFunc)
end
--- [https://wowpedia.fandom.com/wiki/API_setfenv?action=edit&redlink=1]
--- @return void
function setfenv()
end
--- [https://wowpedia.fandom.com/wiki/API_setmetatable?action=edit&redlink=1]
--- @return void
function setmetatable()
end
--- Computes trigonometric functions.
--- [https://wowpedia.fandom.com/wiki/API_sin]
--- @param sine unknown
--- @return number @ radians
function sin(sine)
end
--- Sort the array portion of a table in-place (i.e. alter the table).
--- [https://wowpedia.fandom.com/wiki/API_sort]
--- @param table table @ Table the array portion of which you wish to sort.
--- @param compFunc unknown @ Optional Function - Comparison operator function; the function is passed two arguments (a, b) from the table, and should return a boolean value indicating whether a should appear before b in the sorted array. If omitted, the following comparison function is used:
--- @return void
function sort(table, compFunc)
end
--- [https://wowpedia.fandom.com/wiki/API_sqrt?action=edit&redlink=1]
--- @return void
function sqrt()
end
--- Returns the numerical code of a character in a string.
--- [https://wowpedia.fandom.com/wiki/API_strbyte]
--- @param s string @ The string to get the numerical code from
--- @param index number @ Optional argument specifying the index of the character to get the byte value of
--- @param endIndex number @ Optional argument specifying the index of the last character to return the value of
--- @return number @ indexByte
function strbyte(s, index, endIndex)
end
--- Generate a string representing the character codes passed as arguments. Numerical codes are not necessarily portable across platforms.
--- [https://wowpedia.fandom.com/wiki/API_strchar]
--- @param i1 unknown
--- @param i2 unknown
--- @param ... unknown
--- @return unknown @ s
function strchar(i1, i2, ...)
end
--- [https://wowpedia.fandom.com/wiki/API_strcmputf8i?action=edit&redlink=1]
--- @return void
function strcmputf8i()
end
--- [https://wowpedia.fandom.com/wiki/API_strconcat?action=edit&redlink=1]
--- @return void
function strconcat()
end
--- Returns a pair of numbers representing the start and end of the first occurrence of the pattern within the string, if it exists.
--- [https://wowpedia.fandom.com/wiki/API_strfind]
--- @param string string @ The string to examine.
--- @param pattern string @ The pattern to search for within string. This pattern is similar to Unix regular expressions, but is not the same -- see Lua Pattern matching for more details.
--- @param initpos number @ Index of the character within string to begin searching. As is usual for Lua string functions, 1 refers to the first character of the string, 2 to the second, etc. -1 refers to the last character of the string, -2 to the second last, etc. If this argument is omitted, it defaults to 1; i.e., the search begins at the beginning of string.
--- @param plain boolean @ Whether or not to disable regular expression matching. Defaults to false, so regex matching is usually enabled.
--- @return number, number @ startPos, endPos
function strfind(string, pattern, initpos, plain)
end
--- [https://wowpedia.fandom.com/wiki/API_string.byte?action=edit&redlink=1]
--- @return void
function string.byte()
end
--- [https://wowpedia.fandom.com/wiki/API_string.char?action=edit&redlink=1]
--- @return void
function string.char()
end
--- [https://wowpedia.fandom.com/wiki/API_string.find?action=edit&redlink=1]
--- @return void
function string.find()
end
--- [https://wowpedia.fandom.com/wiki/API_string.format?action=edit&redlink=1]
--- @return void
function string.format()
end
--- [https://wowpedia.fandom.com/wiki/API_string.gfind?action=edit&redlink=1]
--- @return void
function string.gfind()
end
--- [https://wowpedia.fandom.com/wiki/API_string.gmatch?action=edit&redlink=1]
--- @return void
function string.gmatch()
end
--- [https://wowpedia.fandom.com/wiki/API_string.gsub?action=edit&redlink=1]
--- @return void
function string.gsub()
end
--- [https://wowpedia.fandom.com/wiki/API_string.join?action=edit&redlink=1]
--- @return void
function string.join()
end
--- [https://wowpedia.fandom.com/wiki/API_string.len?action=edit&redlink=1]
--- @return void
function string.len()
end
--- [https://wowpedia.fandom.com/wiki/API_string.lower?action=edit&redlink=1]
--- @return void
function string.lower()
end
--- [https://wowpedia.fandom.com/wiki/API_string.match?action=edit&redlink=1]
--- @return void
function string.match()
end
--- [https://wowpedia.fandom.com/wiki/API_string.rep?action=edit&redlink=1]
--- @return void
function string.rep()
end
--- [https://wowpedia.fandom.com/wiki/API_string.reverse?action=edit&redlink=1]
--- @return void
function string.reverse()
end
--- [https://wowpedia.fandom.com/wiki/API_string.split?action=edit&redlink=1]
--- @return void
function string.split()
end
--- [https://wowpedia.fandom.com/wiki/API_string.sub?action=edit&redlink=1]
--- @return void
function string.sub()
end
--- [https://wowpedia.fandom.com/wiki/API_string.trim?action=edit&redlink=1]
--- @return void
function string.trim()
end
--- [https://wowpedia.fandom.com/wiki/API_string.upper?action=edit&redlink=1]
--- @return void
function string.upper()
end
--- Joins strings together with a delimiter.
--- [https://wowpedia.fandom.com/wiki/API_strjoin]
--- @param delimiter string @ The delimiter to insert between each string being joined.
--- @param string1 unknown
--- @param string2 unknown
--- @param ... unknown
--- @return string @ joinedString
function strjoin(delimiter, string1, string2, ...)
end
--- Return the length, in bytes, of the string passed.
--- [https://wowpedia.fandom.com/wiki/API_strlen]
--- @param s unknown
--- @return void
function strlen(s)
end
--- [https://wowpedia.fandom.com/wiki/API_strlenutf8?action=edit&redlink=1]
--- @return void
function strlenutf8()
end
--- Gets a string with all lower case letters instead of upper case.
--- [https://wowpedia.fandom.com/wiki/API_strlower]
--- @param s string @ The string to convert
--- @return string @ lowerS
function strlower(s)
end
--- Extract substrings by matching against a pattern.
--- [https://wowpedia.fandom.com/wiki/API_strmatch]
--- @param string string @ The string to examine.
--- @param pattern string @ The pattern to search for within string. This pattern is similar to Unix regular expressions, but is not the same -- see Lua Pattern matching for more details.
--- @param initpos number @ Index of the character within string to begin searching. As is usual for Lua string functions, 1 refers to the first character of the string, 2 to the second, etc. -1 refers to the last character of the string, -2 to the second last, etc. If this argument is omitted, it defaults to 1; i.e., the search begins at the beginning of string.
--- @return unknown, unknown, unknown @ match1, match2, ...
function strmatch(string, pattern, initpos)
end
--- Generate a string which is n copies of the string passed concatenated together.
--- [https://wowpedia.fandom.com/wiki/API_strrep]
--- @param s unknown
--- @param n unknown
--- @return void
function strrep(s, n)
end
--- Reverses all of the characters in a string.
--- [https://wowpedia.fandom.com/wiki/API_strrev]
--- @param string unknown
--- @return void
function strrev(string)
end
--- Splits a string using a delimiter (optionally: into a specified number of pieces)
--- [https://wowpedia.fandom.com/wiki/API_strsplit]
--- @param delimiter string @ Characters (bytes) that will be interpreted as delimiter characters (bytes) in the string.
--- @param subject string @ String to split.
--- @param pieces number @ optional) - Maximum number of pieces to make (the last piece would contain the rest of the string); by default, an unbounded number of pieces is returned.
--- @return void
function strsplit(delimiter, subject, pieces)
end
--- Return a substring of the string passed. The substring starts at i. If the third argument j is not given, the substring will end at the end of the string. If the third argument is given, the substring ends at and includes j.
--- [https://wowpedia.fandom.com/wiki/API_strsub]
--- @param s unknown
--- @param i unknown
--- @param j unknown
--- @return void
function strsub(s, i, j)
end
--- Trim characters (chars), off the left and right of str
--- [https://wowpedia.fandom.com/wiki/API_strtrim]
--- @param str string @ The input string.
--- @param chars string @ A list of characters to remove from the left and right of str.
--- @return string @ newstr
function strtrim(str, chars)
end
--- Make all the lower case characters in a string upper case.
--- [https://wowpedia.fandom.com/wiki/API_strupper]
--- @param s unknown
--- @return void
function strupper(s)
end
--- [https://wowpedia.fandom.com/wiki/API_table.concat?action=edit&redlink=1]
--- @return void
function table.concat()
end
--- [https://wowpedia.fandom.com/wiki/API_table.foreach?action=edit&redlink=1]
--- @return void
function table.foreach()
end
--- [https://wowpedia.fandom.com/wiki/API_table.foreachi?action=edit&redlink=1]
--- @return void
function table.foreachi()
end
--- [https://wowpedia.fandom.com/wiki/API_table.getn?action=edit&redlink=1]
--- @return void
function table.getn()
end
--- [https://wowpedia.fandom.com/wiki/API_table.insert]
--- @return void
function table.insert()
end
--- [https://wowpedia.fandom.com/wiki/API_table.maxn?action=edit&redlink=1]
--- @return void
function table.maxn()
end
--- [https://wowpedia.fandom.com/wiki/API_table.remove?action=edit&redlink=1]
--- @return void
function table.remove()
end
--- [https://wowpedia.fandom.com/wiki/API_table.removemulti?action=edit&redlink=1]
--- @return void
function table.removemulti()
end
--- Obsolete; throws an error if called.
--- [https://wowpedia.fandom.com/wiki/API_table.setn]
--- @param table table @ The table to be changed.
--- @param n number @ New table size.
--- @return void
function table.setn(table, n)
end
--- [https://wowpedia.fandom.com/wiki/API_table.sort?action=edit&redlink=1]
--- @return void
function table.sort()
end
--- [https://wowpedia.fandom.com/wiki/API_table.wipe?action=edit&redlink=1]
--- @return void
function table.wipe()
end
--- [https://wowpedia.fandom.com/wiki/API_tan]
--- @return void
function tan()
end
--- Returns a timestamp for the specified time or the current Unix time.
--- [https://wowpedia.fandom.com/wiki/API_time]
--- @param dateTable table @ ? - Table specifying a date/time to return the timestamp of; if omitted, a timestamp for the current time (per the local clock) will be returned. This table must have fields year, month, and day, and may have fields hour, min, sec, and isdst. For a description of these fields, see the Lua reference manual.
--- @return number @ timestamp
function time(dateTable)
end
--- From TableLibraryTutorial of lua-users.org.
--- [https://wowpedia.fandom.com/wiki/API_tinsert]
--- @param table unknown
--- @param pos unknown
--- @param value unknown
--- @return void
function tinsert(table, pos, value)
end
--- Attempts to parse the number expressed in a string
--- [https://wowpedia.fandom.com/wiki/API_tonumber]
--- @param str string @ number - this value will be converted to a numeric value.
--- @param radix number @ An optional argument specifies the base to interpret the numeral. The base may be any integer between 2 and 36, inclusive. In bases above 10, the letter `A´ (in either upper or lower case) represents 10, `B´ represents 11, and so forth, with `Z´ representing 35. In base 10 (the default), the number may have a decimal part, as well as an optional exponent part. In other bases, only unsigned integers are accepted.
--- @return number @ num
function tonumber(str, radix)
end
--- Returns the string representation of any value.
--- [https://wowpedia.fandom.com/wiki/API_tostring]
--- @param arg any @ Value to convert to a string.
--- @return string @ s
function tostring(arg)
end
--- From TableLibraryTutorial of lua-users.org.
--- [https://wowpedia.fandom.com/wiki/API_tremove]
--- @param table unknown
--- @param pos unknown
--- @return void
function tremove(table, pos)
end
--- This function returns the type of variable was passed to it.
--- [https://wowpedia.fandom.com/wiki/API_type]
--- @param arg1 any @ Value to query the type of.
--- @return string @ t
function type(arg1)
end
--- Returns values stored in a table's array portion.
--- [https://wowpedia.fandom.com/wiki/API_unpack]
--- @param t table @ A table to unpack values from.
--- @param first number @ ?Optional. Could be nil. - Index of the first value to return (default: 1).
--- @param last number @ ?Optional. Could be nil. - Index of the last value to return (default: #t).
--- @return unknown @ ...
function unpack(t, first, last)
end
--- Wipes a table of all contents.
--- [https://wowpedia.fandom.com/wiki/API_wipe]
--- @param table table @ The table to be cleared.
--- @return table @ table
function wipe(table)
end
--- [https://wowpedia.fandom.com/wiki/API_xpcall?action=edit&redlink=1]
--- @return void
function xpcall()
end
|
broj1 = 10 - math.random(19);
broj2 = 10 - math.random(19);
if (broj1 == broj2) then
if (broj1 == 0) then
broj1 = 5
broj2 = -5
else
broj1 = - broj1
end
else
if (broj1 > 0 and broj2 > 0) then
broj2 = - broj2
end
end
diff = broj1 - broj2
|
if GetObjectName(GetMyHero()) ~= "Riven" then return end
require('MapPositionGOS')
require('Inspired')
require('DeftLib')
require('DamageLib')
local RivenMenu = MenuConfig("Riven", "Riven")
RivenMenu:Menu("Combo", "Combo")
RivenMenu.Combo:Boolean("Q", "Use Q", true)
RivenMenu.Combo:Boolean("W", "Use W", true)
RivenMenu.Combo:Boolean("E", "Use E", true)
RivenMenu.Combo:Boolean("H", "Use Hydra", true)
RivenMenu:Menu("Harass", "Harass")
RivenMenu.Harass:Boolean("Q", "Use Q", true)
RivenMenu.Harass:Boolean("W", "Use W", true)
RivenMenu.Harass:Boolean("E", "Use E", true)
RivenMenu.Harass:Boolean("H", "Use Hydra", true)
RivenMenu:Menu("Killsteal", "Killsteal")
RivenMenu.Killsteal:Boolean("W", "Killsteal with W", true)
RivenMenu.Killsteal:Boolean("R", "Killsteal with R", true)
RivenMenu:Menu("Misc", "Misc")
if Ignite ~= nil then RivenMenu.Misc:Boolean("Autoignite", "Auto Ignite", true) end
RivenMenu.Misc:DropDown("cancel", "Cancel Animation", 1, {"Dance", "Taunt", "Laugh", "Joke", "Off"})
RivenMenu.Misc:KeyBinding("Flee", "Flee", string.byte("T"))
RivenMenu.Misc:KeyBinding("WallJump", "WallJump", string.byte("G"))
RivenMenu.Misc:Boolean("AutoW", "Auto W", true)
RivenMenu.Misc:Slider("AutoWCount", "if Enemies Around >", 3, 1, 5, 1)
RivenMenu:Menu("Drawings", "Drawings")
RivenMenu.Drawings:Boolean("Q", "Draw Q Range", true)
RivenMenu.Drawings:Boolean("W", "Draw W Range", true)
RivenMenu.Drawings:Boolean("E", "Draw E Range", true)
RivenMenu.Drawings:Boolean("R", "Draw R Range", true)
RivenMenu.Drawings:Boolean("EQ", "Draw EQ Range", true)
RivenMenu:Menu("Interrupt", "Interrupt (W)")
DelayAction(function()
local str = {[_Q] = "Q", [_W] = "W", [_E] = "E", [_R] = "R"}
for i, spell in pairs(CHANELLING_SPELLS) do
for _,k in pairs(GetEnemyHeroes()) do
if spell["Name"] == GetObjectName(k) then
RivenMenu.Interrupt:Boolean(GetObjectName(k).."Inter", "On "..GetObjectName(k).." "..(type(spell.Spellslot) == 'number' and str[spell.Spellslot]), true)
end
end
end
end, 0.001)
local QCast = 0
local lastE = 0
OnDraw(function(myHero)
local pos = GetOrigin(myHero)
if RivenMenu.Drawings.Q:Value() then DrawCircle(pos,275,1,25,GoS.Pink) end
if RivenMenu.Drawings.W:Value() then DrawCircle(pos,260,1,25,GoS.Yellow) end
if RivenMenu.Drawings.E:Value() then DrawCircle(pos,250,1,50,GoS.Blue) end
if RivenMenu.Drawings.R:Value() then DrawCircle(pos,1100,1,0,GoS.Green) end
if RivenMenu.Drawings.EQ:Value() then DrawCircle(pos,525,1,0,GoS.Red) end
end)
OnTick(function(myHero)
mousePos = GetMousePos()
local target = GetCurrentTarget()
if IOW:Mode() == "Combo" then
if IsReady(_E) and RivenMenu.Combo.E:Value() and ValidTarget(target, 440) and GetDistance(target) > GetRange(myHero)+GetHitBox(myHero) then
CastSkillShot(_E, GetOrigin(target))
end
if IsReady(_Q) and IsReady(_E) and RivenMenu.Combo.Q:Value() and RivenMenu.Combo.E:Value() and ValidTarget(target, 715) and GetDistance(target) > GetRange(myHero)+GetHitBox(target) then
CastSkillShot(_E, GetOrigin(target))
DelayAction(function() CastSkillShot(_Q, GetOrigin(target)) end, 0.267)
end
end
if IOW:Mode() == "Harass" then
if IsReady(_E) and RivenMenu.Harass.E:Value() and ValidTarget(target, 440) and GetDistance(target) > GetRange(myHero)+GetHitBox(myHero) then
CastSkillShot(_E, GetOrigin(target))
end
if IsReady(_Q) and IsReady(_E) and RivenMenu.Harass.Q:Value() and RivenMenu.Harass.E:Value() and ValidTarget(target, 715) and GetDistance(target) > GetRange(myHero)+GetHitBox(myHero)*3 then
CastSkillShot(_E, GetOrigin(target))
DelayAction(function() CastSkillShot(_Q, GetOrigin(target)) end, 0.267)
end
end
if IsReady(_W) and RivenMenu.Misc.AutoW:Value() and EnemiesAround2(GetOrigin(myHero),260,267) >= RivenMenu.Misc.AutoWCount:Value() then
CastSpell(_W)
end
if RivenMenu.Misc.Flee:Value() then
MoveToXYZ(mousePos)
if IsReady(_E) then
CastSkillShot(_E, mousePos)
end
if not IsReady(_E) and IsReady(_Q) and lastE + 350 < GetTickCount() then
CastSkillShot(_Q, mousePos)
end
end
if RivenMenu.Misc.WallJump:Value() then
local movePos1 = GetOrigin(myHero) + (Vector(mousePos) - GetOrigin(myHero)):normalized() * 75
local movePos2 = GetOrigin(myHero) + (Vector(mousePos) - GetOrigin(myHero)):normalized() * 450
if QCast < 2 and CanUseSpell(myHero, _Q) ~= ONCOOLDOWN then
CastSkillShot(_Q, mousePos)
end
if not MapPosition:inWall(movePos1) then
MoveToXYZ(mousePos)
else
if not MapPosition:inWall(movePos2) and CanUseSpell(myHero, _Q) ~= ONCOOLDOWN then
CastSkillShot(_Q, movePos2)
end
end
end
for i,enemy in pairs(GetEnemyHeroes()) do
if Ignite and RivenMenu.Misc.Autoignite:Value() then
if IsReady(Ignite) and 20*GetLevel(myHero)+50 > GetHP(enemy)+GetHPRegen(enemy)*3 and ValidTarget(enemy, 600) then
CastTargetSpell(enemy, Ignite)
end
end
if IsReady(_W) and ValidTarget(enemy, 260) and RivenMenu.Killsteal.W:Value() and GetHP(enemy) < getdmg("W",enemy) then
CastSpell(_W)
elseif IsReady(_R) and GetCastName(myHero, _R) ~= "RivenFengShuiEngine" and ValidTarget(enemy, 1100) and RivenMenu.Killsteal.R:Value() and GetHP(enemy) < getdmg("R",enemy) then
Cast(_R,enemy)
end
end
end)
OnProcessSpell(function(unit,spell)
if GetObjectType(unit) == Obj_AI_Hero and GetTeam(unit) ~= GetTeam(myHero) and IsReady(_W) then
if CHANELLING_SPELLS[spell.name] then
if ValidTarget(unit, 260) and GetObjectName(unit) == CHANELLING_SPELLS[spell.name].Name and RivenMenu.Interrupt[GetObjectName(unit).."Inter"]:Value() then
CastSpell(_W)
end
end
end
if unit == myHero then
if spell.name == "RivenFeint" then
lastE = GetTickCount()
end
local target = IOW:GetTarget()
if spell.name:lower():find("attack") then
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_W) and RivenMenu.Combo.W:Value() then
CastSpell(_W)
elseif GetItemSlot(myHero, 3074) > 0 and IsReady(GetItemSlot(myHero, 3074)) and RivenMenu.Combo.H:Value() then
CastSpell(GetItemSlot(myHero, 3074))
elseif GetItemSlot(myHero, 3077) > 0 and IsReady(GetItemSlot(myHero, 3077)) and RivenMenu.Combo.H:Value() then
CastSpell(GetItemSlot(myHero, 3077))
elseif IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_W) and RivenMenu.Harass.W:Value() then
CastSpell(_W)
elseif GetItemSlot(myHero, 3074) > 0 and IsReady(GetItemSlot(myHero, 3074)) and RivenMenu.Harass.H:Value() then
CastSpell(GetItemSlot(myHero, 3074))
elseif GetItemSlot(myHero, 3077) > 0 and IsReady(GetItemSlot(myHero, 3077)) and RivenMenu.Harass.H:Value() then
CastSpell(GetItemSlot(myHero, 3077))
elseif IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, GetWindUp(myHero) )
end
if spell.name == "RivenMartyr" then
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime )
end
if spell.name == "RivenTriCleave" then
IOW:ResetAA()
end
if spell.name == "ItemTiamatCleave" then
IOW:ResetAA()
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime )
end
if spell.name == "RivenFengShuiEngine" then
IOW:ResetAA()
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime )
end
if spell.name == "rivenizunablade" then
IOW:ResetAA()
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime )
end
end
end)
OnProcessSpellComplete(function(unit,spell)
if unit == myHero and spell.name == "RivenTriCleave" then
local Emotes = {EMOTE_DANCE, EMOTE_TAUNT, EMOTE_LAUGH, EMOTE_JOKE}
if RivenMenu.Misc.cancel:Value() ~= 5 then
CastEmote(Emotes[RivenMenu.Misc.cancel:Value()])
end
end
end)
OnUpdateBuff(function(unit,buff)
if unit == myHero and buff.Name == "RivenTriCleave" then
QCast = buff.Count
end
end)
OnRemoveBuff(function(unit,buff)
if unit == myHero and buff.Name == "RivenTriCleave" then
QCast = 0
end
end)
AddGapcloseEvent(_W, 260, false, RivenMenu)
|
object_mobile_tcg_familiar_tie_fighter = object_mobile_shared_tcg_familiar_tie_fighter:new {
}
ObjectTemplates:addTemplate(object_mobile_tcg_familiar_tie_fighter, "object/mobile/tcg_familiar_tie_fighter.iff")
|
local Application = dofile(_G.spoonPath.."/application.lua")
local actions = {
find = Application.createMenuItemEvent("Find", { focusAfter = true }),
newEvent = Application.createMenuItemEvent("New Event", { focusAfter = true }),
newCalendar = Application.createMenuItemEvent("New Calendar", { focusAfter = true }),
newCalendarSubscription = Application.createMenuItemEvent("New Calendar Subscription...", { focusAfter = true }),
}
local shortcuts = {
{ nil, "l", actions.find, { "Edit", "Find" } },
{ nil, "n", actions.newEvent, { "File", "New Event" } },
{ { "shift" }, "n", actions.newCalendar, { "File", "New Calendar" } },
{ { "shift" }, "s", actions.newCalendarSubscription, { "File", "New Calendar Subscription..." } },
{ { "cmd" }, "f", actions.find, { "Edit", "Find" } },
}
return Application:new("Calendar", shortcuts), shortcuts, actions
|
#!/usr/local/bin/lua -i
function newpoly (coef)
return function (x)
local value = coef[0] or 0
for exponent,coeficient in ipairs(coef) do
value = value + (coeficient * (x^exponent))
end
return value
end
end
function test()
local f = newpoly({[0]=3,0,1})
print(f(0))
print(f(5))
print(f(10))
end
|
--[[
Filename: DebugClassS.lua
Author: Sam@ke
--]]
DebugClassS = {}
function DebugClassS:constructor(parent)
self.coreClass = parent
mainOutput("DebugClassS was loaded.")
end
function DebugClassS:updateFast()
end
function DebugClassS:updateSlow()
end
function DebugClassS:destructor()
mainOutput("DebugClassS was stopped.")
end
|
function Player_OnEnterWorld(event, plr)
if plr:HasAura(69127) == true then
plr:RemoveAura(69127)
end
if plr:GetMapId() == 631 then
if (plr:HasAura(69127) == false) then
SetDBCSpellVar(69127, "c_is_flags", 0x01000)
plr:CastSpell(69127)
end
end
end
RegisterServerHook(4, "Player_OnEnterWorld")
|
--{blocks={{1238066, {11.547, 0}, command={}},{1238068},{1238067, {-11.547, 0}, 3.142, command={blueprint={blocks={{1238067, {11.547, 0}, command={}}}}}}}}
|
naboo_capper_spineflap_escort_neutral_none = Lair:new {
mobiles = {{"spineflap_queen",1},{"spineflap_handmaiden",2},{"spineflap_guard",3}},
spawnLimit = 15,
buildingsVeryEasy = {},
buildingsEasy = {},
buildingsMedium = {},
buildingsHard = {},
buildingsVeryHard = {},
buildingType = "none",
}
addLairTemplate("naboo_capper_spineflap_escort_neutral_none", naboo_capper_spineflap_escort_neutral_none)
|
local K = unpack(select(2, ...))
local Module = K:NewModule("DelayGMOTD", "AceEvent-3.0", "AceTimer-3.0")
local _G = _G
local pairs = pairs
local string_len = string.len
local table_insert = table.insert
local table_remove = table.remove
local CHAT_FRAMES = _G.CHAT_FRAMES
local ChatFrame_SystemEventHandler = _G.ChatFrame_SystemEventHandler
local ChatTypeGroup = _G.ChatTypeGroup
local CreateFrame = _G.CreateFrame
local GetGuildRosterMOTD = _G.GetGuildRosterMOTD
local function applyChatFrameSEH(...)
return ChatFrame_SystemEventHandler(...)
end
table_remove(ChatTypeGroup.GUILD, 2)
function Module:CreateDelayGMOTD()
local delay, checks, delayFrame, chat = 0, 0, CreateFrame("Frame")
table_insert(ChatTypeGroup.GUILD, 2, "GUILD_MOTD")
delayFrame:SetScript("OnUpdate", function(df, elapsed)
delay = delay + elapsed
if delay < 5 then
return
end
local msg = GetGuildRosterMOTD()
if msg and string_len(msg) > 0 then
for _, frame in pairs(CHAT_FRAMES) do
chat = _G[frame]
if chat and chat:IsEventRegistered("CHAT_MSG_GUILD") then
applyChatFrameSEH(chat, "GUILD_MOTD", msg)
chat:RegisterEvent("GUILD_MOTD")
end
end
df:SetScript("OnUpdate", nil)
else -- 5 seconds can be too fast for the API response. let's try once every 5 seconds (max 5 checks).
delay, checks = 0, checks + 1
if checks >= 5 then
df:SetScript("OnUpdate", nil)
end
end
end)
end
function Module:OnEnable()
self:CreateDelayGMOTD()
end
|
-- scripts.lua
------------------------------------------
-- example for register capture dll
------------------------------------------
local captureList = {
"demoCap", -- demoCap.dll
}
local PS_SPEED_UNKNOWN = 0
local PS_SPEED_LOW = 1
local PS_SPEED_FULL = 2
local PS_SPEED_HIGH = 3
local PS_SPEED_SUPER = 4
local PS_SPEED_MASK = 0x0f
function valid_capture()
return table.concat(captureList, ",")
end
------------------------------------------
-- example for file read/write
------------------------------------------
function valid_filter()
return "example file (*.example);;All files (*.*)"
end
function open_file(name, packet_handler, context)
-- TODO: open and parse the file
local ack = "\xd2"
local nak = "\x5a"
local pkt = ack
local count = 10
local status = PS_SPEED_FULL
for i=1, count do
local timestamp_in_second = 1
local timestamp_in_nano_second = i
-- pending here to got packet data will not block UI, the file reader is running in a background thread
packet_handler(context, timestamp_in_second, timestamp_in_nano_second, pkt, status, i ,10)
pkt = pkt == ack and nak or ack
end
return count
end
function write_file(name, packet_handler, context)
local count = 0
while true do
local ts, nano, packet, status = packet_handler(context)
if ts and nano and packet then
-- TODO: write packet to file
print(ts,nano,#packt, status or 0)
count = count + 1
else
break
end
end
return count
end
------------------------------------------
-- example for update graph viewer
------------------------------------------
local parser_info = nil
function parser_reset()
parser_info = nil
end
---- Graph element format
-- total_width;(name1,data1,backgroundcolor,width[,textColor[,separator_width]])[;(name2,data2...)];flags
-- flags are defined as below, F_PACKET,F_TRANSACTION,F_XFER must near the ';' sign
local F_PACKET = "("
local F_TRANSACTION= "["
local F_XFER = "{"
local F_ACK = "A"
local F_NAK = "N"
local F_NYET = "N"
local F_STALL = "S"
local F_SOF = "F"
local F_INCOMPLETE = "I"
local F_ISO = "O"
local F_ERROR = "E"
local F_PING = "P"
function parser_append_packet(ts, nano, pkt, status, id, transId, handler, context)
if parser_info then return end
local speed = (status or 0) & PS_SPEED_MASK
parser_info = {}
local topItem = "1000;(top name,top data,red,100);(top name2,top data2,blue,100,white,40);(top name3,top data3,yellow,100,red);" .. F_XFER
local midItem = "1000;(mid name,mid data,red,100);(mid name2,mid data2,blue,100,white,40);(mid name3,mid data3,yellow,100,red);" .. F_TRANSACTION
local botItem = "1000;(bot name,bot "..ts..",red,100);(bot name2,bot "..nano..",blue,100,white,40);(bot name3,bot data3,yellow,100,red);" .. F_PACKET
local highlight = transId
-- ADD ack items
r = handler(context, topItem .. F_ACK, highlight, id, 1, -1, -1) -- top id:1
highlight = highlight + 1
r = handler(context, midItem .. F_ACK, highlight, id, 1, 1, -1) -- top id:1, mid id:1
highlight = highlight + 1
r = handler(context, botItem .. F_ACK, highlight, id, 1, 1, 1) -- top 1d:1, mid 1d:1, bot id:1
-- ADD ISO items
highlight = highlight + 1
r = handler(context, topItem .. F_ISO, highlight, id, 2, -1, -1) -- top id:2
highlight = highlight + 1
r = handler(context, midItem .. F_ISO, highlight, id, 2, 2, -1) -- top id:2, mid id:2
highlight = highlight + 1
r = handler(context, botItem .. F_ISO, highlight, id, 2, 2, 2) -- top id:2, mid id:2, bot id:2
-- update exist item , change it's flag to NAK
r = handler(context, botItem .. F_NAK, transId + 2, id, 1, 1, 1) -- top id:1, mid id:1, bot id:1, already exist, update it
end
function parser_get_info(id1, id2, id3)
local item = "Top item, always transfer data"
if id2 and id2>0 then item = "Middle Item, always transaction data" end
if id3 and id3>0 then item = "Bottom Item, always packet data" end
local html = "<h1>"..item.."</h1> The graph element ID is " .. string.format("%d,%d,%d",id1 or -1, id2 or -1,id3 or -1)
local data = "example data \x11\x22\x33" .. html
return data, html
end
|
function BossModel_BionicCommando(player, BossData)
-- Minimum Required
local BossCharacter = BossCreateStartRound(BossData, "boss-vs-players-assets::BionicCommando")
player:Possess(BossCharacter)
-- End minimum required
end
Package.Export("BossModel_BionicCommando", BossModel_BionicCommando)
|
-----------------------------------------
--additional dirt sprites functionality--
-----------------------------------------
--this is an updated More Dirt Sprites functionality by piber20 https://steamcommunity.com/sharedfiles/filedetails/?id=1201700604 but only dirt, womb, scarred, and flooded sprites as to be consistent with the version added to the game.
local BackdropType = { --we make this enum here to make it easier for us to deal with backdrops
BASEMENT = 1,
CELLAR = 2,
BURNING_BASEMENT = 3,
CAVES = 4,
CATACOMBS = 5,
FLOODED_CAVES = 6,
DEPTHS = 7,
NECROPOLIS = 8,
DANK_DEPTHS = 9,
WOMB = 10,
UTERO = 11,
SCARRED_WOMB = 12,
BLUE_WOMB = 13,
SHEOL = 14,
CATHEDRAL = 15,
DARK_ROOM = 16,
CHEST = 17,
MEGA_SATAN = 18,
LIBRARY = 19,
SHOP = 20,
ISAACS_ROOM = 21,
BARREN_ROOM = 22,
SECRET_ROOM = 23,
DICE_ROOM = 24,
ARCADE = 25,
ERROR_ROOM = 26,
BLUE_SECRET = 27,
ULTRA_GREED = 28
}
local DirtType = { --custom enum that tells us which dirt sprite to use
NONE = -1,
DIRT = 0,
WOMB = 1,
SCARRED = 2,
FLOODED = 3
}
local BackdropToDirt = { --this table is used to quickly get what dirt type is used for what backdrop, if not specified uses brown dirt
[BackdropType.FLOODED_CAVES] = DirtType.FLOODED,
[BackdropType.WOMB] = DirtType.WOMB,
[BackdropType.UTERO] = DirtType.WOMB,
[BackdropType.SCARRED_WOMB] = DirtType.SCARRED,
[BackdropType.ERROR_ROOM] = DirtType.NONE
}
local deliriumWasInRoom = false --set to true if delirium was in the room, when the room changes this gets set back to false
function CommunityVisualFixesScriptedChanges.GetDirtToUse(backdrop) --this is a function that returns what dirt type we should use, uses the DirtType enum we created just above
local dirtToUse = BackdropToDirt[backdrop] or DirtType.DIRT --if there is no entry in BackdropToDirt, defaults to regular brown dirt
--this disables ourselves if we're in a custom stage added by a mod (like revelations)
if StageAPI and StageAPI.InNewStage and StageAPI.InNewStage() then
dirtToUse = DirtType.NONE
end
--return our dirtToUse value
return dirtToUse
end
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites = {}
function CommunityVisualFixesScriptedChanges.UpdateDirtSprite(entity)
local sprite = entity:GetSprite()
local spritePath = string.lower(sprite:GetFilename())
if CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites[spritePath] then
local frameCount = entity.FrameCount
local thisType = entity.Type
local thisVariant = entity.Variant
local thisSubType = entity.SubType
local thisSecondInt = entity.I2
local room = Game():GetRoom()
local thisBackdrop = room:GetBackdropType()
local data = entity:GetData()
data.CVFLastType = data.CVFLastType or thisType
data.CVFLastVariant = data.CVFLastVariant or thisVariant
data.CVFLastSubType = data.CVFLastSubType or thisSubType
data.CVFLastBackdrop = data.CVFLastBackdrop or thisBackdrop
data.CVFLastSecondInt = data.CVFLastSecondInt or thisSecondInt
local isDelirium = data.CVFIsDeliriousBoss or deliriumWasInRoom
--the health one is the only way i can think of to detect the frail's second phase
if frameCount <= 1
or data.CVFLastType ~= thisType
or data.CVFLastVariant ~= thisVariant
or data.CVFLastSubType ~= thisSubType
or data.CVFLastBackdrop ~= thisBackdrop
or data.CVFLastSecondInt ~= thisSecondInt
or isDelirium and frameCount == 2 then
if thisType == EntityType.ENTITY_PIN and thisVariant == 2 and thisSecondInt == 1 then
data.CVFfrailSecondPhase = true --special handling for the frail, ugh
end
local dirtTable = CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites[spritePath]
local layerTable = CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites[spritePath].Layers or {0}
local dirtToUse = CommunityVisualFixesScriptedChanges.GetDirtToUse(thisBackdrop) --get what dirt sprite we should use
if dirtToUse ~= DirtType.NONE then
local spritesheet = dirtTable[dirtToUse]
if spritesheet ~= nil then --if the spritesheet local var was set...
--trying to make the frail's second phase work, ugh
if data.CVFfrailSecondPhase then
local frailPrefix = string.sub(spritesheet, 0, 35)
local frailSuffix = string.sub(spritesheet, 36, string.len(spritesheet))
if string.match(frailPrefix, "gfx/bosses/afterbirth/boss_thefrail") then
spritesheet = frailPrefix .. "2" .. frailSuffix --this basically modifies the spritesheet to add 2 after "boss_thefrail"
end
end
--delirium dirt sprites
local spritesheetPrefix = string.sub(spritesheet, 0, 11)
local spritesheetSuffix = string.sub(spritesheet, 12, string.len(spritesheet))
if string.match(spritesheetPrefix, "gfx/bosses/") and (data.CVFIsDeliriousBoss or deliriumWasInRoom) then
spritesheet = spritesheetPrefix .. "afterbirthplus/deliriumforms/" .. spritesheetSuffix --this points the spritesheet to the delirium version instead
spritesheet = string.gsub(spritesheet, "_dirt", "")
spritesheet = string.gsub(spritesheet, "_womb", "")
spritesheet = string.gsub(spritesheet, "_scarred", "")
spritesheet = string.gsub(spritesheet, "_flooded", "")
end
--apply the sprites
for _,layer in pairs(layerTable) do
sprite:ReplaceSpritesheet(layer, spritesheet) --replace every layer with the spritesheet
end
sprite:LoadGraphics() --apply the graphics
end
end
end
data.CVFLastType = thisType
data.CVFLastVariant = thisVariant
data.CVFLastSubType = thisSubType
data.CVFLastBackdrop = thisBackdrop
data.CVFLastSecondInt = thisSecondInt
end
end
CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_NPC_INIT, function(_, npc)
deliriumWasInRoom = true --set this to true as if this callback happens then delirium probably exists
end, EntityType.ENTITY_DELIRIUM)
CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, function()
deliriumWasInRoom = false
if Isaac.CountEntities(nil, EntityType.ENTITY_DELIRIUM, -1, -1) > 0 then --get if delirium was in the room
deliriumWasInRoom = true
end
end)
CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_USE_ITEM, function(_, itemID, rng)
for _, entity in pairs(Isaac.GetRoomEntities()) do
if entity.FrameCount <= 1 and entity:IsBoss() and entity:HasEntityFlags(EntityFlag.FLAG_FRIENDLY) then --try to figure out if a friendly boss has just spawned
local data = entity:GetData()
data.CVFIsDeliriousBoss = true
end
end
end, CollectibleType.COLLECTIBLE_DELIRIOUS)
-----------
--ENEMIES--
-----------
CommunityVisualFixesScriptedChanges.DirtSpritesEntitiesFixes = {
EntityType.ENTITY_FRED,
EntityType.ENTITY_LUMP,
EntityType.ENTITY_NIGHT_CRAWLER,
EntityType.ENTITY_PARA_BITE,
EntityType.ENTITY_ROUNDY,
EntityType.ENTITY_ULCER,
EntityType.ENTITY_PIN,
EntityType.ENTITY_POLYCEPHALUS,
EntityType.ENTITY_MR_FRED,
EntityType.ENTITY_STAIN,
EntityType.ENTITY_DELIRIUM
}
local function fixesUpdate(_, npc)
CommunityVisualFixesScriptedChanges.UpdateDirtSprite(npc)
end
for _,entityId in ipairs(CommunityVisualFixesScriptedChanges.DirtSpritesEntitiesFixes) do
CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_NPC_RENDER, fixesUpdate, entityId)
CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_NPC_INIT, fixesUpdate, entityId)
end
-- CommunityVisualFixesScriptedChanges.DirtSpritesEntitiesExtras = {
-- EntityType.ENTITY_PITFALL,
-- EntityType.ENTITY_LITTLE_HORN,
-- EntityType.ENTITY_BIG_HORN
-- }
-- local function extrasUpdate(_, npc)
-- if CommunityVisualFixesResources then
-- CommunityVisualFixesScriptedChanges.UpdateDirtSprite(npc)
-- end
-- end
-- for _,entityId in ipairs(CommunityVisualFixesScriptedChanges.DirtSpritesEntitiesExtras) do
-- CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_NPC_RENDER, extrasUpdate, entityId)
-- CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_NPC_INIT, extrasUpdate, entityId)
-- end
local prefix = "gfx/monsters/classic/monster_197_fred"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/059.000_fred.anm2"] = {
[DirtType.DIRT] = prefix .. "_dirt" .. suffix,
[DirtType.WOMB] = prefix .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/monsters/classic/monster_198_lump"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/056.000_lump.anm2"] = {
[DirtType.DIRT] = prefix .. "_dirt" .. suffix,
[DirtType.WOMB] = prefix .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/monsters/rebirth/monster_255_nightcrawler"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/255.000_nightcrawler.anm2"] = {
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/monsters/classic/monster_199_parabite"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/058.000_para-bite.anm2"] = {
[DirtType.DIRT] = prefix .. "_dirt" .. suffix,
[DirtType.WOMB] = prefix .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/monsters/afterbirth/058.001_scarredparabite"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/058.001_scarred para-bite.anm2"] = {
[DirtType.DIRT] = prefix .. "_dirt" .. suffix,
[DirtType.WOMB] = prefix .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/monsters/rebirth/monster_244_roundworm"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/244.000_round worm.anm2"] = {
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/monsters/afterbirthplus/tubeworm"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/244.001_tube worm.anm2"] = {
[DirtType.DIRT] = prefix .. "_dirt" .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. suffix
}
local prefix = "gfx/monsters/afterbirth/276.000_roundy"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/276.000_roundy.anm2"] = {
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/monsters/afterbirth/289.000_ulcer"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/289.000_ulcer.anm2"] = {
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
-- local prefix = "gfx/monsters/afterbirth/291.000_pitfall"
-- local suffix = ".png"
-- CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/291.000_pitfall.anm2"] = {
-- [DirtType.DIRT] = prefix .. suffix,
-- [DirtType.WOMB] = prefix .. "_womb" .. suffix,
-- [DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
-- [DirtType.FLOODED] = prefix .. "_flooded" .. suffix
-- }
----------
--BOSSES--
----------
local prefix = "gfx/bosses/classic/boss_019_pin"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/062.000_pin.anm2"] = {
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/bosses/classic/boss_062_scolex"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/062.001_scolex.anm2"] = {
[DirtType.DIRT] = prefix .. "_dirt" .. suffix,
[DirtType.WOMB] = prefix .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/bosses/afterbirth/boss_thefrail"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/062.002_thefrail.anm2"] = {
["Layers"] = {0,1,2,3,4},
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/bosses/rebirth/polycephalus"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/269.000_polycephalus.anm2"] = {
["Layers"] = {0,1,2},
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/bosses/rebirth/megafred"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/270.000_megafred.anm2"] = {
["Layers"] = {0,1},
[DirtType.DIRT] = prefix .. "_dirt" .. suffix,
[DirtType.WOMB] = prefix .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
local prefix = "gfx/bosses/afterbirth/thestain"
local suffix = ".png"
CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/401.000_thestain.anm2"] = {
["Layers"] = {0,1,2,3},
[DirtType.DIRT] = prefix .. suffix,
[DirtType.WOMB] = prefix .. "_womb" .. suffix,
[DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
[DirtType.FLOODED] = prefix .. "_flooded" .. suffix
}
-- local prefix = "gfx/bosses/afterbirth/littlehorn"
-- local suffix = ".png"
-- CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/404.000_littlehorn.anm2"] = {
-- ["Layers"] = {0,1,2},
-- [DirtType.DIRT] = prefix .. suffix,
-- [DirtType.WOMB] = prefix .. "_womb" .. suffix,
-- [DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
-- [DirtType.FLOODED] = prefix .. "_flooded" .. suffix
-- }
-- local prefix = "gfx/items/pick ups/pickup_016_bomb"
-- local suffix = ".png"
-- CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/004.004_megatroll bomb.anm2"] = {
-- ["Layers"] = {1},
-- [DirtType.DIRT] = prefix .. suffix,
-- [DirtType.WOMB] = prefix .. "_womb" .. suffix,
-- [DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
-- [DirtType.FLOODED] = prefix .. "_flooded" .. suffix
-- }
-- CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/004.003_troll bomb.anm2"] = {
-- ["Layers"] = {1},
-- [DirtType.DIRT] = prefix .. suffix,
-- [DirtType.WOMB] = prefix .. "_womb" .. suffix,
-- [DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
-- [DirtType.FLOODED] = prefix .. "_flooded" .. suffix
-- }
-- function CommunityVisualFixesScriptedChanges:onBombUpdate(entity) --resprite little horn's bombs too
-- if CommunityVisualFixesResources then --check if the resources mod exists
-- local sprite = entity:GetSprite()
-- if sprite:IsPlaying("BombReturn") then
-- CommunityVisualFixesScriptedChanges.UpdateDirtSprite(entity)
-- end
-- end
-- end
-- CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_BOMB_UPDATE, CommunityVisualFixesScriptedChanges.onBombUpdate)
-- CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_BOMB_INIT, CommunityVisualFixesScriptedChanges.onBombUpdate)
-- local prefix = "gfx/bosses/afterbirthplus/boss_bighorn"
-- local suffix = ".png"
-- CommunityVisualFixesScriptedChanges.Anm2ToDirtSprites["gfx/411.000_bighorn.anm2"] = {
-- ["Layers"] = {0,1,2,3},
-- [DirtType.DIRT] = prefix .. suffix,
-- [DirtType.WOMB] = prefix .. "_womb" .. suffix,
-- [DirtType.SCARRED] = prefix .. "_scarred" .. suffix,
-- [DirtType.FLOODED] = prefix .. "_flooded" .. suffix
-- }
----------------------------------------
--additional pit sprites functionality--
----------------------------------------
CommunityVisualFixesScriptedChanges:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, function()
--dont do this if we're in a custom stage added by a mod (like revelations)
if StageAPI and StageAPI.InNewStage and StageAPI.InNewStage() then
return
end
if CommunityVisualFixesResources then --check if the resources mod exists
local room = Game():GetRoom() --get the current room
local backdrop = room:GetBackdropType() --get the room's current backdrop
--get what pit sprite we should use
local pitSprite = nil
if backdrop == BackdropType.SCARRED_WOMB then
local level = Game():GetLevel()
local stage = level:GetStage()
if stage == 12 then
pitSprite = "grid_pit_scarredwomb" --replace scarred womb pits in the void with a bloodless texture because they appear as regular caves pits for some reason
end
end
--only replace the pit sprites if the value isn't still nil
if pitSprite ~= nil then
for i=1, room:GetGridSize() do
local gridEntity = room:GetGridEntity(i)
if gridEntity ~= nil then
if gridEntity:ToPit() then
local sprite = gridEntity.Sprite
local spritePath = string.lower(sprite:GetFilename())
if spritePath == "gfx/grid/grid_pit.anm2" then
sprite:ReplaceSpritesheet(0, "gfx/grid/" .. pitSprite .. ".png")
sprite:LoadGraphics()
gridEntity.Sprite = sprite
end
end
end
end
end
end
end)
|
do --- rref points into invariant part 1
local x,y=1,2; for i=1,100 do x=x+y; y=i end
assert(y == 100)
end
do --- rref points into invariant part 2
local x,y=1,2; for i=1,100.5 do x=x+y; y=i end
assert(y == 100)
end
do --- rref points into invariant part 3
local x,y=1,2; for i=1,100 do x,y=y,x end
assert(x == 1)
assert(y == 2)
end
do --- rref points into invariant part 4
local x,y,z=1,2,3; for i=1,100 do x,y,z=y,z,x end
assert(x == 2)
assert(y == 3)
assert(z == 1)
end
do --- rref points into invariant part 5
local x,y,z=1,2,3; for i=1,100 do x,y,z=z,x,y end
assert(x == 3)
assert(y == 1)
assert(z == 2)
end
do --- rref points into invariant part 6
local a,x,y,z=0,1,2,3; for i=1,100 do a=a+x; x=y; y=z; z=i end
assert(a == 4759)
assert(x == 98)
assert(y == 99)
assert(z == 100)
end
do --- variant slot, but no corresponding SLOAD i-1
local x,y=1,2; for i=1,100 do x=i; y=i-1 end
assert(x == 100)
assert(y == 99)
end
do --- variant slot, but no corresponding SLOAD i+1
local x,y=1,2; for i=1,100 do x=i; y=i+1 end
assert(x == 100)
assert(y == 101)
end
do --- variant slot, but no corresponding SLOAD side exit
local x=0; for i=1,100 do if i==90 then break end x=i end
assert(x == 89)
end
do --- dup lref from variant slot (suppressed)
local x,y=1,2; for i=1,100 do x=i; y=i end
assert(x == 100)
assert(y == 100)
end
do --- const rref
local x,y=1,2 local bxor,tobit=bit.bxor,bit.tobit;
for i=1,100 do x=bxor(i,y); y=tobit(i+1) end
assert(x == 0)
assert(y == 101)
end
do --- dup rref (ok)
local x,y,z1,z2=1,2,3,4 local bxor,tobit=bit.bxor,bit.tobit;
for i=1,100 do x=bxor(i,y); z2=tobit(i+5); z1=bxor(x,i+5); y=tobit(i+1) end
assert(x == 0)
assert(y == 101)
assert(z1 == 105)
assert(z2 == 105)
end
do --- variant slot, no corresponding SLOAD
for i=1,5 do
local a, b = 1, 2
local bits = 0
while a ~= b do
bits = bits + 1
a = b
b = bit.lshift(b, 1)
end
assert(bits == 32)
end
end
do --- don't eliminate PHI if referenced from snapshot
local t = { 0 }
local a = 0
for i=1,100 do
local b = t[1]
t[1] = i + a
a = b
end
assert(a == 2500)
assert(t[1] == 2550)
end
do --- don't eliminate PHI if referenced from snapshot
local x = 1
local function f()
local t = {}
for i=1,200 do t[i] = i end
for i=1,200 do
local x1 = x
x = t[i]
if i > 100 then return x1 end
end
end
assert(f() == 100)
end
do --- don't eliminate PHI if referenced from another non-redundant PHI
local t = {}
for i=1,256 do
local a, b, k = i, math.floor(i/2), -i
while a > 1 and t[b] > k do
t[a] = t[b]
a = b
b = math.floor(a/2)
end
t[a] = k
end
local x = 0
for i=1,256 do x = x + bit.bxor(i, t[i]) end
assert(x == -41704)
end
|
local sd = _G.source_directory
local libd = _G.library_directory
local Items = { items = {} }
function Items:newItem(x, y, w, h, name, consumable)
local item = {
x = x,
y = y,
w = w,
h = h,
name = name,
consumable = consumable or false,
dropped = true
}
self.items[#self.items+1] = item
end
function Items:removeItem(i)
self.items[i] = nil
end
function Items:draw()
for i = 1, #self.items do
local item = self.items[i]
love.graphics.setColor(0,255,0)
love.graphics.rectangle("fill", item.x, item.y, item.w, item.h)
end
end
return Items
|
--
--[[
---> 普通基于SQL脚本形式的数据查询适配器
--------------------------------------------------------------------------
---> 参考文献如下
----->
--------------------------------------------------------------------------
---> Examples:
----->
--]]
--
-----------------------------------------------------------------------------------------------------------------
--[[
---> 统一函数指针
--]]
-- 自定义函数指针
local type = type
local ipairs = ipairs
local tonumber = tonumber
local s_format = string.format
local n_log = ngx.log
local n_err = ngx.ERR
local n_warn = ngx.WARN
-- 统一引用导入LIBS
local u_db = require("app.utils.db")
local u_obj = require("app.utils.object")
local s_store = require("app.store.base_store")
--------------------------------------------------------------------------
--[[
---> 统一引用导入APP-LIBS
--]]
--------------------------------------------------------------------------
-----> 基础库引用
local u_base = require("app.utils.base")
-----> 引擎引用
local o_query = require("app.store.normal.query")
-----> 外部引用
-- local c_json = require("cjson.safe")
--------------------------------------------------------------------------
--[[
---> 局部变量声明
--]]
--------------------------------------------------------------------------
local namespace = "app.store.normal.adapter"
-----------------------------------------------------------------------------------------------------------------
local _adapter = u_base:extend()
--[[
---> 初始化构造器
--]]
function _adapter:new(conf)
-- 指定名称
local name = conf.name or namespace
-- 传导至父类填充基类操作对象
_adapter.super.new(self, name)
-- 用于操作具体驱动的配置文件
self.conf = conf
-- self.mysql_addr = conf.host .. ":" .. conf.port
--
_adapter.super.new(self, self._name)
end
function _adapter:open()
local conf = self.conf
local driver = conf.driver
assert(driver, s_format("[%s.open]Please specific db driver", namespace))
local driver_path = "app.store.drivers."..driver
local ok, db = pcall(require, driver_path)
assert(ok, s_format("[%s.open]No driver for %s", namespace, driver_path))
local conn = db(conf)
local command = function(sql)
return o_query.create(conn)(sql)
end
-- 内部执行器,res返回如下
-- {"insert_id":668,"server_status":2,"warning_count":0,"affected_rows":1}
local get_sql = function ( opts )
local param_type = type(opts)
local sql
if param_type == "string" then
sql = opts
elseif param_type == "table" then
sql = u_db.parse_sql(opts.sql, opts.params or {})
end
return sql
end
local exec = function (opts, atts)
if not u_obj.check(opts) then return false end
local sql = get_sql(opts)
local ok, effects = command(sql)
if not ok then
n_log(n_err, s_format("[%s.open.exec.%s][%s],%s", namespace, atts.action_name, sql, ok))
return false
end
--??? 此处旧项目需要调换位置,因旧项目返回值未与ORM保持统一
return ok, effects
end
local query = function (opts)
if not u_obj.check(opts) then return nil end
local sql = get_sql(opts)
local ok, records = command(sql)
if not ok then
n_log(n_err, s_format("[%s.open.query][%s],%s", namespace, sql, ok))
return nil
end
-- 判断是否有结果,执行逻辑动作
local value
local records_len = #(records)
local is_records_nil = records_len == 0
if is_records_nil and opts.records_nil then
value = opts.records_nil(records)
elseif not is_records_nil and opts.records_filter then
value = opts.records_filter(records)
else
value = records
end
if value and type(value) == "table" and records_len <= 0 then
n_log(n_warn, s_format("[%s.open.query_empty]%s", namespace, sql))
end
return value
end
local insert = function (opts)
return exec(opts, {
action_name = "insert"
})
end
local delete = function (opts)
return exec(opts, {
action_name = "delete"
})
end
local update = function (opts)
return exec(opts, {
action_name = "update"
})
end
return {
name = self._name;
exec = exec;
find_all = find_all;
find_page = find_page;
query = query;
insert = insert;
delete = delete;
update = update;
}
end
-----------------------------------------------------------------------------------------------------------------
return _adapter
|
-----------------------------------
-- Area: Oldton Movalpolos
-- NPC: Koblakiq
-- Type: NPC Quest
-- !pos -64.851 21.834 -117.521 11
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
player:startEvent(13)
end
function onEventUpdate(player, csid, option)
end
function onEventFinish(player, csid, option)
end
|
return {
init_effect = "",
name = "中飞BOSS用buff2",
time = 0,
color = "yellow",
picture = "",
desc = "",
stack = 1,
id = 8783,
icon = 8783,
last_effect = "plane_bosseffect_red",
effect_list = {}
}
|
local BulletChar = require "bosses/lekkerchat/projectiles/bulletchar"
local BulletCharPercentage = BulletChar:extend("BulletCharPercentage")
BulletCharPercentage.ySpeed = 400
function BulletCharPercentage:new(x, y, part)
BulletCharPercentage.super.new(self, x, y)
if part then
self.isPart = true
self:setImage("bosses/lekkerchat/char_percentage_part")
self.velocity.x = 0
if part == "up" then
self.velocity.y = -BulletCharPercentage.ySpeed
else
self.velocity.y = BulletCharPercentage.ySpeed
end
else
self:setImage("bosses/lekkerchat/char_percentage")
end
end
function BulletCharPercentage:update(dt)
if not self.isPart then
if self.x < 35 then
self.scene:addEntity(BulletCharPercentage(self.x, self.y, "up"))
self.scene:addEntity(BulletCharPercentage(self.x, self.y, "down"))
self:destroy()
end
end
BulletCharPercentage.super.update(self, dt)
end
function BulletCharPercentage:draw()
BulletCharPercentage.super.draw(self)
end
return BulletCharPercentage
|
ys = ys or {}
slot1 = ys.Battle.BattleUnitEvent
slot2 = ys.Battle.BattleConfig
slot3 = ys.Battle.BattleConst
slot4 = class("BattleSubCharacter", ys.Battle.BattlePlayerCharacter)
ys.Battle.BattleSubCharacter = slot4
slot4.__name = "BattleSubCharacter"
slot4.Ctor = function (slot0)
slot0.super.Ctor(slot0)
end
slot4.AddArrowBar = function (slot0, slot1)
slot0.super.AddArrowBar(slot0, slot1)
slot0._vectorOxygenSlider = slot0._arrowBarTf:Find("submarine/oxygenBar/oxygen"):GetComponent(typeof(Slider))
slot0._vectorOxygenSlider.value = 1
slot0._vectorAmmoCount = slot0._arrowBarTf:Find("submarine/Count/CountText"):GetComponent(typeof(Text))
slot0._vectorAmmoCount.text = slot2 .. "/" .. #slot0._unitData:GetTorpedoList()
end
slot4.Update = function (slot0)
slot0.super.Update(slot0)
if not slot0._inViewArea then
slot0:updateOxygenVector()
end
end
slot4.updateOxygenVector = function (slot0)
slot0._vectorOxygenSlider.value = slot0._unitData:GetOxygenProgress()
end
slot4.onTorpedoWeaponFire = function (slot0, slot1)
slot0.super.onTorpedoWeaponFire(slot0, slot1)
slot2 = 0
for slot6, slot7 in ipairs(slot0._unitData:GetTorpedoList()) do
if slot7:GetCurrentState() == slot7.STATE_READY then
slot2 = slot2 + 1
end
end
slot0._vectorAmmoCount.text = slot2 .. "/" .. #slot0._unitData:GetTorpedoList()
end
return
|
workspace "Fluffy"
architecture "x64"
configurations{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "FluffyEngine"
location "FluffyEngine"
kind "SharedLib"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
pchheader "fpch.h"
pchsource "FluffyEngine/src/fpch.cpp"
files{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs{
"%{prj.name}/src/",
"%{prj.name}/vendor/spdlog/include/"
}
filter "system:windows"
cppdialect "C++17"
staticruntime "On"
systemversion "latest"
defines{
"F_PLATFORM_WINDOWS",
"F_BUILD_DLL"
}
postbuildcommands{
("{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox")
}
filter "configurations:Debug"
defines "F_DEBUG"
symbols "On"
filter "configurations:Release"
defines "F_RELEASE"
optimize "On"
filter "configurations:Dist"
defines "F_DIST"
optimize "On"
project "Sandbox"
location "Sandbox"
kind "ConsoleApp"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs{
"FluffyEngine/src/",
"FluffyEngine/vendor/spdlog/include/"
}
links{
"FluffyEngine"
}
filter "system:windows"
cppdialect "C++17"
staticruntime "On"
systemversion "latest"
defines{
"F_PLATFORM_WINDOWS",
}
filter "configurations:Debug"
defines "F_DEBUG"
symbols "On"
filter "configurations:Release"
defines "F_RELEASE"
optimize "On"
filter "configurations:Dist"
defines "F_DIST"
optimize "On"
|
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {
PlaceObj('RewardFunding', {
'Amount', "<funds>",
}),
},
Effects = {},
Enables = {
"Masterpiece_PeriodicFunding",
},
NotificationText = T(11042, --[[StoryBit Masterpiece_PeriodicFunding NotificationText]] "Received <funds> from art sales"),
Prerequisites = {},
ScriptDone = true,
SuppressTime = 3600000,
TextReadyForValidation = true,
TextsDone = true,
group = "Buildings",
id = "Masterpiece_PeriodicFunding",
PlaceObj('StoryBitParamFunding', {
'Name', "funds",
'Value', 250000000,
}),
})
|
--于冥界的征战
function c54363163.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(54363163,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,54363163+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c54363163.cost)
e1:SetTarget(c54363163.tgtg)
e1:SetOperation(c54363163.tgop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54363163,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,54363163+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c54363163.cost1)
e2:SetTarget(c54363163.rmtg)
e2:SetOperation(c54363163.rmop)
c:RegisterEffect(e2)
--garve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(54363163,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,54363163)
e3:SetCondition(aux.exccon)
e3:SetCost(c54363163.tgcost)
e3:SetTarget(c54363163.tgtg)
e3:SetOperation(c54363163.tgop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(54363163,2))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,54363163)
e4:SetCondition(aux.exccon)
e4:SetCost(c54363163.rmcost)
e4:SetTarget(c54363163.rmtg)
e4:SetOperation(c54363163.rmop)
c:RegisterEffect(e4)
end
function c54363163.filter(c,e,tp)
return (c:IsSetCard(0x1400) or c:IsCode(8198620,21435914,22657402,53982768,66547759,75043725,89272878,89732524,96163807,17484499,31467372,40703393,68304813)) and c:IsAbleToDeckOrExtraAsCost()
end
function c54363163.filter1(c,e,tp)
return (c:IsSetCard(0x38) or c:IsCode(691925,19959563,22201234,24037702,30502181,32233746,35577420,36099620,52665542,57348141,57774843,60431417,61962135,83747250,94886282)) and c:IsAbleToDeckOrExtraAsCost()
end
function c54363163.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c54363163.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=Duel.SelectMatchingCard(tp,c54363163.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SendtoDeck(rg,nil,2,REASON_COST)
end
function c54363163.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c54363163.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=Duel.SelectMatchingCard(tp,c54363163.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
Duel.SendtoDeck(rg,nil,2,REASON_COST)
end
function c54363163.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c54363163.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.HintSelection(g)
Duel.SendtoGrave(tc,POS_FACEUP,REASON_EFFECT)
end
function c54363163.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c54363163.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.HintSelection(g)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
function c54363163.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(c54363163.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=Duel.SelectMatchingCard(tp,c54363163.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SendtoDeck(rg,nil,2,REASON_COST)
end
function c54363163.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(c54363163.filter1,tp,LOCATION_REMOVED,0,1,e:GetHandler(),e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=Duel.SelectMatchingCard(tp,c54363163.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
Duel.SendtoDeck(rg,nil,2,REASON_COST)
end
|
local att = {}
att.name = "skin_ws_mosinclean"
att.displayName = "Clean Wood"
att.displayNameShort = "Clean"
att.isBG = true
att.statModifiers = {}
if CLIENT then
att.displayIcon = surface.GetTextureID("atts/skin_ws_mosinclean")
att.description = {[1] = {t = "Clean wood finish for your weapon.", c = CustomizableWeaponry.textColors.POSITIVE}}
end
function att:attachFunc()
if SERVER then
return
end
if self.CW_VM then
self.CW_VM:SetSkin(2)
end
if self.WMEnt then
self.WMEnt:SetSkin(2)
end
end
function att:detachFunc()
if SERVER then
return
end
if self.CW_VM then
self.CW_VM:SetSkin(0)
end
if self.WMEnt then
self.WMEnt:SetSkin(0)
end
end
CustomizableWeaponry:registerAttachment(att)
|
local cmp = require "cmp"
require "cmp_nvim_lsp"
require "cmp_buffer"
require "cmp_path"
require "cmp_nvim_lua"
require "cmp_calc"
require "cmp_emoji"
require "cmp_nvim_ultisnips"
local tabnine = require "cmp_tabnine"
tabnine:setup {
max_lines = 100,
max_num_results = 5,
sort = true,
}
local kind_icons = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "ﰠ",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "ﰠ",
Unit = "塞",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "פּ",
Event = "",
Operator = "",
TypeParameter = "",
}
cmp.setup {
snippet = {
expand = function(args)
vim.fn["UltiSnips#Anon"](args.body)
end,
},
documentation = {
border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
},
formatting = {
format = function(entry, vim_item)
-- fancy icons and a name of kind
vim_item.kind = kind_icons[vim_item.kind] .. " " .. vim_item.kind
-- set a name for each source
vim_item.menu = ({
buffer = "[Buffer]",
path = "[Path]",
nvim_lsp = "[LSP]",
nvim_lua = "[Lua]",
calc = "[Calc]",
emoji = "[Emoji]",
ultisnips = "[UltiSnips]",
cmp_tabnine = "[TabNine]",
})[entry.source.name]
return vim_item
end,
},
mapping = {
["<C-u>"] = cmp.mapping.scroll_docs(-4),
["<C-d>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
["<Tab>"] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
["<S-Tab>"] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end,
},
sources = {
{ name = "nvim_lsp" },
{ name = "nvim_lua" },
{ name = "buffer" },
{ name = "ultisnips" },
{ name = "cmp_tabnine" },
{ name = "path" },
{ name = "calc" },
{ name = "emoji" },
},
completion = {
keyword_length = 2,
},
}
vim.api.nvim_exec(
[[
highlight link CmpItemMenu Identifier
highlight link CmpItemKind Type
]],
false
)
|
-- Gallery.lua
-- Defines the main entrypoint to the Gallery plugin
--- The main list of galleries available
-- Is both an array of gallery objects and a map (gallery name -> gallery object)
g_Galleries = {};
--- The per-world per-player list of owned areas. Access as "g_Areas[WorldName][PlayerName]"
-- Each such item is both an array of area objects and a map of area name -> area object
g_PlayerAreas = {};
--- The per-world per-player array of allowances. Access as "g_PlayerAllowances[WorldName][PlayerName]"
-- Each such item is both an array of area objects and a map of area name -> area object
g_PlayerAllowances = {};
--[[
Each gallery is loaded from the config file, checked for validity and preprocessed to contain the following members:
{
AreaEdge -- Edge of each area that is "public", i. e. non-buildable even by area's owner.
AreaMaxX, AreaMaxZ, AreaMinX, AreaMinZ -- The (tight) bounding box for all the areas in the gallery
AreaSizeX, AreaSizeZ -- Dimensions of each area in the gallery
FillStrategy -- Strategy used for allocating the areas in the gallery.
MaxAreaIdx -- The maximum index of a valid area in this gallery
MinX, MinZ, MaxX, MaxZ -- Dimensions of the gallery, in block coords
Name -- Name of the gallery, as used in the commands
NextAreaIdx -- index of the next-to-be-claimed area
NumAreasPerX, NumAreasPerZ -- Number of areas in the X and Z directions
TeleportCoordY -- Y coord where the player is teleported upon claiming.
World -- The cWorld where the gallery is placed
WorldName -- Name of the world for which the gallery is defined.
-- Optional members:
AreaTemplate -- The name of the schematic file that will be used to initialize new areas within the gallery
AreaTemplateSchematic -- The loaded schematic used for new areas
AreaTemplateSchematicTop -- An empty schematic that fills the space from the AreaTemplateSchematic to the top of the world
AreaTop -- The Y size of the AreaTemplateSchematic
Biome -- The biome to set in the gallery. String in the config file, biome type in the in-memory structure.
}
--]]
--- Converts area index to area coords in the specified gallery
function AreaIndexToCoords(a_Index, a_Gallery)
if (a_Gallery.FillStrategy == "z+x+") then
local AreaX = math.floor(a_Index / a_Gallery.NumAreasPerZ);
local AreaZ = a_Index % a_Gallery.NumAreasPerZ;
return AreaX, AreaZ;
elseif (a_Gallery.FillStrategy == "z-x+") then
local AreaX = math.floor(a_Index / a_Gallery.NumAreasPerZ);
local AreaZ = a_Gallery.NumAreasPerZ - (a_Index % a_Gallery.NumAreasPerZ) - 1;
return AreaX, AreaZ;
elseif (a_Gallery.FillStrategy == "z+x-") then
local AreaX = a_Gallery.NumAreasPerX - math.floor(a_Index / a_Gallery.NumAreasPerZ) - 1;
local AreaZ = a_Index % a_Gallery.NumAreasPerZ;
return AreaX, AreaZ;
elseif (a_Gallery.FillStrategy == "z-x-") then
local AreaX = a_Gallery.NumAreasPerX - math.floor(a_Index / a_Gallery.NumAreasPerZ) - 1;
local AreaZ = a_Gallery.NumAreasPerZ - (a_Index % a_Gallery.NumAreasPerZ) - 1;
return AreaX, AreaZ;
elseif (a_Gallery.FillStrategy == "x+z+") then
local AreaX = a_Index % a_Gallery.NumAreasPerX;
local AreaZ = math.floor(a_Index / a_Gallery.NumAreasPerX);
return AreaX, AreaZ;
elseif (a_Gallery.FillStrategy == "x-z+") then
local AreaX = a_Gallery.NumAreasPerX - (a_Index % a_Gallery.NumAreasPerX) - 1;
local AreaZ = math.floor(a_Index / a_Gallery.NumAreasPerZ);
return AreaX, AreaZ;
elseif (a_Gallery.FillStrategy == "x+z-") then
local AreaX = a_Index % a_Gallery.NumAreasPerX;
local AreaZ = a_Gallery.NumAreasPerZ - math.floor(a_Index / a_Gallery.NumAreasPerX) - 1;
return AreaX, AreaZ;
elseif (a_Gallery.FillStrategy == "x-z-") then
local AreaX = a_Gallery.NumAreasPerX - (a_Index % a_Gallery.NumAreasPerX) - 1;
local AreaZ = a_Gallery.NumAreasPerZ - math.floor(a_Index / a_Gallery.NumAreasPerX) - 1;
return AreaX, AreaZ;
end
-- This shouldn't happen, the FillStrategy is be checked in CheckGallery()
LOGWARNING("Unknown FillStrategy: \"" .. a_Gallery.FillStrategy .. "\"");
end
--- Converts Area coords into blockcoords in the specified gallery.
function AreaCoordsToBlockCoords(a_Gallery, a_AreaX, a_AreaZ)
local X = a_AreaX * a_Gallery.AreaSizeX;
local Z = a_AreaZ * a_Gallery.AreaSizeZ;
if (a_Gallery.FillStrategy == "x+z+") then
return a_Gallery.MinX + X, a_Gallery.MinX + X + a_Gallery.AreaSizeX, a_Gallery.MinZ + Z, a_Gallery.MinZ + Z + a_Gallery.AreaSizeZ;
elseif (a_Gallery.FillStrategy == "x+z-") then
return a_Gallery.MinX + X, a_Gallery.MinX + X + a_Gallery.AreaSizeX, a_Gallery.MaxZ - Z - a_Gallery.AreaSizeZ, a_Gallery.MinZ - Z;
elseif (a_Gallery.FillStrategy == "x-z+") then
return a_Gallery.MaxX - X - a_Gallery.AreaSizeX, a_Gallery.MaxX - X, a_Gallery.MinZ + Z, a_Gallery.MinZ + Z + a_Gallery.AreaSizeZ;
elseif (a_Gallery.FillStrategy == "x-z-") then
return a_Gallery.MaxX - X - a_Gallery.AreaSizeX, a_Gallery.MaxX - X, a_Gallery.MaxZ - Z - a_Gallery.AreaSizeZ, a_Gallery.MaxZ - Z;
elseif (a_Gallery.FillStreategy == "z+x+") then
return a_Gallery.MinX + X, a_Gallery.MinX + X + a_Gallery.AreaSizeX, a_Gallery.MinZ + Z, a_Gallery.MinZ + Z + a_Gallery.AreaSizeZ;
elseif (a_Gallery.FillStrategy == "z-x+") then
return a_Gallery.MinX + X, a_Gallery.MinX + X + a_Gallery.AreaSizeX, a_Gallery.MaxZ - Z - a_Gallery.AreaSizeZ, a_Gallery.MaxZ - Z;
elseif (a_Gallery.FillStrategy == "z+x-") then
return a_Gallery.MaxX - X - a_Gallery.AreaSizeX, a_Gallery.MaxX - X, a_Gallery.MinZ + Z, a_Gallery.MinZ + Z + a_Gallery.AreaSizeZ;
elseif (a_Gallery.FillStrategy == "z-x-") then
return a_Gallery.MaxX - X - a_Gallery.AreaSizeX, a_Gallery.MaxX - X, a_Gallery.MaxZ - Z - a_Gallery.AreaSizeZ, a_Gallery.MaxZ - Z;
end
end
--- Claims an area in a gallery for the specified player. Returns a table describing the area
-- If there's no space left in the gallery, returns nil and error message
-- a_ForkedFromArea is an optional param, specifying the area from which the new area is forking; used to write statistics into DB
function ClaimArea(a_Player, a_Gallery, a_ForkedFromArea)
-- Check params:
assert(tolua.type(a_Player) == "cPlayer")
assert(type(a_Gallery) == "table")
assert((a_ForkedFromArea == nil) or (type(a_ForkedFromArea) == "table"))
-- Claim in the DB:
local Area = g_DB:ClaimArea(a_Gallery, a_Player:GetName(), a_ForkedFromArea)
-- Add this area to Player's areas:
local PlayerAreas = GetPlayerAreas(a_Player);
table.insert(PlayerAreas, Area);
PlayerAreas[Area.Name] = Area;
return Area;
end
--- Returns the chunk coords of chunks that intersect the given area
-- The returned value has the form of { {Chunk1x, Chunk1z}, {Chunk2x, Chunk2z}, ...}
function GetAreaChunkCoords(a_Area)
assert(type(a_Area) == "table");
local MinChunkX = math.floor(a_Area.MinX / 16);
local MinChunkZ = math.floor(a_Area.MinZ / 16);
local MaxChunkX = math.floor((a_Area.MaxX + 15) / 16);
local MaxChunkZ = math.floor((a_Area.MaxZ + 15) / 16);
local res = {};
for z = MinChunkZ, MaxChunkZ do
for x = MinChunkX, MaxChunkX do
table.insert(res, {x, z});
end
end
assert(#res > 0);
return res;
end
--- Copies the contents of src area into dst area, then calls the callback
function CopyAreaContents(a_SrcArea, a_DstArea, a_DoneCallback)
assert(type(a_SrcArea) == "table");
assert(type(a_DstArea) == "table");
assert(a_SrcArea.Gallery == a_DstArea.Gallery); -- Only supports copying in the same gallery
assert(a_SrcArea.Gallery.World ~= nil);
assert((a_DoneCallback == nil) or (type(a_DoneCallback) == "function"));
local Clipboard = cBlockArea();
local World = a_SrcArea.Gallery.World;
-- Callback that is scheduled once the src is copied into Clipboard
local function WriteDst()
World:ChunkStay(GetAreaChunkCoords(a_DstArea), nil,
function()
Clipboard:Write(World, a_DstArea.MinX, 0, a_DstArea.MinZ);
if (a_DoneCallback ~= nil) then
a_DoneCallback();
end
end
)
end
-- Copy the source area into a clipboard:
World:ChunkStay(GetAreaChunkCoords(a_SrcArea), nil,
function()
Clipboard:Read(World, a_SrcArea.MinX, a_SrcArea.MaxX - 1, 0, 255, a_SrcArea.MinZ, a_SrcArea.MaxZ - 1);
World:QueueTask(WriteDst);
end
);
end
--- Returns the gallery of the specified name in the specified world
local LastGalleryByName = nil;
function FindGalleryByName(a_GalleryName)
-- use a cache of size 1 to improve performance for area loading
if (
(LastGalleryByName ~= nil) and
(LastGalleryByName.Name == a_GalleryName)
) then
return LastGalleryByName;
end
for idx, gal in ipairs(g_Galleries) do
if (gal.Name == a_GalleryName) then
LastGalleryByName = gal;
return gal;
end
end
return nil;
end
function LoadAllPlayersAreas()
cRoot:Get():ForEachWorld(
function (a_World)
local WorldName = a_World:GetName();
a_World:ForEachPlayer(
function (a_Player)
local PlayerName = a_Player:GetName();
SetPlayerAreas(a_Player, g_DB:LoadPlayerAreasInWorld(WorldName, PlayerName));
SetPlayerAllowances(WorldName, PlayerName, g_DB:LoadPlayerAllowancesInWorld(WorldName, PlayerName));
end
);
end
);
end
--- Returns the gallery that intersects the specified coords, or nil if no such gallery
function FindGalleryByCoords(a_World, a_BlockX, a_BlockZ)
for idx, gallery in ipairs(g_Galleries) do
if (gallery.World == a_World) then
if (
(a_BlockX >= gallery.MinX) and
(a_BlockX <= gallery.MaxX) and
(a_BlockZ >= gallery.MinZ) and
(a_BlockZ <= gallery.MaxZ)
) then
return gallery;
end
end
end
return nil;
end
--- Returns StartX, StartZ, EndX, EndZ for a (hypothetical) area that intersects the specified coords
-- If no area the gallery could intersect the coords, returns nothing
function GetAreaBuildableCoordsFromBlockCoords(a_Gallery, a_BlockX, a_BlockZ)
if (
(a_BlockX < a_Gallery.AreaMinX) or (a_BlockX >= a_Gallery.AreaMaxX) or
(a_BlockX < a_Gallery.AreaMinX) or (a_BlockX >= a_Gallery.AreaMaxX)
) then
-- Not inside this gallery
return;
end
local SizeX = a_Gallery.AreaSizeX;
local SizeZ = a_Gallery.AreaSizeZ;
local MinX = a_Gallery.AreaMinX + SizeX * math.floor((a_BlockX - a_Gallery.AreaMinX) / SizeX);
local MinZ = a_Gallery.AreaMinZ + SizeZ * math.floor((a_BlockZ - a_Gallery.AreaMinZ) / SizeZ);
local Edge = a_Gallery.AreaEdge
return MinX + Edge, MinZ + Edge, MinX + SizeX - Edge - 1, MinZ + SizeZ - Edge - 1;
end
--- Returns MinX, MinZ, MaxX, MaxZ for a (hypothetical) area that intersects the specified coords
-- If no area the gallery could intersect the coords, returns nothing
function GetAreaCoordsFromBlockCoords(a_Gallery, a_BlockX, a_BlockZ)
if (
(a_BlockX < a_Gallery.AreaMinX) or (a_BlockX >= a_Gallery.AreaMaxX) or
(a_BlockX < a_Gallery.AreaMinX) or (a_BlockX >= a_Gallery.AreaMaxX)
) then
-- Not inside this gallery
return;
end
local SizeX = a_Gallery.AreaSizeX;
local SizeZ = a_Gallery.AreaSizeZ;
local MinX = a_Gallery.AreaMinX + SizeX * math.floor((a_BlockX - a_Gallery.AreaMinX) / SizeX);
local MinZ = a_Gallery.AreaMinZ + SizeZ * math.floor((a_BlockZ - a_Gallery.AreaMinZ) / SizeZ);
return MinX, MinZ, MinX + SizeX, MinZ + SizeZ;
end
--- Returns the list of all areas that the specified player owns in this world
-- The table has been preloaded from the DB on player's spawn
-- If for any reason the table doesn't exist, return an empty table
function GetPlayerAreas(a_Player)
local res = g_PlayerAreas[a_Player:GetWorld():GetName()][a_Player:GetName()];
if (res == nil) then
res = {};
g_PlayerAreas[a_Player:GetWorld():GetName()][a_Player:GetName()] = res;
end
return res;
end
--- Sets the player areas for the specified player in the global area table
function SetPlayerAreas(a_Player, a_Areas)
local WorldAreas = g_PlayerAreas[a_Player:GetWorld():GetName()];
if (WorldAreas == nil) then
WorldAreas = {};
g_PlayerAreas[a_Player:GetWorld():GetName()] = WorldAreas;
end
WorldAreas[a_Player:GetName()] = a_Areas;
end
function GetPlayerAllowances(a_WorldName, a_PlayerName)
assert(a_WorldName ~= nil);
assert(a_PlayerName ~= nil);
local res = g_PlayerAllowances[a_WorldName][a_PlayerName];
if (res == nil) then
res = {};
g_PlayerAllowances[a_WorldName][a_PlayerName] = res;
end
return res;
end
--- Replaces the area for each player that is using it, either as owned or allowance
function ReplaceAreaForAllPlayers(a_Area)
-- Check params:
assert(type(a_Area) == "table")
assert(a_Area.ID ~= nil)
assert(a_Area.Gallery ~= nil)
-- Replace in Ownership:
for _, areas in pairs(g_PlayerAreas[a_Area.Gallery.WorldName] or {}) do
for idx, area in ipairs(areas or {}) do
if (area.ID == a_Area.ID) then
areas[idx] = a_Area
end
end
areas[a_Area.Name] = a_Area
end
-- Replace in Allowances:
for _, allowances in pairs(g_PlayerAllowances[a_Area.Gallery.WorldName] or {}) do
for idx, area in ipairs(allowances or {}) do
if (area.ID == a_Area.ID) then
allowances[idx] = a_Area
end
end
allowances[a_Area.Name] = a_Area
end
end
--- Removes the specified area from the internal cache of player's areas
function RemovePlayerArea(a_Player, a_Area)
-- Check params:
assert(tolua.type(a_Player) == "cPlayer")
assert(type(a_Area) == "table")
assert(a_Area.ID ~= nil)
-- Remove the area from the Ownership cache:
local PlayerAreas = GetPlayerAreas(a_Player);
for idx, area in ipairs(PlayerAreas) do
if (area.ID == a_Area.ID) then
table.remove(PlayerAreas, idx)
break
end
end
PlayerAreas[a_Area.Name] = nil
-- Remove the area from the Allowances:
for _, allowances in pairs(g_PlayerAllowances[a_Area.Gallery.WorldName]) do
for idx, area in ipairs(allowances or {}) do
if (area.ID == a_Area.ID) then
table.remove(allowances, idx)
break
end
end
allowances[a_Area.Name] = nil
end
end
function SetPlayerAllowances(a_WorldName, a_PlayerName, a_Allowances)
assert(a_WorldName ~= nil);
assert(a_PlayerName ~= nil);
local WorldAllowances = g_PlayerAllowances[a_WorldName];
if (WorldAllowances == nil) then
WorldAllowances = {};
g_PlayerAllowances[a_WorldName] = WorldAllowances;
end
WorldAllowances[a_PlayerName] = a_Allowances;
end
--- Returns true if the specified block lies within the area's buildable space
function IsInArea(a_Area, a_BlockX, a_BlockZ)
return (
(a_BlockX >= a_Area.StartX) and
(a_BlockX < a_Area.EndX) and
(a_BlockZ >= a_Area.StartZ) and
(a_BlockZ < a_Area.EndZ)
)
end
--- Returns true if the specified player can interact with the specified block
-- This takes into account the areas owned by the player
function CanPlayerInteractWithBlock(a_Player, a_BlockX, a_BlockY, a_BlockZ)
-- If the player has the admin permission, allow them:
if (a_Player:HasPermission("gallery.admin.buildanywhere")) then
return true;
end
-- If the player is outside all galleries, bail out:
local Gallery = FindGalleryByCoords(a_Player:GetWorld(), a_BlockX, a_BlockZ);
if (Gallery == nil) then
-- Check the config whether building outside galleries is allowed:
if (g_Config.AllowBuildOutsideGalleries) then
-- Config says allow anyone:
return true;
end
if (a_Player:HasPermission("gallery.admin.buildoutside")) then
-- Player has the permission:
return true;
end
return false, "Building outside galleries is forbidden. Use the " .. g_Config.CommandPrefix .. " command to interact with the galleries.";
end
-- If the player has the admin permission for this gallery, allow them:
if (a_Player:HasPermission("gallery.admin.buildanywhere." .. Gallery.Name)) then
return true;
end
-- Inside a gallery, retrieve the areas:
local Area = FindPlayerAreaByCoords(a_Player, a_BlockX, a_BlockZ);
if (Area == nil) then
-- Not this player's area, check allowances:
local Allowance = FindPlayerAllowanceByCoords(a_Player, a_BlockX, a_BlockZ)
if (Allowance == nil) then
return false, "This area is owned by someone else.";
end
-- Is the allowance locked?
if (Allowance.IsLocked and not(a_Player:HasPermission("gallery.admin.overridelocked"))) then
return false, "This area is locked"
end
-- Allowed via an allowance, is it within the allowed buildable space? (exclude the sidewalks):
if not(IsInArea(Allowance, a_BlockX, a_BlockZ)) then
return false, "This is the public sidewalk.";
end
return true;
end
-- Is the area locked?
if (Area.IsLocked and not(a_Player:HasPermission("gallery.admin.overridelocked"))) then
return false, "This area is locked"
end
-- This player's area, is it within the allowed buildable space? (exclude the sidewalks):
if not(IsInArea(Area, a_BlockX, a_BlockZ)) then
return false, "This is the public sidewalk.";
end
-- Allowed:
return true;
end
--- Returns the player-owned area for the specified coords, or nil if no such area
function FindPlayerAreaByCoords(a_Player, a_BlockX, a_BlockZ)
-- Check params:
assert(tolua.type(a_Player) == "cPlayer", "a_Player is not a cPlayer instance")
a_BlockX = tonumber(a_BlockX)
a_BlockZ = tonumber(a_BlockZ)
assert(a_BlockX ~= nil, "a_BlockX is not a number")
assert(a_BlockZ ~= nil, "a_BlockZ is not a number")
-- Search for the area:
for idx, area in ipairs(GetPlayerAreas(a_Player)) do
if (
(a_BlockX >= area.MinX) and (a_BlockX < area.MaxX) and
(a_BlockZ >= area.MinZ) and (a_BlockZ < area.MaxZ)
) then
return area;
end
end
-- No area found:
return nil;
end
--- Returns the player-allowed area for the specified coords, or nil if no such area
function FindPlayerAllowanceByCoords(a_Player, a_BlockX, a_BlockZ)
local Allowances = GetPlayerAllowances(a_Player:GetWorld():GetName(), a_Player:GetName());
for idx, area in ipairs(Allowances) do
if (
(a_BlockX >= area.MinX) and (a_BlockX < area.MaxX) and
(a_BlockZ >= area.MinZ) and (a_BlockZ < area.MaxZ)
) then
return area;
end
end
return nil;
end
|
local _ENV = mkmodule('plugins.buildingplan')
--[[
Native functions:
* void setSetting(string name, boolean value)
* bool isPlanModeEnabled(df::building_type type, int16_t subtype, int32_t custom)
* bool isPlannableBuilding(df::building_type type, int16_t subtype, int32_t custom)
* bool isPlannedBuilding(df::building *bld)
* void addPlannedBuilding(df::building *bld)
* void doCycle()
* void scheduleCycle()
--]]
local dialogs = require('gui.dialogs')
local guidm = require('gui.dwarfmode')
require('dfhack.buildings')
-- does not need the core suspended
function get_num_filters(btype, subtype, custom)
local filters = dfhack.buildings.getFiltersByType(
{}, btype, subtype, custom)
if filters then return #filters end
return 0
end
local function to_title_case(str)
str = str:gsub('(%a)([%w_]*)',
function (first, rest) return first:upper()..rest:lower() end)
str = str:gsub('_', ' ')
return str
end
local function get_filter(btype, subtype, custom, reverse_idx)
local filters = dfhack.buildings.getFiltersByType(
{}, btype, subtype, custom)
if not filters or reverse_idx < 0 or reverse_idx >= #filters then
error(string.format('invalid index: %d', reverse_idx))
end
return filters[#filters-reverse_idx]
end
-- returns a reasonable label for the item based on the qualities of the filter
-- does not need the core suspended
-- reverse_idx is 0-based and is expected to be counted from the *last* filter
function get_item_label(btype, subtype, custom, reverse_idx)
local filter = get_filter(btype, subtype, custom, reverse_idx)
if filter.has_tool_use then
return to_title_case(df.tool_uses[filter.has_tool_use])
end
if filter.item_type then
return to_title_case(df.item_type[filter.item_type])
end
if filter.flags2 and filter.flags2.building_material then
if filter.flags2.fire_safe then
return "Fire-safe building material";
end
if filter.flags2.magma_safe then
return "Magma-safe building material";
end
return "Generic building material";
end
if filter.vector_id then
return to_title_case(df.job_item_vector_id[filter.vector_id])
end
return "Unknown";
end
-- returns whether the items matched by the specified filter can have a quality
-- rating. This also conveniently indicates whether an item can be decorated.
-- does not need the core suspended
-- reverse_idx is 0-based and is expected to be counted from the *last* filter
function item_can_be_improved(btype, subtype, custom, reverse_idx)
local filter = get_filter(btype, subtype, custom, reverse_idx)
if filter.flags2 and filter.flags2.building_material then
return false;
end
return filter.item_type ~= df.item_type.WOOD and
filter.item_type ~= df.item_type.BLOCKS and
filter.item_type ~= df.item_type.BAR and
filter.item_type ~= df.item_type.BOULDER
end
-- needs the core suspended
-- returns a vector of constructed buildings (usually of size 1, but potentially
-- more for constructions)
function construct_buildings_from_ui_state()
local uibs = df.global.ui_build_selector
local world = df.global.world
local direction = world.selected_direction
local _, width, height = dfhack.buildings.getCorrectSize(
world.building_width, world.building_height, uibs.building_type,
uibs.building_subtype, uibs.custom_type, direction)
-- the cursor is at the center of the building; we need the upper-left
-- corner of the building
local pos = guidm.getCursorPos()
pos.x = pos.x - math.floor(width/2)
pos.y = pos.y - math.floor(height/2)
local min_x, max_x = pos.x, pos.x
local min_y, max_y = pos.y, pos.y
if width == 1 and height == 1 and
(world.building_width > 1 or world.building_height > 1) then
min_x = math.ceil(pos.x - world.building_width/2)
max_x = math.floor(pos.x + world.building_width/2)
min_y = math.ceil(pos.y - world.building_height/2)
max_y = math.floor(pos.y + world.building_height/2)
end
local blds = {}
for y=min_y,max_y do for x=min_x,max_x do
local bld, err = dfhack.buildings.constructBuilding{
type=uibs.building_type, subtype=uibs.building_subtype,
custom=uibs.custom_type, pos=xyz2pos(x, y, pos.z),
width=width, height=height, direction=direction}
if err then
for _,b in ipairs(blds) do
dfhack.buildings.deconstruct(b)
end
error(err)
end
-- assign fields for the types that need them. we can't pass them all in
-- to the call to constructBuilding since attempting to assign unrelated
-- fields to building types that don't support them causes errors.
for k,v in pairs(bld) do
if k == 'friction' then bld.friction = uibs.friction end
if k == 'use_dump' then bld.use_dump = uibs.use_dump end
if k == 'dump_x_shift' then bld.dump_x_shift = uibs.dump_x_shift end
if k == 'dump_y_shift' then bld.dump_y_shift = uibs.dump_y_shift end
if k == 'speed' then bld.speed = uibs.speed end
end
table.insert(blds, bld)
end end
return blds
end
--
-- GlobalSettings dialog
--
local GlobalSettings = defclass(GlobalSettings, dialogs.MessageBox)
GlobalSettings.focus_path = 'buildingplan_globalsettings'
GlobalSettings.ATTRS{
settings = {}
}
function GlobalSettings:onDismiss()
for k,v in pairs(self.settings) do
-- call back into C++ to save changes
setSetting(k, v)
end
end
-- does not need the core suspended.
function show_global_settings_dialog(settings)
GlobalSettings{
frame_title="Buildingplan Global Settings",
settings=settings,
}:show()
end
function GlobalSettings:toggle_setting(name)
self.settings[name] = not self.settings[name]
end
function GlobalSettings:get_setting_string(name)
if self.settings[name] then return 'On' end
return 'Off'
end
function GlobalSettings:get_setting_pen(name)
if self.settings[name] then return COLOR_LIGHTGREEN end
return COLOR_LIGHTRED
end
function GlobalSettings:is_setting_enabled(name)
return self.settings[name]
end
function GlobalSettings:make_setting_label_token(text, key, name, width)
return {text=text, key=key, key_sep=': ', key_pen=COLOR_LIGHTGREEN,
on_activate=self:callback('toggle_setting', name), width=width}
end
function GlobalSettings:make_setting_value_token(name)
return {text=self:callback('get_setting_string', name),
enabled=self:callback('is_setting_enabled', name),
pen=self:callback('get_setting_pen', name),
dpen=COLOR_GRAY}
end
-- mockup:
--[[
Buildingplan Global Settings
e: Enable all: Off
Enables buildingplan for all building types. Use this to avoid having to
manually enable buildingplan for each building type that you want to plan.
Note that DFHack quickfort will use buildingplan to manage buildings
regardless of whether buildingplan is "enabled" for the building type.
Allowed types for generic, fire-safe, and magma-safe building material:
b: Blocks: On
s: Boulders: On
w: Wood: On
r: Bars: Off
Changes to these settings will be applied to newly-planned buildings.
A: Apply building material filter settings to existing planned buildings
Use this if your planned buildings can't be completed because the settings
above were too restrictive when the buildings were originally planned.
M: Edit list of materials to avoid
potash
pearlash
ash
coal
Buildingplan will avoid using these material types when a planned building's
material filter is set to 'any'. They can stil be matched when they are
explicitly allowed by a planned building's material filter. Changes to this
list take effect for existing buildings immediately.
g: Allow bags: Off
This allows bags to be placed where a 'coffer' is planned.
f: Legacy Quickfort Mode: Off
Compatibility mode for the legacy Python-based Quickfort application. This
setting is not needed for DFHack quickfort.
--]]
function GlobalSettings:init()
self.subviews.label:setText{
self:make_setting_label_token('Enable all', 'CUSTOM_E', 'all_enabled', 12),
self:make_setting_value_token('all_enabled'), '\n',
' Enables buildingplan for all building types. Use this to avoid having\n',
' to manually enable buildingplan for each building type that you want\n',
' to plan. Note that DFHack quickfort will use buildingplan to manage\n',
' buildings regardless of whether buildingplan is "enabled" for the\n',
' building type.\n',
'\n',
'Allowed types for generic, fire-safe, and magma-safe building material:\n',
self:make_setting_label_token('Blocks', 'CUSTOM_B', 'blocks', 10),
self:make_setting_value_token('blocks'), '\n',
self:make_setting_label_token('Boulders', 'CUSTOM_S', 'boulders', 10),
self:make_setting_value_token('boulders'), '\n',
self:make_setting_label_token('Wood', 'CUSTOM_W', 'logs', 10),
self:make_setting_value_token('logs'), '\n',
self:make_setting_label_token('Bars', 'CUSTOM_R', 'bars', 10),
self:make_setting_value_token('bars'), '\n',
' Changes to these settings will be applied to newly-planned buildings.\n',
' If no types are enabled above, then any building material is allowed.\n',
'\n',
self:make_setting_label_token('Legacy Quickfort Mode', 'CUSTOM_F',
'quickfort_mode', 23),
self:make_setting_value_token('quickfort_mode'), '\n',
' Compatibility mode for the legacy Python-based Quickfort application.\n',
' This setting is not needed for DFHack quickfort.'
}
end
return _ENV
|
--DEPENDENCIES
--whatever is used here idk lol
local awful = require('awful')
local wibox = require('wibox')
local gears = require('gears')
local clickable_container = require('widget.clickable-container')
local dpi = require('beautiful').xresources.apply_dpi
local icons = require('themes.icons')
local colors = require('themes.dracula.colors')
local watch = require('awful.widget.watch')
local widget_icon = wibox.widget {
layout = wibox.layout.align.vertical,
expand = 'none',
nil,
{
id = 'icon',
image = icons.volume,
resize = true,
widget = wibox.widget.imagebox
},
nil
}
local widget = wibox.widget {
{
{
{
widget_icon,
layout = wibox.layout.fixed.horizontal,
},
margins = dpi(15),
widget = wibox.container.margin
},
forced_height = dpi(50),
widget = clickable_container
},
shape = gears.shape.circle,
bg = colors.yellow,
widget = wibox.container.background
}
local mute_toggle = function()
awful.spawn.easy_async_with_shell(
[[bash -c "pamixer --get-mute"]],
function(stdout)
local status = string.match(stdout, '%a+')
if status == 'true' then
awful.spawn('pamixer -u')
widget_icon.icon:set_image(icons.volume)
widget.bg = colors.yellow
elseif status == "false" then
awful.spawn('pamixer -m')
widget_icon.icon:set_image(icons.mute)
widget.bg = colors.background
end
end
)
end
widget:buttons(
gears.table.join(
awful.button(
{},
1,
nil,
function()
mute_toggle()
end
)
)
)
return widget
|
for i,v in ipairs({
{9339,-242.2,2600.8999,71.2,0,0,0,1,666,85, false},
{4585,-262.2998,2594.6006,-29.3,0,0,0,1,666,85, false},
{9339,-242.2,2574.8,71.2,0,0,0,1,666,85, false},
{9339,-255.2002,2575.5,71.2,0,0,270,1,666,85, false},
{9339,-281.20001,2575.5,71.2,0,0,270,1,666,85, false},
{9339,-271,2600.8999,71.2,0,0,180,1,666,85, false},
{9339,-257.89999,2613.8,71.2,0,0,270,1,666,85, false},
{1533,-242.39999,2595.6001,70.5,0,0,270,1,666,85, false},
{1537,-242.39999,2592.6001,70.5,0,0,270,1,666,85, false},
{9339,-238.60001,2598.7,70.3,0,0,90,1,666,85, false},
{3498,-251.40039,2598.7002,73,0,0,0,1,666,85, false},
{638,-248.90039,2598.2002,71.2,0,0,270,1,666,85, true},
{9339,-238.5,2598.7002,74.1,0,0,90,1,666,85, false},
{9339,-242.2,2600.8999,72.6,0,0,0,1,666,85, false},
{9339,-242.2,2595.8999,74,0,0,0,1,666,85, false},
{9907,-256.7002,2591.7002,126.8,0.005,180,180,1,666,85, false},
{1649,-248.90039,2598.7002,72.4,0,0,0,1,666,85, true},
{1649,-244.5,2598.7002,72.4,0,0,0,1,666,85, true},
{638,-244.40039,2598.2002,71.2,0,0,270,1,666,85, true},
{9339,-238.60001,2589.3999,70.3,0,0,90,1,666,85, false},
{3498,-251.39999,2589.3999,73,0,0,0,1,666,85, false},
{638,-249.10001,2589.8999,71.2,0,0,270,1,666,85, true},
{1649,-248.89999,2589.3999,72.4,0,0,0,1,666,85, true},
{1649,-244.5,2589.4004,72.4,0,0,0,1,666,85, true},
{638,-244.60001,2589.8999,71.2,0,0,270,1,666,85, true},
{9339,-238.5,2589.3999,74.1,0,0,90,1,666,85, true},
{9339,-242.2,2574.8,72.6,0,0,0,1,666,85, false},
{9339,-242.2,2569.8,74,0,0,0,1,666,85, false},
{9339,-242.2,2621.8999,74,0,0,0,1,666,85, false},
{9339,-231.8,2613.8,71.2,0,0,270,1,666,85, false},
{9339,-271,2575,71.2,0,0,179.995,1,666,85, false},
{9339,-271,2575,72.6,0,0,179.995,1,666,85, false},
{9339,-271,2600.8999,72.6,0,0,179.995,1,666,85, false},
{9339,-271,2600.8999,74,0,0,179.995,1,666,85, false},
{9339,-271,2575,74,0,0,179.995,1,666,85, false},
{9339,-255.3,2613.7949,72.6,0,0,270,1,666,85, false},
{9339,-281.29999,2613.8,72.6,0,0,270,1,666,85, false},
{9339,-249.09961,2613.7949,73.9,0,0,270,1,666,85, false},
{9339,-267.79999,2613.7949,74,0,0,270,1,666,85, false},
{9339,-255.2002,2575.5,72.6,0,0,270,1,666,85, false},
{9339,-281.29999,2575.5,72.6,0,0,270,1,666,85, false},
{9339,-255.3,2575.5,74,0,0,270,1,666,85, false},
{9339,-281.39999,2575.5,74,0,0,270,1,666,85, false},
{1727,-243,2600,70.5,0,0,270,1,666,85, false},
{1727,-248.3,2600,70.5,0,0,270,1,666,85, false},
{1727,-247.3,2599,70.5,0,0,90,1,666,85, false},
{1727,-252.3,2599.2,70.5,0,0,90,1,666,85, false},
{2024,-245.7,2599,70.5,0,0,0,1,666,85, false},
{1734,-245.2,2599.8999,74,0,0,0,1,666,85, true},
{2024,-250.8,2599.2,70.5,0,0,0,1,666,85, false},
{1734,-250.39999,2599.7,74.1,0,0,0,1,666,85, true},
{1726,-246.5,2613.2,70.5,0,0,0,1,666,85, false},
{1726,-243,2611.3,70.5,0,0,270,1,666,85, false},
{628,-243.2,2612.7,72.3,0,0,0,1,666,85, true},
{3430,-267.70001,2594,72.1,0,0,15,1,666,85, false},
{2442,-262.98499,2597.356,70.5,0,0,90,1,666,85, false},
{2441,-269.39999,2597.8,70.5,0,0,180,1,666,85, false},
{2441,-268.39999,2597.8,70.5,0,0,179.995,1,666,85, false},
{2441,-267.39999,2597.8,70.5,0,0,179.995,1,666,85, false},
{2441,-266.39999,2597.8,70.5,0,0,179.995,1,666,85, false},
{2441,-265.39999,2597.8,70.5,0,0,179.995,1,666,85, false},
{2441,-264.39999,2597.8,70.5,0,0,179.995,1,666,85, false},
{2441,-262.98499,2596.3999,70.5,0,0,89.995,1,666,85, false},
{2441,-262.98499,2595.3999,70.5,0,0,89.995,1,666,85, false},
{2441,-262.98499,2594.3999,70.5,0,0,89.995,1,666,85, false},
{2441,-262.98499,2593.3999,70.5,0,0,89.995,1,666,85, false},
{2441,-262.98499,2592.3999,70.5,0,0,89.995,1,666,85, false},
{2441,-262.98499,2591.3999,70.5,0,0,89.995,1,666,85, false},
{2442,-263.42999,2590,70.5,0,0,0,1,666,85, false},
{2441,-264.39999,2590,70.5,0,0,359.995,1,666,85, false},
{2441,-265.39999,2590,70.5,0,0,359.989,1,666,85, false},
{2441,-266.39999,2590,70.5,0,0,359.989,1,666,85, false},
{2441,-267.39999,2590,70.5,0,0,359.989,1,666,85, false},
{2441,-268.39999,2590,70.5,0,0,359.989,1,666,85, false},
{2441,-269.39999,2590,70.5,0,0,359.989,1,666,85, false},
{9339,-263.79999,2573.3999,71.1,0,0,180,1,666,85, false},
{9339,-276.70001,2586.6001,71.1,0,0,90,1,666,85, false},
{9339,-276.70001,2586.6001,72.5,0,0,90,1,666,85, false},
{9339,-276.70001,2586.6001,73.9,0,0,90,1,666,85, false},
{2878,-264.89999,2586.73,71.7,0,0,180,1,666,85, false},
{2878,-269.20001,2586.73,71.7,0,0,179.995,1,666,85, false},
{1523,-271,2597.7,71.56,0,180,180,1,666,85, true},
{1523,-271,2590.2,71.56,0,179.995,179.995,1,666,85, true},
{9339,-263.79999,2573.3999,72.5,0,0,179.995,1,666,85, false},
{9339,-263.79999,2573.3999,73.9,0,0,179.995,1,666,85, false},
{14391,-260.5,2581.7,71.5,0,0,180,1,666,85, true},
{17068,-259.79001,2583.4661,60.68,90,12.604,77.396,1,666,85, false},
{17068,-259.79999,2581.7,60.68,90,7.124,82.87,1,666,85, false},
{17068,-259.79901,2579.8999,60.68,90,7.119,82.87,1,666,85, false},
{2773,-263,2591.2,73.8,0,180,180,1,666,85, false},
{2773,-263,2593.1001,73.8,0,179.995,179.995,1,666,85, false},
{2773,-263,2595,73.8,0,179.995,179.995,1,666,85, false},
{2773,-263,2596.8999,73.8,0,179.995,179.995,1,666,85, false},
{2773,-264,2597.8999,73.8,0,179.995,267.995,1,666,85, false},
{2773,-265.92001,2597.97,73.8,0,179.995,267.99,1,666,85, false},
{2773,-267.84,2598.0801,73.8,0,179.995,267.99,1,666,85, false},
{2773,-269.79999,2598.1499,73.8,0,179.995,267.99,1,666,85, false},
{2773,-264,2590.2,73.8,0,180,270,1,666,85, false},
{2773,-265.89999,2590.2,73.8,0,179.995,270,1,666,85, false},
{2773,-267.79999,2590.2,73.8,0,179.995,270,1,666,85, false},
{2773,-269.70001,2590.2,73.8,0,179.995,270,1,666,85, false},
{1805,-261.70001,2590.3999,70.8,0,0,0,1,666,85, false},
{1805,-261.70001,2592.2,70.8,0,0,0,1,666,85, false},
{1805,-261.70001,2594.2,70.8,0,0,0,1,666,85, false},
{1805,-261.70001,2596.2,70.8,0,0,0,1,666,85, false},
{1805,-262,2598.6001,70.8,0,0,0,1,666,85, false},
{1805,-264.70001,2599.3,70.8,0,0,0,1,666,85, false},
{1805,-266.70001,2599.3,70.8,0,0,0,1,666,85, false},
{1805,-268.60001,2599.3,70.8,0,0,0,1,666,85, false},
{1518,-263,2597.7,71.8,0,0,32.75,1,666,85, false},
{1488,-266.5,2593.8999,72.5,0,0,74.75,1,666,85, false},
{1511,-266.60001,2593.6001,72.5,0,0,70,1,666,85, false},
{1541,-266.79999,2594.8999,72.5,0,0,312,1,666,85, false},
{1545,-267.39999,2592.8999,72.4,0,0,17,1,666,85, false},
{2796,-263.70001,2587.1001,73.7,0,0,268,1,666,85, false},
{2714,-262.60001,2593.8,71.1,0,0,90,1,666,85, true},
{2533,-270.29999,2592.3,70.5,0,0,90,1,666,85, false},
{2533,-270.29999,2593.3,70.5,0,0,90,1,666,85, false},
{2024,-245.89999,2610.1001,70.5,0,0,0,1,666,85, false},
{1727,-244.7,2606.8,70.5,0,0,0,1,666,85, false},
{1727,-243.7,2602.6001,70.5,0,0,180,1,666,85, false},
{2024,-244.7,2605.2,70.5,0,0,270,1,666,85, false},
{1727,-249.60001,2606.8,70.5,0,0,0,1,666,85, false},
{1727,-248.60001,2602.6001,70.5,0,0,179.995,1,666,85, false},
{2024,-249.60001,2605.2,70.5,0,0,270,1,666,85, false},
{1726,-260.20001,2613.1001,70.5,0,0,0,1,666,85, false},
{1726,-257.89999,2613.1001,70.5,0,0,0,1,666,85, false},
{1726,-261,2609.7,70.5,0,0,90,1,666,85, false},
{1726,-261,2607.3999,70.5,0,0,90,1,666,85, false},
{2024,-259.38901,2610.3999,70.5,0,0,0,1,666,85, false},
{2024,-257.39999,2610.3999,70.5,0,0,0,1,666,85, false},
{2024,-259.38901,2608.9399,70.5,0,0,0,1,666,85, false},
{2024,-257.39999,2608.9399,70.5,0,0,0,1,666,85, false},
{1727,-254.2,2611.3999,70.5,0,0,270,1,666,85, false},
{1727,-258.20001,2606.5,70.5,0,0,180,1,666,85, false},
{1727,-256.79999,2606.5,70.5,0,0,179.995,1,666,85, false},
{1727,-254.2,2609.8999,70.5,0,0,270,1,666,85, false},
{1726,-264,2612,70.5,0,0,270,1,666,85, false},
{1726,-270.29999,2610,70.5,0,0,90,1,666,85, false},
{1726,-269.20001,2613,70.5,0,0,0,1,666,85, false},
{1726,-266.89999,2613,70.5,0,0,0,1,666,85, false},
{2024,-259.38901,2607.5,70.5,0,0,0,1,666,85, false},
{2024,-257.39999,2607.5,70.5,0,0,0,1,666,85, false},
{2024,-268.70001,2610.5,70.5,0,0,0,1,666,85, false},
{2024,-266.39999,2610.5,70.5,0,0,0,1,666,85, false},
{1727,-270.70001,2606.6001,70.5,0,0,0,1,666,85, false},
{1727,-269.70001,2602.2,70.5,0,0,180,1,666,85, false},
{2024,-270.70001,2604.8999,70.5,0,0,270,1,666,85, false},
{2188,-242.3,2582.7,71.5,0,0,270,1,666,85, false},
{2785,-242.7,2577.8,71.4,0,0,270,1,666,85, false},
{2785,-242.60001,2587,71.4,0,0,270,1,666,85, false},
{2245,-250.3,2599.7,71.3,0,0,0,1,666,85, false},
{2245,-245.3,2599.5,71.3,0,0,0,1,666,85, false},
{2245,-244.3,2604.5,71.3,0,0,0,1,666,85, false},
{2245,-245.39999,2610.3999,71.3,0,0,0,1,666,85, false},
{2245,-257.89999,2609.5,71.3,0,0,0,1,666,85, false},
{2252,-268.10001,2610.7,71.4,0,0,0,1,666,85, false},
{2252,-265.89999,2610.8,71.4,0,0,0,1,666,85, false},
{2252,-270,2604.3999,71.4,0,0,0,1,666,85, false},
{2252,-249.39999,2604.6001,71.4,0,0,0,1,666,85, false},
{628,-250.8,2613.1001,72.3,0,0,0,1,666,85, true},
{628,-262.70001,2613.1001,72.3,0,0,0,1,666,85, true},
{646,-270,2608.5,72,0,0,0,1,666,85, true},
{632,-241.89999,2591.7,71,0,0,0,1,666,85, true},
{632,-241.89999,2596.6001,71,0,0,0,1,666,85, true},
{1734,-249.2,2604.3999,74.1,0,0,0,1,666,85, true},
{1734,-244.3,2604.3999,74.1,0,0,0,1,666,85, true},
{1734,-245.39999,2610.3999,74.1,0,0,0,1,666,85, true},
{1734,-257.89999,2609.5,74.1,0,0,0,1,666,85, true},
{1734,-268,2610.7,74.1,0,0,0,1,666,85, true},
{1734,-265.89999,2610.7,74.1,0,0,0,1,666,85, true},
{1734,-269.89999,2604.3999,74.1,0,0,0,1,666,85, true},
}) do
local obj = createObject(v[1], v[2], v[3], v[4], v[5], v[6], v[7])
setObjectScale(obj, v[8])
setElementDimension(obj, v[9])
setElementInterior(obj, v[10])
setElementDoubleSided(obj, v[11])
setObjectBreakable(obj, false)
end
|
local wet_html=require("wetgenes.html")
local sys=require("wetgenes.www.any.sys")
local json=require("wetgenes.json")
local dat=require("wetgenes.www.any.data")
local users=require("wetgenes.www.any.users")
local fetch=require("wetgenes.www.any.fetch")
local img=require("wetgenes.www.any.img")
local log=require("wetgenes.www.any.log").log -- grab the func from the package
local wet_string=require("wetgenes.string")
local str_split=wet_string.str_split
local serialize=wet_string.serialize
local math=math
local string=string
local table=table
local os=os
local ipairs=ipairs
local pairs=pairs
local tostring=tostring
local tonumber=tonumber
local type=type
local pcall=pcall
local loadstring=loadstring
module(...)
function b64(d) return sys.bin_encode("base64",d) end
-----------------------------------------------------------------------------
--
-- The escape function for oauth must be exactly this, RFC3986
-- it would be nice if / was not escaped since base64 is also used all over the place
-- but that is not the case.
--
--
-----------------------------------------------------------------------------
function esc(s)
return string.gsub(s,'[^0-9A-Za-z%-._~]', -- RFC3986 happy chars
function(c) return ( string.format("%%%02X", string.byte(c)) ) end )
end
-----------------------------------------------------------------------------
--
-- unesc performs the oposite of esc
--
-----------------------------------------------------------------------------
function unesc(str)
return string.gsub(str, "%%(%x%x)", function(hex)
return string.char(tonumber(hex, 16))
end)
end
-----------------------------------------------------------------------------
--
-- perform a hmac_sha1 that is oauth friendly, key is an RFC3986 string, result is a base64 hash
--
-- this uses some java crypto functions exposed in sys for dealing with hmac and sha1
--
-----------------------------------------------------------------------------
function hmac_sha1(key,str)
local bin=sys.hmac_sha1(key,str,"bin") -- key gets used as is, (string is 7bit safe).
local b64=sys.bin_encode("base64",bin) -- we need to convert the resuilt to base64
return b64
end
-----------------------------------------------------------------------------
--
-- get the current time and build a nonce for it using a passed in key value
-- which i do not think has to be terribly secret, we reuse hmac_sha1
-- just to keep the number of strange functions used low, really this could generate anything
--
-----------------------------------------------------------------------------
function time_nonce(key) -- pass in a secret key
local t=math.floor(os.time())
local n=sys.bin_encode("hex",sys.hmac_sha1(key,tostring(t).."&aelua.dumid.oauth","bin"))
return t,n -- returns time,nonce
end
-----------------------------------------------------------------------------
--
-- vars contains the variables we intend to send to the oauth server
-- opts contains extra options:
-- post should be set to GET if we do not intend to use POST
-- url should be the oauth server url for this request
-- tok_secret should be the token secret provided by the oauth server or nil for initial signin
-- api_secret should be your special api/consumer secret
-- these opts are used to build a request string from the vars and sign it so that
-- the oauth server will be happy with it
-- it returns a base64 signature , request string
-- the request string could be used in the body of a POST (default)
-- or if you set opts.post="GET" then you could the use it in a GET request
--
-- aparently it is better to put this stuff in the header, Authorization:
-- but I have my doubts
--
-----------------------------------------------------------------------------
function build(vars,opts)
local post =opts.post or "POST"
local url =opts.url or ""
local tok_secret=opts.tok_secret or ""
local api_secret=opts.api_secret or ""
local vals={}
-- esc and shove all oauth vars into vals
for i,v in pairs(vars) do
vals[#vals+1]={esc(i),esc(v)} -- record a simple table , i==[1] v==[2]
end
table.sort(vals, function(a,b)
if a[1]==b[1] then return a[2]<b[2] end -- sort by [2] if [1] is the same
return a[1]<b[1] -- other wise sort by [1]
end)
-- now they are in the right order, build the query string
for i=1,#vals do local v=vals[i]
vals[i]=v[1].."="..v[2]
end
local query=table.concat(vals,"&")
local base=post.."&"..esc(url).."&"..esc(query) -- everything always gets escaped
local key=esc(api_secret).."&"..esc(tok_secret) -- the key is built from these strings
local sign=hmac_sha1(key,base)
return sign , query.."&oauth_signature="..esc(sign) -- sign it
end
-----------------------------------------------------------------------------
--
-- turns a responce string into a table of values, this is the oposite of build
-- and intended to deal with the results
--
-----------------------------------------------------------------------------
function decode(s)
local ret={}
local aa=str_split("&",s) -- first split on &
for i=1,#aa do local v=aa[i]
local a,b = wet_string.split_equal(v)
--log("decode : "..v.." : "..type(a).." : "..type(b))
-- if a and b then
ret[unesc(a)]=unesc(b) -- unescape both sides
-- end
end
return ret -- return a lookup table, which may be empty
end
|
local lfs = require 'lfs'
local path = require 'path'
local zip = require 'brimworks.zip'
local FS = require 'packagemanager/fs'
local Misc = require 'packagemanager/misc'
-------- DirectoryView
local DirectoryView = {}
DirectoryView.__index = DirectoryView
function DirectoryView:_getAbsFilePath( filePath, createDir )
filePath = path.normalize(filePath)
assert(not filePath:match('^%.%.'..path.DIR_SEP),
'File path may not leave the base directory.')
if createDir then
local dirName = path.dirname(filePath)
if dirName ~= '.' then
assert(FS.makeDirectoryPath(self._path, dirName))
end
end
return path.join(self._path, filePath)
end
function DirectoryView:openFile( filePath, mode )
local absFilePath = self:_getAbsFilePath(filePath, mode == 'w')
return assert(io.open(absFilePath, mode..'b'))
end
-- - size (in bytes)
-- - modification (unix timestamp)
function DirectoryView:getFileAttributes( filePath )
local absFilePath = self:_getAbsFilePath(filePath)
return lfs.attributes(absFilePath)
end
function DirectoryView:eachFile()
local prefix = self._path..path.DIR_SEP
local function yieldTree( directory )
for entry in lfs.dir(prefix..directory) do
if entry ~= '.' and entry ~= '..' then
local entryPath
if directory == '' then
entryPath = entry
else
entryPath = path.join(directory, entry)
end
coroutine.yield(entryPath)
if path.isdir(prefix..entryPath) then
yieldTree(entryPath)
end
end
end
end
return coroutine.wrap(function() yieldTree('') end)
end
function DirectoryView:destroy()
-- nothing to do here
end
local function CreateDirectoryView( path )
return setmetatable({ _path = path }, DirectoryView)
end
-------- ZipFileStream
local ZipFileStream = {}
ZipFileStream.__index = ZipFileStream
function ZipFileStream:read( length )
local bytes
if type(length) == 'number' then
bytes = length
else
if length == '*a' then
bytes = self._size
-- actually one would need to take the position into account
else
error(string.format('Read mode "%s" not supported.', length))
end
end
return self._handle:read(bytes)
end
function ZipFileStream:lines()
error('Line iterator is not implemented.')
end
function ZipFileStream:seek()
error('Seeking is not supported.')
end
function ZipFileStream:close()
self._handle:close()
self._handle = nil
end
local function CreateZipFileStream( handle, size )
return setmetatable({ _handle = handle,
_size = size }, ZipFileStream)
end
-------- ZipView
local ZipView = {}
ZipView.__index = ZipView
function ZipView:_getFileId( filePath )
filePath = path.normalize(filePath)
assert(not filePath:match('^%.%.[/\\]'),
'File path may not leave the base directory.')
local fileId = assert(self._fileMapping[filePath], 'No such file.')
return fileId
end
function ZipView:openFile( filePath, mode )
if mode == 'r' then
local fileId = self:_getFileId(filePath)
local handle = assert(self._zipFile:open(fileId))
local size = assert(self._zipFile:stat(fileId).size)
return CreateZipFileStream(handle, size)
else
error('Can\'t modify ZIP archives.')
end
end
-- - size (in bytes)
-- - modification (unix timestamp)
function ZipView:getFileAttributes( filePath )
local stat = self._zipFile:stat(self:_getFileId(filePath))
return { size = stat.size,
modification = stat.mtime }
end
function ZipView:eachFile()
return pairs(self._fileMapping)
end
function ZipView:destroy()
self._zipFile:close()
self._zipFile = nil
end
local function IsDirectory( path )
return path:match('[/\\]$')
end
local function CreateZipView( path )
local zipFile = assert(zip.open(path))
local fileMapping = {}
for i = 1, zipFile:get_num_files() do
local filePath = assert(zipFile:stat(i)).name
if not IsDirectory(filePath) then
local normalizedFilePath = path.normalize(filePath)
fileMapping[normalizedFilePath] = i
end
end
return setmetatable({ _zipFile = zipFile,
_fileMapping = fileMapping }, ZipView)
end
return function( path )
if NativePath.extension(path) == 'zip' then
return CreateZipView(path)
else
return CreateDirectoryView(path)
end
end
|
oil = require "oil"
iorfile, killfile = ...
oil.main(function()
orb = oil.init{
flavor = "cooperative;corba;corba.ssl;kernel.ssl",
options = {
server = {
security = "required",
ssl = {
key = "certs/server.key",
certificate = "certs/server.crt",
cafile = "certs/myca.crt",
},
},
},
}
orb:loadidl [[
module demo{
module ssl{
interface SSLDemo{
void printCert();
};
};
};
]]
servant = { __type = "::demo::ssl::SSLDemo" }
function servant:printCert()
print("[Server] invoked printCert()")
end
object = orb:newservant(servant)
ref = tostring(object)
if iorfile == nil or not oil.writeto(iorfile, ref) then
print(ref)
end
if killfile ~= nil then
repeat
local file = io.open(killfile)
if file ~= nil then
file:close()
break
end
oil.sleep(1)
until false
orb:shutdown()
end
end)
|
aurum.wings = {}
b.dofile("item.lua")
b.dofile("flight.lua")
b.dofile("api.lua")
b.dofile("wear.lua")
|
-- Copyright 2012 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
-- @release $Header$
---
-- @section subsection {Hyperedges}
--
-- @end
-- Includes
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
---
declare {
key = "hyper",
layer = -10,
summary = [["
A \emph{hyperedge} of a graph does not connect just two nodes, but
is any subset of the node set (although a normal edge is also a
hyperedge that happens to contain just two nodes). Internally, a
collection of kind |hyper| is created. Currently, there is
no default renderer for hyper edges.
"]],
documentation = [["
\begin{codeexample}[code only]
\graph {
% The nodes:
a, b, c, d;
% The edges:
{[hyper] a,b,c};
{[hyper] b,c,d};
{[hyper] a,c};
{[hyper] d}
};
\end{codeexample}
"]]
}
-- Done
return Hyperedge
|
require('onmt.init')
local tester = ...
local beamSearchTest = torch.TestSuite()
function beamSearchTest.beamSearch()
local transitionScores = { {-math.huge, math.log(.6), math.log(.4), -math.huge},
{math.log(.6), -math.huge, math.log(.4), -math.huge},
{-math.huge, -math.huge, math.log(.1), math.log(.9)},
{-math.huge, -math.huge, -math.huge, -math.huge}
}
transitionScores = torch.Tensor(transitionScores)
local Advancer = onmt.translate.Advancer
local initBeam = function()
return onmt.translate.Beam.new(torch.LongTensor({1, 2, 3}), {})
end
local update = function()
end
local expand = function(beam)
local tokens = beam:getTokens()
local token = tokens[#tokens]
local scores = transitionScores:index(1, token)
return scores
end
local isComplete = function(beam)
local tokens = beam:getTokens()
local completed = tokens[#tokens]:eq(4)
if #tokens - 1 > 2 then
completed:fill(1)
end
return completed
end
Advancer.initBeam = function() return initBeam() end
Advancer.update = function(_, beam) update(beam) end
Advancer.expand = function(_, beam) return expand(beam) end
Advancer.isComplete = function(_, beam) return isComplete(beam) end
local beamSize, nBest, advancer, beamSearcher, results
advancer = Advancer.new()
advancer.dicts = {}
-- Test different beam sizes
nBest = 1
-- Beam size 2
beamSize = 2
beamSearcher = onmt.translate.BeamSearcher.new(advancer)
results = beamSearcher:search(beamSize, nBest)
tester:eq(results, { {{tokens = {3, 4}, states = {}, score = math.log(.4*.9)}},
{{tokens = {3, 4}, states = {}, score = math.log(.4*.9)}},
{{tokens = {4}, states = {}, score = math.log(.9)}} }, 1e-6)
-- Beam size 1
beamSize = 1
beamSearcher = onmt.translate.BeamSearcher.new(advancer)
results = beamSearcher:search(beamSize, nBest)
tester:eq(results, { {{tokens = {2, 1, 2}, states = {}, score = math.log(.6*.6*.6)}},
{{tokens = {1, 2, 1}, states = {}, score = math.log(.6*.6*.6)}},
{{tokens = {4}, states = {}, score = math.log(.9)}} }, 1e-6)
-- Test SubDict mapping
advancer.dicts.subdict = onmt.utils.SubDict
advancer.dicts.subdict.vocabs = {1,2,3}
advancer.dicts.subdict.targetVocInvMap = torch.LongTensor{2,1,4,3}
beamSearcher = onmt.translate.BeamSearcher.new(advancer)
results = beamSearcher:search(beamSize, nBest)
tester:eq(results[1][1].tokens, {1, 1, 1})
advancer.dicts.subdict = nil
-- Test nBest = 2
nBest = 2
beamSize = 3
beamSearcher = onmt.translate.BeamSearcher.new(advancer)
results = beamSearcher:search(beamSize, nBest)
tester:eq(results, { {{tokens = {3, 4}, states = {}, score = math.log(.4*.9)},
{tokens = {2, 3, 4}, states = {}, score = math.log(.6*.4*.9)}},
{{tokens = {3, 4}, states = {}, score = math.log(.4*.9)},
{tokens = {1, 3, 4}, states = {}, score = math.log(.6*.4*.9)}},
{{tokens = {4}, states = {}, score = math.log(.9)},
{tokens = {3, 4}, states = {}, score = math.log(.1*.9)}} }, 1e-6)
-- Test filter
local filter = function(beam)
local tokens = beam:getTokens()
local batchSize = tokens[1]:size(1)
-- Disallow {3, 4}
local prune = torch.ByteTensor(batchSize):zero()
for b = 1, batchSize do
if #tokens >= 3 then
if tokens[2][b] == 3 and tokens[3][b] == 4 then
prune[b] = 1
end
end
end
return prune
end
Advancer.filter = function(_, beam) return filter(beam) end
advancer = Advancer.new()
advancer.dicts = {}
nBest = 1
beamSize = 3
beamSearcher = onmt.translate.BeamSearcher.new(advancer)
results = beamSearcher:search(beamSize, nBest)
tester:eq(results, { {{tokens = {2, 3, 4}, states = {}, score = math.log(.6*.4*.9)}},
{{tokens = {1, 3, 4}, states = {}, score = math.log(.6*.4*.9)}},
{{tokens = {4}, states = {}, score = math.log(.9)}} }, 1e-6)
end
return beamSearchTest
|
require"sc.Compilesynth" -- has some common synthdefs
SynthDef("formantVoice2", {out=0, gate=1, freq=60, amp=0.3,pan=0, voiceGain=1.0, noiseGain=0.0,sweepRate=0.01},function ()
local f = Control.names({'f'}).kr(Ref{ 400, 750, 2400, 2600, 2900 });
local q = Control.names({'q'}).kr(Ref{ 0.1, 0.10666666666667, 0.041666666666667,0.046153846153846, 0.041379310344828 });
local a = Control.names({'a'}).kr(Ref{ 1, 0.28183829312645, 0.089125093813375, 0.1, 0.01 });
local env=EnvGen.ar(Env.asr(0.1, 1.0, 0.1), gate, nil,nil,nil,2);
local filters,filter,freqlag;
local vibrato = SinOsc.kr(4,Rand(0,2*math.pi));
freqlag=Lag.kr(freq,sweepRate*0.1);
filters = Formant.ar(freqlag+vibrato, Lag.kr(f, sweepRate), Lag.kr(f*q, sweepRate), Lag.kr(a, sweepRate));
filter=HPF.ar(Mix(filters),200)*env*4;
return Out.ar(out, Pan2.ar(amp*filter,pan,amp ));
end):store()
local path = require"sc.path"
local this_file_path = path.file_path()
ccc=FileBuffer(this_file_path..[[\dbexcite.wav]])
SynthDef("cbass", { fnoise=3500,out=0, freq=440, amp=0.5, gate=1,pos=1-1/7,c1=0.3,c3=200,mistune = 4,mp=0.55,gc=10,wfreq=20000,release=0.2,pan=0},function()
local wide2 = 0.006 --LinExp.kr(amp,0,1,0.006,0.0001)
local pre = 1 --LinExp.kr(amp,0,1,1,0.0001) - 0.5
local env = Env.new({0,pre, 1, 0}, TA{0.001,wide2, 0.0005}*1,{5,-5, -8});
fnoise = LinExp.kr(amp,0,1,1600,16000)
local inp = PlayBuf.ar(1, ccc.buffnum, BufRateScale.kr(ccc.buffnum),gate,0 ,0)*amp
wfreq = LinExp.kr(amp,40/127,1,1000,20000)
inp = LPF.ar(inp,wfreq)
local son = DWGPlucked.ar(freq, amp, gate,pos,c1,c3,inp,release)
son = son * EnvGen.ar(Env.perc(0,0.6),gate)
DetectSilence.ar(son, 0.001,nil,2);
Out.ar(out, Pan2.ar(Mix(son*0.3) ,pan));
end):store();
SynthDef("plukVm",{freq=440,amp = 1,decay = 10,pan=0,coef=0.6 ,out=0,gate=1,excit=0.1},
function ()
local signal = Decay.ar(Impulse.ar(0), excit, PinkNoise.ar(amp));
CheckBadValues.ar(signal,15)
local freqreciprocal=freq:reciprocal()
signal = Pluck.ar(signal, 1, freqreciprocal, freqreciprocal, 9, LinExp.kr(amp,0,1,0.9,LinExp.kr(freq,50,1000,coef,0.2*coef)))
CheckBadValues.ar(signal,16)
signal=signal*EnvGen.kr(Env.perc(0.01,decay,amp),gate,nil,nil,nil,2);
--DetectSilence.ar(signal)
signal=LeakDC.ar(signal)
DetectSilence.ar(signal,0.001,0.1,2);
CheckBadValues.ar(signal,13)
return Out.ar(out, signal);
end):store()
SynthDef("early",{busout=0,fac=5,mix=1,lat=0,ff=6000,bypass=0},function()
local sin = In.ar(busout,2)
local s = Mix(sin)*0.5 --Resonz.ar(Impulse.ar(1), 2000 , 0.3)*3
local z = {2,3,5,7,11,13,17}*fac*(1-lat)
z = z:Do(function(v) return DelayC.ar(s, 0.2,v/1000)*z[1]/v end) --*z[1]/v
z = Mix(z)
local z2 = {2,3,5,7,11,13,17}*fac*(1+lat)
z2 = z2:Do(function(v) return DelayC.ar(s, 0.2,v/1000)*z2[1]/v end) --*z2[1]/v
z2 = Mix(z2)
local effect = LPF.ar({z,z2},ff)*mix + sin
ReplaceOut.ar(busout,Select.ar(bypass,{effect,sin}) )
end):store()
|
local RunService = game:GetService("RunService")
local Stories = script.Parent.Parent.Parent.Parent
local Packages = Stories.Parent.Parent
local Roact = require(Packages.Roact)
local UIBloxConfig = require(Stories.UIBloxStorybookConfig)
local Gamepad = require(Packages.RoactGamepad)
local InputManager = require(Packages.StoryComponents.InputManager)
local FocusContainer = require(Packages.StoryComponents.FocusContainer)
local App = Packages.UIBlox.App
local EmptyState = require(App.Indicator.EmptyState)
local Images = require(App.ImageSet.Images)
local ICON = 'icons/status/oof_xlarge'
local BUTTON_ICON = 'icons/common/refresh'
local EmptyStateStory = Roact.PureComponent:extend("EmptyStateStory")
function EmptyStateStory:render()
return Roact.createElement(EmptyState, {
position = UDim2.fromScale(0.5, 0.5),
anchorPoint = Vector2.new(0.5, 0.5),
text = "No [Items]",
icon = Images[ICON],
buttonIcon = Images[BUTTON_ICON],
onActivated = (function() print("callback") end),
})
end
local function wrapStoryForGamepad(story)
if not UIBloxConfig.emptyStateControllerSupport or not RunService:IsRunning() then
return story
end
return Roact.createElement(FocusContainer, {}, {
InputManager = UIBloxConfig.emptyStateControllerSupport
and Gamepad.withFocusController(function(focusController)
return Roact.createElement(InputManager, {
focusController = focusController,
})
end),
EmptyStateStory = Roact.createElement(Gamepad.Focusable.Frame, {
Size = UDim2.fromScale(1, 1),
BackgroundTransparency = 1,
}, {
EmptyState = Roact.createElement(story)
})
})
end
return wrapStoryForGamepad(EmptyStateStory)
|
--
local M = {}
---@return string,string
local function checkReturn(ret)
if ret ~= '' then
return ret:gsub('\\', '/')
end
local err = lstg.FileDialog:getLastError()
if err == 'cancel' then
--return
else
print(string.format('got error in FileDialog: %s', err))
--return
end
return nil, err
end
local function makeFilter(filter)
if not filter then
return ''
end
local str = ''
if type(filter) == 'string' then
str = filter
else
for _, f in ipairs(filter) do
if type(f) == 'string' then
str = str .. f .. ';'
else
str = str .. table.concat(f, ',') .. ';'
end
end
str = str:sub(1, -2)
end
return str
end
local function splitFilter(filter)
filter = makeFilter(filter)
local ret = {}
for _, v in ipairs(string.split(filter, ';') or {}) do
for _, u in ipairs(string.split(v, ',') or {}) do
table.insert(ret, u)
end
end
return ret
end
--- File dialog for 'open'
--- If successed, return path. If cancelled, return nil and 'cancel'. If failed, return nil and message.
---@param filter string|table
---@param defaultPath string
function M.open(filter, defaultPath)
--TODO: move to cpp
if defaultPath and jit.os == 'Windows' then
defaultPath = defaultPath:gsub('/', '\\')
end
return checkReturn(lstg.FileDialog:open(makeFilter(filter), defaultPath or ''))
end
---
---@param filter string|table
---@param defaultPath string
function M.openMultiple(filter, defaultPath)
local ret = lstg.FileDialog:openMultiple(makeFilter(filter), defaultPath or '')
if #ret > 0 then
return ret
end
local err = lstg.FileDialog:getLastError()
if err == 'cancel' then
--return
else
Print(string.format('got error in FileDialog: %s', err))
end
return nil, err
end
---
---@param filter string|table
---@param defaultPath string
function M.save(filter, defaultPath)
local path, msg = checkReturn(lstg.FileDialog:save(makeFilter(filter), defaultPath or ''))
if path and string.fileext(path) == '' then
local ext = splitFilter(filter)[1]
if ext and ext ~= '' then
path = path .. '.' .. ext
end
end
return path, msg
end
---
---@param defaultPath string
function M.pickFolder(defaultPath)
return checkReturn(lstg.FileDialog:pickFolder(defaultPath or ''))
end
return M
|
--proc/cursor: cursor resources.
setfenv(1, require'winapi')
require'winapi.winuser'
ffi.cdef[[
HCURSOR LoadCursorW(
HINSTANCE hInstance,
LPCWSTR lpCursorName);
int ShowCursor(BOOL bShow);
BOOL SetCursorPos(int X, int Y);
BOOL SetPhysicalCursorPos(int X, int Y);
HCURSOR SetCursor(HCURSOR hCursor);
BOOL GetCursorPos(LPPOINT lpPoint);
BOOL GetPhysicalCursorPos(LPPOINT lpPoint);
BOOL ClipCursor(const RECT *lpRect);
BOOL GetClipCursor(LPRECT lpRect);
HCURSOR GetCursor(void);
]]
IDC_ARROW = 32512
IDC_IBEAM = 32513
IDC_WAIT = 32514
IDC_CROSS = 32515
IDC_UPARROW = 32516
IDC_SIZE = 32640
IDC_ICON = 32641
IDC_SIZENWSE = 32642
IDC_SIZENESW = 32643
IDC_SIZEWE = 32644
IDC_SIZENS = 32645
IDC_SIZEALL = 32646
IDC_NO = 32648
IDC_HAND = 32649
IDC_APPSTARTING = 32650
IDC_HELP = 32651
function LoadCursor(hInstance, name)
if not name then hInstance, name = nil, hInstance end
return checkh(C.LoadCursorW(hInstance,
ffi.cast('LPCWSTR', wcs(MAKEINTRESOURCE(name)))))
end
function SetCursor(cursor)
return ptr(C.SetCursor(cursor))
end
function GetCursorPos(p)
p = POINT(p)
checknz(C.GetCursorPos(p))
return p
end
if not ... then
print(LoadCursor(IDC_ARROW))
print(LoadCursor(IDC_HELP))
end
|
require("prototypes.entity.entities")
require("prototypes.item.item")
require("prototypes.recipe.recipe")
require("prototypes.signal.signal")
require("prototypes.technology.technology")
|
quest_paper = {
use = function(player)
--local width = 20
--local height = 15
local width = 15
local height = 20
local item = player:getInventoryItem(player.invSlot)
player:paperpopup(width, height, item.note)
end
}
|
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- F I N A L C U T P R O A P I --
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--- === cp.apple.finalcutpro.main.Inspector.ShareInspector ===
---
--- Share Inspector Module.
--------------------------------------------------------------------------------
--
-- EXTENSIONS:
--
--------------------------------------------------------------------------------
local log = require("hs.logger").new("shareInspect")
local prop = require("cp.prop")
--------------------------------------------------------------------------------
--
-- THE MODULE:
--
--------------------------------------------------------------------------------
local ShareInspector = {}
--- cp.apple.finalcutpro.main.Inspector.ShareInspector:new(parent) -> ShareInspector object
--- Method
--- Creates a new ShareInspector object
---
--- Parameters:
--- * `parent` - The parent
---
--- Returns:
--- * A ShareInspector object
function ShareInspector:new(parent)
local o = {
_parent = parent,
_child = {}
}
return prop.extend(o, ShareInspector)
end
--- cp.apple.finalcutpro.main.Inspector.ShareInspector:parent() -> table
--- Method
--- Returns the ShareInspector's parent table
---
--- Parameters:
--- * None
---
--- Returns:
--- * The parent object as a table
function ShareInspector:parent()
return self._parent
end
--- cp.apple.finalcutpro.main.Inspector.ShareInspector:app() -> table
--- Method
--- Returns the `cp.apple.finalcutpro` app table
---
--- Parameters:
--- * None
---
--- Returns:
--- * The application object as a table
function ShareInspector:app()
return self:parent():app()
end
--------------------------------------------------------------------------------
--
-- SHARE INSPECTOR:
--
--------------------------------------------------------------------------------
return ShareInspector
|
--邀请好友模块
local layerBase = require("games/common2/module/layerBase");
local InviteLayer2 = class(layerBase, false);
InviteLayer2.ctor = function(self)
super(self, nil);
local localseat = PlayerSeat.getInstance():getMyLocalSeat();
if self.m_viewConfig[localseat] then
self:addView(localseat,self.m_viewConfig[localseat]);
end
end
InviteLayer2.Delegate = {
};
InviteLayer2.parseViewConfig = function(self)
local viewConfig = {
["onlooker"] = {};
};
return viewConfig;
end
-- 初始化layer的配置
InviteLayer2.initViewConfig = function(self)
self.m_viewConfig = {
[1] = {
path = "games/common2/module/invite2/inviteView2";
pos = {};
viewLayer = "view/kScreen_1280_800/games/common2/inviteView2";
viewConfig = "inviteView2";
};
[2] = {};
[3] = {};
};
end
InviteLayer2.dtor = function(self)
end
InviteLayer2.onCloseInviteView = function(self,seat,uid,info,isFast)
self:removeView(seat);
end
InviteLayer2.s_stateFuncMap = {
[GameMechineConfig.STATUS_START] = "onCloseInviteView";
[GameMechineConfig.STATUS_GAMEOVER] = "onCloseInviteView";
};
InviteLayer2.s_actionFuncMap = {
[GameMechineConfig.ACTION_NS_CLOSEINVITE] = "onCloseInviteView";
};
return InviteLayer2;
--[[
邀请好友模块
支持 微信/QQ好友、 面对面扫码、短信、在线好友的邀请
监听状态:
STATUS_START/STATUS_GAMEOVER:游戏开始和结算状态时,会关闭邀请的弹框
STATUS_LOGIN:登陆状态,会校验是否弹框。私人房登陆成功后,会自动弹出弹框
STATUS_LOGOUT/STATUS_READY:登出/准备状态,清除社交消息的监听
监听动作:
ACTION_NS_CLOSEINVITE:关闭邀请弹框
ACTION_NS_REQUESTINVITELIST:显示邀请弹框
ACTION_NS_RECEIVE_PRIVATEROOMINFO: 接收私人房信息
ACTION_NS_GET_PASSWORD_BY_INFO:获取口令码
ACTION_NS_HIDEINVITE:隐藏邀请框
ACTION_NS_INITINVITE:初始化邀请框,生成口令数据
]]
|
---------------------------------------------------------------------------------
--
-- Prat - A framework for World of Warcraft chat mods
--
-- Copyright (C) 2006-2018 Prat Development Team
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to:
--
-- Free Software Foundation, Inc.,
-- 51 Franklin Street, Fifth Floor,
-- Boston, MA 02110-1301, USA.
--
--
-------------------------------------------------------------------------------
Prat:AddModuleToLoad(function()
local PRAT_MODULE = Prat:RequestModuleName("TellTarget")
if PRAT_MODULE == nil then
return
end
local module = Prat:NewModule(PRAT_MODULE, "AceHook-3.0")
local PL = module.PL
--[===[@debug@
PL:AddLocale(PRAT_MODULE, "enUS", {
["TellTarget"] = true,
["Adds telltarget slash command (/tt)."] = true,
["Target does not exist."] = true,
["Target is not a player."] = true,
["No target selected."] = true,
["NoTarget"] = true,
["/tt"] = true,
})
--@end-debug@]===]
-- These Localizations are auto-generated. To help with localization
-- please go to http://www.wowace.com/projects/prat-3-0/localization/
--@non-debug@
do
local L
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = true,
["No target selected."] = true,
["NoTarget"] = true,
["Target does not exist."] = true,
["Target is not a player."] = true,
["TellTarget"] = true,
}
}
PL:AddLocale(PRAT_MODULE, "enUS",L)
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = "Ajoute la commande telltarget (/tt) pour envoyer un message privé au joueur ciblé.",
["No target selected."] = "Pas de cible sélectionnée.",
["NoTarget"] = "PasDeCible",
["Target does not exist."] = "La cible n'existe pas.",
["Target is not a player."] = "La cible n'est pas un joueur.",
["TellTarget"] = true,
}
}
PL:AddLocale(PRAT_MODULE, "frFR",L)
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = "Fügt das Slash-Kommando TellTarget (/tt) hinzu",
["No target selected."] = "Kein Ziel ausgewählt.",
["NoTarget"] = "KeinZiel",
["Target does not exist."] = "Ziel existiert nicht.",
["Target is not a player."] = "Ziel ist kein Spieler.",
["TellTarget"] = true,
}
}
PL:AddLocale(PRAT_MODULE, "deDE",L)
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = "대상에게 말하기 슬래쉬 명령어를 추가합니다 (/tt).",
["No target selected."] = "대상이 선택되지 않았습니다.",
["NoTarget"] = "대상 없음",
["Target does not exist."] = "대상이 존재하지 않습니다.",
["Target is not a player."] = "대상이 플레이어가 아닙니다.",
["TellTarget"] = "대상에게 말하기",
}
}
PL:AddLocale(PRAT_MODULE, "koKR",L)
L=
{
["TellTarget"] = {
--[[Translation missing --]]
--[[ ["/tt"] = "",--]]
--[[Translation missing --]]
--[[ ["Adds telltarget slash command (/tt)."] = "",--]]
--[[Translation missing --]]
--[[ ["No target selected."] = "",--]]
--[[Translation missing --]]
--[[ ["NoTarget"] = "",--]]
--[[Translation missing --]]
--[[ ["Target does not exist."] = "",--]]
--[[Translation missing --]]
--[[ ["Target is not a player."] = "",--]]
--[[Translation missing --]]
--[[ ["TellTarget"] = "",--]]
}
}
PL:AddLocale(PRAT_MODULE, "esMX",L)
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = "Добавляет слеш-команду 'сказать о цели' (/tt).",
["No target selected."] = "Нет выбранной цели.",
["NoTarget"] = "Нет цели",
["Target does not exist."] = "Цель не существует.",
["Target is not a player."] = "Выбранная цель не является игроком.",
["TellTarget"] = "Сказать цели",
}
}
PL:AddLocale(PRAT_MODULE, "ruRU",L)
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = "添加目标告知斜杠命令(/tt).",
["No target selected."] = "无目标被选取",
["NoTarget"] = "无目标",
["Target does not exist."] = "目标不存在",
["Target is not a player."] = "目标不是一个玩家",
["TellTarget"] = "告知目标",
}
}
PL:AddLocale(PRAT_MODULE, "zhCN",L)
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = "Añade comando decir a objetivo (/tt).",
["No target selected."] = "Sin objetivo seleccionado.",
["NoTarget"] = "SinObjetivo",
["Target does not exist."] = "El Objetivo no existe.",
["Target is not a player."] = "El Objetivo no es un jugador.",
["TellTarget"] = "DecirObjetivo",
}
}
PL:AddLocale(PRAT_MODULE, "esES",L)
L=
{
["TellTarget"] = {
["/tt"] = true,
["Adds telltarget slash command (/tt)."] = "新增 telltarget 快捷命令(/tt)",
["No target selected."] = "未選取目標",
["NoTarget"] = "沒有目標",
["Target does not exist."] = "目標並不存在",
["Target is not a player."] = "目標並不是玩家",
["TellTarget"] = true,
}
}
PL:AddLocale(PRAT_MODULE, "zhTW",L)
end
--@end-non-debug@
-- create prat module
Prat:SetModuleDefaults(module.name, {
profile = {
on = true,
}
})
Prat:SetModuleOptions(module.name, {
name = PL["TellTarget"],
desc = PL["Adds telltarget slash command (/tt)."],
type = "group",
args = {
info = {
name = PL["Adds telltarget slash command (/tt)."],
type = "description",
}
}
})
--[[------------------------------------------------
Module Event Functions
------------------------------------------------]] --
function module:OnModuleEnable()
self:HookScript(ChatFrame1EditBox, "OnTextChanged")
end
function module:OnModuleDisable()
self:UnhookAll()
end
--[[------------------------------------------------
Core Functions
------------------------------------------------]] --
function module:GetDescription()
return PL["Adds telltarget slash command (/tt)."]
end
function module:OnTextChanged(editBox, ...)
local command, msg = editBox:GetText():match("^(/%S+)%s(.*)$")
if command == "/tt" or command == PL["/tt"] then
self:SendTellToTarget(editBox.chatFrame, msg, editBox)
end
self.hooks[editBox].OnTextChanged(editBox, ...)
end
function module:SendTellToTarget(frame, text, editBox)
if frame == nil then frame = DEFAULT_CHAT_FRAME end
local unitname, realm, fullname
if UnitIsPlayer("target") then
unitname, realm = UnitName("target")
if unitname then
if realm and UnitRealmRelationship("target") ~= LE_REALM_RELATION_SAME then
fullname = unitname .. "-" .. realm
else
fullname = unitname
end
end
end
local target = fullname and fullname:gsub(" ", "") or PL["NoTarget"]
if editBox then
editBox:SetAttribute("chatType", "WHISPER");
editBox:SetAttribute("tellTarget", target);
editBox:SetText(text)
ChatEdit_UpdateHeader(editBox);
else
ChatFrame_SendTell(target, frame)
end
end
local function TellTarget(msg)
module:SendTellToTarget(SELECTED_CHAT_FRAME, msg)
end
return
end) -- Prat:AddModuleToLoad
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.