Skip to content

Commit

Permalink
Merge pull request #4 from Vysci/Auto_Invite_Option
Browse files Browse the repository at this point in the history
Added a couple toggle options + guild channel
  • Loading branch information
Vysci authored Sep 20, 2021
2 parents e2b4049 + b436acc commit abfdb40
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 10 deletions.
13 changes: 12 additions & 1 deletion Enchanter/Enchanter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ EC.Initalized = false
EC.PlayerList = {}
EC.LfRecipeList = {}
EC.DefaultMsg = "I can do "
EC.RecipesWithNether = {"Enchant Boots - Surefooted"}

-- Scans the users known recipes and stores them
-- Additionally it also stores the recipes clickable link, that will be used when messaging the user (for those people asks what are the mats?)
Expand All @@ -21,6 +22,12 @@ function EC.GetItems()
EC.DBChar.RecipeList[craftName] = EC.RecipeTags["enGB"][craftName]
end
end

if EC.DB.NetherRecipes then
for _, v in pairs(EC.RecipesWithNether) do
EC.DBChar.RecipeList[v] = nil
end
end
end

function EC.Init()
Expand Down Expand Up @@ -126,7 +133,9 @@ function EC.ParseMessage(msg, name)
print("Inviting Player: " .. name .. " for request: " .. msg)
end
EC.PlayerList[name] = 1
InviteUnit(name)
if EC.DB.AutoInvite then
InviteUnit(name)
end
-- Reason for whispering them before the join the group is in case they are already in a group
EC.SendMsg(name)
else
Expand Down Expand Up @@ -158,5 +167,7 @@ function EC.OnLoad()
EC.Tool.RegisterEvent("CHAT_MSG_CHANNEL",Event_CHAT_MSG_CHANNEL)
EC.Tool.RegisterEvent("CHAT_MSG_SAY",Event_CHAT_MSG_CHANNEL)
EC.Tool.RegisterEvent("CHAT_MSG_YELL",Event_CHAT_MSG_CHANNEL)
EC.Tool.RegisterEvent("CHAT_MSG_GUILD",Event_CHAT_MSG_CHANNEL)
EC.Tool.RegisterEvent("CHAT_MSG_OFFICER",Event_CHAT_MSG_CHANNEL)
end

2 changes: 1 addition & 1 deletion Enchanter/Enchanter.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 20502
## Title: Enchanter
## Notes: Helps enchanters get connected with those looking for enchants
## Version: 1.2
## Version: 1.3
## Author: Vyscî-Whitemane
## DefaultState: enabled
## SavedVariables: EnchanterDB
Expand Down
14 changes: 11 additions & 3 deletions Enchanter/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,23 @@ function EC.OptionsInit ()
-- Tags Tab
EC.Options.AddPanel("Enchanter",false,true)

EC.Options.AddCategory("Search Patterns")
EC.Options.AddCategory("General Options")
EC.Options.Indent(10)
EC.Options.InLine()
EC.Options.AddCheckBox(EC.DB, "AutoInvite", true, "Auto Invite")
EC.Options.AddCheckBox(EC.DB, "NetherRecipes", false, "Disable Nether Recipes")
EC.Options.EndInLine()
EC.Options.Indent(-10)

EC.Options.AddCategory("Search Patterns")
EC.Options.Indent(10)
EC.Options.AddText('Enter your own unique search patterns here. You must use "," (comma) as the seperator with no space after it', 450+200)
EC.Options.AddSpace()

-- Message String
EC.Options.AddEditBox(EC.DB, "MsgPrefix", EC.DB.MsgPrefix, "Message Prefix", 445, 200, false, nil, EC.DB.MsgPrefix)
EC.Options.AddSpace()
EC.Options.AddEditBox(EC.DB, "MsgPrefix", EC.DB.MsgPrefix, "Message Prefix", 445, 200, false, nil, EC.DB.MsgPrefix)

