c0d3r
Traveler
We've made a house for our guild in order to sort, evaluate and properly store items, I decided to share the macro and configuration in case someone is interested...
Disclaimer
It takes a while to setup, but once it is done you'll not have to worry about organizing items anymore.
Requirements
- 46 wooden chests (I recommend using different colors setup like: frostwood, heartwood, bloodwood, yew, ash... or just dye later using a furniture dye tub)
- 46 wooden container engraving tool
- 10 regular backpacks (buy on a provisioner npc)
- 10 goza mats (craft with tailoring)
- 1 "sample piece" of the following items:
|- tunic: do, tunic
|- leggings: suneate, haidate, leggings
|- sleeves: hiro sode, sleeves
|- gloves: ninja mitts, gloves
|- gorget: mempo, gorget
|- helm: cap, jingasa
|- brac: gold bracelet, silver bracelet
|- ring: gold ring, silver ring
|- melee: viking sword, broadsword, bone harvester, katana, kryss, mace, war axe, double axe, cleaver, hammer pick, quarter staff, gnarled staff, black staff
|- ranged: bow, composite bow, crossbow, repeating crossbow, heavy crossbow, yumi, magical shortbow
Steps
- Rename wooden chests with engraving tool, use the following names for each chest (copy and paste):
- Secure the chests as groups (leggings, sleeves, tunic, bracelet, ring, etc)
- For each group put a goza mat in front of it and secure a backpack that will be our "limbo" container (a container where items the macro cannot evaluate or consider weak will be placed).
- On top of each goza mat lock the "sample pieces" for that group
- Check the setup image sample below
Macro
Setup and Notes
- Between lines 5 - 14 you must configure your house z levels, just stay on each house floor and use object inspector or say -where in game to get z value
- Name the chests and setup exactly as described above, goza mat is optional
- You can add new items to the groups, just secure the sample piece in front of the chests and edit the macro where it populate the group lists with item graphics
- Between lines 20 - 27 you can configure armors, weapons and jewels minimum "score"
- Between lines 226 - 339 you can edit properties minimum value to be counted as a "score"
Once configuration is done just put all the items you want to evaluate/organize inside of a container, stay in front of a group of chests (on top of the goza mat with sample pieces), play the macro and target the container.
How does it work?
It will scan item properties, if the item has a property and that property has a minimum value it will add a point to that item's "score"; if that item has a minimum amount of score points it will be considered a good item and moved to the chest it belongs, otherwise it goes to the limbo backpack of that item group.
Disclaimer
It takes a while to setup, but once it is done you'll not have to worry about organizing items anymore.
Requirements
- 46 wooden chests (I recommend using different colors setup like: frostwood, heartwood, bloodwood, yew, ash... or just dye later using a furniture dye tub)
- 46 wooden container engraving tool
- 10 regular backpacks (buy on a provisioner npc)
- 10 goza mats (craft with tailoring)
- 1 "sample piece" of the following items:
|- tunic: do, tunic
|- leggings: suneate, haidate, leggings
|- sleeves: hiro sode, sleeves
|- gloves: ninja mitts, gloves
|- gorget: mempo, gorget
|- helm: cap, jingasa
|- brac: gold bracelet, silver bracelet
|- ring: gold ring, silver ring
|- melee: viking sword, broadsword, bone harvester, katana, kryss, mace, war axe, double axe, cleaver, hammer pick, quarter staff, gnarled staff, black staff
|- ranged: bow, composite bow, crossbow, repeating crossbow, heavy crossbow, yumi, magical shortbow
Steps
- Rename wooden chests with engraving tool, use the following names for each chest (copy and paste):
Tunic: Lower Reagent Cost
Tunic: Lower Mana Cost
Tunic: Hit Point Increase - Mana Increase - Stamina Increase
Tunic: Luck
Tunic: Mana Regeneration
Leggings: Lower Reagent Cost
Leggings: Lower Mana Cost
Leggings: Hit Point Increase - Mana Increase - Stamina Increase
Leggings: Luck
Leggings: Mana Regeneration
Sleeves: Lower Reagent Cost
Sleeves: Lower Mana Cost
Sleeves: Hit Point Increase - Mana Increase - Stamina Increase
Sleeves: Luck
Sleeves: Mana Regeneration
Gloves: Lower Reagent Cost
Gloves: Lower Mana Cost
Gloves: Hit Point Increase - Mana Increase - Stamina Increase
Gloves: Luck
Gloves: Mana Regeneration
Gorget: Lower Reagent Cost
Gorget: Lower Mana Cost
Gorget: Hit Point Increase - Mana Increase - Stamina Increase
Gorget: Luck
Gorget: Mana Regeneration
Helm: Lower Reagent Cost
Helm: Lower Mana Cost
Helm: Hit Point Increase - Mana Increase - Stamina Increase
Helm: Luck
Helm: Mana Regeneration
Ring: Lower Reagent Cost - Spell Damage
Ring: Hit - Defense - Damage Increase - Enhance
Ring: Faster Casting - Faster Cast Recovery
Ring: Luck
Brac: Lower Reagent Cost - Spell Damage
Brac: Hit - Defense - Damage Increase - Enhance
Brac: Faster Casting - Faster Cast Recovery
Brac: Luck
Melee: Spell Channeling
Melee: Lower Defense - Lower Attack - Leech
Melee: Fireball - Lightning - Harm - Magic Arrow
Melee: Slayer
Ranged: Spell Channeling
Ranged: Lower Defense - Lower Attack - Leech
Ranged: Fireball - Lightning - Harm - Magic Arrow - Velocity
Ranged: Slayer
Tunic: Lower Mana Cost
Tunic: Hit Point Increase - Mana Increase - Stamina Increase
Tunic: Luck
Tunic: Mana Regeneration
Leggings: Lower Reagent Cost
Leggings: Lower Mana Cost
Leggings: Hit Point Increase - Mana Increase - Stamina Increase
Leggings: Luck
Leggings: Mana Regeneration
Sleeves: Lower Reagent Cost
Sleeves: Lower Mana Cost
Sleeves: Hit Point Increase - Mana Increase - Stamina Increase
Sleeves: Luck
Sleeves: Mana Regeneration
Gloves: Lower Reagent Cost
Gloves: Lower Mana Cost
Gloves: Hit Point Increase - Mana Increase - Stamina Increase
Gloves: Luck
Gloves: Mana Regeneration
Gorget: Lower Reagent Cost
Gorget: Lower Mana Cost
Gorget: Hit Point Increase - Mana Increase - Stamina Increase
Gorget: Luck
Gorget: Mana Regeneration
Helm: Lower Reagent Cost
Helm: Lower Mana Cost
Helm: Hit Point Increase - Mana Increase - Stamina Increase
Helm: Luck
Helm: Mana Regeneration
Ring: Lower Reagent Cost - Spell Damage
Ring: Hit - Defense - Damage Increase - Enhance
Ring: Faster Casting - Faster Cast Recovery
Ring: Luck
Brac: Lower Reagent Cost - Spell Damage
Brac: Hit - Defense - Damage Increase - Enhance
Brac: Faster Casting - Faster Cast Recovery
Brac: Luck
Melee: Spell Channeling
Melee: Lower Defense - Lower Attack - Leech
Melee: Fireball - Lightning - Harm - Magic Arrow
Melee: Slayer
Ranged: Spell Channeling
Ranged: Lower Defense - Lower Attack - Leech
Ranged: Fireball - Lightning - Harm - Magic Arrow - Velocity
Ranged: Slayer
- For each group put a goza mat in front of it and secure a backpack that will be our "limbo" container (a container where items the macro cannot evaluate or consider weak will be placed).
- On top of each goza mat lock the "sample pieces" for that group
- Check the setup image sample below
Macro
Code:
// Author: c0d3r
// Description: items evaluator and organizer, it will check for property values and put items inside the chest it belongs
// Configuration: Begin
@removelist 'z'
if createlist 'z'
// 1 floor
pushlist 'z' 7
// 2 floor
pushlist 'z' 27
// 3 floor
pushlist 'z' 47
// 4 floor
pushlist 'z' 67
endif
if list 'z' > 4
sysmsg 'House should not have more than 4 floors!' 25
stop
endif
@removelist 'config'
if createlist 'config'
// Minimum jewels score
pushlist 'config' 2
// Minimum armors score
pushlist 'config' 3
// Minimum weapons score
pushlist 'config' 3
endif
// Configuration: End
// Lists
@removelist 'jewels'
if createlist 'jewels'
// Ring
pushlist 'jewels' 0x108a
pushlist 'jewels' 0x1f09
// Bracelet
pushlist 'jewels' 0x1086
pushlist 'jewels' 0x1f06
endif
@removelist 'armors'
if createlist 'armors'
// Tunic
pushlist 'armors' 0x13cc
pushlist 'armors' 0x27c6
// Leggings
pushlist 'armors' 0x13cb
pushlist 'armors' 0x2786
pushlist 'armors' 0x278a
// Sleeves
pushlist 'armors' 0x13cd
pushlist 'armors' 0x277e
// Gloves
pushlist 'armors' 0x13c6
pushlist 'armors' 0x2792
// Gorget
pushlist 'armors' 0x13c7
pushlist 'armors' 0x277a
// Cap
pushlist 'armors' 0x1db9
pushlist 'armors' 0x2776
endif
@removelist 'weapons'
if createlist 'weapons'
// Viking Sword
pushlist 'weapons' 0x13b9
// Broadsword
pushlist 'weapons' 0xf5e
// Bone Harvester
pushlist 'weapons' 0x26bb
// Katana
pushlist 'weapons' 0x13ff
// Kryss
pushlist 'weapons' 0x1401
// Mace
pushlist 'weapons' 0xf5c
// War Axe
pushlist 'weapons' 0x13b0
// Double Axe
pushlist 'weapons' 0xf4b
// Cleaver
pushlist 'weapons' 0xec3
// Hammer Pick
pushlist 'weapons' 0x143d
// Quarter Staff
pushlist 'weapons' 0xe89
// Gnarled Staff
pushlist 'weapons' 0x13f8
// Black Staff
pushlist 'weapons' 0xdf0
// Bow
pushlist 'weapons' 0x13b2
// Composite Bow
pushlist 'weapons' 0x26c2
// Crossbow
pushlist 'weapons' 0xf50
// Repeating Crossbow
pushlist 'weapons' 0x26c3
// Heavy Crossbow
pushlist 'weapons' 0x13fd
// Yumi
pushlist 'weapons' 0x27a5
// Magical Shortbow
pushlist 'weapons' 0x2d2b
endif
@removelist 'items'
if createlist 'items'
for 0 to 'jewels'
pushlist 'items' 'jewels[]'
endfor
for 0 to 'armors'
pushlist 'items' 'armors[]'
endfor
for 0 to 'weapons'
pushlist 'items' 'weapons[]'
endfor
endif
@removelist 'properties'
if createlist 'properties'
pushlist 'properties' 'slayer'
pushlist 'properties' 'spell channeling'
pushlist 'properties' 'balanced'
pushlist 'properties' 'fireball'
pushlist 'properties' 'lightning'
pushlist 'properties' 'harm'
pushlist 'properties' 'magic arrow'
pushlist 'properties' 'velocity'
pushlist 'properties' 'swing speed'
pushlist 'properties' 'lower defense'
pushlist 'properties' 'lower attack'
pushlist 'properties' 'leech'
pushlist 'properties' 'luck'
pushlist 'properties' 'faster cast recovery'
pushlist 'properties' 'faster casting'
pushlist 'properties' 'lower reagent cost'
pushlist 'properties' 'mana regeneration'
pushlist 'properties' 'lower mana cost'
pushlist 'properties' 'hit point increase'
pushlist 'properties' 'mana increase'
pushlist 'properties' 'stamina increase'
pushlist 'properties' 'physical resist'
pushlist 'properties' 'fire resist'
pushlist 'properties' 'cold resist'
pushlist 'properties' 'poison resist'
pushlist 'properties' 'energy resist'
pushlist 'properties' 'strength bonus'
pushlist 'properties' 'dexterity bonus'
pushlist 'properties' 'intelligence bonus'
pushlist 'properties' 'defense chance'
pushlist 'properties' 'hit chance'
pushlist 'properties' 'spell damage'
pushlist 'properties' 'damage increase'
pushlist 'properties' 'enhance'
endif
if not listexists 'values'
createlist 'values'
endif
if not listexists 'chests'
createlist 'chests'
endif
if not listexists 'score'
createlist 'score'
endif
clearignorelist
// Main
headmsg '* Begin *' 88
promptalias 'source container'
waitforcontents 'source container' 15000
// Find chests
@clearlist 'chests'
while @findtype 0xe43 'any' 'ground' 1 1 or @findtype 0xe42 'any' 'ground' 1 1
ignoreobject 'found'
if z == 'z[0]'
if z 'found' >= 'z[1]'
continue
endif
elseif z == 'z[1]'
if z 'found' >= 'z[2]' or z 'found' < 'z[1]'
continue
endif
elseif z == 'z[2]'
if z 'found' >= 'z[3]' or z 'found' < 'z[2]'
continue
endif
elseif z 'found' < 'z[3]'
continue
endif
pushlist! 'chests' 'found'
endwhile
if list 'chests' == 0
sysmsg 'Chests not found!' 25
stop
endif
// Evaluate items
for 0 to 'items'
if not @findtype 'items[]' 'any' 'ground' 1 0
continue
endif
if z == 'z[0]'
if z 'found' >= 'z[1]'
continue
endif
elseif z == 'z[1]'
if z 'found' >= 'z[2]' or z 'found' < 'z[1]'
continue
endif
elseif z == 'z[2]'
if z 'found' >= 'z[3]' or z 'found' < 'z[2]'
continue
endif
elseif z 'found' < 'z[3]'
continue
endif
while @findtype 'items[]' 'any' 'source container'
@clearlist 'score'
@setalias 'item' 'found'
waitforproperties 'item' 15000
// Check item type: jewel, armor or weapon
@unsetalias 'jewel'
for 0 to 'jewels'
if @graphic 'found' == 'jewels[]'
@setalias 'jewel' 'item'
break
endif
endfor
// Define minimum property values base on item type
@clearlist 'values'
if @findalias 'jewel'
pushlist 'values' 0 // slayer
pushlist 'values' 0 // spell channeling
pushlist 'values' 0 // balanced
pushlist 'values' 0 // hit fireball
pushlist 'values' 0 // hit lightning
pushlist 'values' 0 // hit harm
pushlist 'values' 0 // hit magic arrow
pushlist 'values' 0 // velocity
pushlist 'values' 0 // swing speed
pushlist 'values' 0 // hit lower defense
pushlist 'values' 0 // hit lower attack
pushlist 'values' 0 // hit life, mana and stamina leech
pushlist 'values' 70 // luck
pushlist 'values' 2 // faster cast recovery
pushlist 'values' 1 // faster casting
pushlist 'values' 8 // lower reagent cost
pushlist 'values' 0 // mana regeneration
pushlist 'values' 3 // lower mana cost
pushlist 'values' 0 // hit point increase
pushlist 'values' 0 // mana increase
pushlist 'values' 0 // stamina increase
pushlist 'values' 5 // physical resist
pushlist 'values' 5 // fire resist
pushlist 'values' 5 // cold resist
pushlist 'values' 5 // poison resist
pushlist 'values' 5 // energy
pushlist 'values' 3 // strength bonus
pushlist 'values' 3 // dexterity bonus
pushlist 'values' 3 // intelligence bonus
pushlist 'values' 8 // defense chance increase
pushlist 'values' 8 // hit chance increase
pushlist 'values' 6 // spell damage increase
pushlist 'values' 15 // damage increase
pushlist 'values' 15 // enhance potions
else
@unsetalias 'armor'
for 0 to 'armors'
if @graphic 'found' == 'armors[]'
@setalias 'armor' 'item'
break
endif
endfor
if @findalias 'armor'
pushlist 'values' 0 // slayer
pushlist 'values' 0 // spell channeling
pushlist 'values' 0 // balanced
pushlist 'values' 0 // hit fireball
pushlist 'values' 0 // hit lightning
pushlist 'values' 0 // hit harm
pushlist 'values' 0 // hit magic arrow
pushlist 'values' 0 // velocity
pushlist 'values' 0 // swing speed
pushlist 'values' 0 // hit lower defense
pushlist 'values' 0 // hit lower attack
pushlist 'values' 0 // hit life, mana and stamina leech
pushlist 'values' 100 // luck
pushlist 'values' 0 // faster cast recovery
pushlist 'values' 0 // faster casting
pushlist 'values' 11 // lower reagent cost
pushlist 'values' 2 // mana regeneration
pushlist 'values' 5 // lower mana cost
pushlist 'values' 3 // hit point increase
pushlist 'values' 3 // mana increase
pushlist 'values' 3 // stamina increase
pushlist 'values' 15 // physical resist
pushlist 'values' 15 // fire resist
pushlist 'values' 15 // cold resist
pushlist 'values' 15 // poison resist
pushlist 'values' 15 // energy resist
pushlist 'values' 0 // strength bonus
pushlist 'values' 0 // dexterity bonus
pushlist 'values' 0 // intelligence bonus
pushlist 'values' 0 // defense chance increase
pushlist 'values' 0 // hit chance increase
pushlist 'values' 0 // spell damage increase
pushlist 'values' 0 // damage increase
pushlist 'values' 0 // enhance potions
else // weapon
pushlist 'values' 'self' // slayer
pushlist 'values' 'self' // spell channeling
pushlist 'values' 'self' // balanced
pushlist 'values' 28 // hit fireball
pushlist 'values' 28 // hit lightning
pushlist 'values' 28 // hit harm
pushlist 'values' 28 // hit magic arrow
pushlist 'values' 28 // velocity
pushlist 'values' 20 // swing speed
pushlist 'values' 28 // hit lower defense
pushlist 'values' 28 // hit lower attack
pushlist 'values' 28 // hit life, mana and stamina leech
pushlist 'values' 110 // luck
pushlist 'values' 0 // faster cast recovery
pushlist 'values' 'self' // faster casting
pushlist 'values' 0 // lower reagent cost
pushlist 'values' 0 // mana regeneration
pushlist 'values' 0 // lower mana cost
pushlist 'values' 0 // hit point increase
pushlist 'values' 0 // mana increase
pushlist 'values' 0 // stamina increase
pushlist 'values' 8 // physical resist
pushlist 'values' 8 // fire resist
pushlist 'values' 8 // cold resist
pushlist 'values' 8 // poison resist
pushlist 'values' 8 // energy resist
pushlist 'values' 0 // strength bonus
pushlist 'values' 0 // dexterity bonus
pushlist 'values' 0 // intelligence bonus
pushlist 'values' 8 // defense chance increase
pushlist 'values' 8 // hit chance increase
pushlist 'values' 0 // spell damage increase
pushlist 'values' 30 // damage increase
pushlist 'values' 0 // enhance potions
endif
endif
// Check properties and values
for 0 to 'properties'
if @serial == 'values[0]' and @property 'properties[]' 'item'
pushlist 'score' 'properties[]'
elseif @property 'properties[]' 'item' >= 'values[0]'
pushlist 'score' 'properties[]'
endif
poplist 'values' 'front'
endfor
@unsetalias 'store'
if @findalias 'jewel'
if list 'score' >= 'config[0]'
@setalias 'store' 'item'
endif
elseif @findalias 'armor'
if list 'score' >= 'config[1]'
@setalias 'store' 'item'
endif
elseif list 'score' >= 'config[2]'
@setalias 'store' 'item'
endif
// Only items with a minimum of 3 useful properties should be stored
@unsetalias 'container'
if @findalias 'store'
for 0 to 'score'
for 0 to 'chests'
// Find most appropriate chest to store item
if @property 'score[]' 'chests[]'
@setalias 'container' 'chests[]'
break
endif
endfor
if @findalias 'container'
break
endif
endfor
if @findalias 'container'
if @moveitem 'item' 'container'
headmsg '* Store *' 78
pause 1000
endif
endif
endif
// Move to limbo in case item doesnt fit any chest or criteria
if @findobject 'item' 'any' 'backpack'
// Find limbo backpack
clearignorelist
@unsetalias 'limbo'
while @findtype 0xe75 'any' 'ground' 1 1 or @findtype 0xe76 'any' 'ground' 1 1
ignoreobject 'found'
if z == 'z[0]'
if z 'found' >= 'z[1]'
continue
endif
elseif z == 'z[1]'
if z 'found' >= 'z[2]' or z 'found' < 'z[1]'
continue
endif
elseif z == 'z[2]'
if z 'found' >= 'z[3]' or z 'found' < 'z[2]'
continue
endif
elseif z 'found' < 'z[3]'
continue
endif
waitforproperties 'found' 15000
if @property 'contents' 'found' == 125
continue
endif
@setalias 'limbo' 'found'
break
endwhile
if not @findalias 'limbo'
sysmsg 'Limbo backpack not found!' 25
stop
endif
if @moveitem 'item' 'limbo'
headmsg '* Limbo *' 35
pause 1000
endif
endif
endwhile
endfor
headmsg '* End *' 88
Setup and Notes
- Between lines 5 - 14 you must configure your house z levels, just stay on each house floor and use object inspector or say -where in game to get z value
- Name the chests and setup exactly as described above, goza mat is optional
- You can add new items to the groups, just secure the sample piece in front of the chests and edit the macro where it populate the group lists with item graphics
- Between lines 20 - 27 you can configure armors, weapons and jewels minimum "score"
- Between lines 226 - 339 you can edit properties minimum value to be counted as a "score"
Once configuration is done just put all the items you want to evaluate/organize inside of a container, stay in front of a group of chests (on top of the goza mat with sample pieces), play the macro and target the container.
How does it work?
It will scan item properties, if the item has a property and that property has a minimum value it will add a point to that item's "score"; if that item has a minimum amount of score points it will be considered a good item and moved to the chest it belongs, otherwise it goes to the limbo backpack of that item group.
Last edited: