WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Script Possibilities (https://www.wowinterface.com/forums/showthread.php?t=93)

Cide 01-15-05 07:29 PM

Script Possibilities
 
Hi all. While browsing the WoW forums, I frequently see those "Can you do XYZ?" threads. So I figured, since I have quite a knowledge about WoW's interface and LUA, I could help you answer these questions if you have any. So, if you would like to know if something is possible, or if you want to know how to do it, feel free to ask and I'll do my best to answer :).

Cairenn 01-15-05 09:58 PM

Thank you very much Cide. Remmy and I are going to be working like crazy over the next while, trying to get this site up and going, so any and all help from such knowledgeable sources as yourself is greatly appreciated. It's just this sort of community assistance that made EQ Interface the site it became, and precisely what we are hoping to re-create with WoW Interface.

Schrade 01-16-05 12:01 AM

Yay Cide! Thanks so much.

Here's what I want:

I want a script for my healer friends that use CastParty.

Basically, I want them to be able to hit a script and that script will automatically figure out my pet and cast a heal on the pet.

So here's what I had in mind:

/script (Put whatever needs to go here to target my pet)
/script CastParty_DoTheRightThing();
/script TargetLastEnemy();

I know you can just do /target PetName but I want it to be able to target my pet no matter what name it has. So like some lua function to Target Schrade's pet only.

Cide 01-16-05 07:22 AM

Quote:

Originally Posted by Schrade
Yay Cide! Thanks so much.

Here's what I want:

I want a script for my healer friends that use CastParty.

Basically, I want them to be able to hit a script and that script will automatically figure out my pet and cast a heal on the pet.

So here's what I had in mind:

/script (Put whatever needs to go here to target my pet)
/script CastParty_DoTheRightThing();
/script TargetLastEnemy();

I know you can just do /target PetName but I want it to be able to target my pet no matter what name it has. So like some lua function to Target Schrade's pet only.

Well, to target the player named "Schrade"'s pet:
/target Schrade
/script TargetUnitsPet("target")

That should be enough. As a little hint on what we're developing for CTMod right now; it's somewhat like what you asked, yet different :). Things are going well, and if we're lucky, you might see version 1 in a matter of days. I can say that it's gonna help priests bigtime :).

@ Cairenn: I'd love to see a good source for WoW interfaces, so I will do my best to support this site :).

AldWulf 01-16-05 08:09 AM

Would it be Possible for a Total Conversion Such as we had in EQ no window looking the same or are we Limited in the graphics we can change?

Svarten 01-16-05 08:39 AM

No limitations what so ever when it comes to graphics and window numbers.

/Svarten

Cide 01-16-05 10:17 AM

Quote:

Originally Posted by AldWulf
Would it be Possible for a Total Conversion Such as we had in EQ no window looking the same or are we Limited in the graphics we can change?

What Svarten says is true. We can modify the original files in any way we wish(I believe cosmos does this to some extent).

AldWulf 01-16-05 11:00 AM

Ahh Sweet That is Great to hear was just wondering as we hadn't really seen any Major Graphic Changeing Mods as of yet

guice 01-16-05 01:19 PM

Quote:

Originally Posted by AldWulf
Ahh Sweet That is Great to hear was just wondering as we hadn't really seen any Major Graphic Changeing Mods as of yet

I think it's due to two factors; The compexity of the UI has a high learning curve and most designers aren't very programming savy to be able to make a real appealing UI.

EQ's UI was simple XML file changes. Naturally it had some big limitations. With WoW's excessive fexability comes added complexity.

mondinga 01-16-05 01:54 PM

You could simply do as in EverQuest and make direct replacements of WoW's graphics. This is somewhat less desirable though as most of WoW's graphics are quite specifically tailored to their purposes, and there is little in standard window display graphics. To effectively skin the interface would require a massive number of graphic changes, and without changing code, you will still end up with something that looks fundamentally the same as the default.

Besides that, it is difficult to keep track of graphic use from patch to patch as things are added or tweaked. There are so many files and SO many instances where they are used in the code, it would be a true job of work to keep a skin pack usable.

And thirdly, many current mods change things which are reliant on existing screen elements. Often times you would have to choose between wanting to use a nifty looking skin or an incredibly helpful utility mod.

