Thread Tools Display Modes
02-23-05, 01:56 AM   #1
Grimcat
A Kobold Labourer
Join Date: Feb 2005
Posts: 1
React to a whisper

I am trying to figure out how to cause my character to act upon a specific whisper. I can figure out the LUA string parsing but I am new to WoW interface mod and do not know how to capture a whisper to parse. It looks like I would use the CHAT_MSG event? For instance I want to script so that when my friend to sends me a whisper tell that says: "GRIM HEAL" my character will automatically target and heal him. The code for casting a spell seems straight forward I just need to figure out how to capture the last whisper sent to me to check it for certain phrases.
Thx for any help!
  Reply With Quote
02-23-05, 08:05 AM   #2
Remelio
 
Remelio's Avatar
Join Date: Dec 2004
Posts: 696
It won't work.. casting a spell has to be tied to something that generates a keypress on your keyboard or a click.. this is to prevent using something like what you're describing for botting.

Note: I know this isn't what you were asking, but I figured I'd let you know that the end result would unfortunately not work
  Reply With Quote
02-23-05, 01:59 PM   #3
BumRush
A Defias Bandit
Join Date: Jan 2005
Posts: 2
Sounds very bot-like
  Reply With Quote
02-23-05, 03:16 PM   #4
Remelio
 
Remelio's Avatar
Join Date: Dec 2004
Posts: 696
If I may make a suggestion, instead of having it cast on your friend, you could have it pop up a message in the middle of your screen that tells you that you need to heal a person, or even target them automatically - the only part you couldn't automate would be the casting of the heal spell itself.
  Reply With Quote
02-23-05, 04:55 PM   #5
DrgnFyre
A Kobold Labourer
Join Date: Feb 2005
Posts: 1
Then how is it that autopotion is able to automatically use my potions when i'm at 30% health??


just a random thought.
  Reply With Quote
02-23-05, 05:58 PM   #6
Remelio
 
Remelio's Avatar
Join Date: Dec 2004
Posts: 696
Because thats using an item, not casting a spell.
  Reply With Quote
02-23-05, 06:49 PM   #7
Random
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 93
actually you can cast spells with chat commands... like /script CastSpellByName("spellname(Rank X)")

http://www.wowwiki.com/Main_Page for more stuff
  Reply With Quote
02-23-05, 09:09 PM   #8
Remelio
 
Remelio's Avatar
Join Date: Dec 2004
Posts: 696
Well maybe I'm wrong here, but the way I understood it, there had to be a click or a keypress along with whatever is triggering that script to run in order for the spell to be cast. Anybody who's played with it know what I'm talking about?
  Reply With Quote
02-24-05, 07:03 AM   #9
axlezero
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 7
maybe the script casting is to tie it to a macro, which would still need a key press, so you could create a text to add to your spell like, now healing so and so / cast etc
  Reply With Quote
02-24-05, 07:54 AM   #10
HollowedAndJaded
A Murloc Raider
Join Date: Jan 2005
Posts: 9
Putting the spell to a macro like that would be kinda useless for what he's trying to do. because he has to select a target anyways, then click the macro. If you'r going to click a macro that all it does is cast a set spell to a selected target, then don't bother with the macro, and just click the spell button. It would work just the same.

The only way to do what he wants is to have a mod that reads everything that is sent to his client, text wise, and see if it fits a set string like ":GRIM HEAL". You would need the : there to make it so it only responded to a whisper since a whisper appears as <username>: <text>. But, someone could also just /s :GRIM HEAL. But the major problem would be having th emod target the source of the whisper. As far as I know that cannot be done. I'm pretty sure you can make it respond to msgs sent to your client though. I've done a lot of DC coding, and we use LUA in that aswell, and it is possible to do so.

So unless it's a party of 2, and you always have that person targeted, it's not gonna work. But even still I'm not sure how you would go about having it filter the whispers and matching it to a set string : /

If i come across anything that would help I'll be sure to post it.

P.S

The ability to watch incoming msgs and having macros react to them would certainly be something to pester blizzard about for adding them into the wiki.
  Reply With Quote
02-24-05, 01:44 PM   #11
Random
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 93
you could try somthing with a macro that would work like this...

when somone types ".heal me" into party chat it sets that person to be the target and then all you would have to do is press the heal button

not sure if it'll work but it might
  Reply With Quote
02-24-05, 03:15 PM   #12
HollowedAndJaded
A Murloc Raider
Join Date: Jan 2005
Posts: 9
Not really. The hard part is getting it to filter the text and match it to a set string. The casting to a target can be done in a script as it stands. Just need to find a way to make the text become a trigger.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » React to a whisper


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