
Сообщение от
Катамаранов
/dbm arrow focus
Таак а импортировать это в простой аддон можно?
- - - Updated - - -
PHP код:
local x, y = string.split(" ", cmd:sub(6):trim())
xNum, yNum = tonumber(x or ""), tonumber(y or "")
local success
if xNum and yNum then
DBM.Arrow:ShowRunTo(xNum / 100, yNum / 100, 0)
success = true
elseif type(x) == "string" and x:trim() ~= "" then
local subCmd = x:trim()
if subCmd:upper() == "HIDE" then
DBM.Arrow:Hide()
success = true
elseif subCmd:upper() == "MOVE" then
DBM.Arrow:Move()
success = true
elseif subCmd:upper() == "TARGET" then
DBM.Arrow:ShowRunTo("target")
success = true
elseif subCmd:upper() == "FOCUS" then
DBM.Arrow:ShowRunTo("focus")
success = true
elseif DBM:GetRaidUnitId(DBM:Capitalize(subCmd)) ~= "none" then
DBM.Arrow:ShowRunTo(DBM:Capitalize(subCmd))
success = true
end
end
if not success then
for i, v in ipairs(DBM_ARROW_ERROR_USAGE) do
DBM:AddMsg(v)
end
end
else
DBM:LoadGUI()
end
end
Нашёл какой-то кусок кода с DBMа со стрелочками, ниче не пойму здесь