WoWInterface SVN UltimateWarcraftBattlecryGenerator

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 41 to Rev 40
    Reverse comparison

Rev 41 → Rev 40

BattleCryGen.lua
1,73 → 1,26
-- The Ultimate Warcraft Battlecry Generator
-- ===========================================
-- Version : 0.41
-- Author : Nuchaleft (NytewolfAU2k7 on Curse)
-- Email : nwcreations@gmail.com
-- Create Date : 10/07/2008 01:11:43 PM WAST (GMT+8:00)
-- Update : 26/04/2009 12:38:11 PM WAST (GMT+8:00)
-- ===========================================
-- Version 0.11
 
-- Declare our Generator Variables
local n_idx_a = 0; --Alliance Cry Index
local n_idx_h = 0; --Horde Cry Index
local s_bcgsay1 = ""; --ally say var
local s_bcgsay2 = ""; --pond scum say var
-- By Nuchaleft (NytewolfAU2k7 on Curse)
-- nwcreations@gmail.com
-- 15/04/2009 02:50AM WAST (GMT+8:00)
 
local SNum4 = 0;
local s_bcgsay1 = "";
local s_final = "";
local s_channel = ""; --Channel Name
 
UWBG_Prefs = {defchannel = "Say",
allfaction = false,}
 
function frmBCG_OnEvent()
-- Do nothing.
end;
 
function GenerateFactionBattlecry(ransom_msg,channel)
local pc_faction = UnitFactionGroup("player");
if (pc_faction == "Alliance") then
DEFAULT_CHAT_FRAME:AddMessage("UWBCG Test: I am Alliance.");
 
if UnitName("target") == nil then --Do we have no target?
SendChatMessage(GetRandomArgument("DIE! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you!", "For the " .. ransom_msg .. "!","All who betray the " .. ransom_msg .. " shall be punished!","I smite thee, In the name of the " .. ransom_msg .. "!","DIE! Your evil shall never triumph!","Your evil ends here!", "We Fight!", "DIE! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will face justice!","There can only be 1000!","There can only be over 9000!","For Cenarius!","For Stormwind!","For Ironforge!","For Darnassus!","For Gnomeregan!"), channel);
else
SendChatMessage(GetRandomArgument("DIE, %t! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you, %t!", "For the " .. ransom_msg .. "!","All who betray the light shall be punished!","I smite thee, %t, In the name of the " .. ransom_msg .. "!","DIE, %t! Your evil shall never triumph!","Your evil ends here, %t!", "DIE! %t! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will face justice!","There can only be 1000!","There can only be over 9000!","For Cenarius!","For the Warchief!","For Stormwind!","For Ironforge!","For Darnassus!","For Gnomeregan!"), channel);
end;
elseif (pc_faction == "Horde") then
DEFAULT_CHAT_FRAME:AddMessage("UWBCG Test: I am Horde.");
 
if UnitName("target") == nil then --Do we have no target?
SendChatMessage(GetRandomArgument("DIE! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you!", "For the " .. ransom_msg .. "!","All who betray the light shall be punished!","Your blood shall be mine!","DIE! Your evil shall never triumph!","Your evil ends here!", "DIE! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will bring me great honor!","There can only be 1000!","There can only be over 9000!","For the Warchief!","For Ogrimmar!","For Undercity!","For Silvermoon City!","For Quel'Thalas!"), channel);
else
SendChatMessage(GetRandomArgument("DIE, %t! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you, %t!", "For the " .. ransom_msg .. "!","All who betray the light shall be punished!","%t! Your blood shall be mine!","DIE, %t! Your evil shall never triumph!","Your evil ends here, %t!", "DIE! %t! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will bring me great honor!","There can only be 1000!","There can only be over 9000!","For the Warchief!","For Ogrimmar!","For Undercity!","For Silvermoon City!","For Quel'Thalas!"), channel);
end;
end;
end;
 
function GenerateFactionBattlecryANT(ransom_msg)
return GetRandomArgument("DIE! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you!", "For the " .. ransom_msg .. "!","All who betray the " .. ransom_msg .. " shall be punished!","I smite thee, In the name of the " .. ransom_msg .. "!","DIE! Your evil shall never triumph!","Your evil ends here!", "We Fight!", "DIE! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will face justice!","There can only be 1000!","There can only be over 9000!","For Cenarius!","For Stormwind!","For Ironforge!","For Darnassus!","For Gnomeregan!");
end;
 
