Macro issue

Share your guides, how-tos, FAQs, and so forth. This is not for support -- post questions in General Discussion.
Post Reply
wangmerc
Posts: 43

Macro issue

Post by wangmerc »

Hello there. Could anyone tell me how to add more mods except this two while sorting crafted items? I also want to save jewels with Enhance Potions or Damage Increase, but "if @property" could works only with 2 mods. I've tried "else if" but its doesn't work that way. Thanks.
// Start loop searching for a ring on backpack
while @findtype 0x1086 'any' 'backpack'
// Ring found, check for a desired property
if @property 'Faster Cast Recovery' 'found' >= 2 or @property 'Hit Chance Increase' 'found' >= 5
sysmsg 'Valid, move to pouch!'
moveitem! 'found' 'pouch'
else
sysmsg 'Invalid, move to trash!'
moveitem! 'found' 'trash'
endif
pause 1000
endwhile
User avatar
MB
Posts: 379

Re: Macro issue

Post by MB »

if @property 'Faster Cast Recovery' 'found' >= 2 or @property 'Hit Chance Increase' 'found' >= 5
sysmsg 'Valid, move to pouch!'
moveitem! 'found' 'pouch'
elseif @property 'Damage Increase' 'found' >= 10 or @property 'Enhance Potions' 'found' >= 10
sysmsg 'Valid, move to pouch!'
moveitem! 'found' 'pouch'
else
sysmsg 'Invalid, move to trash!'
moveitem! 'found' 'trash'
endif
pause 1000
endwhile
wangmerc likes this.
Top
gonthrax
Posts: 254

Re: Macro issue

Post by gonthrax »

Elseif does work that way. MB's script will save items with any 1 of the 4 specified mods.

If you want to save things with ALL 3 of specified mods, nest another if below.

If @property1 found AND property2 found
if property3 found
moveitem
endif
else
trash
endif
wangmerc likes this.
Top
Lobo
Posts: 285
Location: Spain

Re: Macro issue

Post by Lobo »

@findtype XXXXX' 'any' 'backpack'
waitforproperties 'found' 5000
if @property 'Hit Lower Defense' > 37 'found' and @property 'Hit Lightning' 'found' > 37
moveitem 'found' 'HighEndBag'
ignoreobject 'found'
clearjournal
pause 600
else
@findtype 'XXXXX' 'any' 'backpack'
moveitem 'found' 'TrashBag'
pause 200
@ignoreobject 'found'
endif


this is a part of my runic burning script, is like u get the exact props.
wangmerc likes this.
Top
Post Reply