"random" incoming messages

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

Bilbo
decaying skeleton
decaying skeleton
Posts: 1
Joined: Wed Mar 03, 2004 2:06 pm

"random" incoming messages

Post by Bilbo » Wed Mar 03, 2004 2:16 pm

What I would like (but I'm so code-backward its comical), is to have a simple macro that contains a selection of incoming messages, and randomly selects one to display once called for group, and a general one for raid.

For example, I pull a mob and trigger the incoming macro

the macro has a list of X incoming messages for the group (incoming %t!; help! %t is on my tail! etc), and randomly selects one to display. Also, there is one incoming message that goes into raidsay (/rs incoming %t!!) that is always displayed.

After this the macro terminates until called again.

Any help would be much appreciated.

Gumby
a ghoul
a ghoul
Posts: 99
Joined: Sat Jan 24, 2004 5:27 pm

Post by Gumby » Wed Mar 03, 2004 2:48 pm

Why? :)

No puller that I've ever played with, from the worst, to the best, has multiple incoming messages.

If you wanted to do it yourself, and I have no idea why you'd ever want to script something to be used "publically" when it's not something that's done routinely by unaided players is beyond my ken; however, if you wanted to do it:

Define an array of string incoming messages (messagearray).

Populate the array.

Define the maxindex of the array.

/g @messagearray($rand(@maxindex))

or /rsay @messagearray($rand(@maxindex))

G

MultiWebberNL
orc pawn
orc pawn
Posts: 11
Joined: Sun Dec 21, 2003 10:41 am

Post by MultiWebberNL » Wed Mar 03, 2004 4:55 pm

Or make a hotkey bank with 10 diff hotkeys, then shift to that bank when you pull and randomly hit a key at the top of your keyboard :)

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Thu Mar 04, 2004 9:33 am

Gumby wrote:Why? :)
Hey, there's nothing wrong with having a couple different messages, and it's not hard to do.

I change my incoming and assist messages during long, boring camps or raids just for variety. So if he wants a slew of different messages just to add some humor or fun, I say go for it. Doesn't hurt anything, and isn't really a way to convince people you aren't afk macroing during a raid (which is probably what he wants it for, but it's his funeral).

Glasscoin
a lesser mummy
a lesser mummy
Posts: 55
Joined: Mon Jan 13, 2003 8:57 am

Post by Glasscoin » Sat Mar 13, 2004 8:13 pm

Bilbo! Bilbo! Bilbo Baggins;
He's only three feet tall.
Bilbo! Bilbo! Bilbo Baggins;
The bravest little hobbit of them all.

The following code is based on a macro I made, with very similar purpose. It has *.ini support. If you want to only display the group message, use

/macro pull group

For raid only pull message, use

/macro pull raid

Otherwise, use

/macro pull both

To display both raid and group messages. Also, be sure to change the val keys in your ini file if you add or remove any messages. It should be the number of messages - 1.

Pull.mac:

Code: Select all

| pull.mac

| Usage:  /macro pull [group/raid/both]
| The macro will default to displaying a group pull, if no switches are present.

Sub Main 
   /if @Param0=="raid" {
      /gsay $ini(pull.ini,Raid,$rand($int($ini(pull.ini,Raid,val))))
   } else /if @Param0=="both" {
      /rsay $ini(pull.ini,Group,$rand($int($ini(pull.ini,Group,val))))
      /gsay $ini(pull.ini,Raid,$rand($int($ini(pull.ini,Raid,val))))      
   } else {
      /rsay $ini(pull.ini,Group,$rand($int($ini(pull.ini,Group,val))))
   }
/return
Pull.ini:

Code: Select all

[Group]
val=3
0=This %t was brought to you by the letters A, Z, and the number 7!
1=A lawyer, a doctor, and a %t walked into a bar...
2=When all you have is a hammer, this %t starts to look like a nail.
3=If you're happy and you know it, help me beat the face offa this %t!

[Raid]
val=0
0=%t incoming to raid, get ready!
Something like

/macro pull both

in a hotkey should do what you specified.

Enjoy!

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Wed Jan 26, 2005 4:42 pm

I thought I remembered a newer working version of a macro like this, but this was the only thread I could find.

Anyone have a short random inc message generator with an ini file?

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Jan 26, 2005 5:38 pm

I remember that thread!

/looking
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

Frank25
a ghoul
a ghoul
Posts: 136
Joined: Thu Aug 12, 2004 6:38 am

Post by Frank25 » Fri Apr 08, 2005 10:44 pm

Chill wrote:I thought I remembered a newer working version of a macro like this, but this was the only thread I could find.

Anyone have a short random inc message generator with an ini file?
this one works great: http://www.macroquest2.com/phpBB2/viewt ... 5232#85232