ScriptUO
		Scripting Resources & Utilities => Stealth Client => Stealth archive => Topic started by: rwo001 on December 02, 2013, 07:01:11 AM
		
			
			- 
				
Stealth.Script_SetFindDistance(2);
Stealth.Script_FindType(0xffff, 0x0000);
List<uint> _findlist = new List<uint>(Stealth.Script_GetFindList());
foreach (uint i in _findlist) { Console.WriteLine("{0:X}",i); }
Console.WriteLine("Total:{0}",_findlist.Count);
Console.ReadLine();
i found the result is different from i see in StealthUO as attached.
			 
			
			- 
				Can you keep sure, that no item on ground were moved? and Also the range isnt different to your view on World?
			 
			
			- 
				Notice the Z axis of the missing item is Z = -43
Chances are the vertical find distance threshold is too low to cover that item.  This is the distance between Self.Z and Item.Z
Stealth.Script_SetFindVeritcal(50); should cover it.
			 
			
			- 
				Yes ...careless mistake.. :P
			
 
			
			- 
				Another question on Finding
Is anyway to find NPC faster?
                Stealth.Script_SetFindDistance(50);
                Stealth.Script_SetFindVertical(255);
                Stealth.Script_FindType(0xffff, 0x0);
                List<uint> _findlist = new List<uint>(Stealth.Script_GetFindList());                
                List<uint> _creature = new List<uint>();
                Console.WriteLine(DateTime.Now);                
                foreach (uint i in _findlist)
                {
                    // The problem seems in here..
                    if ( Stealth.Script_GetNotoriety(i) > 0 ){
                        _creature.Add(i);
                    }
                }
                Console.WriteLine(DateTime.Now);                 
                Console.WriteLine("Total NPC:{0}", _creature.Count);
                Console.WriteLine("Total FindItem:{0}", _findlist.Count);
It use 2 seconds to filter the result...
			 
			
			- 
				I found the function Stealth.Script_FindNotoriety().
But it seems only return uint and will not update Stealth.Script_GetFindList();
Stealth.Script_SetFindDistance(255);
Stealth.Script_SetFindVertical(255);
List<uint> _creature = new List<uint>();
for (byte i = 1; i <= 7; i++)
{
    Stealth.Script_FindNotoriety(0xffff, i);
    Console.WriteLine("Notoriety : {0} , Found : {1} , Found List : {2} ", i, Stealth.Script_GetFindCount(), Stealth.Script_GetFindList().Length);
}
Another problem...Cannot Use FindNotoriety to find Player Vendor
            uint _id = 0x01E42449;
            Console.WriteLine("Player Vendoer Notoriety : {0}", Stealth.Script_GetNotoriety(_id));
            Stealth.Script_FindNotoriety(Stealth.Script_GetType(_id), Stealth.Script_GetNotoriety(_id));
            Console.WriteLine("Find Notoriety Count : {0}", Stealth.Script_GetFindCount());
            _id = Stealth.Script_GetSelfID();
            Console.WriteLine("Self Notoriety : {0}", Stealth.Script_GetNotoriety(_id));
            Stealth.Script_FindNotoriety(Stealth.Script_GetType(_id), Stealth.Script_GetNotoriety(_id));
            Console.WriteLine("Find Notoriety Count : {0}", Stealth.Script_GetFindCount()); 
            Console.ReadLine();
			 
			
			- 
				Stealth.Script_IsNPC() would be easier to discern what is an NPC.
If you want speed, you will need to collect a list of valid types to search for.  I would suggest looking for old EasyUO scripts with the NPC types you are looking for, then converting them in Stealth or programatically via. Script_EUO2StealthType()
Hope that helps.
			 
			
			- 
				m...the main purpose of my function is used to find all creature in certain range.
in my openeuo script, i use it for auto attack all finditem with findrep 1,2,7..
Also, i found that if i use any Stealth.Script_GetXXXX [e.g. Stealth.Script_GetX(_id) ] in the loop..it consumes lots of time...It will not happen when I use Pascal script...
			 
			
			- 
				
m...the main purpose of my function is used to find all creature in certain range.
in my openeuo script, i use it for auto attack all finditem with findrep 1,2,7..
Also, i found that if i use any Stealth.Script_GetXXXX [e.g. Stealth.Script_GetX(_id) ] in the loop..it consumes lots of time...It will not happen when I use Pascal script...
This is a problem with Stealth.exe ... Big changes in next release, and the performance issue will be fixed :)
			 
			
			- 
				sound good...looking for the update... ;D