View Full Version : Rogue addon help
kindredsoul
22-06-2008, 07:34 AM
What I'm looking for seems simple enough to me, but I don't code so..
Rogue stealth mode. Rogue gets near mob. Mob "detects" rogue and "grunts"
Instead of that grunt, I want an addon that plays the Metal Gear Solid guard alert sound.
I would be deeply thankful :grin:
Tunga
23-06-2008, 12:25 AM
Impossible.
kindredsoul
23-06-2008, 04:09 AM
Ok. I'm the kind of person that wants to know why or why not.
Wouldn't it be something like this but in LUA
If Stealthed
If mob alert then access MGS_Alert.mp3
end
end
Very very basic but yeah.
Moongaze
23-06-2008, 05:13 AM
If a unit "grunts" or makes a noice, we can't really do much to change that sound. We can play another sound, though, that plays at the same time. You'll get your "grunt" and you'll also get the Metal Gear surprised sound.
Your addon concept would require checking if you are stealthed, then, finding out if you are being targetted by a non-friendly unit. If you are being targetted while entering combat, you were spotted. If you are not being targetted while entering combat, you must be starting the combat, therefore, not spotted.
I haven't looked into the events that are fired for units that are targetting the player. I know that if you have no target and then a mob targets you, sometimes your target frame appears and you auto-target your attacker. If the WOW UI does this, an addon should also be able to do this.
Sadly, that's all the information I can share on this subject, since I haven't dabbled much into unit targetting. It wouldn't need much, code wise, though ... probably 10-20 lines, max.
Tunga
23-06-2008, 10:08 AM
There's no event for a mob targeting you, so unless you are targeting the mob you can't track it's target. The closest you could get would be to watch your target's target and if it switches to you (while you are stealthed) then play the sound. But it's not going to be very reliable, for example the auto-targeting that Moonglaze mentions will only work if you don't currently have a target. If you have mob x targeted and mob y spots I can't think of any way for a mod to detect that.
Lothaer
23-06-2008, 03:29 PM
there is another way but it would require alot of files :D
Tunga
23-06-2008, 05:34 PM
You mean an illegal MPQ hack, or something else?
Lothaer
23-06-2008, 06:28 PM
no no no not a mpq hack atleast i dont think its a hack... have a look at this (http://wowui.worldofwar.net/?p=mod&m=4224) mod and maybe you'll understand
Tunga
23-06-2008, 06:31 PM
That's what I meant, my understanding is that it's illegal since you can use the same method to replace any texture or sound in the game and this has been banned. It's only local but it can give an unfair advantage. And if Blizzard wanted to then it would be very easy to detect with Warden.
kindredsoul
24-06-2008, 07:22 PM
TY for the information on this. The thing is though...I don't see how there isn't an event for a mob looking in your direction and playing a sound file. But, I don't want to replace the sound file...just play my own at same time. I understand that IF it were able to work in any way it would have to be constantly running and checking for the non-you event. Like start checking 5 times a second when you stealth, and check if a mob in an area does something non-normal in an area within 20 yards of you.
But Tunga, are you saying that there is no way to track events that mobs do when you don't have the mob targeted?
Tunga
25-06-2008, 10:39 AM
I don't see how there isn't an event for a mob looking in your direction and playing a sound file.I don't think you understand the word "event" in this context. It's not a word to mean "anything that happens on the screen". Event refers to a specific set of occurences that a mod can detect. You register your mod with an event and when that event happens your mod is informed about it. For example, you could register with UNIT_AURA to be told whenever a buff or debuff changes on a unit near you. The problem is that there is simple no event that represents "a mob has spotted you in stealth".
The closest we can get is that the player eneters combat or a mob targets you.
However, a mod is only able to view the target of a mob/player if it is one of the following:
You.
In your party/raid.
Your focus.
Any target of something on this list (including this!)
So a mod can look at your target and see what it is targeting. But it can't do that for any random mob you can see on your screen. Something in the list above would have to be targeting it.
With your method (which is generally not how mods work though some things are done this way), you can check 5 times a second, you can check 500 times a second, but what are you checking for? How do you detect this "non-normal" behaviour?
kindredsoul
25-06-2008, 07:55 PM
Gotcha. tyvm for the information. I guess I have to keep playing the sound in my head instead of a real sound lol. At least I have my ToastyMod that cries "Toasty!" from Mortal Kombat whenever I crit with non-white dmg.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.