function GenerateFactionBattlecryAT(ransom_msg)
return GetRandomArgument("DIE, %t! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you, %t!", "For the " .. ransom_msg .. "!","All who betray the light shall be punished!","I smite thee, %t, In the name of the " .. ransom_msg .. "!","DIE, %t! Your evil shall never triumph!","Your evil ends here, %t!", "DIE! %t! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will face justice!","There can only be 1000!","There can only be over 9000!","For Cenarius!","For the Warchief!","For Stormwind!","For Ironforge!","For Darnassus!","For Gnomeregan!");
end;
 
function GenerateFactionBattlecryHNT(ransom_msg)
return GetRandomArgument("DIE! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you!", "For the " .. ransom_msg .. "!","All who betray the light shall be punished!","Your blood shall be mine!","DIE! Your evil shall never triumph!","Your evil ends here!", "DIE! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will bring me great honor!","There can only be 1000!","There can only be over 9000!","For the Warchief!","For Ogrimmar!","For Undercity!","For Silvermoon City!","For Quel'Thalas!");
end;
 
function GenerateFactionBattlecryHT(ransom_msg)
return GetRandomArgument("DIE, %t! Feel the wrath of the " .. ransom_msg .. "!","Light BURN you, %t!", "For the " .. ransom_msg .. "!","All who betray the light shall be punished!","%t! Your blood shall be mine!","DIE, %t! Your evil shall never triumph!","Your evil ends here, %t!", "DIE! %t! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will bring me great honor!","There can only be 1000!","There can only be over 9000!","For the Warchief!","For Ogrimmar!","For Undercity!","For Silvermoon City!","For Quel'Thalas!");
end;
 
 
 
 
-- Possible Suffixes (Alliance)
-- Possible Suffixes list 1
PossSuff1 = {
"Legion",
"Scourge",
"Alliance",
"Legion!?!",
"Horde!?!",
"Fel Horde!?!",
"Scourge!?!",
"Alliance!?!",
"Tauren",
"Taunka",
"Ladies Undergarments",
"Forsaken",
"Sindorei",
"Kaldorei",
"Draenei",
"Lost Ones",
94,17 → 47,21
"Valiance Expedition",
"Silver Covenant",
"Explorers' League",
"Warsong Offensive",
"Hand of Vengeance",
"Silverwing Sentinels",
"Taunka",
"League of Arathor!",
"Stormpike Guard!",
"Zandalari!",
"San'layn!",
"Warsong Outriders!",
"Frostwolf Clan!",
"Steamwheedle Cartel!",
"Sha'tar!",
"Ashtongue Deathsworn!",
"Cenarion Expedition!",
"Cenarion Circle",
"Seer",
"Thorium Brotherhood",
"Wintersaber Trainers",
"Violet Eye",
135,173 → 92,64
"Gnomeregan Exiles",
"Murkblood",
"Light!",
"Illidari",
"Frostsabers",
"Kobolds",
"fallen Titan, Sargares",
"Old Ones",
"Queldorei",
"Yogg-Saron",
"Ale!"
"Illidari"
}
 
-- Possible Suffixes (Horde)
-- Possible Suffixes list 2
PossSuff2 = {
"Legion",
"Horde",
"Fel Horde",
"Scourge",
"Tauren",
"Taunka",
"Ladies Undergarments",
"Forsaken",
"Sindorei",
"Lost Ones",
"Beer!",
"Pie!",
"Naaru!",
"Lich King!",
"Old Gods!",
"Warchief!",
"Azshara!",
"Holy Light!",
"Warchief",
"Defilers!",
"Argent Dawn",
"Argent Crusade",
"Kalu'ak",
"Frenzyheart Tribe",
"Oracles",
"Wyrmrest Accord",
"Kirin Tor",
"Knights of the Ebon Blade",
"Silver Covenant",
"Warsong Offensive",
"Hand of Vengeance",
"Silverwing Sentinels",
"Taunka",
"League of Arathor!",
"Stormpike Guard!",
"Zandalari!",
"San'layn!",
"Warsong Outriders!",
"Frostwolf Clan!",
"Steamwheedle Cartel!",
"Sha'tar!",
"Ashtongue Deathsworn!",
"Cenarion Expedition!",
"Cenarion Circle",
"Seer",
"Thorium Brotherhood",
"Wintersaber Trainers",
"Violet Eye",
"Black Dragonflight",
"Green Dragonflight",
"Red Dragonflight",
"Bronze Dragonflight",
"Infinite Dragonflight",
"Scarlet Crusade",
"Syndicate",
"Zandalar Tribe",
"Consortium!",
"Mag'har!",
"Aldor!",
"Scryers!",
"Shattered Sun Offensive!",
"Sha'tari Skyguard!",
"Gelkis Clan Centaur",
"Hydraxian Waterlords",
"Keepers of Time",
"Magram Clan Centaur",
"Warriors of the Night!",
"Dichotomy of good and evil!",
"Murkblood",
"Light!",
"Illidari",
"Frostsabers",
"Kobolds",
"fallen Titan, Sargares",
"Old Ones",
"Yogg-Saron",
"Ale"
"Queldorei",
"Ale!"
}
 
