![]() |
![]() |
|
|
|
findItem — Finds items, monsters, players, NPCs based on object ID or object type.
findItem {{id} | {type} | *} [index] [[G] | [G_{dist}] | [C] | [C_{container id}]]
The findItem command finds objects given by their ID (6-8 letters) or any object type (2-3 letters). If no index is given the first object found is returned in the #FIND* variables. If an index is given, the {index}'th object is returned in the #FIND*. If * is used instead of an id or an index, all items of all types will be returned.
initEvents
set %regbag XXXXX ; <- replace with your own bag
; find an dagger on the ground within 2 tiles (pickup distance)
; and picks it up and drops it at a specific position
findItem TSF G_2 ;
if #findkind <> -1
{
event Drag #findID
wait 20
click 200 300 p
}
; find a stack of black perl in a specific bag and moves it
; to a specific position
findItem KUF C_ , %regbag
if #findkind <> -1
{
event Drag #findID
wait 20
click 200 300 p
}ignoreItem, #findID, #findType, #findX, #findY, #findZ, #findDist, #findKind, #findStack, #findBagID, #findRep, #findCol, #findCnt