I dabble in graphics work a bit, and have thought on skinning the interface. Skinning certainly lends itself to being distributed side by side with a suite of scripts, as you have a more cohesive and dependable package of changes. But this again somewhat discourages the practice of mixing and matching mods, which is what makes the way WoW mods work so great.

Grumdor 01-16-05 06:15 PM

As far as graphic changes, Ive been extremely happy with WoWs defaults. GypsyMod to give me more buttons and flexibility in my windows is really all I needed to make it about perfect for me. I think with WoW we'll see more functionality based improvements rather than cosmetic, but thats just a guess.

bahzeel 01-17-05 10:43 AM

DPS Received mod
 
I've got a request.

I'm hunting for a DPS mod that works in reverse. I've got one I'm currently using that reports the DPS I've delivered during a fight, and I'm finding that quite handy to keep an eye on my character's effectiveness.


There are some defensive related changes and testing that I would like to do. Ultimately, they all boil down to DPS done to me by the mob, and I'm looking for a mod that will report that. When I say all boil down, blocks, parries, misses - anything that increases those reduces DPS taken. And I feel that any other measure except DPS taken can too easily leave something out of the analysis that counter balances what's been done.


Do you know of a mod that can report DPS taken?

Would it be difficult to collect and report DPS taken?


I'm currently using the COSMOS DPSTracker, but will willingly and easily change to any other DPS mod if it will get me the DPS Taken effect.

Thanks!

Cide 01-17-05 12:27 PM

Quote:

Originally Posted by bahzeel
I've got a request.

I'm hunting for a DPS mod that works in reverse. I've got one I'm currently using that reports the DPS I've delivered during a fight, and I'm finding that quite handy to keep an eye on my character's effectiveness.


There are some defensive related changes and testing that I would like to do. Ultimately, they all boil down to DPS done to me by the mob, and I'm looking for a mod that will report that. When I say all boil down, blocks, parries, misses - anything that increases those reduces DPS taken. And I feel that any other measure except DPS taken can too easily leave something out of the analysis that counter balances what's been done.


Do you know of a mod that can report DPS taken?

Would it be difficult to collect and report DPS taken?


I'm currently using the COSMOS DPSTracker, but will willingly and easily change to any other DPS mod if it will get me the DPS Taken effect.

Thanks!

It's pretty easy to make a mod that monitors damage taken. I'm unfortunately not going to do one in the nearest future, but we have something along those lines coming up. However, I can say that you won't get any help from that, since it's from a different perspective :). You only need 5 or so regular expressions and you've got yourself a damage taken monitor. Just need an interface for that and you're set.

bahzeel 01-17-05 12:52 PM

Thanks for the quick response Cide. Not the response I wanted to hear you understand :)

I'm not really planning to try and build one of these things myself - my development skills aren't all that grand, but if a person were going to attempt such a thing, is there an existing script/mod that you'd point them to as a good start?


(thinking out loud now :D)
I'm reasonably confident that I can work out the logic for such a thing (need to keep track of time and dmg taken, and convert them to DPS). What more is there to track?

H'mm - some way of noticing the start and stop of a fight. Fight ending at mob death is probably pretty easy. I bet there's an event of some kind when character transitions out of combat mode.

Fight starting - I'm thinking this is best started when I dish out some damage (which will lower the reported DPS taken, but better represents those situations where I control the start of things and what I can do as a result of that control).

Heck - I bet there's an event for character transitioning into combat mode. That's probably the height of easy - report on DPS taken from beginning to end of combat mode....

With start and stop of a fight, in time, seconds elapsed can be calculated. With a counter that increments damage taken, you'd have total damage taken. And damage / elapsed time (sec) would be DPS.

And it shouldn't be too hard to use end of the fight as <current time> if the end of the fight hasn't been reached yet to provide numbers for constant updating.


I bet there's a DPS mod already in existence that tracks start and end of a fight. Is it a good bet that all that a DPS Taken mod would need is to change the guts of such a thing to track dmg done to the player, instead of damage they do? Then apply all the same math after that?


