Untitled

mail@pastecode.io avatar
unknown
lua
2 years ago
3.5 kB
1
Indexable
Never
function LInstall()
  
  Legacy = Legacy or {}
  Legacy[gmcp.Char.Status.name] = {}
  Legacy.Rift = Legacy.Rift or {}
  Legacy.CT = Legacy.CT or {}
  Legacy.Curing = Legacy.Curing or {}
  Legacy.Sailing = Legacy.Sailing or {}
  Legacy.NDB = Legacy.NDB or {}
  Legacy[gmcp.Char.Status.name] = {}
 
  --Curing
  Legacy.Curing.Prios = Legacy.Curing.Prios or {}
  Legacy.Curing.Affs = Legacy.Curing.Affs or {}
  Legacy.Curing.Prios.default = {}
  Legacy.Curing.Prios.aeon = {}

  
  --Class Tracking
  Legacy.CT.Enemies = Legacy.CT.Enemies or {}
  Legacy.CT.StaticAllies = Legacy.CT.StaticAllies or {}
  Legacy.CT.StaticEnemies = Legacy.CT.StaticEnemies or {}
  
  --NDB
  Legacy.NDB.db = Legacy.NDB.db or {}
  
  --SETTINGS
  Legacy.Settings = Legacy.Settings or {}
  Legacy.Settings.Curing = Legacy.Settings.Curing or {}
  Legacy.Settings.Curing.SS = Legacy.Settings.Curing.SS or {}
  Legacy.Settings.NDB = Legacy.Settings.NDB or {}
  
  
  --Curing
  Legacy.Settings.Curing.SS = Legacy.Settings.Curing.SS.Settings or {}
  Legacy.Settings.Curing.status = true
  Legacy.Settings.Curing.precache = Legacy.Settings.Curing.precache or true
  Legacy.Settings.Curing.precacheCount = 1 -- number of curatives to remove on eat
  Legacy.Settings.Curing.SS.Settings = Legacy.Settings.Curing.SS.Settings or {}
  Legacy.Settings.Curing.SS.cureEchos = true
  
  --NDB
  Legacy.Settings.NDB.tempHL = {}
  Legacy.Settings.NDB.Config = {
    ["ashtan"] = {
      color = "purple",
      bold = false,
      underline = false,
      italics = false
    },
    ["cyrene"] = {
      color = "cornflower_blue",
      bold = false,
      underline = false,
      italics = false
    },
    ["eleusis"] = {
      color = "forest_green",
      bold = false,
      underline = false,
      italics = false    
    },
    ["hashan"] = {
      color = "ansi_yellow",
      bold = false,
      underline = false,
      italics = false    
    },
    ["mhaldor"] = {
      color = "red",
      bold = false,
      underline = false,
      italics = false    
    },
    ["targossas"] = {
      color = "white",
      bold = false,
      underline = false,
      italics = false    
    },
    ["(none)"] = {
      color = "orange",
      bold = false,
      underline = false,
      italics = false    
    },
    ["divine"] = {
      color = "pink",
      bold = true,
      underline = false,
      italics = true    
    },
    ["(hidden)"] = {
      color = "green",
      bold = true,
      underline = false,
      italics = true    
    },
  }
  
  
  
  
  
  Legacy.panic = function(msg)
    if msg == nil then
      cecho("\n<cyan>You broke something")
    else
      cecho("\n<red>You broke something...but left notes!\n<cyan>Notes: "..msg)
    end
  end
  
  
     
      --table.save(getMudletHomeDir().."/Legacy/Profile/"..gmcp.Char.Status.name..".lua", Legacy[ProfileName])
  
  
  lfs.mkdir(getMudletHomeDir().. "/Legacy")
  lfs.mkdir(getMudletHomeDir().. "/Legacy/Profile")
  lfs.mkdir(getMudletHomeDir().. "/Legacy/NDB")
  lfs.mkdir(getMudletHomeDir().. "/Legacy/NDB/Characters")
  lfs.mkdir(getMudletHomeDir().. "/Legacy/ClassTrack")
  
  function Legacy.NDB.getOnline()
  downloadFile(getMudletHomeDir() .. "/Legacy/NDB/who.json", "http:\/\/api.achaea.com\/characters.json")
  end
  

  expandAlias("ndbupdate")
  raiseEvent("LInstall")
  send("curing status")
  send("curing on")
  Legacy_Settings()
end