Difference between revisions of "IgnoreItem"

From Wiki
Jump to: navigation, search
m (list)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{command header|client}}
 
{{command header|client}}
{{body|ignoreItem <nowiki>{{</nowiki>id} <nowiki>|</nowiki> {id-list} <nowiki>|</nowiki> {type} <nowiki>|</nowiki> {type-list} <nowiki>|</nowiki> {"reset"<nowiki>}}</nowiki> [list]|:The ignoreItem command removes specific items from the list of items searched by [[findItem]]. If the option reset is given, all previously ignored items will be returned on the list.
+
=Synopsis=
:There are different lists of ignored items. If no list number is given, it is the global list. The idea behind this, is the ability to reset one list, while still keeping some other items ignored.
+
ignoreItem [''{Item ID}'' | ''{ID List}'' | ''{Item Type}'' | ''{Type List}'' | reset] ''{Numeric List}''
:If an items id is added to any list, it will not be returned from subsequent calls to findItem. If reset is given with a list number, only the specific list is cleared.
+
==Overview==
:Using ignoreitem on an item that is already ignored will un-ignore it, ie: it will remove it from the ignore list thereby making it visible to [[findItem]] again.
+
:ignoreItem will hide items from the [[findItem]] command. If an item ID or type is ignored then any further [[findItem]] commands will not find the item as long as the [[findItem]] command is used with a matching parameter.  
:Multiple items can be ignored at one time if the list of items is separated with underscores "_".}}
+
:If an item ''type'' is ignored and [[findItem]] is called using an ''ID'' then the item '''will be found''' even if the ''type'' of item found matches that which was previously ignored.
 +
===item===
 +
:If an item ID or type is already ignored and ignoreItem is called to ignore it again the item ID or type will be removed from the ignore list even if the item is ignored in separate lists.  
 +
::Example using a single pile of gold with a type of POF and ID of xxx
 +
ignoreitem POF 1
 +
; all gold is ignored
 +
ignoreitem POF
 +
; gold can be found again regardless of List number passed to previous command
 +
finditem xxx
 +
; search was done by ID, not type, so if the pile exists it will be found.
 +
:ignoreItem ''does'' support ignoring IDs and TYPEs in the same command.
 +
:You may pass the following parameters to ignoreItem:
 +
*''Item ID'': The unique ID of a single item
 +
ignoreItem BWVOKMS
 +
*''Item ID List'': A list of 2 or more IDs joined by underscores
 +
ignoreItem _BWVOKMS_RFTDQWE_
 +
*''Item Type'': The type of item, a variable common to all instances of an item. (All stacks of gold have an item type of POF, each stack has its own unique ID)
 +
ignoreItem POF
 +
*''Item Type List'': A list of 2 or more item types joined by underscores
 +
ignoreItem _POF_LKF_
 +
===reset===
 +
:The reset option will flush either all ignore item lists (global) or only a single list if the ''list'' option is passed
 +
::Example: flush list 2, but all other lists remain in tact
 +
ignoreitem reset 2
  
 +
===list===
 +
:Multiple ignore lists can be managed by specifying a list in the ignoreItem command.
 +
::Example using item type ''POF'':
 +
ignoreitem POF 2
 +
:This stores item type POF in the second ignoreItem list. It still won't show up in a [[findItem]] command, and the list can be managed/reset independently of other lists.
  
=== Example ===
+
===Example===
 
<pre>
 
<pre>
 
; IgnoreItem.txt
 
; IgnoreItem.txt

Latest revision as of 06:15, 18 September 2008

Synopsis

ignoreItem [{Item ID} | {ID List} | {Item Type} | {Type List} | reset] {Numeric List}

Overview

ignoreItem will hide items from the findItem command. If an item ID or type is ignored then any further findItem commands will not find the item as long as the findItem command is used with a matching parameter.
If an item type is ignored and findItem is called using an ID then the item will be found even if the type of item found matches that which was previously ignored.