function Show_Msg(msg)
if( DEFAULT_CHAT_FRAME ) then
DEFAULT_CHAT_FRAME:AddMessage(msg);
end;
end;
end
end
 
function btnGenSay_Click()
-- fetch an array/table
n_say1 = table.getn( PossSuff1 );
n_say2 = table.getn( PossSuff2 );
-- Randomize
n_idx_a = math.random( n_say1 );
n_idx_h = math.random( n_say2 );
SNum4 = math.random( n_say1 );
-- populate s_bcgsay1 with a random value.
s_bcgsay1 = PossSuff1[n_idx_a];
-- populate s_bcgsay2 with a random value.
s_bcgsay2 = PossSuff2[n_idx_h];
 
local pc_faction = UnitFactionGroup("player");
if (pc_faction == "Alliance") then
GenerateFactionBattlecry(s_bcgsay1, "SAY");
elseif (pc_faction == "Horde") then
GenerateFactionBattlecry(s_bcgsay2, "SAY");
end;
s_bcgsay1 = PossSuff1[SNum4];
 
SendChatMessage(GetRandomArgument("DIE, %t! Feel the wrath of the " .. s_bcgsay1 .. "!","Light BURN you, %t!", "For the " .. s_bcgsay1 .. "!","All who betray the light shall be punished!","I smite thee, %t, In the name of the " .. s_bcgsay1 .. "!","DIE, %t! Your evil shall never triumph!","Your evil ends here, %t!", "DIE! %t! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will face justice!","There can only be 1000!","There can only be over 9000!","For Cenarius!"), "SAY");
end;
 
-- Options Button
function btnGenOpt_Click()
UWBCG_Options:Show();
function btnGenYell_Click()
-- fetch an array/table
n_say1 = table.getn( PossSuff1 );
-- Randomize
SNum4 = math.random( n_say1 );
-- populate s_bcgsay1 with a random value.
s_bcgsay1 = PossSuff1[SNum4];
 
SendChatMessage(GetRandomArgument("DIE, %t! Feel the wrath of the " .. s_bcgsay1 .. "!","Light BURN you, %t!", "For the " .. s_bcgsay1 .. "!","All who betray the light shall be punished!","I smite thee, %t, In the name of the " .. s_bcgsay1 .. "!","DIE, %t! Your evil shall never triumph!","Your evil ends here, %t!", "DIE! %t! Your evil shall be purged!", "You DARE face me?","The Light shall never fade!", "You will face justice!","There can only be 1000!","There can only be over 9000!","For Cenarius!"), "YELL");
end;
 
function MakeOneUp(WhatKind)
-- fetch an array/table
n_say1 = table.getn( PossSuff1 );
n_say2 = table.getn( PossSuff2 );
-- Randomize
n_idx_a = math.random( n_say1 );
n_idx_h = math.random( n_say2 );
SNum4 = math.random( n_say1 );
-- populate s_bcgsay1 with a random value.
s_bcgsay1 = PossSuff1[n_idx_a];
-- populate s_bcgsay2 with a random value.
s_bcgsay2 = PossSuff2[n_idx_h];
s_bcgsay1 = PossSuff1[SNum4];
 
