What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

logic="Or" attribute on rules

CCCComboBreaker

New Member
Joined
Jun 25, 2012
Messages
56
Reaction score
0
Now supports logic="Or" attribute on rules. This allows you to simplify your rules. See the forums for a better explanation.

any example please?

I want to do a thing like this:
Code:
<ItemRule itemBaseType="Armor">
	<StatRules>
		<Rule stat="Quality" value="Rare4" />
		<Rule stat="Strength" minValue="120" />
		<Rule stat="Vitality" minValue="100" />
	</StatRules>
</ItemRule>
<ItemRule itemBaseType="Armor">
	<StatRules>
		<Rule stat="Quality" value="Rare4" />
		<Rule stat="Dexterity" minValue="120" />
		<Rule stat="Vitality" minValue="100" />
	</StatRules>
</ItemRule>
<ItemRule itemBaseType="Armor">
	<StatRules>
		<Rule stat="Quality" value="Rare4" />
		<Rule stat="Intelligence" minValue="120" />
		<Rule stat="Vitality" minValue="100" />
	</StatRules>
</ItemRule>

and doing it like:
Code:
<ItemRule itemBaseType="Armor">
	<StatRules>
		<Rule stat="Quality" value="Rare4" />
		<Rule stat="Strength" [COLOR="#FF0000"]OR[/COLOR] "Dexterity" [COLOR="#FF0000"]OR[/COLOR] "Intelligence" minValue="120" />
		<Rule stat="Vitality" minValue="100" />
	</StatRules>
</ItemRule>


thanks in advance
 
<ItemRule itemBaseType="Armor">
<StatRules>
<Rule stat="Quality" value="Rare4" />
<Rule stat="Strength" minValue="120" logic="or" />
<Rule stat="Dexterity" minValue="120" logic="or" />
<Rule stat="Intelligence" minValue="120" logic="or" />
<Rule stat="Vitality" minValue="100" />
</StatRules>
</ItemRule>


I think it works like this
 
logic="or" is a pretty good tool I write mine similar to Auxilium.
Say you want t keep every piece of armor that has a socket and vitality, but you all so take anything with a socket that has dexterity and strength.
Instead of writing:
<ItemRule itemBaseType="Armor">
<StatRules>
<Rule stat="Quality" value="Magic1" />
<Rule stat="Socket" minValue="1" />
<Rule stat="Vitality" minValue="100"/>
</StatRules>
</ItemRule>

and

<ItemRule itemBaseType="Armor">
<StatRules>
<Rule stat="Quality" value="Magic1" />
<Rule stat="Socket" minValue="1" />
<Rule stat="Dexterity" minValue="100"/>
</StatRules>
</ItemRule>

the Logic"or" allows you to simplify both of those into one code like what Auxilium shows:

<ItemRule itemBaseType="Armor">
<StatRules>
<Rule stat="Quality" value="Magic1" />
<Rule stat="Socket" minValue="1" />
<Rule stat="Dexterity" minValue="100" logic="Or" />
<Rule stat="Vitality" minValue="100" />
</StatRules>
</ItemRule>

Btw Auxilum You did a great example was just showing another one.
 
and what if i want item that have:
GF or MF
and
dex or str or int??
 
and what if i want item that have:
GF or MF
and
dex or str or int??

If I'm not mistaken:

<ItemRule itemBaseType="Armor">
<StatRules>
<Rule stat="Quality" value="Magic1" />
<Rule stat="GoldFind" minValue="1" logic="Or" />
<Rule stat="MagicFind" minValue="1" />
<Rule stat="Strength"minValue="90" logic="Or" />
<Rule stat="Intelligence" minValue="90" logic="Or" />
<Rule stat="Dexterity" minValue="90" />
</StatRules>
</ItemRule>

Magic+ AND (GF or MF) AND (Str or int or dex)
 
Last edited:
What line that parameter logic="Or" appends to? To the next line?

For example, is there wrong usage which causes "or" logic to select between some stats like dex and item Quality?

<ItemRule ruleType="Keep" itemType="Legs">
<StatRules>
<Rule stat="Strength" minValue="130" logic="Or" />
<Rule stat="Intelligence" minValue="130" logic="Or" />
<Rule stat="Dexterity" minValue="130" logic="Or" />
<Rule stat="Quality" value="Rare4" />
<Rule stat="Vitality" minValue="80" />
<Rule stat="MagicFind" minValue="18" />
<Rule stat="Sockets" minValue="2"/>
</StatRules>
</ItemRule>
 
Back
Top