------------------------------------------------------------------------------------------------
-- Global Function Variables
------------------------------------------------------------------------------------------------
AUTODINGVER = "2.1";
AUTODINGFRAME = "AutoDingFrame";
AUTODINGOPTIONSFRAME = "AutoDingConfigFrame";
SLASH_AUTODING1 = "/AutoDing";
SLASH_AUTODING2 = "/ad";
AD_Player = UnitName("player") .. " of " .. GetCVar("realmName");
ADLevel = 0;
ADmsg = "";
DingString = "";
ADChannel = "";
ADInterval = 0;
DingNow = 0;
ADMax = 60;

------------------------------------------------------------------------------------------------
-- Delay Variables
------------------------------------------------------------------------------------------------
ADChatDelay1 = 0;
ADChatDelay2 = 0;
ADPartyDelay1 = 0;
ADPartyDelay2 = 0;
ADScrnDelay1 = 0;
ADScrnDelay2 = 0;

------------------------------------------------------------------------------------------------
-- Config Window Variables
------------------------------------------------------------------------------------------------
AUTODING_CONFIG_TITLE = "Thorin's AutoDing Config: v"..AUTODINGVER;
AUTODING_WHISPER_TITLE = "AutoDing Whisper to:";
AUTODING_WHISPER_HELP = "Type a player name to whisper. Blank disables Whisper option";
AUTODING_EDIT_TITLE = "AutoDing Message:";
AUTODING_EDIT_HELP = "Type your Ding message here. Use '$L' in place of your level.\nThe word 'list' by itself will pull from a list of built in messages.";
AUTODING_CHANNEL_TITLE = "AutoDing Channel:";
AUTODING_INTERVAL_TITLE = "AutoDing Interval:";
AD_DEFAULT_NOTE = "Recall Default Settings";
AD_TEST_NOTE = "Test Current Settings";
AD_ENABLE_NOTE = "A check in this box: Enables AutoDing";
AD_PARTY_NOTE = "A check in this box: Forces a message to the Party channel if grouped";
AD_SCREEN_NOTE = "A check in this box: AutoDing will take a screenshot";
AD_CHANNEL_NOTE = "Channel to send AutoDing messages: Enter a user created channel name or GUILD, SAY, YELL, GROUP, RAID.";
AD_INTERVAL_NOTE = "Enter a number 0-60. 0 takes a screenshot only, no message is sent\n1 Dings every level, 3 every 3rd, 10 every 10th etc...\nNUMBERS ONLY OR YOU WILL GET ERRORS!";
AD_STRING_NOTE = "$L=New lvl, $l=Old lvl, $P=Player name, $D=Date, $T=Time, $R=Lvls remaining to "..ADMax;

------------------------------------------------------------------------------------------------
-- AutoDing messages 
-- Feel free to make them your own. Remember to stay inside the quotes. 
-- $L=New lvl, $l=Old lvl, $P=Player name, $D=Date, $T=Time, $R=Lvls remaining to the max level
--(Addmittedly, some of these are quite lame)
------------------------------------------------------------------------------------------------
-- General Posts, all toons will use these
General1 = "DING $L! WOOT another step closer to the top of the food chain!";
General2 = "DING $L! Whoah, that woke me up!";
General3 = "DING $L! Can't touch this!";
General4 = "DING $L! Raise the roof, raise the roof!";
General5 = "DING $L! This is too much fun!";
General11 = "DING $L! $R to go!";
General12 = "DING $L! I love that sound!";
General13 = "DING $L! It's gettin hot in here...";
General14 = "DING $L! So many mobs, so little time.";
General15 = "DING $L! Life is good :)";

-- Draenei Only Posts
Draenei6 = "Ding $L! Velen be praised!";
Draenei7 = "It seems I've Dinged yet again, $L!";
Draenei8 = "By the powers of the Naaru! I've Dinged again, $L!";
Draenei9 = "WOOT - Ding $L! For Draenei everywhere!";
Draenei10 = "Ding $L! HA! Yet another lvl out of the way!";