if UnitName("target") == nil then
if (WhatKind == "s") then
local pc_faction = UnitFactionGroup("player");
if (pc_faction == "Alliance") then
s_final = GenerateFactionBattlecryANT(s_bcgsay1);
elseif (pc_faction == "Horde") then
s_final = GenerateFactionBattlecryHNT(s_bcgsay2);
end;
elseif (WhatKind == "y") then
local pc_faction = UnitFactionGroup("player");
if (pc_faction == "Alliance") then
s_final = GenerateFactionBattlecryANT(s_bcgsay1);
elseif (pc_faction == "Horde") then
s_final = GenerateFactionBattlecryHNT(s_bcgsay2);
end;
end;
else
if (WhatKind == "s") then
local pc_faction = UnitFactionGroup("player");
if (pc_faction == "Alliance") then
s_final = GenerateFactionBattlecryAT(s_bcgsay1);
elseif (pc_faction == "Horde") then
s_final = GenerateFactionBattlecryHT(s_bcgsay2);
end;
elseif (WhatKind == "y") then
local pc_faction = UnitFactionGroup("player");
if (pc_faction == "Alliance") then
s_final = GenerateFactionBattlecryAT(s_bcgsay1);
elseif (pc_faction == "Horde") then
s_final = GenerateFactionBattlecryHT(s_bcgsay2);
end;
end;
end;
if UnitName("target") ==nil then
if (WhatKind == "s") then
s_final = "For the " .. s_bcgsay1 .. "!"
end;
else
if (WhatKind == "s") then
s_final = "I smite thee, %t, In the name of the " .. s_bcgsay1 .. "!"
end;
end;
end;
 
 
309,30 → 157,15
 
local dummy1, dummy2, command, value = string.find(param1, "(%w+) (%w+)");
 
--if $parentComboBox1.
 
 
if string.lower(param1) == "y" then param1 = "yell" end;
if string.lower(param1) == "s" then param1 = "say" end;
if string.lower(param1) == "p" then param1 = "party" end;
if string.lower(param1) == "g" then param1 = "guild" end;
if string.lower(param1) == "r" then param1 = "raid" end;
if string.lower(param1) == "bg" then param1 = "battleground" end;
 
if (string.lower(param1) == "say") or (string.lower(param1) == "yell") then
MakeOneUp("s");
SendChatMessage(s_final, param1, self.language);
if (string.lower(param1) == "say") or (string.lower(param1) == "yell") then
MakeOneUp("s");
SendChatMessage(s_final, param1, this.language);
elseif (string.lower(param1) == "show") then
if (self:IsVisible()==false) then
self:Show();
else
self:Hide();
end;
-- elseif (string.lower(param1) == "options") then
-- if (self:IsVisible()==false) then
-- self:Show();
-- end;
else
frmBCG:Show();
else
btnUsage_Click();
end;
end
340,38 → 173,25
function btnUsage_Click()
Show_Msg("|cff6666ff Usage:\n");
Show_Msg("|cff999999 /bcg show Open Panel\n");
--Show_Msg("|cff999999 /bcg options Open Options Panel\n");
Show_Msg("|cff999999 /bcg y (Yell)\n");
Show_Msg("|cff999999 /bcg s (Say)\n");
Show_Msg("|cff6666ff Enjoy the power!\n");
end
 
function frmBCG_Close()
self:Hide();
--UWBG_Prefs=1;
--UWBG_CharPrefs=1;
frmBCG:Hide();
end
 
function frmBCG_Open()
self:Show();
--UWBG_Prefs=0;
--UWBG_CharPrefs=0;
frmBCG:Show();
end
 
function frmBCG_OnLoad()
Show_Msg("|cff999999 Ultimate Warcraft Battlecry Generator is Loaded\n");
Show_Msg("|cff999999 Version 0.41 for WoW Patch 3.1\n");
Show_Msg("|cff999999 Version 0.11 for WoW Patch 3.1\n");
Show_Msg("|cff6666ff Type /bcg for options\n");
 
SLASH_BCGEN1 = "/bcg";
SlashCmdList["BCGEN"] = cmdBCG;
self:RegisterEvent("VARIABLES_LOADED")
self:RegisterEvent("ADDON_LOADED"); -- Fired when saved variables are loaded
self:RegisterEvent("PLAYER_LOGOUT"); -- Fired when about to log out
end
 
