Thread Tools Display Modes
01-24-15, 04:57 PM   #21
JimJoBlue
An Onyxian Warder
 
JimJoBlue's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 362
I'm basically using a template from the other notes plugins I have compiled..

Lua Code:
  1. CBwodtreasures = LibStub("AceAddon-3.0"):NewAddon("CBwodtreasures", "AceConsole-3.0", "AceEvent-3.0")
  2.  
  3. local nodes = { }
  4.  
  5. --Shadowmoon valley (947)
  6. nodes[1] = { 947, 35280, 27.1, 2.5, "Stolen Treasure" }
  7. nodes[2] = { 947, 34174, 26.5, 5.7, "Fantastic Fish" }
  8. nodes[3] = { 947, 35279, 28.8, 7.1, "Sunken Treasure" }
  9.  
  10. --
  11.  
  12. function CBwodtreasures:OnInitialize()
  13.  self:RegisterEvent("PLAYER_ENTERING_WORLD", "WorldEnter")
  14.  
  15.  local defaults = {
  16.   profile = {
  17.    alwaysshow = false,
  18.    save = true,
  19.    icon = 6,
  20.   },
  21.  }
  22.  
  23.  self.db = LibStub("AceDB-3.0"):New("CBwodtreasuresDB", defaults, true)
  24. end
  25.  
  26. function CBwodtreasures:WorldEnter()
  27.  self:UnregisterEvent("PLAYER_ENTERING_WORLD")
  28.  
  29.  self:PopulateNotes()
  30. end
  31.  
  32. function CBwodtreasures:PopulateNotes()
  33.  local icon = self.db.profile.icon or 6
  34.  for k, v in pairs(nodes) do
  35.   -- Nodes: MapID, QuestID, X Coord, Y Coord, QuestName, isDaily
  36.   -- AddonNote: folder, name, icon, id, x, y
  37.   if (not self:HasBeenLooted(v)) then
  38.    Nx.Notes:AddonNote("WOD Treasures", v[5], icon, v[1], v[3], v[4])
  39.   end
  40.  end
  41. end
  42.  
  43. function CBwodtreasures:HasBeenLooted(value)
  44.  if (self.db.profile.alwaysshow) then return false end
  45.  
  46.  if (self.db.char[value[2]] and self.db.profile.save) then return true end
  47.  
  48.  if (IsQuestFlaggedCompleted(value[2])) then
  49.   if (self.db.profile.save and not value[6]) then  -- Save the chest but not if it's a daily
  50.    self.db.char[value[2]] = true;
  51.   end
  52.  
  53.   return true
  54.  end
  55.  
  56.  return false
  57. end
__________________
I still say a church steeple with a lightning rod on top shows a lack of confidence. Doug McLeod


  Reply With Quote
01-25-15, 07:06 AM   #22
ircdirk
A Molten Giant
 
ircdirk's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 823
Originally Posted by atl77 View Post
Well, we can import the data - but we'll either need to extract it from the modules, as it would clearly be in a different format and carry some extra lua code - or write some handynotes emulation - a carbonite.notes.handynotes module or something like that.
Both ideas are good... i think coverting data shouldnt be so hard and then we dont need other addon installed, like in making module carbonite.notes.handynotes. Ofcourse we would give credit to HandyNotes authors i both cases.
__________________
Carbonite and Carbonite Classic Developer
  Reply With Quote
02-26-15, 04:57 PM   #23
Cherio
A Fallenroot Satyr
Join Date: Mar 2009
Posts: 23
so did anyone manage to find a way around having handynotes points into carbonite ?

its so annoying to keep pressing ALT M to see how near i am to elite rare or trasure item
  Reply With Quote
02-26-15, 04:59 PM   #24
Cherio
A Fallenroot Satyr
Join Date: Mar 2009
Posts: 23
Originally Posted by JimJoBlue View Post
I'm basically using a template from the other notes plugins I have compiled..

Lua Code:
  1. CBwodtreasures = LibStub("AceAddon-3.0"):NewAddon("CBwodtreasures", "AceConsole-3.0", "AceEvent-3.0")
  2.  
  3. local nodes = { }
  4.  
  5. --Shadowmoon valley (947)
  6. nodes[1] = { 947, 35280, 27.1, 2.5, "Stolen Treasure" }
  7. nodes[2] = { 947, 34174, 26.5, 5.7, "Fantastic Fish" }
  8. nodes[3] = { 947, 35279, 28.8, 7.1, "Sunken Treasure" }
  9.  
  10. --
  11.  
  12. function CBwodtreasures:OnInitialize()
  13.  self:RegisterEvent("PLAYER_ENTERING_WORLD", "WorldEnter")
  14.  
  15.  local defaults = {
  16.   profile = {
  17.    alwaysshow = false,
  18.    save = true,
  19.    icon = 6,
  20.   },
  21.  }
  22.  
  23.  self.db = LibStub("AceDB-3.0"):New("CBwodtreasuresDB", defaults, true)
  24. end
  25.  
  26. function CBwodtreasures:WorldEnter()
  27.  self:UnregisterEvent("PLAYER_ENTERING_WORLD")
  28.  
  29.  self:PopulateNotes()
  30. end
  31.  
  32. function CBwodtreasures:PopulateNotes()
  33.  local icon = self.db.profile.icon or 6
  34.  for k, v in pairs(nodes) do
  35.   -- Nodes: MapID, QuestID, X Coord, Y Coord, QuestName, isDaily
  36.   -- AddonNote: folder, name, icon, id, x, y
  37.   if (not self:HasBeenLooted(v)) then
  38.    Nx.Notes:AddonNote("WOD Treasures", v[5], icon, v[1], v[3], v[4])
  39.   end
  40.  end
  41. end
  42.  
  43. function CBwodtreasures:HasBeenLooted(value)
  44.  if (self.db.profile.alwaysshow) then return false end
  45.  
  46.  if (self.db.char[value[2]] and self.db.profile.save) then return true end
  47.  
  48.  if (IsQuestFlaggedCompleted(value[2])) then
  49.   if (self.db.profile.save and not value[6]) then  -- Save the chest but not if it's a daily
  50.    self.db.char[value[2]] = true;
  51.   end
  52.  
  53.   return true
  54.  end
  55.  
  56.  return false
  57. end

How can I use that ?
  Reply With Quote

WoWInterface » Featured Projects » Carbonite » Carbonite: Notes Module » Carbonite Notes import from old version?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off