Update
This commit is contained in:
@@ -1,65 +1,65 @@
|
||||
function()
|
||||
FriendlyPlayerNameplateIds = {}
|
||||
local pointer = 1
|
||||
for i = 1, 40 do
|
||||
if UnitIsPlayer("nameplate" .. i) == true then
|
||||
FriendlyPlayerNameplateIds[pointer] = i
|
||||
pointer = pointer + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
UnitIsFriend("player", "nameplate" .. i)
|
||||
|
||||
|
||||
|
||||
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(FriendlyPlayerNameplateIds) do
|
||||
if UnitName("nameplate" .. v) ~= nil then
|
||||
output = output .. string.match(UnitName("nameplate" .. v), "%a+") .. " " .. UnitHealth("nameplate" .. v) .. "/" .. UnitHealthMax("nameplate" .. v) .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function()
|
||||
local output = ""
|
||||
FriendlyPlayerNameplateIds = {}
|
||||
local pointer = 1
|
||||
for i = 1, 40 do
|
||||
if UnitIsPlayer("nameplate" .. i) == true then
|
||||
FriendlyPlayerNameplateIds[pointer] = i
|
||||
pointer = pointer + 1
|
||||
output = output .. i .. " " .. string.match(UnitName("nameplate" .. i), "%a+") .. "\n"
|
||||
end
|
||||
end
|
||||
output = output .. "\n\n\n"
|
||||
for k,v in ipairs(FriendlyPlayerNameplateIds) do
|
||||
output = output .. k .. " " .. v .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
local f = CreateFrame("Button", "name", UIParent, "SecureUnitButtonTemplate")
|
||||
f:SetAttribute("unit", "player") -- or whatever unit you're making
|
||||
f:EnableMouse(true)
|
||||
f:SetSize(100, 20) -- width 100, height 20
|
||||
f:SetAllPoints(WeakAuras.regions[aura_env.id].region)
|
||||
f:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
f:SetAttribute("type1", "target") -- Left click targets unit
|
||||
function()
|
||||
FriendlyPlayerNameplateIds = {}
|
||||
local pointer = 1
|
||||
for i = 1, 40 do
|
||||
if UnitIsPlayer("nameplate" .. i) == true then
|
||||
FriendlyPlayerNameplateIds[pointer] = i
|
||||
pointer = pointer + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
UnitIsFriend("player", "nameplate" .. i)
|
||||
|
||||
|
||||
|
||||
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(FriendlyPlayerNameplateIds) do
|
||||
if UnitName("nameplate" .. v) ~= nil then
|
||||
output = output .. string.match(UnitName("nameplate" .. v), "%a+") .. " " .. UnitHealth("nameplate" .. v) .. "/" .. UnitHealthMax("nameplate" .. v) .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function()
|
||||
local output = ""
|
||||
FriendlyPlayerNameplateIds = {}
|
||||
local pointer = 1
|
||||
for i = 1, 40 do
|
||||
if UnitIsPlayer("nameplate" .. i) == true then
|
||||
FriendlyPlayerNameplateIds[pointer] = i
|
||||
pointer = pointer + 1
|
||||
output = output .. i .. " " .. string.match(UnitName("nameplate" .. i), "%a+") .. "\n"
|
||||
end
|
||||
end
|
||||
output = output .. "\n\n\n"
|
||||
for k,v in ipairs(FriendlyPlayerNameplateIds) do
|
||||
output = output .. k .. " " .. v .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
local f = CreateFrame("Button", "name", UIParent, "SecureUnitButtonTemplate")
|
||||
f:SetAttribute("unit", "player") -- or whatever unit you're making
|
||||
f:EnableMouse(true)
|
||||
f:SetSize(100, 20) -- width 100, height 20
|
||||
f:SetAllPoints(WeakAuras.regions[aura_env.id].region)
|
||||
f:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
f:SetAttribute("type1", "target") -- Left click targets unit
|
||||
f:SetAttribute("type2", "togglemenu") -- Right click opens the context menu
|
||||
@@ -1,89 +1,89 @@
|
||||
--https://wago.io/VJb37XBIb
|
||||
{
|
||||
"m": "d",
|
||||
"s": "2.1.0.27",
|
||||
"d": {
|
||||
"yOffset": -13,
|
||||
"width": 185,
|
||||
"version": 1,
|
||||
"id": "Player Frame Clickable",
|
||||
"additional_triggers": [
|
||||
{
|
||||
"untrigger": [],
|
||||
"trigger": {
|
||||
"unit": "player",
|
||||
"use_unit": true,
|
||||
"use_alwaystrue": true,
|
||||
"event": "Conditions",
|
||||
"subeventPrefix": "SPELL",
|
||||
"subeventSuffix": "_CAST_START",
|
||||
"type": "status",
|
||||
"unevent": "auto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"numTriggers": 2,
|
||||
"disjunctive": "any",
|
||||
"regionType": "texture",
|
||||
"load": {
|
||||
"use_never": false,
|
||||
"faction": {
|
||||
"multi": []
|
||||
},
|
||||
"difficulty": {
|
||||
"multi": []
|
||||
},
|
||||
"role": {
|
||||
"multi": []
|
||||
},
|
||||
"talent": {
|
||||
"multi": []
|
||||
},
|
||||
"race": {
|
||||
"multi": []
|
||||
}
|
||||
},
|
||||
"trigger": {
|
||||
"custom": "function(event)
|
||||
return false
|
||||
end
|
||||
",
|
||||
"events": "PLAYER_ENTERING_WORLD",
|
||||
"type": "custom",
|
||||
"custom_type": "status",
|
||||
"custom_hide": "timed"
|
||||
},
|
||||
"init_completed": 1,
|
||||
"color": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
0
|
||||
],
|
||||
"url": "https://wago.io/VJb37XBIb/1",
|
||||
"untrigger": {
|
||||
"custom": function()
|
||||
if LeafPlayerFrame then
|
||||
else
|
||||
local r = WeakAuras.regions[aura_env.id].region
|
||||
local f = CreateFrame("button", "LeafPlayerFrame", r, "SecureActionButtonTemplate")
|
||||
f.unit = 'player'
|
||||
f:SetAttribute("unit", "player")
|
||||
f:SetAllPoints(r)
|
||||
f:EnableMouse(true)
|
||||
f:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
f:SetAttribute("type1", "target")
|
||||
f:SetAttribute("type2", "togglemenu")
|
||||
RegisterUnitWatch(f)
|
||||
f:SetScript("OnEnter",UnitFrame_OnEnter)
|
||||
end
|
||||
end
|
||||
"
|
||||
},
|
||||
"height": 20,
|
||||
"texture": "interface\\addons\\LeafPack\\Other\\Square Frame.tga",
|
||||
"semver": "1.0.0"
|
||||
},
|
||||
"v": 1421,
|
||||
"wagoID": "VJb37XBIb"
|
||||
--https://wago.io/VJb37XBIb
|
||||
{
|
||||
"m": "d",
|
||||
"s": "2.1.0.27",
|
||||
"d": {
|
||||
"yOffset": -13,
|
||||
"width": 185,
|
||||
"version": 1,
|
||||
"id": "Player Frame Clickable",
|
||||
"additional_triggers": [
|
||||
{
|
||||
"untrigger": [],
|
||||
"trigger": {
|
||||
"unit": "player",
|
||||
"use_unit": true,
|
||||
"use_alwaystrue": true,
|
||||
"event": "Conditions",
|
||||
"subeventPrefix": "SPELL",
|
||||
"subeventSuffix": "_CAST_START",
|
||||
"type": "status",
|
||||
"unevent": "auto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"numTriggers": 2,
|
||||
"disjunctive": "any",
|
||||
"regionType": "texture",
|
||||
"load": {
|
||||
"use_never": false,
|
||||
"faction": {
|
||||
"multi": []
|
||||
},
|
||||
"difficulty": {
|
||||
"multi": []
|
||||
},
|
||||
"role": {
|
||||
"multi": []
|
||||
},
|
||||
"talent": {
|
||||
"multi": []
|
||||
},
|
||||
"race": {
|
||||
"multi": []
|
||||
}
|
||||
},
|
||||
"trigger": {
|
||||
"custom": "function(event)
|
||||
return false
|
||||
end
|
||||
",
|
||||
"events": "PLAYER_ENTERING_WORLD",
|
||||
"type": "custom",
|
||||
"custom_type": "status",
|
||||
"custom_hide": "timed"
|
||||
},
|
||||
"init_completed": 1,
|
||||
"color": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
0
|
||||
],
|
||||
"url": "https://wago.io/VJb37XBIb/1",
|
||||
"untrigger": {
|
||||
"custom": function()
|
||||
if LeafPlayerFrame then
|
||||
else
|
||||
local r = WeakAuras.regions[aura_env.id].region
|
||||
local f = CreateFrame("button", "LeafPlayerFrame", r, "SecureActionButtonTemplate")
|
||||
f.unit = 'player'
|
||||
f:SetAttribute("unit", "player")
|
||||
f:SetAllPoints(r)
|
||||
f:EnableMouse(true)
|
||||
f:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
f:SetAttribute("type1", "target")
|
||||
f:SetAttribute("type2", "togglemenu")
|
||||
RegisterUnitWatch(f)
|
||||
f:SetScript("OnEnter",UnitFrame_OnEnter)
|
||||
end
|
||||
end
|
||||
"
|
||||
},
|
||||
"height": 20,
|
||||
"texture": "interface\\addons\\LeafPack\\Other\\Square Frame.tga",
|
||||
"semver": "1.0.0"
|
||||
},
|
||||
"v": 1421,
|
||||
"wagoID": "VJb37XBIb"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user