EC.Options.AddSpace()
-- Recipe Tags
for k,v in pairs(EC.RecipeTags["enGB"]) do
local txt = EC.Tool.Combine(EC.RecipeTags["enGB"][k],",")
Expand Down
7 changes: 5 additions & 2 deletions Enchanter/Tags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EC.RecipeTags={
["Enchant Boots - Cat's Swiftness"] = "Enchant Boots - Cat's Swiftness,cats,cat's,cat swift",
["Enchant Boots - Dexterity"] = "Enchant Boots - Dexterity,dex to boots,dex to feet,12 agi to boots,12 agi to feet,12 agi boot,dexterity to boot,boots agil",
["Enchant Boots - Fortitude"] = "Enchant Boots - Fortitude,fortitude to boots,fortitude to feet,fort to boots,fort boot,fort to feet,12 stam to boot,boots stamina",
["Enchant Boots - Minor Speed"] = "Enchant Boots - Minor Speed,minor speed,speed to boot,speed to feet",
["Enchant Boots - Minor Speed"] = "Enchant Boots - Minor Speed,minor speed,speed to boot,speed to feet,minor move speed,minor movespeed",
["Enchant Boots - Surefooted"] = "Enchant Boots - Surefooted,surefoot",
["Enchant Boots - Vitality"] = "Enchant Boots - Vitality,vitality to feet,vitality to boots",
["Enchant Bracer - Assault"] = "Enchant Bracer - Assault,bracers assault,assault to bracer,bracers assault,24 ap,24 attack power,ap to bracer",
Expand All @@ -41,7 +41,7 @@ EC.RecipeTags={
["Enchant Bracer - Superior Healing"] = "Enchant Bracer - Superior Healing,healing to bracer,healing to wrist,heal to bracer,heal to wrist,superior healing bracer,30 healing to bracer,30 healing bracer,30 healing wrist,30 healing to wrist",
--["Enchant Bracer - Superior Stamina"] = " ",
--["Enchant Chest - Defense"] = " ",
["Enchant Chest - Exceptional Health"] = "Enchant Chest - Exceptional Health,150 hp,150hp,exceptional health,health to chest",
["Enchant Chest - Exceptional Health"] = "Enchant Chest - Exceptional Health,150 hp,150hp,exceptional health,health to chest,150 health,150+ health",
--["Enchant Chest - Exceptional Mana"] = " ",
["Enchant Chest - Exceptional Stats"] = "Enchant Chest - Exceptional Stats,6 stat,exceptional stats",
["Enchant Chest - Greater Stats"] = "Enchant Chest - Greater Stats,+4 stat,greater stat,4+ chest,4+ to chest,4 to chest,4 stat",
Expand All @@ -60,6 +60,8 @@ EC.RecipeTags={
["Enchant Cloak - Stealth"] = "Enchant Cloak - Stealth,stealth",
-- ["Enchant Cloak - Steelweave"] = " ",
["Enchant Cloak - Subtlety"] = "Enchant Cloak - Subtlety,subtlety,2%",
["Enchant Gloves - Advanced Herbalism"] = "Enchant Gloves - Advanced Herbalism,advanced herb,herb to hand,herb to glove,+herb,herbalism to hand,herbalism to glove",
["Enchant Gloves - Advanced Mining"] = "Enchant Gloves - Advanced Mining,advanced mining,mining to hand, mining to glove",
["Enchant Gloves - Assault"] = "Enchant Gloves - Assault,assault to glove,assault to hand,gloves assault,glove assault,26 ap,26 attack power",
["Enchant Gloves - Blasting"] = "Enchant Gloves - Blasting,blasting to gloves,blasting to hands,crit to glove,crit to hand",
["Enchant Gloves - Fire Power"] = "Enchant Gloves - Fire Power,fire power,20 fire",
Expand All @@ -68,6 +70,7 @@ EC.RecipeTags={
["Enchant Gloves - Major Healing"] = "Enchant Gloves - Major Healing,35 heal,healing to glove,healing to hand,heal to glove,heal to hand",
["Enchant Gloves - Major Spellpower"] = "Enchant Gloves - Major Spellpower,sp to hand,20sp to glove,20 sp to glove,20+ sp to glove,20sp glove,",
["Enchant Gloves - Major Strength"] = "Enchant Gloves - Major Strength,major str,15 str,15+ str,str glove",
["Enchant Gloves - Riding Skill"] = "Enchant Gloves - Riding Skill,riding speed,riding skill,+riding",
["Enchant Gloves - Shadow Power"] = "Enchant Gloves - Shadow Power,shadow power,20 shadow",
["Enchant Gloves - Spell Strike"] = "Enchant Gloves - Spell Strike,spell strike,hit to glove,hit to hand,15 hit,15 spell hit",
["Enchant Gloves - Superior Agility"] = "Enchant Gloves - Superior Agility,superior agility,15 agi,15agi,15+ agi ",
Expand Down
11 changes: 8 additions & 3 deletions Enchanter/change_log.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
v1.3
- Added option to toggle auto invite
- Added option to toggle recipes that require nether
- Added some more recipes + minor tag improvement

v1.2
- Added options to modify tags and custom msg prefix
- Added options to modify tags and custom msg prefix

v1.1
- Updated tags
- Updated tags

v1.0
- Initial Version
- Initial Version

0 comments on commit abfdb40

Please sign in to comment.