I'm specifically interested in 1:1 fights that are player initiated for my defensive testing. So a mod that's more tuned for these situations, and not as robust for those long running / many mob battles are not as important to me (though that wouldn't stop me from using it in those situations just to see what happens).

I think COSMOS gets around this problem with a simple window type of control that sets the time window within which to track damage dealt. So it has a way to roll old damage off the end of the stack while adding new damage dealt to the top of the stack. I think I'd rather have something that relies on quiescence / out of combat as an end, and then reports everything over an entire fight.


Anyway, if I could trouble you for your thoughts on how to go about this Cide, as well as advice on any mods you know of that are pretty close already, I'd appreciate it. If I'm as close as I think I am, then I think it might be time to learn some .lua :)

Cide 01-17-05 01:34 PM

Quote:

Originally Posted by bahzeel
Thanks for the quick response Cide. Not the response I wanted to hear you understand :)

I'm not really planning to try and build one of these things myself - my development skills aren't all that grand, but if a person were going to attempt such a thing, is there an existing script/mod that you'd point them to as a good start?


(thinking out loud now :D)
I'm reasonably confident that I can work out the logic for such a thing (need to keep track of time and dmg taken, and convert them to DPS). What more is there to track?

H'mm - some way of noticing the start and stop of a fight. Fight ending at mob death is probably pretty easy. I bet there's an event of some kind when character transitions out of combat mode.

Fight starting - I'm thinking this is best started when I dish out some damage (which will lower the reported DPS taken, but better represents those situations where I control the start of things and what I can do as a result of that control).

Heck - I bet there's an event for character transitioning into combat mode. That's probably the height of easy - report on DPS taken from beginning to end of combat mode....

With start and stop of a fight, in time, seconds elapsed can be calculated. With a counter that increments damage taken, you'd have total damage taken. And damage / elapsed time (sec) would be DPS.

And it shouldn't be too hard to use end of the fight as <current time> if the end of the fight hasn't been reached yet to provide numbers for constant updating.


I bet there's a DPS mod already in existence that tracks start and end of a fight. Is it a good bet that all that a DPS Taken mod would need is to change the guts of such a thing to track dmg done to the player, instead of damage they do? Then apply all the same math after that?


I'm specifically interested in 1:1 fights that are player initiated for my defensive testing. So a mod that's more tuned for these situations, and not as robust for those long running / many mob battles are not as important to me (though that wouldn't stop me from using it in those situations just to see what happens).

I think COSMOS gets around this problem with a simple window type of control that sets the time window within which to track damage dealt. So it has a way to roll old damage off the end of the stack while adding new damage dealt to the top of the stack. I think I'd rather have something that relies on quiescence / out of combat as an end, and then reports everything over an entire fight.


Anyway, if I could trouble you for your thoughts on how to go about this Cide, as well as advice on any mods you know of that are pretty close already, I'd appreciate it. If I'm as close as I think I am, then I think it might be time to learn some .lua :)

Well, I don't know if there's an event for especially entering combat, but I've always used PLAYER_REGEN_DISABLED/PLAYER_REGEN_ENABLED, and it seems to work out good(can't think of any other time when the player's regen would be disabled?). Other than that, what you said sounds good. You just need some regular expressions for getting damage done.

Some code to log the combatlog and check for some messages(directly from our upcoming mod):

Code:

DamageTaken = 0;

CT_OldChatFrame_OnEvent = ChatFrame_OnEvent;

local function CT_ChatFrame_OnEvent(event)
        if ( strsub(event, 1, 8) == "CHAT_MSG" ) then
                local type = strsub(event, 10);
                if ( strsub(type,1,7) == "COMBAT_" or strsub(type,1,6) == "SPELL_" ) then
                        CT_CheckLine(arg1);
                end
        end
        CT_OldChatFrame_OnEvent(event);
end

ChatFrame_OnEvent = CT_ChatFrame_OnEvent;

function CT_CheckLine(line)
        local iStart, iEnd, damage = string.find(line, ".+ hits you for (%d+).*");
        if ( damage ) then
                DamageTaken = DamageTaken + tonumber(damage);
        end
        iStart, iEnd, damage = string.find(line, ".+ crits you for (%d+).*");
        if ( damage ) then
                DamageTaken = DamageTaken + tonumber(damage);
        end
        iStart, iEnd, damage = string.find(line, "You suffer (%d+) .+ from .+%.");
        if ( damage ) then
                DamageTaken = DamageTaken + tonumber(damage);
        end