item

If an item ID or type is already ignored and ignoreItem is called to ignore it again the item ID or type will be removed from the ignore list even if the item is ignored in separate lists.
Example using a single pile of gold with a type of POF and ID of xxx
ignoreitem POF 1
; all gold is ignored
ignoreitem POF
; gold can be found again regardless of List number passed to previous command
finditem xxx
; search was done by ID, not type, so if the pile exists it will be found.
ignoreItem does support ignoring IDs and TYPEs in the same command.
You may pass the following parameters to ignoreItem:
  • Item ID: The unique ID of a single item
ignoreItem BWVOKMS
  • Item ID List: A list of 2 or more IDs joined by underscores
ignoreItem _BWVOKMS_RFTDQWE_
  • Item Type: The type of item, a variable common to all instances of an item. (All stacks of gold have an item type of POF, each stack has its own unique ID)
ignoreItem POF
  • Item Type List: A list of 2 or more item types joined by underscores
ignoreItem _POF_LKF_

reset

The reset option will flush either all ignore item lists (global) or only a single list if the list option is passed
Example: flush list 2, but all other lists remain in tact
ignoreitem reset 2

list

Multiple ignore lists can be managed by specifying a list in the ignoreItem command.
Example using item type POF:
ignoreitem POF 2
This stores item type POF in the second ignoreItem list. It still won't show up in a findItem command, and the list can be managed/reset independently of other lists.

Example

; IgnoreItem.txt
;
; This script will demonstrate how ignoreItem can be used.
;
; Press start, go to a shop and follow the instructions.

msg #SMC Use a dagger and target an NPC$
wait 3s
msg #SMC (Press play to continue)
pause

set %npc1 #lTargetID

msg #SMC Use a dagger and target another NPC$
wait 3s
msg #SMC (Press play to continue)
pause

set %npc2 #lTargetID

ignoreItem %npc1 1
ignoreItem %npc2 2

; Nothing will be found
findItem %npc1
msg #SMC 1: #findID $
findItem %npc2
msg #SMC 2: #findID $

ignoreItem reset 1

; NPC 1 will be found
findItem %npc1
msg #SMC 1: #findID $
findItem %npc2
msg #SMC 2: #findID $

ignoreItem %npc1 1
ignoreItem reset 2

; NPC 2 will be found
findItem %npc1
msg #SMC 1: #findID $
findItem %npc2
msg #SMC 2: #findID $
halt

Related Commands

ignoreItem findItem #findCnt
#findID #findType #findX
#findY #findZ #findDist
#findKind #findStack #findBagID
#findMod #findRep #findCol
#findIndex

See Also

Client

  • Client commands are used to send information to the Ultima Online client in order to perform an action or effect some change.
chooseSkill Reads the current skill value/lock status for a specific skill
click Clicks at a specific position in the UO client
cmpPix Compares a current pixel to a previously saved pixel
contPos Moves the active topmost gump to a new position
deleteJournal Forgets the contents of the journal buffer
findItem Finds items, monsters, players, NPCs based on object ID or object type
getShopInfo Retrieves information from the client about the currently shown top entry on a shopping gump
getUOTitle Gets the text on the title bar of the client
hideItem Removes an items graphic from the client
ignoreItem Removes items from the list searched by findItem
key Sends a key-stroke to the client
move Moves the character to a specified location
msg Sends a string to the client as keystrokes
nextCPos Denotes where the next opened container/gump will open
onHotKey Performs a line of code if a specific key is pressed
savePix Saves the color of a pixel in a specified location
setShopItem Sets the number of items to purchase given by ID
setUOTitle Sets the text on the title bar of the client
scanJournal Scans the users journal and stores the string for examination
sleep Waits a specified amount of time
target Waits for a target cursor to appear
terminate Terminates the current client
uoXL Start/manage clients
wait Waits a specified amount of time