function cboGen_OnTextChanged()
local s_num = ""
DEFAULT_CHAT_FRAME:AddMessage("UWBCG Test: Text Changed.");
end
 
\ No newline at end of file + SLASH_BCGEN1 = "/bcg"; + SLASH_BCGEN2 = "/bcg2"; + SlashCmdList["BCGEN"] = cmdBCG; \ No newline at end of file
BattleCryGen.toc
1,21 → 1,12
## Interface: 30100
## Title: Ultimate Warcraft Battlecry Generator
## Author: Nuchaleft (NytewolfAU2k7 on Curse)
## Version: v00.00.41
## Version: 0.11
## Notes: As the title suggests, this addon can generate over 100 hilarious and random battlecries to put fear into your enemies, and to inspire courage in your allies.
## Notes-enGB: As the title suggests, this addon can generate over 100 hilarious and random battlecries to put fear into your enemies, and to inspire courage in your allies.
## eMail: nwcreations@gmail.com
## URL: http://nytesgames.webs.com/
## X-Category: Other
## X-License: GPL v2
## X-Curse-Packaged-Version: v00.00.41
## X-Curse-Project-Name: Ultimate Warcraft Battlecry Generator
## X-Curse-Project-ID: uwbcg
## URL: http://nightwolfslair.spaces.live.com/
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables: UWBG_Prefs
## SavedVariablesPerCharacter: UWBG_CharPrefs
## SavedVariablesPerCharacter: UWBG_Prefs
BattleCryGen.lua
BattleCryGenFrame.xml
BattleCryGenOptions.lua
BattleCryGenOptionsFrame.xml
BattleCryGen.xml
Readme.txt
1,15 → 1,13
The Ultimate Warcraft Battlecry Generator
====================================================
Version : 0.41
Author : Nuchaleft (NytewolfAU2k7 on Curse)
Email : nwcreations@gmail.com
Create Date : 10/07/2008 01:11 PM WAST (GMT+8:00)
Update : 26/04/2009 12:55 PM WAST (GMT+8:00)
====================================================
The Ultimate Warcraft Battlecry Generator
v0.11
 
by Nuchaleft (NytewolfAU2k7 on Curse)
on 15/04/2009 02:50AM WAST (GMT+8:00)
 
 
INTRODUCTION:
 
Need to inspire courage in your allies and to instill the fear of the Old Gods into your enemies? This is for you!
Need to inspire courage in your allies and to instill the fear of God into your enemies? This is for you!
 
Have a target selected?
Simply click the "Generate!" button to have it done in /say where others within a close range can hear you.
21,8 → 19,7
HOW TO INSTALL:
 
Extract the contents of the ZIP File to your World of Warcraft Addon directory.
Windows 2000/XP e.g.:"C:\Program Files\World of Warcraft\Interface\AddOns\"
Windows Vista/7 e.g.:"C:\Users\Public\Games\World of Warcraft\Interface\AddOns\"
e.g.:"C:\Program Files\World of Warcraft\Interface\AddOns\"
 
 
HOW TO USE:
32,7 → 29,6
The slash commands cover everything.
 
/bcg show - will display the panel again if you've closed it.
/bcg options - will display the options panel again if you've closed it.
/bcg y - /Yell. Target optional.
/bcg s - /say. Target optional.
 
47,9 → 43,41
 
NOTES:
May annoy people if used too often, use responsibly and please rate! :)
If you like this addon, please donate to show your appreciation! :)
For the most recent updates, please check the SVN.
 
 
CHANGELOG:
See CHANGELOG.txt for the list of changes in this version and previous versions.
\ No newline at end of file +From 0.09 ++ Added more cries ++ Added Fubar and Ace3 compatability ++ Changed TOC to 30100 + +From 0.08 ++ Added more cries ++ Fixed the button text issue ++ Changed TOC to 30000 + +From 0.07 ++ Added macro commands + +From 0.04 ++ Fixed a few of the battlecry options. ++ Fixed a button that was positioned incorrectly. ++ Changed Version Number ++ Added a few more cries +- Removed unused code + +From 0.02 ++ Fixed a missing comma ++ Fixed a few of the battlecry options. ++ Changed Version Number ++ Added a few more cries +- Removed unused code + +From 0.01 ++ Added Y Button ++ Added Version Label ++ Changed Version Number +- Removed unused code ++ Added some more cries +