end

This logs the combatlog, and then increments the DamageTaken variable with the amount of damage taken. If you want me to explain something in the code, please ask :).

guice 01-17-05 02:29 PM

Can a mod split this post? The question really blonged in another thread.


In responce to Grumdor; You're most likely right. The default interface and graphics are very down to earth, you might say. It's nothing like EQ or EQII where you're so distracted by the gody-arse borders you're ready to puke (And I don't know who the hell made the EQII interface, but they need to be SHOT TO H*. It's gotta be one of *THE* worse UI appearences I've ever seen.)

WoW's is nice, clean and really fits the game environment.

deca prime 01-17-05 02:43 PM

Thanks for making this thread cide... I have a question...

What could you use to determine a negative effect on a mob, what I mean by this is... When you cast a spell like a DOT or any non permanant effect, how could you determine when that spell would be up...

bahzeel 01-17-05 03:15 PM

I don't think player_regen_enabled/disabled will do the job here. Assuming those refer to mana regeneration, mana regeneration is occuring anytime it's been 5 seconds since your last spell.

Time to go do some reading and research - see if I can find a .lua that is already doing approximately what I'm looking to do, and then adjust it a bit. :)


I think that code fragment will be quite useful to me Cide. That looks like the core of what I need to accumulate damage taken. The rest all maps out in my mind - translating it into a new language is where this is going to get interesting.

Thanks again Cide.

EDIT:

Ahh! Here we go. There are a couple of game events that seem to be exactly what I'm looking for. PLAYER_ENTER_COMBAT and PLAYER_LEAVES_COMBAT.

Now I need to find the .lua for an existing DPS tool to see if I can adjust it for what I want :)


EDIT 2:
Looks like there are two game events that I might be able to take advantage of. There is CHAT_MSG_COMBAT_LOG_ENEMY and CHAT_MSG_COMBAT_LOG_SELF. Since damage taken goes into the personal log also, I think I'll use the _SELF log. I can think of all sorts of possible problems with peeking in the bad guys log for this data (how many will I be peeking into when I'm beset by multiple bad guys).

It looks to me like there are functions built up around parsing these entries in ctMod and Cosmos that I can use, or I can build around these 2 game events from scratch.


The CtMod and Cosmos DPS tracker both seem to be built around a concept of reporting DPS over a given time window. This causes them to add and remove individual damage events to a stack with a timestamp. I can see the benefits of the feature, but my preference is DPS for a fight - so using the time from enter combat to exiting combat (which will at times be a long time - those pulls and fights that never ends as bad guys run away and return with friends :P). It also seems simpler for the data handling (simple accumulation of dmg).

Still very daunting to me - getting the data reported and some of that GUI stuff is truly a mystery to me - we'll see how far this little project gets.

bahzeel 01-17-05 03:58 PM

Quice - sorry to steer the thread down a new path. You're right about needing a new thread here.

Cide,

I do have some questions about the code fragment, but I need to go do some more background / reading on .lua first. I think 19/20 of those questions are the very basics (string manipulation, GUI interactions - that sort of thing).

So I'll save them for now. Heck - probably start a new thread (if I remember) when I have them ready.

--Bahz
35th Undead Priest
Cenarion Circle

(also 36th Shaman)

Cide 01-17-05 04:02 PM

Quote:

Originally Posted by bahzeel
I don't think player_regen_enabled/disabled will do the job here. Assuming those refer to mana regeneration, mana regeneration is occuring anytime it's been 5 seconds since your last spell.

Time to go do some reading and research - see if I can find a .lua that is already doing approximately what I'm looking to do, and then adjust it a bit. :)


I think that code fragment will be quite useful to me Cide. That looks like the core of what I need to accumulate damage taken. The rest all maps out in my mind - translating it into a new language is where this is going to get interesting.

Thanks again Cide.

EDIT:

Ahh! Here we go. There are a couple of game events that seem to be exactly what I'm looking for. PLAYER_ENTER_COMBAT and PLAYER_LEAVES_COMBAT.

Now I need to find the .lua for an existing DPS tool to see if I can adjust it for what I want :)


