Item Filters: Difference between revisions

Jump to navigation Jump to search
1,322 bytes added ,  04:26, 5 November 2022
→�: - updated for examples
(slash commands :()
(→�: - updated for examples)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Item filters can be used to reduce the size of a list of items. Current commands that support them are <code>/items</code>, <code>/inv</code>, <code>/g inv</code> and <code>/recipe</code>.
Item filters can be used to reduce the size of a list of items. Current commands that support them are <code>/items</code>, <code>/inv</code>, <code>/g inv</code> and <code>/recipe</code>. These commands have a <code>filter:</code> argument which accept an item filter.


Examples:
==Properties==
 
{| class="wikitable"
!Property
! width="500px" |Acceptable values
! width="250px" |Examples
|-
|name
|The item name
|<code>iron</code>
|-
|level
|The item level
|<code>level:1</code>
<br />
|-
|cost
|The buying price of the item; unbuyable items have a cost of -1
|<code>cost:1000</code>
|-
|type
|The type of the item shown in <code>/items</code><nowiki>Properties: weapon | helm | boots | chest | ring | necklace | | potion | ore | log | sapling | book | effectpotion | trophy | gem | rune | dummy </nowiki>
|<code>type:necklace</code>
|-
|toolType
|The type of tools shown in <code>/items</code><nowiki>Properties: axe | pickaxe | shears | fishingRod</nowiki>
|<code>toolType:axe</code>
|-
|sell
|The selling price of the item
|<code>sell:1000</code>
|-
|sellable
|true or false value showing if an item can be sold
|<code>sellable:true</code>
|-
|tradable
|true or false value showing if an item can be traded
|<code>tradable:true</code>
|-
|desc
|The item's description
|<code>desc:dummy</code>
|-
|forage
|true or false value of if the item can be foraged
|<code>forage:true</code>
|-
|foragedata
|Either Object or undefined; same as forage but includes Magic Saplings
|<code>foragedata:</code>
|-
|ore
|Either Object or undefined; same items as type:ore
|<code>ore:</code>
|-
|fish
|Either Object or undefined; same as type:fish
|<code>fish:</code>
|-
|plural
|The plural name of the object
|<code>plural:apples</code>
|-
|prefix
|The grammatical prefix of the object; usually <code>a</code> or <code>an</code>
|<code>prefix:an</code>
|-
|attributes
|Either Object or undefined; whether or not the object boosts any attributes
|<code>attributes:</code>
|-
|def
|The percentage of damage blocked by the armor (or undefined)
|<code>def:10</code>
|-
|id
|The ID of the item; normally a number. Meta items are <code>m:number</code>
|<code>id:1</code>
|-
|itemBoost
|The amount of extra items received when doing sides with this tool
|<code>itemBoost:</code>
|-
|skillXp
|The static boost to skill xp granted by Jades in tools
|<code>skillXp:</code>
|-
|gems
|The enchantments on an item; is a string like JJ for 2 Jades
|<code>gems:J</code>
|-
|sockets
|The number of gem sockets on an item: 1, 2, or undefined
|<code>sockets:1</code>
|-
|enchants
|An array of enchantments in the form [sx;4,as;10] (don't try to use this; just use gems)
|<code>enchants:sx;4</code>
|-
|suffix
|The end of the name on meta items, such is 2SRR+23
|<code>suffix:2SRR+23</code>
|}
 
===Specific to /recipe===
These properties can only be used in /recipe:
 
{| class="wikitable"
!Property
! width="500px" |Acceptable values
! width="250px" |Examples
|-
|canCraft
|true or false value showing if you're allowed to craft that item; the gray items in the list are false
|
|-
|hasMats
|true or false value showing if you have the materials to craft that item right then
|
|-
|level
|Specifies the crafting level instead of the item level
|
|-
|uses
|Item name or item ID used in the crafting recipe; this isn't a property so much as a special search
|
|}
 
==Examples==


*To get the list of buyable weapons under level 100:
*To get the list of buyable weapons under level 100:


/items filter:type:weapon cost:>:0 level:<=:100
<code>/items filter:type:weapon cost:>:0 level:<=:100</code>


*To get all the ores in your inventory:
*To get all the ores in your inventory:


/inv view filter:type:ore
<code>/inv view filter:type:ore</code>


*To get items in your inv that give boosts to attributes:
*To get items in your inv that give boosts to attributes:


/inv view filter:attributes:
<code>/inv view filter:attributes:</code>


*To get the list of non-donor items:
*To get the list of non-donor items:


/items filter:donate:undefined donator:undefined
<code>/items filter:donate:undefined donator:undefined</code>


*To get (most of) the list of donor items:
*To get (most of) the list of donor items:


/items filter:donate:true
<code>/items filter:donate:true</code>


*To get all the recipes that use coal anywhere in the crafting tree:
*To get all the recipes that use coal anywhere in the crafting tree:


/recipe filter:uses:coal --raw
<code>/recipe filter:uses:coal --raw</code>
 
Usable Properties:
 
*name (The item name)
*level (The item level)
*cost (The buying price of the item; unbuyable items have a cost of -1)
*type (The type of the item shown in <code>/items</code>)
*toolType (The type of tools shown in <code>/items</code>)
*sell (The selling price of the item)
*sellable (true or false value showing if an item can be sold)
*tradable (true or false value showing if an item can be traded)
*desc (The item's description)
*forage (true or false value of if the item can be foraged)
*foragedata (Either Object or undefined; same as forage but includes Magic Saplings)
*ore (Either Object or undefined; same items as type:ore)
*fish (Either Object or undefined; same as type:fish)
*plural (The plural name of the object)
*prefix (The grammatical prefix of the object; usually <code>a</code> or <code>an</code>)
*attributes (Either Object or undefined; whether or not the object boosts any attributes)
*def (The percentage of damage blocked by the armor (or undefined))
*id (The ID of the item; normally a number. Meta items are <code>m:number</code>)
*itemBoost (The amount of extra items received when doing sides with this tool)
*skillXp (The static boost to skill xp granted by Jades in tools)
*gems (The enchantments on an item; is a string like JJ for 2 Jades)
*sockets (The number of gem sockets on an item: 1, 2, or undefined)
*enchants (An array of enchantments in the form [sx;4,as;10] (don't try to use this; just use gems))
*suffix (The end of the name on meta items, such is 2SRR+23)


Additional properties specific to #!recipe:
*To get the list off all axe's tool type in items


*canCraft (true or false value showing if you're allowed to craft that item; the gray items in the list are false)
<code>/items filter:toolType:axe</code>
*hasMats (true or false value showing if you have the materials to craft that item right then)
*level (Specifies the crafting level instead of the item level)
*uses (Item name or item ID used in the crafting recipe; this isn't a property so much as a special search)


==Notes==


Notes:<br>
*Not all items can use all properties. For example, not all items have an <code>ore</code> field, so if you search <code>/items filter:ore:</code>, any items without <code>ore</code> data will be filtered out.
Not all items can use all properties. For example, not all items have an <code>ore</code> field, so if you search <code>/items filter:ore:</code>, any items without <code>ore</code> data will be filtered out.<br>
*To search for items that '''don't''' have a property, you can use <code>undefined</code>, like <code>/items filter:donate:undefined</code>.
To search for items that '''don't''' have a property, you can use <code>undefined</code>, like <code>/items filter:donate:undefined</code>.<br>
*The left-hand side of the filter is case-sensitive, so itemBoost will work and itemboost won't.
The left-hand side of the filter is case-sensitive, so itemBoost will work and itemboost won't.<br>
*Searches use substrings, so if you search <code>name:log</code>, it'll give all items with "log" in the name.
Searches use substrings, so if you search <code>name:log</code>, it'll give all items with "log" in the name.<br>
*If you want to search for multiple words, simply remove the spaces like <code>name:maplelog</code>.
If you want to search for multiple words, simply remove the spaces like <code>name:maplelog</code>.<br>
*If you leave the value (the right side of the <code>:</code>) empty, all items with the property will be matched.
If you leave the value (the right side of the <code>:</code>) empty, all items with the property will be matched.<br>
*If a value is a number, like level, you can use <, <=, >, and >= to do inequality searches like <code>level:<:100 cost:>:0</code>.
If a value is a number, like level, you can use <, <=, >, and >= to do inequality searches like <code>level:<:100 cost:>:0</code>.<br>
*If <code>--raw</code> is used in a recipe search, all the properties will reflect the raw recipes rather than the normal recipes, so, <code>uses:ironingot --raw</code> will return nothing as the raw recipes only use <code>ironore</code>.
If <code>--raw</code> is used in a recipe search, all the properties will reflect the raw recipes rather than the normal recipes, so, <code>uses:ironingot --raw</code> will return nothing as the raw recipes only use <code>ironore</code>.

Navigation menu