Sample for Type-Based ItemScan in your Backpack :
First we need to generate a class wich has a QueryGraphic Attribute
[QueryGraphic(0x1085, 0x1088, 0x1089, 0x1F08, 0x1F05)] //Possible Graphic Types for a Neclace
public class Necklace : Item
{
public Necklace(Serial serial)
: base(serial)
{
}
}
MainMethod Sample how to Find it :
using System;
using ScriptDotNet2;
using ScriptSDK.Engines;
using ScriptSDK.Items;
using ScriptSDK.Mobiles;
namespace App
{
internal static class Program
{
[STAThread]
private static void Main()
{
var Player = PlayerMobile.GetPlayer();
ScriptLogger.Initialize();
ScriptLogger.LogToStealth = true;
var results = Scanner.Find(typeof(Necklace), Player.Backpack.Serial.Value, true);//Sends Query based on QueryGraphic
ScriptLogger.WriteLine(String.Format("{0} Necklaces found!",results.Count));
}
}
}
Output through ScriptLogger :
19:38:05:912 [xxx(Live)]: External Script Started
19:38:06:072 [xxx(Live)]: Starting Scan :
19:38:06:212 [xxx(Live)]: Finish Scan : 1 Results , tooked 00:00:00.1350032
19:38:06:222 [xxx(Live)]: 1 Necklaces found!
19:38:08:552 [xxx(Live)]: External Script Stopped