EDIT 2:
Looks like there are two game events that I might be able to take advantage of. There is CHAT_MSG_COMBAT_LOG_ENEMY and CHAT_MSG_COMBAT_LOG_SELF. Since damage taken goes into the personal log also, I think I'll use the _SELF log. I can think of all sorts of possible problems with peeking in the bad guys log for this data (how many will I be peeking into when I'm beset by multiple bad guys).

It looks to me like there are functions built up around parsing these entries in ctMod and Cosmos that I can use, or I can build around these 2 game events from scratch.


The CtMod and Cosmos DPS tracker both seem to be built around a concept of reporting DPS over a given time window. This causes them to add and remove individual damage events to a stack with a timestamp. I can see the benefits of the feature, but my preference is DPS for a fight - so using the time from enter combat to exiting combat (which will at times be a long time - those pulls and fights that never ends as bad guys run away and return with friends :P). It also seems simpler for the data handling (simple accumulation of dmg).

Still very daunting to me - getting the data reported and some of that GUI stuff is truly a mystery to me - we'll see how far this little project gets.

Pretty sure they refer to health regen, but you seem to have found to find specific events for combat :).

Quote:

Originally Posted by deca prime
What could you use to determine a negative effect on a mob, what I mean by this is... When you cast a spell like a DOT or any non permanant effect, how could you determine when that spell would be up...

Well, you can only get info about debuffs from your current target. If you want to log such a thing for a mob that isn't targeted, you have to check the combat log for when the DoT stops ticking(not sure if it prints "<Spell> has faded from <Mob>", but if it does, it should be somewhat easy). To check the target, you'd have to store the debuffs in a table, and then check UnitDebuff("target", n) periodically(where n is the debuff number).

deca prime 01-17-05 09:44 PM

Just a little follow up...I did a little ingame testing and the UnitDebuff funtion returns the texture for the ability(like Cide told me), as Interface/Icon/Ability_Sap for example. I haven't been able to stack 5 debuffs but I thought I saw that as the limit of number of debuffs so that n as 1 refers to the first debuffs texture, so on and so forth.

Lewzephyr 01-18-05 12:48 PM

Assist anything I have targeted?
 
What is the command for me to assist any target I have... or is there one.

/assist
does not work when you have a NPC, or your pet targeted.

Basicly it goes back to the EQ days of assisting for healing people not necessairly in your group.
grab anyone as target, assit them to see who everyone is attacking, then assit again to see who the NPC/MOB is aggroed on, hence the one who will need the healing.

/assist keeps returning unknown unit

thanks for your time

Cide 01-21-05 01:48 PM

I believe it is /script AssistUnit(). This targets your target's target.

bahzeel 01-21-05 04:50 PM

Cide,

Brief note to let you know that I've got my DPS Taken mod working. I started with the DamageWatch utility (I like the way it calculates the period for reporting DPS), and bolted in the DPS Taken logic.

I'm still testing it out (dev complete, not testing complete or ready for release), but at least for straight up melee in one test - I get DPS Taken :D

I appreciate the help you provided getting me steered in the right direction!

Jugger 01-21-05 11:52 PM

