· 6 years ago · Nov 16, 2019, 11:40 AM
1 -- WoW Classic - Battlecry Generator
2 local Version = "2.17";
3 local Client = "(Alpha)"
4 -- By Mahtrok
5 -- mahtrok@mahtrok.info
6 -- 11-16-2019
7
8 -- ##################################################################################################################
9
10 -- ChangeLog 2.17:
11 --
12 -- Rewrote COMBAT_LOG_EVENT_UNFILTERED() and GenerateCry() completely, for a more detailed cry selection process.
13 -- Minor changes on some other methods.
14 -- Renamed some major methods for useabillity/overview reasons.
15 -- Added lots of additional cries to the default [cries.General] and class tables.
16 -- Added rogue cries.
17
18 -- ##################################################################################################################
19
20 -- What is BattleCry Generator?
21
22 -- Custom BattleCry Generator. Cries out specific phrases, either entered inside the code here or added ingame,
23 -- whenever specific combat events happen, depending on the type of spell used, or the current combat action.
24 -- The goal of this addon is in-combat-roleplay, NOT to annoy the people you play with. Therefor the selection
25 -- of cries shouldn't be too small, while the global cry chance shouldn't be too high. I suggest, using a global
26 -- cry chance not greater then 5-10% and around 10-20 cries per spell (larger selection is always a good thing).
27
28
29 -- Supported classes:
30
31 -- At the moment, only Warrior, Rogue & Paladin classes are supported, for testing reasons. More will be added,
32 -- once the generator engine runs as intended.
33
34
35 -- Editing Settings:
36
37 -- Scroll down to the code local defaultSettings = {} and change the values inside the table as you wish.
38 -- After changing the default settings inside this code, you MUST use '/bcg reset' ingame, to reload the settings.
39
40
41 -- Editing/Creating/Removing custom cries:
42
43 -- Ingame adding/removing/editing of cries is not yet implemented, but planned, later on.
44 -- At the moment, only in-code cries are supported. Scroll down and find the code: local cries = {}.
45 -- Search for the event or spell table inside the main table and change the cries or add new ones as strings.
46 -- Don't forget the , at the end!
47 -- ATTENTION: When editing cries inside this code, do NOT USE '%t' for target name! Instead, write 'targetName'
48 -- without the '' to your cry. It will then be replaced later, automatically with the actual '%t' value.
49 -- After changing the cry lists inside this code, you MUST use '/bcg dbreset' ingame, to reload the list completely,
50 -- or your changes will not be available.
51
52
53 -- Ingame command list:
54
55 -- /bcg Show options (and this list) default chatframe.
56 -- /bcg on Enable generator.
57 -- /bcg off Disable generator.
58 -- /bcg debug Toggle ingame debugger.
59 -- /bcg reset Reset settings to defaults. (Cry Chance, critical hit bonus, generator and debugger state.
60 -- /bcg dbreset Delete all custom cries and reset to default cries, offered in this code.
61 -- /bcg status Show ingame generator/debugger state info.
62
63 -- Language localizations currently supported: German, English.
64 -- Default cries language: German
65
66 -- ##################################################################################################################
67
68 -- This table is gonna be saved on program close, for all chars, it holds all available cries for all classes.
69 BattleCryDB = {};
70
71 -- This table is gonna be saved on program close, only for the current char, it holds this chars general settings.
72 BattleCryPerCharDB = {};
73
74 -- The default settings for BattleCry Generator are stored only for the current character.
75 local defaultSettings = {
76 Enabled = true,
77 Debugger = false,
78 Chance = 5,
79 CritBonus = 75
80 }
81
82 -- Runtime values
83 local playerClass = "";
84 local playerName = "";
85 local playerRace = "";
86 local targetName = "";
87 local mySpells = {};
88
89 -- All available cries.
90 local cries = {
91
92 ["General"] = {
93
94 ["Any"] = {
95 "Aye!",
96 "Heureka!",
97 "Hervorragend.",
98 "Ahh, so geht das.",
99 "Besser geht's nich.",
100 "Aye, so macht man das.",
101 "Wusste doch, das klappt.",
102 },
103
104 ["SWING_DAMAGE"] = {
105 "Ho!",
106 "Aye!",
107 "Hah!",
108 "Heya!",
109 "He-he!",
110 "Ha-ha!",
111 "Ah-ha!",
112 "Erwischt!",
113 "Nimm' das!",
114 "Oink oink!",
115 "So sieht's aus!",
116 "Hier kommt der Schmerz!",
117 },
118
119 ["SWING_MISSED"] = {
120 "Mist!",
121 "Hoppla!",
122 "Bastard.",
123 "Verdammt!",
124 "Halt still!",
125 "Sportlich...",
126 "Wirst du wohl?!",
127 },
128
129 ["SWING_ABSORBED"] = {
130 "Oha!",
131 "Uhhhh!",
132 },
133
134 ["SWING_RESISTED"] = {
135 "Oha!",
136 "Uhhhh!",
137 },
138
139 ["SWING_BLOCKED"] = {
140 "Uh!",
141 "Ouh!",
142 "Huh!",
143 "Urgh!",
144 "Bastard!",
145 "Drecksack!",
146 "Auf's Maul?!",
147 "Wirst du wohl?!",
148 },
149
150 ["RANGE_DAMAGE"] = {
151 "Aye!",
152 "Jaawoll!",
153 "Treffer!",
154 "Bullseye!",
155 "Ins Schwarze!",
156 "Der hat gesessen!",
157 "Ich schieße scharf!",
158 "Genau ins Schwarze!",
159 "Zwischen die Augen!",
160 "Augen wie ein Adler!",
161 "Auf 200 Schritt, direkt zwischen die Augen!",
162 },
163
164 ["RANGE_MISSED"] = {
165 "Mist!",
166 "Bastard.",
167 "Daneben!",
168 "Verdammt!",
169 "Halt still!",
170 "Sportlich...",
171 "Wirst du wohl?!",
172 },
173
174 ["RANGE_ABSORBED"] = {
175 "Oha!",
176 "Uhhhh!",
177 },
178
179 ["RANGE_RESISTED"] = {
180 "Oha!",
181 "Uhhhh!",
182 },
183
184 ["RANGE_BLOCKED"] = {
185 "Uh!",
186 "Ouh!",
187 "Huh!",
188 "Urgh!",
189 "Bastard!",
190 "Drecksack!",
191 "Auf's Maul?!",
192 "Wirst du wohl?!",
193 },
194
195 ["SPELL_MISSED"] = {
196 "Mist!",
197 "Daneben!",
198 "Verdammt!",
199 },
200
201 ["SPELL_ABSORBED"] = {
202 "Oha!",
203 "Uhhhh!",
204 },
205
206 ["SPELL_RESISTED"] = {
207 "Oha!",
208 "Uhhhh!",
209 },
210
211 ["SPELL_BLOCKED"] = {
212 "Uh!",
213 "Ouh!",
214 "Huh!",
215 "Urgh!",
216 "Sowas!",
217 "Bastard!",
218 "Drecksack!",
219 "Auf's Maul?!",
220 "Wirst du wohl?!",
221 },
222
223 ["PARTY_KILL"] = {
224 "SIEEG!",
225 "Sonst noch wer?!",
226 "Ein weiterer Sieg!",
227 "wer is der nächste?!",
228 "Wieder einer weniger!",
229 "Der zählt aber für mich!",
230 "Ein weiterer Sieg! War klar.",
231 }
232
233 },
234
235 ["Racial"] = {
236
237 -- Dwarf
238 ["Stoneform"] = {
239 "Irdene Macht!",
240 "Ich bin ein Fels!",
241 "Ich bin Steinhart!",
242 "Bei den Vorfahren!",
243 "Die Macht des Steins!",
244 "Die Macht der Irdenen!",
245 "An mir beißt du dir die Zähne aus!",
246 "Ich bin ein wahrhafter Sohn der Irdenen!",
247 "Ihr Irdenen und Vorfahren, helft mir mit eurer Kraft!",
248 },
249
250 -- Gnome
251 ["Escape artist"] = {
252 "Und tschüss!",
253 "Haste gedacht!",
254 "Schwupps und weg."
255 },
256
257 -- Night elf
258 ["Shadowmeld"] = {
259
260 },
261
262 -- Orc
263 ["Blood Fury"] = {
264
265 },
266
267 -- Troll
268 ["Berserking"] = {
269
270 },
271
272 -- Tauren
273 ["War Stomp"] = {
274
275 },
276
277 -- Undead 1
278 ["Cannibalize"] = {
279
280 },
281
282 -- Undead 2
283 ["Will of the Forsaken"] = {
284
285 }
286
287 },
288
289 ["Class"] = {
290
291 ["Druid"] = {
292
293 },
294
295 ["Hunter"] = {
296
297 },
298
299 ["Mage"] = {
300
301 },
302
303 ["Paladin"] = {
304
305 -- Segen der Könige
306 ["Blessing of kings"] = {
307 "Die Könige segnen dich.",
308 "Geh mit dem Segen der Könige.",
309 "Der Segen der Könige erfülle dich."
310 },
311
312 -- Segen der Macht
313 ["Blessing of might"] = {
314 "Empfange die Macht des Lichts.",
315 "Die Macht des Lichts ist mit dir.",
316 "Sei gesegnet mit der Macht des Lichts.",
317 "Das Licht segne dich mit seiner Macht.",
318 "Geh mit der Macht, die das Licht schenkt.",
319 "Das Licht sei mit dir und schenke dir Macht."
320 },
321
322 -- Segen des Schutzes
323 ["Blessing of protection"] = {
324 "Licht, errette diese arme Seele.",
325 "Licht, beschütze diese arme Seele.",
326 "Das Licht möge deiner Seele gnädig sein!"
327 },
328
329 -- Segen der Rettung
330 ["Blessing of salvation"] = {
331 "Das Licht ist mit dir.",
332 "Das Licht verdeckt deine Absichten."
333 },
334
335 -- Segen der Weisheit
336 ["Blessing of wisdom"] = {
337 "Spüre die Weisheit des Lichts.",
338 "Das Licht segne dich mit Weisheit.",
339 "Geh mit der Weisheit, die das Licht schenkt.",
340 "Das Licht sei mit dir und schenke dir Weisheit."
341 },
342
343 -- Göttlicher Schutz
344 ["Divine protection"] = {
345 "Licht, beschütz mich!",
346 "Das Licht erfüllt mich!",
347 "Das Licht wacht über mich!",
348 "Licht, schütze deinen Diener."
349 },
350
351 -- Göttliches Eingreifen
352 ["Divine intervention"] = {
353 "Nimm dieses Opfer und ahhhhh",
354 "Ich opfere mich, für die Allianz!",
355 "Nimm mein Leben und rette das Seine."
356 },
357
358 -- Exorzismus
359 ["Exorcism"] = {
360 "Es werde Licht!",
361 "Weiche, Kreatur!",
362 "Klaatu, Verata, Nachahaha!",
363 "Zurück in die Schatten, targetName!",
364 "Das Licht wird dich bannen, targetName!",
365 "Das Licht wird dich richten, targetName!",
366 "Du hast hier nichts verloren, targetName!",
367 "Zurück in das Loch, aus dem du kamst!",
368 "Ich verbanne dich, zurück in die Schatten!"
369 },
370
371 -- Lichtblitz
372 ["Flash of light"] = {
373 "Halt durch!",
374 "Hilfe ist unterwegs!",
375 "Wird gleich wieder gut.",
376 "Heile, heile, Gänschen!",
377 "Gleich wirds kurz hell!",
378 "Achtung, es blitzt kurz.",
379 "Warte, ich rufe Hilfe! Ach, moment... Die bin ja ich."
380 },
381
382 -- Richturteil
383 ["Judgement"] = {
384 "Das Licht wird dich richten!",
385 "Schuldig, im Sinne der Anklage!",
386 "Ich bin dein Richter und Henker!",
387 "Das hohe Gericht hat entschieden: Tod!",
388 "Höre nun dein Urteil! Tod auf Bewährung!",
389 "Das hohe Gericht serviert heut Tiefschläge!",
390 "Du hast das Recht zu STERBEN! Ein für alle mal!",
391 "Empfange das Urteil: Tod im Sinne von ...naja, tot!"
392 },
393
394 -- Hammer der Gerechtigkeit
395 ["Hammer of justice"] = {
396 "Rumms!",
397 "Das gibt Kopfweh!",
398 "Gleich wirds dunkel!",
399 "Hier kommt der HAMMER!",
400 "Alles gute kommt von oben!"
401 },
402
403 -- Heiliges Licht
404 ["Holy light"] = {
405 "Heiliges Licht! Hilf uns!",
406 "Das heilige Licht ist mit dir!",
407 "Der Schmerz ist gleich vorbei.",
408 "Das heilige Licht gibt dir neue Kraft!",
409 "Heiliges Licht, errette diese Arme Seele!",
410 "Ist das deine Mils? Naja, ich bau sie erstmal wieder ein.",
411 "Da hängen ja schon die Gedärme raus, ich mach dich mal wieder zu."
412 },
413
414 -- Handauflegung
415 ["Lay on hands"] = {
416 "Du stirbst heut' nich!",
417 "Hier wird nich' gestorben!",
418 "Nich, während meiner Wache!"
419 },
420
421 -- Läutern
422 ["Purify"] = {
423 "Ich nehme die Krankheit von dir!",
424 "Hier wird sich nich' krank gemeldet!",
425 "Verzage nicht, ich erlöse dich von dieser Krankheit."
426 },
427
428 -- Erlösung
429 ["Redemption"] = {
430 "REANIMATION!",
431 "Reanimation! Das kann ich.",
432 "Das Licht erfülle dich erneut!",
433 "Empfange erneut das heilige Licht!",
434 "Stirb an einem anderen Tag, Freund.",
435 "Atme wieder die gute Luft mein Freund.",
436 "Kein Licht, kein Ton, ich komm' ja schon!"
437 },
438
439 -- Rechtschaffender Zorn
440 ["Righteous fury"] = {
441 "Ich werde sie ablenken!",
442 "Ich werde euch beschützen!",
443 "Ich nehme ihren Zorn auf mich!"
444 },
445
446 -- Untote spüren
447 ["Sense undead"] = {
448 "Ich kann den Tod spüren!",
449 "Untote, ich kann Sie spüren.",
450 "Orks! Ah, ne, riecht nur so ähnlich.",
451 "Ich sehe untote Menschen...und anderes, was mir auch nich' richtig schmeckt."
452 }
453
454 },
455
456 ["Priest"] = {
457
458 },
459
460 ["Rogue"] = {
461
462 -- Hinterhalt
463 ["Ambush"] = {
464 "Ha-ha!",
465 "Erwischt!",
466 "Nimm das!",
467 "Da bin ich!",
468 "Überraschung!",
469 },
470
471 -- Entrinnen
472 ["Evasion"] = {
473 "1, 2, 3, Cha-Cha-Cha!",
474 "Tanzen wir eine Runde!",
475 "Mich triffst du nicht!",
476 "1, 2, 3, wieder vorbei!",
477 "Komm schon, zeig was du kannst!",
478 "Ich bin einfach zu schnell für dich!",
479 },
480
481 -- Finte
482 ["Feint"] = {
483 "Kuck kuck!",
484 "War ich nicht!",
485 "Ich war's nicht!",
486 "Hier! Nein, hier!",
487 "Ich bin unschuldig!",
488 "Huch, Entschuldigung!",
489 "Rechts äh, links, äh ZACK!",
490 },
491
492 -- Tritt
493 ["Kick"] = {
494 "Ruhe!",
495 "Klappe!",
496 "Vergiss es!",
497 "Netter Versuch!",
498 "Bist du wohl ruhig!?",
499 "Hier wird nicht gezaubert!",
500 },
501
502 -- Nierenhieb
503 ["Kidney shot"] = {
504 "Zack!",
505 "Und Haken!",
506 "Und jetzt der Haken!",
507 "Jetzt kommt der Schmerz!",
508 },
509
510 -- Schloss knacken
511 ["Pick lock"] = {
512 "Kleinigkeit.",
513 "Kinderspiel.",
514 "Hab's gleich.",
515 "Gleich offen.",
516 "Zeig mal her...",
517 },
518
519 -- Verschwinden
520 ["Vanish"] = {
521 "Und weg.",
522 "Bis gleich.",
523 "Ich bin dann mal weg.",
524 "Ich verschwinde dann mal.",
525 "Jetzt siehst du mich...und jetzt nicht.",
526 "Was du nicht siehst, kannst du nicht bekämpfen.",
527 },
528
529 },
530
531 ["Shaman"] = {
532
533 },
534
535 ["Warrior"] = {
536
537 -- Schlachtruf
538 ["Battle shout"] = {
539 "Für Falstad!",
540 "Haltet Stand!",
541 "Für Ironforge!",
542 "Für den König!",
543 "Für die Allianz",
544 "Für die Wildhammer!",
545 "Die ersten 100 sind meine!",
546 "Für Bronzebart und Ironforge!",
547 "Für Falstad und die Wildhammer!",
548 },
549
550 -- Blutrausch
551 ["Bloodrage"] = {
552 "Roarrrr!",
553 "Aaaaargh!",
554 "Aggresssiooon!",
555 "Rrrrrraaaawww!",
556 "Ich bin sauer!",
557 "Aaargh, diese WUUUT!",
558 "Ich bin echt wütend!",
559 "Ne ordentliche Keilerei, wird auch Zeit!",
560 },
561
562 -- Sturmangriff
563 ["Charge"] = {
564 "ATTACKE!",
565 "Auf geht's!",
566 "Zum Angriff!",
567 "Und nu' zu uns!",
568 "Zwerg is daaaa!",
569 "Ich kooooommmmeee!",
570 "Damm-dadada-daaaaaaa!",
571 "Die ersten Zehn sind meine!",
572 "Bluuuutig, bluutig halleluja!",
573 },
574
575 -- Herausforderungsruf
576 ["Challenging shout"] = {
577 "Kommt alle her!",
578 "Zu mir ihr Bastarde!",
579 "Hier spielt die Musik!",
580 "Ich nehm's mit euch allen auf!",
581 "Jeder kriegt was ab, versprochen!",
582 "Wer hat noch nich, wer will noch mal?!",
583 },
584
585 -- Demoralisierungsruf
586 ["Demoralizing shout"] = {
587 "Oink, Oink!",
588 "Kommt nur her!",
589 "Spürt die irdene Kraft!",
590 "Ist das hier schon Alles?!",
591 "Die Vorfahren sind mit mir!",
592 "Endlich 'ne ordentliche Prügelei!"
593 "Ich hab' 'ne Posaune eingepflanzt un' es wurd' 'ne VUVUZELA!",
594 },
595
596 -- Drohruf
597 ["Intimidating shout"] = {
598 "Buh!",
599 "Ahhh, Verstärkung!",
600 "Pfffffft. Huch, 'tschuldigung!",
601 "Kennst du den Witz vom Ork, der den Zwerg nach dem Weg fragte?",
602 },
603
604 -- Hinrichten
605 ["Execute"] = {
606 "Stirb!",
607 "Jetz' STIRB!",
608 "Und jetz' Stirb!",
609 "Fall. Endlich. Um!",
610 "Gleich ist's um dich geschehen!",
611 "Ich kann den Sieg schon schmecken!",
612 },
613
614 -- Heldenhafter Stoß
615 ["Heroic strike"] = {
616 "Ha-ha!",
617 "Treffer!",
618 "Nimm das!",
619 "So geht das!",
620 "Hier kommt der Schmerz!",
621 },
622
623 -- Überwältigen
624 ["Overpower"] = {
625 "Zack!",
626 "So nich!",
627 "Erwischt!",
628 "Dir zeig ich's!",
629 "Haste dir so gedacht!",
630 "So nicht, mein Freund!",
631 "Hier kommt der Schmerz!",
632 "Oink, Oink, targetName!",
633 "Hier kommt der Schmerz!",
634 "Haste gedacht, targetName!",
635 },
636
637 -- Rache
638 ["Revenge"] = {
639 "Zack!",
640 "So nich!",
641 "Erwischt!",
642 "Dir zeig ich's!",
643 "Haste dir so gedacht!",
644 "So nicht, mein Freund!",
645 "Hier kommt der Schmerz!",
646 "Oink, Oink, targetName!",
647 "Hier kommt der Schmerz!",
648 "Haste gedacht, targetName!",
649 },
650
651 -- Schildhieb
652 ["Shield bash"] = {
653 "Bist du ruhig!",
654 "Nein, nein, nein!",
655 "Haste gedacht, targetName!",
656 "Pssst, targetName, Klappe!",
657 "Halt die Klappe, targetName!",
658 "Hier wird nich gezaubert, targetName!",
659 "Ich zauber dir gleich mal'n Ring um die Augen!",
660 },
661
662 -- Spott
663 ["Taunt"] = {
664 "He, Schweinenase?!",
665 "Ich bin hier unten!",
666 "Hier bin ich, targetName!",
667 "Ich lache über dich, targetName!",
668 "Du stinkst ganz schön, targetName!",
669 "Wirst du wohl herkommen, targetName!?",
670 "Hey targetName, hier gibts aufs Maul!",
671 "Deine Nase passt mir nicht, targetName!",
672 "Hey, targetName, deine Mutter lässt grüßen!",
673 "Wir waren hier noch nich fertig, targetName!",
674 "Mit dir bin ich noch nich fertig, targetName!",
675 "Leg dich mit Jemand in deiner Größe an, targetName!",
676 "Igitt, targetName, der Geruch deiner Füße ist unerträglich!",
677 "Mein linker Zeh juckt und ich glaube DU hast Schuld!",
678 }
679
680 },
681
682 ["Warlock"] = {
683
684 }
685
686 }
687
688 }
689
690 -- Colors used to format the output text inside the ChatBox.
691 local colors = {
692 ["red"] = "|cffFF6969",
693 ["orange"] = "|cffFFA369",
694 ["yellow"] = "|cffFFEF2B",
695 ["green"] = "|cff6BBD57",
696 ["blue"] = "|cff4040F2";
697 ["violet"] = "|cffBD6FBF",
698 ["pink"] = "|cffFFB8F5",
699 ["white"] = "|cffFFFFFF",
700 ["gold"] = "|cffAD9E63",
701 ["Druid"] = "|cffFFB04F",
702 ["Hunter"] = "|cff8ECF63",
703 ["Mage"] = "|cff80CAFF",
704 ["Paladin"] = "|cffFAB6F7",
705 ["Priest"] = "|cffFDFFFC",
706 ["Rouge"] = "|cffFFEE03",
707 ["Shaman"] = "|cff78F1FF",
708 ["Warrior"] = "|cffCCB89B",
709 ["Warlock"] = "|cffCA86DB"
710 }
711
712 -- Create the main table for BattleCry Generator
713 local BattleCryGenHud = BattleCryGenHud or {};
714
715 -- Create the frame that will be used for any events
716 BattleCryGenHud.frame = CreateFrame("Frame", "BattleCryGenHud", UIParent);
717 BattleCryGenHud.frame:SetFrameStrata("BACKGROUND");
718
719 -- Register all required events.
720 BattleCryGenHud.frame:RegisterEvent("PLAYER_ENTERING_WORLD");
721 BattleCryGenHud.frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
722 BattleCryGenHud.frame:RegisterEvent("ADDON_LOADED");
723
724 -- Fired, when the player has finally entered the world.
725 function BattleCryGenHud.frame:PLAYER_ENTERING_WORLD(...)
726 playerClass = inEnglish("class", UnitClass("player"));
727 playerGUID = UnitGUID("player");
728 playerName = UnitName("player");
729 playerRace = inEnglish("race", UnitRace("player"));
730
731 if (playerClass ~= "Warrior") and (playerClass ~= "Paladin") and (playerClass ~= "Rogue") then
732 BattleCryPerCharDB.Enabled = false;
733 BattleCryPerCharDB.Debugger = false;
734 Show_Msg (colors.gold .. "BattleCry Generator " .. colors.yellow .. "has been " .. colors.red .. "disabled" .. colors.yellow .. " for this character.");
735 Show_Msg (colors.yellow .. "We're sorry, but your class " .. colors[playerClass] .. "[" .. playerClass .. "] " .. colors.yellow .. "is not yet supported!");
736 else
737 Show_Status();
738 -- SETTINGs
739 if (BattleCryPerCharDB ~= {}) then
740 Show_Msg (colors.yellow .. "Settings loaded for" .. colors[inEnglish("class", playerClass)] .. " " .. playerName .. "" .. colors.yellow .. ".");
741 else
742 Show_Msg (colors.orange .. "Settings not found for" .. colors[inEnglish("class", playerClass)] .. " " .. playerName .. "" .. colors.orange .. ".");
743 ResetSettings();
744 end;
745
746 -- Store default cries
747 if (BattleCryDB == {}) or (BattleCryDB == nil) then
748 Show_Msg (colors.orange .. "Stored cries not found. Loading defaults.");
749 BattleCryDB = copyTable (cries);
750 else
751 Show_Msg (colors.yellow .. "All cries loaded.");
752 end;
753
754 local _classes = BattleCryDB["Class"];
755 mySpells = _classes[playerClass];
756
757 if (BattleCryPerCharDB.Debugger) then
758 Show_Msg (colors.yellow .. "PLAYER_ENTERING_WORLD complete.");
759 end;
760 end;
761 end
762
763 -- Fires on any event, non- or combat, registered by wow's combat log, from somewhere near the player.
764 function BattleCryGenHud.frame:COMBAT_LOG_EVENT_UNFILTERED(...)
765 -- If BattleCry Generator has been enabled, otherwise, do nothing.
766 if (BattleCryPerCharDB.Enabled) then
767 -- Gather all event info required.
768 local _, subevent, _, sourceGUID, sourceName, _, _, destGUID, destName, _, _ = ...;
769 local spellId, spellName, spellSchool;
770 local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing, isOffHand;
771
772 -- Check if the event should be ignored from the beginning.
773 if (ignoreEvent(subevent) == false) then
774 -- Check if the player or his actual target are involved, or a unit died... otherwise, ignore this event.
775 if (sourceGUID == playerGUID) or (destGUID == playerGUID) or (UnitExists("target") and ((UnitGUID("target") == destGUID) or (UnitGUID("target") == sourceGUID))) or (subevent == "PARTY_KILL") then
776 -- Don't cry, if the player acts on himself.
777 if (sourceGUID ~= destGUID) then
778 -- Check if this is a non-spell MELEE or RANGE event?
779 if(string.find(subevent, "SWING")) or (string.find(subevent, "RANGE")) then
780 _, _, _, resisted, blocked, absorbed, critical, glancing, crushing, _ = select(12, ...);
781 -- Non-spell event. Initialize spellName with empty string.
782 spellName = "";
783 -- Or is it a SPELL event?
784 elseif(string.find(subevent, "SPELL")) then
785 _, spellName, _, _, _, _, resisted, blocked, absorbed, critical, glancing, crushing, _ = select(12, ...);
786 else
787 -- It is neither SPELL, nor MELEE or RANGE event!
788 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.orange .. ">> Event" .. colors.yellow .. " [" .. subevent .. "]" .. colors.orange .. " is neither SPELL, nor MELEE or RANGE!"); end;
789 end;
790
791 -- Now calculate chances for a cry to happen.
792 local _rand = math.random( 100 );
793 -- If this was a critical hit, increase calculated cry chance by CritBonus from BattleCryPerCharDB settings.
794 if (critical) then
795 _rand = _rand + BattleCryPerCharDB.CritBonus;
796 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.orange .. " Hit was a crit, so Chance for a cry was increased by " .. BattleCryPerCharDB.CritBonus .. " to " .. _rand .. "%"); end;
797 end;
798 -- If we hit the cry chance,...
799 if (_rand >= (100-BattleCryPerCharDB.Chance)) then
800 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.green .. "Rolled " .. _rand .. " against " .. (100-BattleCryPerCharDB.Chance) .. " on " .. colors.yellow .. "[" .. spellName .. "]" .. colors.green .. "."); end;
801 -- ...generate the cry.
802 GenerateCry ({subevent, spellName, destName});
803 -- If we do not hit the cry chance, do nothing.
804 else
805 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.blue .. "Rolled " .. _rand .. " against " .. (100-BattleCryPerCharDB.Chance) .. " on " .. colors.yellow .. "[" .. spellName .. "]" .. colors.blue .. "."); end;
806 end;
807 end;
808 end;
809 end;
810 end;
811 end
812
813 -- Generates the actual cry.
814 function GenerateCry(...)
815 local subevent, spellName, destName = select(1, ...)
816 local chnl = "SAY";
817 local tble = {};
818 local tbleCnt = table.getn( tble );
819
820 -- Is this a spell action?
821 if (spellName ~= nil) and (spellName ~= "") then
822 -- Ensure that spellName is valid and not only some Number or spellId.
823 if (string.len(spellName) > 3) then
824 -- Try getting the cry from the characters, race specific, 'Racial' table.
825 if (keyExists(cries.Racial, inEnglish("racial", spellName))) then
826 tble = cries.Racial[inEnglish("racial", spellName)];
827 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.green .. ">> Cry table found for" .. colors.yellow .. " [" .. spellName .. "]" .. colors.green .. "inside Racials."); end;
828 -- Now try getting the cry from characters class specific 'mySpells' table.
829 elseif (keyExists(mySpells, inEnglish("spell", spellName))) then
830 tble = mySpells[inEnglish("spell", spellName)];
831 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.green .. ">> Cry table found for" .. colors.yellow .. " [" .. spellName .. "]" .. colors.green .. "inside mySpells."); end;
832 -- No table found!
833 else
834 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.red .. ">> No cry table found for" .. colors.yellow .. " [" .. spellName .. "]" .. colors.red .. "!"); end;
835 end;
836 end;
837 -- It is a non-spell action.
838 else
839 spellName = subevent;
840 -- Try getting the cry from the 'General' table by using 'subevent' as key.
841 if (keyExists(cries.General, spellName)) then
842 tble = cries.General[spellName];
843 -- subevent was no valid key, so use the 'Any' table.
844 else
845 tble = cries.General["Any"];
846 end;
847 end;
848
849 -- There should be a non-empty table, else something went wrong.
850 if(tble ~= nil) and (tble ~= {}) then
851 -- Now select a random cry,...
852 local _rand = math.random(table.getn( tble ));
853 local _cry = tble[_rand];
854
855 -- Check if there is an actual cry.
856 if (_cry ~= "") and (_cry ~= nil) then
857 -- Check if the randomly selected cry uses the targetName.
858 if (string.find(_cry, "targetName") or string.find(_cry, "%'targetName%'")) then
859 -- Check if there IS an actual target.
860 if (UnitExists("target")) then
861 _cry.gsub("targetName", GetFirstOfStrg(UnitName("target")));
862 _cry.gsub("%'targetName%'", GetFirstOfStrg(UnitName("target")));
863 -- There is no target, but targetName should be used, try to use destName instead.
864 elseif (destName ~= "") and (destName ~= nil) then
865 _cry.gsub("targetName", GetFirstOfStrg(destName));
866 _cry.gsub("%'targetName%'", GetFirstOfStrg(destName));
867 -- There is no actual target and also no destName, so delete the _cry.
868 else
869 _cry = nil;
870 end;
871 end;
872
873 -- If cry has been deleted, don't send anything.
874 if (_cry ~= nil) then
875 -- Now send it to the selected chnl.
876 SendChatMessage(_cry, chnl);
877 end;
878 end;
879 else
880 if (BattleCryPerCharDB.Debugger) then Show_Msg (colors.red .. ">> Cry table selection failed."); end;
881 end;
882 end
883
884 -- Recieved text command
885 function TextCommand(_arg)
886 -- Recieved command for turning Battlecry Generator on.
887 if (string.lower(_arg) == "on") then
888 BattleCryPerCharDB.Enabled = true;
889 Show_Msg (colors.yellow .. "BattleCry Generator is now" .. colors.green .. " ON" .. colors.yellow .. ".");
890 -- Recieved command for turning Battlecry Generator off.
891 elseif (string.lower(_arg) == "off") then
892 BattleCryPerCharDB.Enabled = false;
893 Show_Msg (colors.yellow .. "BattleCry Generator is now" .. colors.red .. " OFF" .. colors.yellow .. ".");
894 -- Recieved command for turning Battlecry Generators Debugger on/off.
895 elseif (string.lower(_arg) == "debug") then
896 if (BattleCryPerCharDB.Debugger) then
897 BattleCryPerCharDB.Debugger = false;
898 Show_Msg (colors.yellow .. "BattleCry Debugger is now" .. colors.red .. " OFF" .. colors.yellow .. ".");
899 else
900 BattleCryPerCharDB.Debugger = true;
901 Show_Msg (colors.yellow .. "BattleCry Debugger is now" .. colors.green .. " ON" .. colors.yellow .. ".");
902 end;
903 -- Display status of BattleCry Generator on the ChatBox.
904 elseif (string.lower(_arg) == "status") then
905 Show_Status();
906 elseif (string.lower(_arg) == "dbreset") then
907 ResetDB();
908 elseif (string.lower(_arg) == "reset") then
909 ResetSettings();
910 -- If anything else comes in, as a command, but is not valid, show the info again.
911 else
912 Show_Info();
913 end;
914 end
915
916 -- Restore default settings.
917 function ResetSettings ()
918 BattleCryPerCharDB = {};
919
920 if (BattleCryPerCharDB.Enabled == nil) then
921 BattleCryPerCharDB.Enabled = defaultSettings.Enabled;
922 end;
923 if (BattleCryPerCharDB.Debugger == nil) then
924 BattleCryPerCharDB.Debugger = defaultSettings.Debugger;
925 end;
926 if (BattleCryPerCharDB.Chance == nil) then
927 BattleCryPerCharDB.Chance = defaultSettings.Chance;
928 end;
929 if (BattleCryPerCharDB.CritBonus == nil) then
930 BattleCryPerCharDB.CritBonus = defaultSettings.CritBonus;
931 end;
932 Show_Msg (colors.orange .. "Stored BattleCry Generator settings deleted & reset to defaults.");
933 Show_Status();
934 end;
935
936 -- Reset all stored cries. ATTENTION! None of the ingame added cries will survive! Use with caution!
937 function ResetDB ()
938 BattleCryDB = {};
939 BattleCryDB = copyTable (cries);
940 Show_Msg (colors.red .. "All cries deleted from database and restored with defaults!");
941 end
942
943 -- Copy a table with all its contents.
944 function copyTable(source)
945 local source_type = type(source)
946 local dest
947 if source_type == 'table' then
948 dest = {}
949 for source_key, source_value in next, source, nil do
950 dest[copyTable(source_key)] = copyTable(source_value)
951 end
952 setmetatable(dest, copyTable(getmetatable(source)))
953 else -- number, string, boolean, etc
954 dest = source
955 end
956 return dest
957 end
958
959 -- Ignores specific events, not supported or used (yet).
960 function ignoreEvent(eventName)
961 if (eventName == "-1") then
962 return true;
963 elseif (eventName == "SPELL_AURA_APPLIED") then
964 return true;
965 elseif (eventName == "SPELL_AURA_REMOVED") then
966 return true;
967 elseif (eventName == "SPELL_AURA_REFRESH") then
968 return true;
969 elseif (eventName == "ENCHANT_APPLIED") then
970 return true;
971 elseif (eventName == "ENCHANT_REMOVED") then
972 return true;
973 elseif (eventName == "SPELL_CAST_START") then
974 return true;
975 elseif (eventName == "SPELL_CAST_FAILED") then
976 return true;
977 elseif (eventName == "SPELL_HEAL") then
978 return true;
979 elseif (eventName == "SPELL_PERIODIC_HEAL") then
980 return true;
981 elseif (eventName == "SPELL_ENERGIZE") then
982 return true;
983 elseif (eventName == "SPELL_PERIODIC_ENERGIZE") then
984 return true;
985 elseif (eventName == "SPELL_PERIODIC_DAMAGE") then
986 return true;
987 elseif (eventName == "DAMAGE_SHIELD") then
988 return true;
989 elseif (eventName == "ENVIRONMENTAL_DAMAGE") then
990 return true;
991 else
992 return false;
993 end;
994 end;
995
996 -- Returns the translated, equivalent value of the passed-in _arg, if known (and therefor relevant) from a localized game version.
997 function inEnglish(_loc, _arg)
998 if(string.lower(_loc) == "class") then
999 -- CLASS NAMES in english in german
1000 if(string.lower(_arg) == "druid") or (string.lower(_arg) == "druide") then
1001 return "Druid";
1002 elseif(string.lower(_arg) == "hunter") or (string.lower(_arg) == "jäger") then
1003 return "Hunter";
1004 elseif(string.lower(_arg) == "mage") or (string.lower(_arg) == "magier") then
1005 return "Mage";
1006 elseif(string.lower(_arg) == "paladin") or (string.lower(_arg) == "paladin") then
1007 return "Paladin";
1008 elseif(string.lower(_arg) == "priest") or (string.lower(_arg) == "priester") then
1009 return "Priest";
1010 elseif(string.lower(_arg) == "rogue") or (string.lower(_arg) == "schurke") then
1011 return "Rogue";
1012 elseif(string.lower(_arg) == "shaman") or (string.lower(_arg) == "schamane") then
1013 return "Shaman";
1014 elseif(string.lower(_arg) == "warrior") or (string.lower(_arg) == "krieger") then
1015 return "Warrior";
1016 elseif(string.lower(_arg) == "warlock") or (string.lower(_arg) == "hexenmeister") then
1017 return "Warlock";
1018 end;
1019 end;
1020 if(string.lower(_loc) == "race") then
1021 -- RACE NAMES in english in german
1022 if(string.lower(_arg) == "gnome") or (string.lower(_arg) == "gnom") then
1023 return "gnome";
1024 elseif(string.lower(_arg) == "human") or (string.lower(_arg) == "mensch") then
1025 return "human";
1026 elseif(string.lower(_arg) == "dwarf") or (string.lower(_arg) == "zwerg") then
1027 return "dwarf";
1028 elseif(string.lower(_arg) == "night elf") or (string.lower(_arg) == "nachtelf") then
1029 return "night elf";
1030 elseif(string.lower(_arg) == "orc") or (string.lower(_arg) == "ork") then
1031 return "orc";
1032 elseif(string.lower(_arg) == "troll") or (string.lower(_arg) == "troll") then
1033 return "troll";
1034 elseif(string.lower(_arg) == "tauren") or (string.lower(_arg) == "taure") then
1035 return "tauren";
1036 elseif(string.lower(_arg) == "undead") or (string.lower(_arg) == "untoter") then
1037 return "undead";
1038 end;
1039 end;
1040 if(string.lower(_loc) == "racial") then
1041 -- RACIAL SPELL NAMES in english in german
1042 if(string.lower(_arg) == "escape artist") or (string.lower(_arg) == "entfesselungskünstler") then
1043 return "Escape Artist";
1044 elseif(string.lower(_arg) == "stoneform") or (string.lower(_arg) == "steingestalt") then
1045 return "Stoneform";
1046 elseif(string.lower(_arg) == "shadowmeld") or (string.lower(_arg) == "schattenhaftigkeit") then
1047 return "Shadowmeld";
1048 elseif(string.lower(_arg) == "blood fury") or (string.lower(_arg) == "kochendes blut") then
1049 return "Blood Fury";
1050 elseif(string.lower(_arg) == "berserking") or (string.lower(_arg) == "Berserker") then
1051 return "Berserking";
1052 elseif(string.lower(_arg) == "war stomp") or (string.lower(_arg) == "kriegsdonner") then
1053 return "War Stomp";
1054 elseif(string.lower(_arg) == "cannibalize") or (string.lower(_arg) == "kannibalismus") then
1055 return "Cannibalize";
1056 elseif(string.lower(_arg) == "will of the forsaken") or (string.lower(_arg) == "wille der verlassenen") then
1057 return "Will of the Forsaken";
1058 end;
1059 end;
1060 if(string.lower(_loc) == "spell") then
1061 if (string.lower(playerClass) == "druid") then
1062
1063 end;
1064 if (string.lower(playerClass) == "hunter") then
1065
1066 end;
1067 if (string.lower(playerClass) == "mage") then
1068
1069 end;
1070 if (string.lower(playerClass) == "paladin") then
1071 -- PALADIN SPELL NAMES in english in german
1072 if (string.lower(_arg) == "blessing of kings") or (string.lower(_arg) == "segen der könige") then
1073 return "Blessing of kings";
1074 elseif (string.lower(_arg) == "blessing of might") or (string.lower(_arg) == "segen der macht") then
1075 return "Blessing of might";
1076 elseif (string.lower(_arg) == "blessing of protection") or (string.lower(_arg) == "segen des schutzes") then
1077 return "Blessing of protection";
1078 elseif (string.lower(_arg) == "blessing of salvation") or (string.lower(_arg) == "segen der rettung") then
1079 return "Blessing of salvation";
1080 elseif (string.lower(_arg) == "blessing of wisdom") or (string.lower(_arg) == "segen der weisheit") then
1081 return "Blessing of wisdom";
1082 elseif (string.lower(_arg) == "divine protection") or (string.lower(_arg) == "göttlicher schutz") then
1083 return "Divine protection";
1084 elseif (string.lower(_arg) == "divine intervention") or (string.lower(_arg) == "göttliches eingreifen") then
1085 return "Divine intervention";
1086 elseif (string.lower(_arg) == "exorcism") or (string.lower(_arg) == "exorzismus") then
1087 return "Exorcism";
1088 elseif (string.lower(_arg) == "judgement") or (string.lower(_arg) == "richturteil") then
1089 return "Judgement";
1090 elseif (string.lower(_arg) == "flash of light") or (string.lower(_arg) == "lichtblitz") then
1091 return "Flash of light";
1092 elseif (string.lower(_arg) == "hammer of justice") or (string.lower(_arg) == "hammer der gerechtigkeit") then
1093 return "Hammer of justice";
1094 elseif (string.lower(_arg) == "holy light") or (string.lower(_arg) == "heiliges licht") then
1095 return "Holy light";
1096 elseif (string.lower(_arg) == "lay on hands") or (string.lower(_arg) == "handauflegung") then
1097 return "Lay on hands";
1098 elseif (string.lower(_arg) == "purify") or (string.lower(_arg) == "läutern") then
1099 return "Purify";
1100 elseif (string.lower(_arg) == "redemption") or (string.lower(_arg) == "auferstehung") then
1101 return "Redemption";
1102 elseif (string.lower(_arg) == "righteous fury") or (string.lower(_arg) == "zorn der gerechtigkeit") then
1103 return "Righteous fury";
1104 elseif (string.lower(_arg) == "sense undead") or (string.lower(_arg) == "untote aufspüren") then
1105 return "Sense undead";
1106 end;
1107 end;
1108 if (string.lower(playerClass) == "priest") then
1109
1110 end;
1111 if (string.lower(playerClass) == "rogue") then
1112 if (string.lower(_arg) == "ambush") or (string.lower(_arg) == "hinterhalt") then
1113 return "Ambush";
1114 elseif (string.lower(_arg) == "evasion") or (string.lower(_arg) == "entrinnen") then
1115 return "Evasion";
1116 elseif (string.lower(_arg) == "feint") or (string.lower(_arg) == "finte") then
1117 return "Feint";
1118 elseif (string.lower(_arg) == "kick") or (string.lower(_arg) == "tritt") then
1119 return "Kick";
1120 elseif (string.lower(_arg) == "kidney shot") or (string.lower(_arg) == "nierenhieb") then
1121 return "Kidney shot";
1122 elseif (string.lower(_arg) == "pick lock") or (string.lower(_arg) == "schloss knacken") then
1123 return "Pick lock";
1124 elseif (string.lower(_arg) == "vanish") or (string.lower(_arg) == "verschwinden") then
1125 return "Vanish";
1126 end;
1127 end;
1128 if (string.lower(playerClass) == "shaman") then
1129
1130 end;
1131 if (string.lower(playerClass) == "warrior") then
1132 -- WARRIOR SPELL NAMES in english in german
1133 if (string.lower(_arg) == "battle shout") or (string.lower(_arg) == "schlachtruf") then
1134 return "Battle shout";
1135 elseif (string.lower(_arg) == "bloodrage") or (string.lower(_arg) == "blutrausch") then
1136 return "Bloodrage";
1137 elseif (string.lower(_arg) == "challenging shout") or (string.lower(_arg) == "herausforderungsruf") then
1138 return "Challenging shout";
1139 elseif (string.lower(_arg) == "charge") or (string.lower(_arg) == "sturmangriff") then
1140 return "Charge";
1141 elseif (string.lower(_arg) == "demoralizing shout") or (string.lower(_arg) == "demoralisierungsruf") then
1142 return "Demoralizing shout";
1143 elseif (string.lower(_arg) == "intimidating shout") or (string.lower(_arg) == "drohruf") then
1144 return "Intimidating shout";
1145 elseif (string.lower(_arg) == "execute") or (string.lower(_arg) == "hinrichten") then
1146 return "Execute";
1147 elseif (string.lower(_arg) == "heroic strike") or (string.lower(_arg) == "heldenhafter stoß") then
1148 return "Heroic strike";
1149 elseif (string.lower(_arg) == "overpower") or (string.lower(_arg) == "überwältigen") then
1150 return "Overpower";
1151 elseif (string.lower(_arg) == "revenge") or (string.lower(_arg) == "rache") then
1152 return "Revenge";
1153 elseif (string.lower(_arg) == "shield bash") or (string.lower(_arg) == "schildhieb") then
1154 return "Shield bash";
1155 elseif (string.lower(_arg) == "taunt") or (string.lower(_arg) == "spott") then
1156 return "Taunt";
1157 end;
1158 end;
1159 if (string.lower(playerClass) == "warlock") then
1160
1161 end;
1162 end;
1163 -- Return nil, if no valid value has been found until here.
1164 return nil;
1165 end
1166
1167 -- Returns true, if the passed-in key exists inside the passed-in table set.
1168 function keyExists(set, key)
1169 return set[key] ~= nil
1170 end
1171
1172 -- Returns only the first strg of a longer strg (for exmpl. only the First NAME or TITLE of a mob, without the faction or other additional informations).
1173 function GetFirstOfStrg (str)
1174 local tbl = {}
1175 for substring in str:gmatch("%S+") do
1176 table.insert(tbl, substring)
1177 end
1178 return tbl[1] or "";
1179 end
1180
1181 -- Chat box debugger/printer
1182 function Show_Msg(_msg)
1183 if( DEFAULT_CHAT_FRAME ) then
1184 DEFAULT_CHAT_FRAME:AddMessage(_msg);
1185 end
1186 end
1187
1188 -- Displays the current status of BattleCry Generator on the ChatBox.
1189 function Show_Status()
1190 Show_Msg(colors.gold .. "BattleCry Generator " .. colors.white .. "" .. Version .. " " .. Client .. "" .. colors.yellow .. " - Status:");
1191
1192 local _state = colors.red .. "off";
1193 if (BattleCryPerCharDB.Enabled) then
1194 _state = colors.green .. "on";
1195 end;
1196
1197 Show_Msg(colors.yellow .. "Generator is " .. _state .. colors.yellow .. ".");
1198 if (BattleCryPerCharDB.Debugger) then
1199 _state = colors.green .. "on";
1200 else
1201 _state = colors.red .. "off";
1202 end;
1203 Show_Msg(colors.yellow .. "Debugger is " .. _state .. colors.yellow .. ".");
1204
1205 Show_Msg(colors.white .. "Welcome" .. colors[inEnglish("class", playerClass)] .. " " .. playerClass .. "" .. colors.white .. ".");
1206 Show_Msg(colors.white .. "The cry chance is " .. colors.orange .. "" .. BattleCryPerCharDB.Chance .. "" .. colors.white .. "% The critical hit bonus is " .. colors.orange .. "" .. BattleCryPerCharDB.CritBonus .. "" .. colors.white .. ".");
1207 Show_Msg(colors.white .. "To see the options menu, type" .. colors.green .. " /bcg" .. colors.white .. ".");
1208 end
1209
1210 -- Displays the tutorial/info for BattleCry Generator on the ChatBox.
1211 function Show_Info()
1212 Show_Msg(colors.gold .. "BattleCry Generator " .. colors.white .. "" .. Version .. " " .. Client .. "" .. colors.blue .. " " .. colors.yellow .. "Options:\n");
1213 Show_Msg(colors.white .. "/bcg status " .. colors.yellow .. " Show Status");
1214 Show_Msg(colors.white .. "/bcg debug " .. colors.yellow .. " Debugger On/Off");
1215 Show_Msg(colors.white .. "/bcg off " .. colors.red .. " Disable" .. colors.yellow .. " BattleCry Generator");
1216 Show_Msg(colors.white .. "/bcg on " .. colors.green .. " Enable" .. colors.yellow .. " BattleCry Generator");
1217 end
1218
1219 -- Override the OnEvent() method to dispatch events to our processing functions.
1220 BattleCryGenHud.frame:SetScript("OnEvent", function(self, event, ...) if self[event] then return self[event](self, ...) end end);
1221
1222 -- Slash command list
1223 SLASH_BCGEN1 = "/bcg";
1224 SLASH_BCGEN2 = "/bcgen";
1225 SlashCmdList["BCGEN"] = TextCommand;