Not sure where to look for reference info on how to make this work --
- LUA file layout basic: Header info -- version, interface, any ordering needed (globals then init or what have you), etc...
- Registration of slash command(s) and where the switches are at when you get the values.
Also looking for some potential advice on if I should do a small UI for it or just use switches and a generic command for help, etc...
There are only 4 load settings --
- On or Off for any messages to be seen.
- GroupRaid for Auto Determination.
- GroupOnly for only send message to group.
No, I'm not putting an option in to send to both -- 1 or the other depending if you're in a group or raid and no, not putting in a soloing message either -- you hit the friggn button so you should know about it... It's letting others know who/what you're sapping that can be kind of important at times.
Why do an add-on?
Ok, so I wrote a little sap macro that detects if I'm in a group or raid and sends a sap message to the appropriate window depending if you're in a group or raid.
The problem is the usual -- I want more protections with it from:
- Spamming (try sapping someone off a mount moving across an intercept path -- sap, sap, sap, sap -- gotcha!)
- Sapable vs unsapable (humanoids only)
- In-range checking (see ,
- Dynamic on/off for messages -- as in "yeah, yeah -- you're out there... we don't need to know who you're messing with..."
Can't do all this in a macro so it's time to write an add-on... (oh joy -- learning a new language again...)
What'll it do?
Single command with text usable in a macro such as:
-- if no text, it's like regular sap.
On/off or Group only or Default (send depending on group or raid).
- /Sapper On (messages on)
- /Sapper Off (no messages)
- /Sapper GroupOnly (only send to group)
- /Sapper GroupRaid (send to group or raid depending -- if manually adjusted)
- /Sapper Reset (Reset to default settings)
-- Session specific so goes back to default mode (read at load time) between sessions.
List what options are available.
Beyond the above it'll do the following (in order):
- Detect if enough energy is available (mana)
- Detect if proper type (Humanoid)
- Detect if Friend or Enemy BEFORE messaging.
- Detect if in range BEFORE messaging.
- Detect and use Highest rank of Sap.
Anyhow, If anyone has any suggestion on if I should do a UI for it or where I can find some sample code on the functions, I'd appreciat it.
Thanks in advance.