Would it be at all possible to create a proggy or something that does what EQwatcher ( www.eqwatcher.com )does for EQ.. meaning a text to speech engine that speaks out what is written in chat realtime, I have been asking around some other forums, and been told that WoW dos not log the chat in real time, and that makes it almost impossible, but now a chatlogger ( http://chatlogger.infernalsoul.net/ )has been released, wouldnt it be possible to connect the text 2 speech engine to that chatlog for desired text 2 speech efffect?

so I cry out to all you uber coders out there..
And would it be legal if it is at all possible?

Can it be done??

I got so used to hearing everyhting written in EQ so its a real drag having to read it all now in WoW (lazy I dunno =p)

Sincerly...

/J

MIMP 01-26-05 11:49 AM

Minimap Mod.
 
From all the searching I've done I haven't found anyone that has done this yet, I'm still hoping that it's possible.

I'd like to see a mod where the minimap window was adjustable in size, I have the interface size scaled down. This is great for all the other functions, but I'd be willing to sacrifice screen real estate for a larger view of the minimap.

There are a number of utilities out there that allow the user to add points of interest to their map with comments etc and save them locally. I think a cool map mod would function in the same respect but instead offer vender/trainer locations, I know the Guards can often show you these things but it'd be nice to be able to pull up on the world map too, I'm still fairly new to the game and have found myself wondering where in the city a particular trainer was or even which cities I can find them in when first playing a new race. The ability to have the interface shut off all points of interest and instead show all 'cooking trainers' or all 'cloth armor' venders would rock.

It would also be awesome if someone could figure out a way to give the map more dynamic scaling options, the varying levels of detail that it offers are ok but I find myself wanting to zoom in or out farther than it goes and having more options in between the defaults would be nice. I'm not sure how much flexibility the map files actually offer in this regard, obviously having to recreate the maps would be a nightmare.

I plan on modding the UI myself but think this may be too large a project to start with...

FireFlash 01-26-05 02:34 PM

Altering existing windows
 
I know that you can hide frames and replace old functions with your own (since functions are really just variables in LUA), but how do I get around to stop an entire frame / function from loading at all, without putting my own xxx.xml/lua in the FrameXML folder (thus possibly ruining it for other mods out there).

I wanted to perhaps alter the player/party status to fit my own needs, or maybe create an entirely new minimap or something along those lines?
Also, how do scripts like MiniGroup get around to altering the party "HUD"?

BooFer 02-04-05 11:06 AM

Ok, I'm looking for the perfect Tank/ Healer interface and I think I may have found it in 2 mods. The question is can the 2 be made into 1?
I've recently used CT Pethealth Mod and Castparty Mod together.
2 things come to mind with Castparty.

1. I love Castparty look, now can I disable the regular party list on the left hand side of the screen in favor of Castparty list?

2. Can Castparty be configured to pick up the pets as party members like CT Pethealth does? Would it be possible to meld the 2 together?

I currently use a Paladin and so far I feel lke I'm working with a bandaged program. I could also see a Priest using a mod like this extensively.
I do not know how to program LUA and would like to learn but I think i'm in way over my head here!

Has this been done or could someone do it? Is it even possible?

pesto126 02-05-05 09:48 AM

Thx for the offer of help Cide.. looking for some code (or an example addon) that will take a txt file and load it into a table.. Need to load a fixed amount of data that is currently in a text file.. I guess I could just build the text file within the lua since it won't change all that often.. an advice would be helpful!

BooFer 02-06-05 07:23 AM

Quote:

Originally Posted by BooFer
Ok, I'm looking for the perfect Tank/ Healer interface and I think I may have found it in 2 mods. The question is can the 2 be made into 1?
I've recently used CT Pethealth Mod and Castparty Mod together.
2 things come to mind with Castparty.

1. I love Castparty look, now can I disable the regular party list on the left hand side of the screen in favor of Castparty list?

2. Can Castparty be configured to pick up the pets as party members like CT Pethealth does? Would it be possible to meld the 2 together?

I currently use a Paladin and so far I feel lke I'm working with a bandaged program. I could also see a Priest using a mod like this extensively.
I do not know how to program LUA and would like to learn but I think i'm in way over my head here!

Has this been done or could someone do it? Is it even possible?

I just realized that Cosmos now includes a pet monitor! How sweet is that?!
Still, I'd like to disable the regular party look in favor of Castparty's clean look & big bars!
Now I'm off to learn how to configure castparty for a paladin...

tralkar 02-06-05 03:28 PM

Anyone know how to assist your pet?? and tryed it out.. i hate all the answers and they dont work.. I have been trying to assist my pet since day one and nothing works. I tryed that one a few post back < < /script AssistUnit(). This targets your target's target.> > but still get an error. =(

aaronsullivan 02-06-05 10:37 PM

argument
 
You need to give the AssistUnit function an argument. :) Try:
/script AssistUnit("target")

aaronsullivan 02-06-05 10:40 PM

x and y postition of TARGET
 
