Thread Tools Display Modes
09-03-10, 09:26 AM   #1
Jigain
A Molten Giant
 
Jigain's Avatar
Join Date: Jul 2009
Posts: 732
[Request] ...hic!

So, since both my RP guilds enjoyed my latest request here, I figured I'd toss up another idea I've had for a long while.

Alcohol is a very interesting part of this game. Unfortunately, buying large quantities of alcohol in order to roleplay a constantly drunk dwarf gets a bit... expensive in the long run. So here's what I had in mind.

I want an addon that filters outgoing messages (like Dwarvenizer / Trollizer, or Eloquence), changing most (probably around 75-80%) of "S"s into "SH"s, and (preferrably disableable (is that even a word?), through interface or maybe as a stand-alone addon) adding "...hic!" at random after sentences. Just like when you're drunk in the game.

Anyone feel like they can tackle this? I'd greatly appreciate it, as would most of my RP friends.

Oh, and if anyone know of an addon that can do this already, please say so.
  Reply With Quote
09-03-10, 02:26 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
I just whipped this up in 10 mins...
There's a 50% chance it'll tag " ...hic!" at the end and a 25% chance per letter to replace "s" with "sh".
Toggle with /drunk, it'll respond with the localized drunk messages when toggling.

lua Code:
  1. local function Drunkenize(match)
  2.     if (match=="S" or match=="s") and math.random()<0.25 then
  3.         return match.."h";
  4.     else
  5.         return match;
  6.     end
  7. end
  8.  
  9. local OldChat=SendChatMessage;
  10. local function NewChat(...)
  11.     local msg=(...);
  12.     msg=msg:gsub("[Ss]",Drunkenize);
  13.     if math.random()<0.5 then
  14.         msg=msg.." ...hic!";
  15.     end
  16.     return OldChat(msg,select(2,...));
  17. end
  18.  
  19. SlashCmdList["DRUNK"]=function()
  20.     if SendChatMessage==OldChat then
  21.         print("|cffffcc00"..DRUNK_MESSAGE_SELF3.."|r");
  22.         SendChatMessage=NewChat;
  23.     else
  24.         print("|cffffcc00"..DRUNK_MESSAGE_SELF1.."|r");
  25.         SendChatMessage=OldChat;
  26.     end
  27. end;
  28. SLASH_DRUNK1="/drunk";
  29.  
  30. print((...).." loaded. Type /drunk to toggle.");
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-23-12 at 04:27 PM.
  Reply With Quote
09-04-10, 05:58 AM   #3
Jigain
A Molten Giant
 
Jigain's Avatar
Join Date: Jul 2009
Posts: 732
Cheers! Looks like just what I wanted, though I may fiddle a little bit with the random numbers.

So if I understand it right, /drunk will toggle both "...hic!" and the slurring S's on/off?
  Reply With Quote
09-04-10, 10:08 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by Jigain View Post
So if I understand it right, /drunk will toggle both "...hic!" and the slurring S's on/off?
Yep





/em curses the 10 character minimum for posting.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » [Request] ...hic!


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off