-- Human Only Posts
Human6 = "I thought I'd never get to do this... DING $L!";
Human7 = "Ding $L, aaahhh that felt good.";
Human8 = "Oops I did it again... Ding $L!";
Human9 = "WOOT - Ding $L! Another one bites the dust!";
Human10 = "Ding Baby! $L! How great am I? lol";

-- Night Elf Only Posts
NightElf6 = "Ding $L! Elune be praised!";
NightElf7 = "A ding for me, and a dirt nap for yet another mob. $L!";
NightElf8 = "Try not to be envious friends, but I've just Dinged $L.";
NightElf9 = "WOOT - Ding $L! For Azeroth!";
NightElf10 = "Ding $L! That was long awaited!";

-- Dwarf Only Posts
Dwarf6 = "Ding $L! It's hard to keep yer feet on the ground when yer this great!";
Dwarf7 = "How's that fer kickin' butt, I just dinged again... $L!";
Dwarf8 = "HA, try to keep up lads, Ding $L!";
Dwarf9 = "WOOT - Ding $L! I'm feelin' spry now! Where's that Snow White lass?";
Dwarf10 = "Ding $L! How do ya like meh now?";

-- Gnome Only Posts
Gnome6 = "Ding $L! Daylight's burning, let's do that again!";
Gnome7 = "Dynamite does come in small packages! Ding $L!";
Gnome8 = "Ding $L! See, size doesn't matter!";
Gnome9 = "WOOT - Ding $L! Jumped up and took that one's knees out!";
Gnome10 = "It isn't my stature... it's my Lvl, Ding $L!";

-- Blood Elf Only Posts
BloodElf6 = "Be it known that on this day, the great $P Dinged to level $L!";
BloodElf7 = "Ding $L! With each level I gain, the Alliance comes one step closer to their end!";
BloodElf8 = "Ding $L! And not a moment too soon!";
BloodElf9 = "WOOT - Ding $L! Jealous? Well you should be!";
BloodElf10 = "HA! I Dinged and you didn't, $L! ";
      
-- Undead Only Posts
Undead6 = "Give me some skin, I just Dinged $L! No really, I need some skin!";
Undead7 = "Ding $L! Be still my beating, er nevermind, my heart stopped years ago.";
Undead8 = "Ding $L! Now congratulate me before I breathe on you!";
Undead9 = "WOOT - Ding $L! No bones about it!";
Undead10 = "I can mulitask, I just put my ear back on and Dinged $L at the same time!";

-- Troll Only Posts
Troll6 = "Don't be jealous mon, but juss dinged again, $L!";
Troll7 = "Dinging is no problem for me mon! $L!";
Troll8 = "DING $L! I'm tinkin' it's 'bout time dis happond mon!";
Troll9 = "WOOT - Ding $L! Who's da Troll? I'm da Troll!";
Troll10 = "Ding $L, dose Alliance wimps betta watch out now mon!";

-- Tauren Only Posts
Tauren6 = "Ding $L! Don't hate the player, hate the game.";
Tauren7 = "Turned that one into hamburger, Ding $L!";
Tauren8 = "DING $L! MOOOHOOO!";
Tauren9 = "WOOT - Ding $L! Gave that mob a cow lickin!";
Tauren10 = "Grade A prime beaf right here! Ding $L!";

-- Orc Only Posts
Orc6 = "Ding $L! Oooo, I think I celebrate by killin' sumtin'.";
Orc7 = "I luv dat ding sound! $L!";
Orc8 = "I smash him! Ding $L!";
Orc9 = "WOOT - Ding $L! Green wit envi?";
Orc10 = "Ding $L! Dat mob not stand a chance!";

-- Default Post, this is an error catcher in case the count happens to have an invalid value.
DefaultDing = "DING $L, WOOT!"

-- "Special" Posts
Level40 = "DING 40! OH YEAH! TIME TO MOUNT UP BABY!";
Level60 = "DING 60! What? They're changing it so 70's the highest? DOH!";
Level65 = "DING 65! I'M SO CLOSE I CAN SMELL IT! ...err wait, what is that smell? EWE, when did I step in that?";
Level70 = "DING 70! Bring on the next expansion!";