Has anyone found a method for finding the x and y position of your target?
There is:
x,y = GetPlayerMapPosition("player")
but if you try this:
x,y = GetPlayerMapPosition("target")
you predictably get x=0 and y=0
:(
If anyone has found a way, you are :cool: ... but only if you share. :p

(I've already tried GetTargetMapPostition() and GetMapPosition() but they are nil)

tralkar 02-07-05 01:00 AM

Quote:

Originally Posted by aaronsullivan
You need to give the AssistUnit function an argument. :) Try:
/script AssistUnit("target")

Nope, another false script. only tell me one if you tryed it........i hate trying things that fail and ppl didnt try them, them selfs

Cairenn 02-07-05 01:29 AM

Did you try:

/script AssistUnit("pet")

aaronsullivan 02-07-05 07:26 AM

Quote:

Originally Posted by tralkar
Nope, another false script. only tell me one if you tryed it........i hate trying things that fail and ppl didnt try them, them selfs

Um... I'm sorry but you are mistaken. Try again.
I don't like it when people don't try it first either, but I did.
Make sure you target your pet first, and use the same caps, etc.

/script AssistUnit("pet") is better in this case (and also works) because you don't have to target your pet first. The method I gave lets you assist ANYONE you have targeted.

BTW, there hasn't been a "false" script yet. Just not as specific as you wanted. Perhaps because there are coders on here, they are just assuming that people know about arguments and are just giving a pointer in the right direction that any other coder would be able to utilize.

Too much shorthand, that's all.

aaronsullivan 02-07-05 08:22 AM

Along with my above question about finding a target's x and y position, I was wondering if there is a way to extract the info between "<>"'s under npc's names.

For instance, can I get the <food and drink> information under a merchants name. I didn't see anything in the cosmos:BlizzardCommands.xml, but I might have missed something.

Is this information ever logged anywhere? (chat, combat) I don't think it is.

Thanks for any assistance.

tralkar 02-07-05 01:03 PM

ok im giving up theres no assisting the pet.. and by the way heres what the error said when i tryed Cairenn's.

[string "assistunit("pet")"]:1: attempt to call Global assistunit'(a nil value)

aaronsullivan 02-07-05 01:13 PM

AHA! I think your problem is solved! Good that you gave detailed feedback.

The error (probably all along) is that you are typing it wrong. This is why I suggested you "use the same caps, etc."

In other words:
In programming and scripting "assistunit" does NOT equal "AssistUnit"
Notice the capital 'A' and the capital 'U' in the function name. It's called case sensitivity. The error is telling you that there is no function called "assistunit" because the script only recognizes the one with the caps on the A and the U.

So, try again with the capital letters in the right place. Of course, once you have it working just slap it into a macro button, and you won't have to type it again. :)

I genuinely hope that helps you out. :D

Anyone have any help for me and my two questions? :confused:

tralkar 02-07-05 01:53 PM

ok, Do i feel like an a$$. I did'nt but the capital U in /bonkself, meny meny times over.. Thanks for the help, from now on ill type it how i see it. lol

aaronsullivan 02-07-05 04:16 PM

One question answered
 
Well, I figured out how to get the second line of info from an npc.

You use the GetTooltipText2:something or other. (Don't have the code in front of me) Basically you can't get it from the target info any way I know of, but you CAN get it from the current tooltip text. Generally, the last tooltip someone is going to get before clicking on a target is going to be the tooltip for the target itself, so it's easy to match up the info.

Anyway, it's just what I needed. I can give more details if anyone is interested.

I still don't have a way to get a target's position, but I've noticed that AddOn's you might expect would get a target's position use the player's position instead, which is the method I'm already using.

Still, if anyone knows of a way, I'm interested. Seems like a harmless hook for Blizzard to add.

Cide 02-07-05 05:32 PM

They removed that because of TargetDistance mods, aaronsullivan. If you want to check if the npc you're interacting with is the same NPC as the player you just hovered over, use:

Code:

if ( UnitIsUnit("npc", "mouseover") ) then

aaronsullivan 02-07-05 05:46 PM

Thanks, I didn't know about that issue with the distances. That's a bummer. How exactly was the target distance mod exploitive?

Still, it's good to know that it won't be coming, so I'll just go without it.

No problems with the tooltip and target data being connected.

Thanks again for the response.

Txzeenath 11-16-06 03:25 PM

I was curious as to if there is a way to open the trainer UI via a script of some sort. I want to make a custom way to open the trainer window, but I can't seem to find how to open it. :confused: I've tried opening the UI itself, but it doesn't retrieve the listing of skills.

(the trainers i'm referring to are class trainers)


All times are GMT -6. The time now is 11:12 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI