Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from gbl/master

commited new files
  • Loading branch information...
commit 6c1743c40559d3f8c1389cafc0d8f368376d0edd 2 parents 47aa580 + c3d9e7f
@ka-ka authored
View
BIN  RareDar/arrowleft.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  RareDar/arrowright.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
80 RareDar/data.lua
@@ -157,12 +157,12 @@ RareDar_rares = {
["Gepeinigtes Irrlicht"] ={"Freimark", "Seeblick-Außenposten", 6036, 5698, 6},--
["Augustor"] ={"Freimark", "", 6198, 5032, 7},--
- ["Rachedurstiger Geist"] ={"Silberwald", "Palisade", 6350, 2645},
- ["Brod"] ={"Silberwald", "Treantenhain", 6445, 2921},
- ["Marlrog"] ={"Silberwald", "Treantenhain", 6812, 3200},
- ["Mok"] ={"Silberwald", "Silberküste", 7117, 3225},
- ["Pandora"] ={"Silberwald", "Sonngipfel", 7107, 3476},
- ["Pentheus"] ={"Silberwald", "Heckenhof", 6585, 2585},
+ ["Rachedurstiger Geist"] ={"Silberwald", "Palisade", 6350, 2645, 6},
+ ["Brod"] ={"Silberwald", "Treantenhain", 6445, 2921, 4},
+ ["Marlrog"] ={"Silberwald", "Treantenhain", 6812, 3200, 3},
+ ["Mok"] ={"Silberwald", "Silberküste", 7117, 3225, 1},
+ ["Pandora"] ={"Silberwald", "Sonngipfel", 7107, 3476, 2},
+ ["Pentheus"] ={"Silberwald", "Heckenhof", 6585, 2585, 5},
["Silberwald-Werwolf"] ={"Silberwald", "", 5800, 2700},
["Bahezerk"] ={"Steinfeld", "Gewaltige Steppen", 4428, 5065, 1},--
@@ -181,17 +181,17 @@ RareDar_rares = {
["Nela Valcuthren"] ={"Steinfeld", "Bruchsteinstraße", 5880, 4830, 14},--
["Ashandara"] ={"Steinfeld", "Bruchsteinstraße", 4462, 5027, 15},--rare but not in achievement
- ["Braunkappenschneider"] ={"Düsterwald", "Knorzwaldposten", 5212, 2461},
- ["Dozer"] ={"Düsterwald", "Mathosianische Mühle", 4336, 2336},
- ["Gnarl-Nachtjäger"] ={"Düsterwald", "Knorzwaldposten", 5313, 2813},
- ["Mondschattenschleicher"] ={"Düsterwald", "Schattensturztürme", 4610, 2488},
- ["Mühlstieg Mondschleicher"] ={"Düsterwald", "Mühlenteich", 4188, 2700},
- ["Brüher"] ={"Düsterwald", "Finstere Tiefen", 4950, 2145},
- ["Narbenbiss"] ={"Düsterwald", "Mühlenteich", 4164, 2838},
- ["Tränenschleicher"] ={"Düsterwald", "?Tearfall Creek", 4687, 2561},
- ["Schleicher des Hains"] ={"Düsterwald", "Hain der Alten", 5354, 2572},
- ["Xaksha"] ={"Düsterwald", "Mathosianische Mühle", 4640, 2380},
- ["Zatzak Braunkapp"] ={"Düsterwald", "Knorzwaldposten", 5212, 2461},
+ ["Braunkappenschneider"] ={"Dämmerwald", "Hain der Alten", 5212, 2461, 3},
+ ["Dozer"] ={"Dämmerwald", "Holzfällerheber", 4336, 2336, 9},
+ ["Gnarl-Nachtjäger"] ={"Dämmerwald", "Finsterpfad", 5313, 2813, 1},
+ ["Mondschattenschleicher"] ={"Dämmerwald", "Festung Schattensturz", 4610, 2488, 7},
+ ["Mühlstieg Mondschleicher"] ={"Dämmerwald", "Westlicher Tiefwaldpfad", 4188, 2700, 10},
+ ["Brüher"] ={"Dämmerwald", "Finstere Tiefen", 4950, 2145, 5},
+ ["Narbenbiss"] ={"Dämmerwald", "Mühlenteich", 4164, 2838, 11},
+ ["Tränenschleicher"] ={"Dämmerwald", "Schattensturztürme", 4687, 2561, 8},
+ ["Schleicher des Hains"] ={"Dämmerwald", "Hain der Alten", 5354, 2572, 2},
+ ["Xaksha"] ={"Dämmerwald", "Festung Schattensturz", 4640, 2380, 6},
+ ["Zatzak Braunkapp"] ={"Dämmerwald", "Hain der Alten", 5212, 2461, 4},
["Nachtklaue"] ={"Scharlachrote Schlucht", "", 4392, 4521, 2},--not in achievement
["Felskiefer"] ={"Scharlachrote Schlucht", "Steinkrone", 4131, 3242, 4},
@@ -199,27 +199,27 @@ RareDar_rares = {
["Ghorgull der Bote der Trankopfer"] ={"Scharlachrote Schlucht", "", 4434, 3313, 3},
["Quogor"] ={"Scharlachrote Schlucht", "Purpurbach", 3840, 2968, 5},
- ["Gurock"] ={"Wundwaldregion", "Alte Wache", 3003, 4014},
- ["Steinpeitsche"] ={"Wundwaldregion", "Alte Wache", 2969, 3963},
- ["Faulpeitsche"] ={"Wundwaldregion", "Granitwaldkreuzung", 3990, 4650},
- ["Schattenernter"] ={"Wundwaldregion", "Granitwaldkreuzung", 3950, 4675},
- ["Blutbart"] ={"Wundwaldregion", "Eisenfall", 3900, 4300},
- ["Schotterfaust"] ={"Wundwaldregion", "Eisenfall", 3692, 4242},
- ["Nuhtu"] ={"Wundwaldregion", "Herrscherhalle", 2836, 4268},
- ["Granitkriecher"] ={"Wundwaldregion", "Granitewood Haunt", 3581, 3976},
- ["Eisenklaue"] ={"Wundwaldregion", "Granitewood Haunt", 3460, 4334},
- ["Blase"] ={"Wundwaldregion", "Granitewood Haunt", 3396, 4098},
- ["Nietenschädel"] ={"Wundwaldregion", "Granitewood Haunt", 3338, 4144},
- ["Wandernder Zertrümmerer"] ={"Wundwaldregion", "Wundwald-Lift, Bergstation", 4040, 4186},
- ["Klingenkeiler-Schrecken"] ={"Wundwaldregion", "Scharfklingenmühle", 3830, 4020},
- ["Stachelschwinge"] ={"Wundwaldregion", "Steinhain", 3600, 3660},
- ["Giftspeier"] ={"Wundwaldregion", "Steinhain", 3600, 3650},
- ["Leichenschleifer"] ={"Wundwaldregion", "Timar-Vorland", 2677, 3789},
- ["Narbenschnabel"] ={"Wundwaldregion", "Timar-Vorland", 3200, 3700},
- ["Ahasa"] ={"Wundwaldregion", "Timar-Vorland", 2750, 3800},
- ["Vasyu"] ={"Wundwaldregion", "Timar-Vorland", 2601, 3849},
- ["Schwarzklaue"] ={"Wundwaldregion", "Trollpesthöhlen", 3449, 4412},
- ["Ekelhaut"] ={"Wundwaldregion", "Trollpesthöhlen", 3477, 4419},
+ ["Gurock"] ={"Wundwaldregion", "Alte Wache", 3003, 4014, 16},
+ ["Steinpeitsche"] ={"Wundwaldregion", "Alte Wache", 2969, 3963, 17},
+ ["Faulpeitsche"] ={"Wundwaldregion", "Granitwaldkreuzung", 3990, 4650, 5},
+ ["Schattenernter"] ={"Wundwaldregion", "Granitwaldkreuzung", 3950, 4675, 4},
+ ["Blutbart"] ={"Wundwaldregion", "Eisenfall", 3900, 4300, 2},
+ ["Schotterfaust"] ={"Wundwaldregion", "Eisenfall", 3692, 4242, 3},
+ ["Nuhtu"] ={"Wundwaldregion", "Herrscherhalle", 2836, 4268, 9},
+ ["Granitkriecher"] ={"Wundwaldregion", "Narbenhaut-Ödnis", 3581, 3976, 13},
+ ["Eisenklaue"] ={"Wundwaldregion", "Granitwaldgegend", 3460, 4334, 8},
+ ["Blase"] ={"Wundwaldregion", "Granitwaldgegend", 3396, 4098, 11},
+ ["Nietenschädel"] ={"Wundwaldregion", "Granitwaldgegend", 3338, 4144, 10},
+ ["Wandernder Zertrümmerer"] ={"Wundwaldregion", "Wundwald-Lift, Bergstation", 4040, 4186, 1},
+ ["Klingenkeiler-Schrecken"] ={"Wundwaldregion", "Scharfklingenmühle", 3830, 4020, 12},
+ ["Stachelschwinge"] ={"Wundwaldregion", "Steinhain", 3600, 3660, 14},
+ ["Giftspeier"] ={"Wundwaldregion", "Steinhain", 3600, 3650, 15},
+ ["Leichenschleifer"] ={"Wundwaldregion", "Timar-Vorland", 2677, 3789, 20},
+ ["Narbenschnabel"] ={"Wundwaldregion", "Timar-Vorland", 3200, 3700, 18},
+ ["Ahasa"] ={"Wundwaldregion", "Timar-Vorland", 2750, 3800, 19},
+ ["Vasyu"] ={"Wundwaldregion", "Timar-Vorland", 2601, 3849, 21},
+ ["Schwarzklaue"] ={"Wundwaldregion", "Trollpesthöhlen", 3449, 4412, 6},
+ ["Ekelhaut"] ={"Wundwaldregion", "Trollpesthöhlen", 3477, 4419, 7},
-- these two to debug the addon
-- ["Schwarzhauer-Verwüster"] ={"Wundwaldregion", "Kains Kommandoposten", 3137, 3856},
-- ["Soldat Thelian"] ={"Wundwaldregion", "Kains Kommandoposten", 3137, 3856},
@@ -290,8 +290,8 @@ RareDar_rares = {
["Osmas"] ={"Glutinsel", "Talos-Landung", 12562, 3142},
["Phocas"] ={"Glutinsel", "Kheramos", 13650, 4560},
["Tephra"] ={"Glutinsel", "Aschebruch", 13250, 3465},
- ["Thome"] ={"Glutinsel", "Höllenfelder", 13352, 3914},
- ["Tricksy"] ={"Glutinsel", "Fernhall", 13482, 2892},
+ ["Thome"] ={"Glutinsel", "Fernhall", 13352, 3914},
+ ["Tricksy"] ={"Glutinsel", "Höllenfelder", 13482, 2892},
},
["French"] = {
View
256 RareDar/radarbutton.lua
@@ -0,0 +1,256 @@
+local miniWindow
+local cycle, cyclepos
+
+local function updatecycleinfo(i)
+ miniWindow.cycle.xpos:SetText(tostring(cycle[i][3]))
+ miniWindow.cycle.ypos:SetText(tostring(cycle[i][4]))
+ miniWindow.cycle.mobName:SetText(cycle[i][6])
+ miniWindow.cycle.mobArea:SetText(cycle[i][2])
+ miniWindow.cycle.mobName.Event.LeftDown="/target "..cycle[i][6]
+ if cycle[i][7] == true then
+ miniWindow.cycle.mobName:SetFontColor(0, 1, 0)
+ elseif cycle[i][7] == false then
+ miniWindow.cycle.mobName:SetFontColor(1, 0.5, 0.5)
+ else
+ miniWindow.cycle.mobName:SetFontColor(1, 1, 1)
+ end
+end
+
+local function showZoneMenu()
+ for i, label in ipairs(miniWindow.zoneMenu) do
+ label:SetVisible(true)
+ end
+ miniWindow.cycle:SetVisible(false)
+end
+
+local function hideZoneMenu()
+ for i, label in ipairs(miniWindow.zoneMenu) do
+ label:SetVisible(false)
+ end
+end
+
+-- fill mobs to the cycle array in 2 passes. First pass, add all mobs
+-- that have index numbers, 2nd pass, add those that don't. So we can
+-- use indexes where we have them defined, but we don't need to define
+-- them in all zones.
+
+local function zoneMenuClick(zone)
+ hideZoneMenu()
+ local lang=Inspect.System.Language()
+ cycle={}
+-- print ("zone='"..zone.."'")
+ for name,info in pairs(RareDar_rares[lang]) do
+ if (info ~= false) and (zone == info[1]) and info[5] then
+ local tmpinfo=info
+ tmpinfo[6]=name
+ cycle[tmpinfo[5]]=tmpinfo
+ end
+ end
+ for name,info in pairs(RareDar_rares[lang]) do
+ if (info ~= false) and (zone == info[1]) and not info[5] then
+ local tmpinfo=info
+ tmpinfo[6]=name
+ table.insert(cycle, tmpinfo)
+ end
+ end
+ cyclepos=1
+ updatecycleinfo(cyclepos)
+ miniWindow.cycle:SetVisible(true)
+end
+
+local function cycleLeft()
+ if RareDar.secureMode then return end
+ if cyclepos==1 then cyclepos=#cycle else cyclepos=cyclepos-1 end
+ updatecycleinfo(cyclepos)
+end
+
+local function cycleRight()
+ if RareDar.secureMode then return end
+ if cyclepos==#cycle then cyclepos=1 else cyclepos=cyclepos+1 end
+ updatecycleinfo(cyclepos)
+end
+
+local function buildMiniWindow()
+ miniWindow=UI.CreateFrame("Frame", "RareDar", context)
+ miniWindow:SetPoint("TOPLEFT", UIParent, "TOPLEFT", RareDar.xpos, RareDar.ypos)
+ miniWindow:SetWidth(150)
+ miniWindow:SetHeight(50)
+ miniWindow:SetBackgroundColor(0.1, 0.1, 0.1, 0.8)
+ miniWindow:SetVisible(true)
+ miniWindow:SetSecureMode("restricted")
+ miniWindow.state={}
+ function miniWindow.Event:LeftDown()
+ if RareDar.secureMode then return end
+ miniWindow.state.mouseDown = true
+ local mouse = Inspect.Mouse()
+ miniWindow.state.startX = miniWindow:GetLeft()
+ miniWindow.state.startY = miniWindow:GetTop()
+ miniWindow.state.mouseStartX = mouse.x
+ miniWindow.state.mouseStartY = mouse.y
+ miniWindow:SetBackgroundColor(0.4, 0.4, 0.4, 0.8)
+ end
+
+ function miniWindow.Event:MouseMove()
+ if miniWindow.state.mouseDown then
+ local mouse = Inspect.Mouse()
+ RareDar.xpos=mouse.x - miniWindow.state.mouseStartX + miniWindow.state.startX
+ RareDar.ypos=mouse.y - miniWindow.state.mouseStartY + miniWindow.state.startY
+ miniWindow:SetPoint("TOPLEFT", UIParent, "TOPLEFT",
+ RareDar.xpos, RareDar.ypos)
+ end
+ end
+
+ function miniWindow.Event:LeftUp()
+ if miniWindow.state.mouseDown then
+ miniWindow.state.mouseDown = false
+ miniWindow:SetBackgroundColor(0.1, 0.1, 0.1, 0.8)
+ end
+ end
+
+ function miniWindow.Event:RightClick()
+ if miniWindow.zoneMenu[1]:GetVisible()==true then
+ hideZoneMenu()
+ else
+ showZoneMenu()
+ end
+ end
+
+ miniWindow.title = UI.CreateFrame("Text", "title", miniWindow)
+ miniWindow.title:SetText("RareDar")
+ miniWindow.title:SetPoint("CENTER", miniWindow, "TOPLEFT", 100, 25)
+ miniWindow.title:SetFontSize(17)
+ miniWindow.title:SetWidth(100);
+
+ miniWindow.itembtn = UI.CreateFrame("Texture", "itembtn", miniWindow)
+ miniWindow.itembtn:SetPoint("TOPLEFT", miniWindow, "TOPLEFT", 0, 0)
+ miniWindow.itembtn:SetWidth(50)
+ miniWindow.itembtn:SetHeight(50)
+ miniWindow.itembtn:SetTexture("RareDar", "radarred.png")
+ miniWindow.itembtn:SetSecureMode("restricted")
+ miniWindow.itembtn.Event.RightClick = miniWindow.Event.RightClick
+
+ miniWindow.zoneMenu = {}
+
+ local lang=Inspect.System.Language()
+ local zoneNames={}
+ local zoneNameHash={}
+ for name,info in pairs(RareDar_rares[lang]) do
+ if info ~= false and not zoneNameHash[info[1]] then
+ zoneNameHash[info[1]]=1
+ table.insert(zoneNames, info[1])
+ end
+ end
+ table.sort(zoneNames);
+ for i,name in ipairs(zoneNames) do
+ miniWindow.zoneMenu[i]=UI.CreateFrame("Text", "menu"..i, miniWindow)
+ miniWindow.zoneMenu[i]:SetText(name)
+ miniWindow.zoneMenu[i]:SetFontSize(14)
+ miniWindow.zoneMenu[i]:SetWidth(150)
+ miniWindow.zoneMenu[i]:SetVisible(false)
+ miniWindow.zoneMenu[i]:SetBackgroundColor(0, 0, 0, 1)
+ if i==1 then
+ miniWindow.zoneMenu[i]:SetPoint("TOPLEFT", miniWindow, "BOTTOMLEFT", 0, 0)
+ else
+ miniWindow.zoneMenu[i]:SetPoint("TOPLEFT", miniWindow.zoneMenu[i-1], "BOTTOMLEFT", 0, 0)
+ end
+ miniWindow.zoneMenu[i].Event.LeftClick=function()
+ zoneMenuClick(name)
+ end
+ end
+
+ miniWindow.cycle=UI.CreateFrame("Frame", "Cycle", miniWindow)
+ miniWindow.cycle:SetWidth(150)
+ miniWindow.cycle:SetHeight(60)
+ miniWindow.cycle:SetVisible(false)
+ miniWindow.cycle:SetBackgroundColor(0.1, 0.1, 0.1, 0.8)
+ miniWindow.cycle:SetPoint("TOPLEFT", miniWindow, "BOTTOMLEFT", 0, 0)
+ miniWindow.cycle:SetSecureMode("restricted")
+
+ miniWindow.cycle.mobName=UI.CreateFrame("Text", "CycleMobName", miniWindow.cycle)
+ miniWindow.cycle.mobName:SetWidth(120)
+ miniWindow.cycle.mobName:SetHeight(20)
+ miniWindow.cycle.mobName:SetFontSize(14)
+ miniWindow.cycle.mobName:SetPoint("TOPLEFT", miniWindow.cycle, "TOPLEFT", 15, 0)
+ miniWindow.cycle.mobName:SetSecureMode("restricted")
+
+ miniWindow.cycle.mobArea=UI.CreateFrame("Text", "CycleMobName", miniWindow.cycle)
+ miniWindow.cycle.mobArea:SetWidth(120)
+ miniWindow.cycle.mobArea:SetHeight(20)
+ miniWindow.cycle.mobArea:SetFontSize(14)
+ miniWindow.cycle.mobArea:SetPoint("TOPLEFT", miniWindow.cycle.mobName, "BOTTOMLEFT", 0, 0)
+
+ miniWindow.cycle.leftshift=UI.CreateFrame("Texture", "CycleLeft", miniWindow.cycle)
+ miniWindow.cycle.leftshift:SetWidth(15)
+ miniWindow.cycle.leftshift:SetHeight(60)
+ miniWindow.cycle.leftshift:SetTexture("RareDar", "arrowleft.png")
+ miniWindow.cycle.leftshift:SetPoint("TOPLEFT", miniWindow.cycle, "TOPLEFT", 0, 0)
+ miniWindow.cycle.leftshift.Event.LeftClick=cycleLeft
+
+ miniWindow.cycle.rightshift=UI.CreateFrame("Texture", "CycleRight", miniWindow.cycle)
+ miniWindow.cycle.rightshift:SetWidth(15)
+ miniWindow.cycle.rightshift:SetHeight(60)
+ miniWindow.cycle.rightshift:SetTexture("RareDar", "arrowright.png")
+ miniWindow.cycle.rightshift:SetPoint("TOPRIGHT", miniWindow.cycle, "TOPRIGHT", 0, 0)
+ miniWindow.cycle.rightshift.Event.LeftClick=cycleRight
+
+ miniWindow.cycle.xpos=UI.CreateFrame("Text", "CycleMobXPos", miniWindow.cycle)
+ miniWindow.cycle.xpos:SetWidth(60)
+ miniWindow.cycle.xpos:SetFontSize(14)
+ miniWindow.cycle.xpos:SetPoint("TOPLEFT", miniWindow.cycle.mobArea, "BOTTOMLEFT", 0, 0)
+
+ miniWindow.cycle.ypos=UI.CreateFrame("Text", "CycleMobYPos", miniWindow.cycle)
+ miniWindow.cycle.ypos:SetWidth(60)
+ miniWindow.cycle.ypos:SetFontSize(14)
+ miniWindow.cycle.ypos:SetPoint("TOPRIGHT", miniWindow.cycle.mobArea, "BOTTOMRIGHT", 0, 0)
+end
+
+function RareDar_SetZoneMobs(list)
+ local str=""
+ local n=0
+ for i,name in ipairs(list) do
+ n=i
+ str=str .. "target " .. name .. "\n"
+ end
+ if (n>0) then
+ miniWindow.itembtn:SetTexture("RareDar", "radargreen.png")
+ else
+ miniWindow.itembtn:SetTexture("RareDar", "radarred.png")
+ end
+ miniWindow.title:SetText("RareDar (" .. n .. ")")
+ miniWindow.itembtn.Event.LeftDown=str
+end
+
+function RareDar_SetCloseMobs()
+ local player=Inspect.Unit.Detail("player");
+ if (not RareDar.secureMode)
+ and (player.locationName ~= nil) -- while porting
+ and (player.locationName ~= lastLocationName) then
+ local lang=Inspect.System.Language()
+ print ("Location is now "..player.locationName)
+ local moblist={}
+ for name, info in pairs(RareDar_rares[lang]) do
+ if info then
+ --print (name .. "/" .. (info[1] or "x") .. "/" .. (info[2] or "y"))
+ --dump(info)
+ end
+ if info
+ and ( info[1] == player.locationName and info[2] == ""
+ or info[2] == player.locationName
+ ) then
+ print(name .. " might be close")
+ table.insert(moblist, name)
+ end
+ end
+ RareDar_SetZoneMobs(moblist)
+ lastLocationName=player.locationName
+ end
+end
+
+function RareDar_createUI()
+ context=UI.CreateContext("RareDar")
+ context:SetSecureMode("restricted")
+
+ if (miniWindow == nil) then
+ buildMiniWindow()
+ end
+end
View
BIN  RareDar/radargreen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  RareDar/radarred.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.