more questions...

Forum for posting custom UIs, portions of UIs, and HUD stuff using MQ's enhancements.

Moderator: MacroQuest Developers

board_lurker_01
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sun Jul 25, 2004 7:06 am

more questions...

Post by board_lurker_01 » Sat Aug 14, 2004 1:18 pm

Is there any way of determining if an item in the buffcollection happens to be detrimental instead of good?

(other than enumerating every know dot/debuff/ae in the game and comparing names, cause that would suck). I just wanna know if its good or bad, and ill figure something out from there.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Aug 14, 2004 1:54 pm

Each icon is attached to a certain group of spells. Find the spell numbers for all the debuffs that can be landed on a PC and you could make it work with an /if statement, possibly.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sat Aug 14, 2004 2:08 pm

${Me.Buff[1].SpellType} should do it for you, if not use
${Spell[${Me.Buff[1].ID}.SpellType}

should return:
Beneficial(Group), Beneficial, Detrimental, Unknown

not 100%, but it's a start

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Aug 14, 2004 2:16 pm

So you should be able to do something like

Pseudocode

Code: Select all

/if (${Spell[${Me.Buff[1].ID}.SpellType} ! clear) ${Me.Buff[1].ID}
as an example?
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Sat Aug 14, 2004 2:27 pm

I think he's just trying to get at making the good (beneficial) spells show one color and the bad (detrimental) spells show another color.

board_lurker_01
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sun Jul 25, 2004 7:06 am

Post by board_lurker_01 » Sat Aug 14, 2004 2:38 pm

You guys rawk, thanks!

Where do you find the info, or have you just reversed engineered more stuff than I have?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Aug 14, 2004 2:40 pm

Much of it in the manual, though I sometimes don't quite understand it.
There is a search on the 2nd tab of the manual (Readme.chm) and it does pretty good.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sat Aug 14, 2004 8:41 pm

Aye, seems I spend about 3 hours a day reading the FM, and I still feel like I'm flailing about. Also the forum search rairly fails to turn up at least a few hints.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Sat Aug 14, 2004 9:05 pm

Cr4zyb4rd wrote:${Me.Buff[1].SpellType} should do it for you, if not use
${Spell[${Me.Buff[1].ID}.SpellType}
The first one is the correct one. ${Me.Buff[].ID} returns the buff slot number not the spell ID so the second one won't work. The datatype buff inherits spell but that particular member is overridden, which might be a bit confusing. If you want the spell ID use ${Me.Buff[].Spell.ID}.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sun Aug 15, 2004 12:04 am

Hey, I was close. :)

board_lurker_01
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sun Jul 25, 2004 7:06 am

Post by board_lurker_01 » Sun Aug 15, 2004 6:34 am

More help =/

Cant get string comparisons to work....I dont understand the syntax fully, i know its sad.
/if (${String[${Param1].NotEqual[${Me.Name}]})
is from the manual on string comparisons.

so

/if ( ${String[Beneficial].Equal[${Me.Buff[1].SpellType}]} ) { do something here }

Did I totally misunderstand this? Im totally stuck.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sun Aug 15, 2004 8:39 am

Um, that should work I think, but as SpellType is already a string go the other way and do

Code: Select all

/if (${Me.Buff[1].SpellType.Equal[Beneficial]}) { stuff } 

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Mon Aug 16, 2004 2:39 pm

Cr4zyb4rd wrote:Hey, I was close. :)
You were right.. And wrong at the same time.. Quite an accomplishment :) ..

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Mon Aug 16, 2004 3:01 pm

board_lurker_01 wrote:Cant get string comparisons to work....I dont understand the syntax fully, i know its sad.
That's a typo in the example you quoted, it needs an end brace after ${Param1. I notified wassup who writes the manual. However, the code you posted looks ok, one thing that might cause a problem there is that you have spaces in the beginning and end of your condition, /if ( ${} ) should be /if (${}). The parser can be a little stingy about that kind of stuff sometimes.

Anyway, what Cr4zyb4rd posted is still a better way of doing it so go with that, just figured I would elaborate a little on it :).

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

Post by Chill » Mon Aug 16, 2004 3:21 pm

Cr4zyb4rd wrote:

Code: Select all

/if (${Me.Buff[1].SpellType.Equal[Beneficial]}) { stuff } 
Close, but assuming you were right with the 4 return values I would actually go the other way and use:

Code: Select all

/if (!${Me.Buff[1].SpellType.Equal[Detrimental]}) { stuff } 
if you want to include "Unknown" in with beneficials
or

Code: Select all

/if (${Me.Buff[1].SpellType.Find[Beneficial]}) { stuff } 
to catch just: "Beneficial(Group)" and "Beneficial"