Page 1 of 2
more questions...
Posted: Sat Aug 14, 2004 1:18 pm
by board_lurker_01
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.
Posted: Sat Aug 14, 2004 1:54 pm
by aChallenged1
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.
Posted: Sat Aug 14, 2004 2:08 pm
by Cr4zyb4rd
${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
Posted: Sat Aug 14, 2004 2:16 pm
by aChallenged1
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?
Posted: Sat Aug 14, 2004 2:27 pm
by Night Hawk
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.
Posted: Sat Aug 14, 2004 2:38 pm
by board_lurker_01
You guys rawk, thanks!
Where do you find the info, or have you just reversed engineered more stuff than I have?
Posted: Sat Aug 14, 2004 2:40 pm
by aChallenged1
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.
Posted: Sat Aug 14, 2004 8:41 pm
by Cr4zyb4rd
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.
Posted: Sat Aug 14, 2004 9:05 pm
by blueninja
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}.
Posted: Sun Aug 15, 2004 12:04 am
by Cr4zyb4rd
Hey, I was close. :)
Posted: Sun Aug 15, 2004 6:34 am
by board_lurker_01
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.
Posted: Sun Aug 15, 2004 8:39 am
by Cr4zyb4rd
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 }
Posted: Mon Aug 16, 2004 2:39 pm
by blueninja
Cr4zyb4rd wrote:Hey, I was close. :)
You were right.. And wrong at the same time.. Quite an accomplishment :) ..
Posted: Mon Aug 16, 2004 3:01 pm
by blueninja
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 :).
Posted: Mon Aug 16, 2004 3:21 pm
by Chill
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"