FindType()

General Injection issues

Moderators: Murderator+, Murderator

Post Reply
Dmitrij
Posts: 14
Joined: 2004-08-13 00:00:02

FindType()

Post by Dmitrij »

exists some way to get every object which i found with findtype??

(findtype returns first (or last) object of this type, but i need get every object in sequence)
333333
Posts: 22
Joined: 2004-07-28 12:39:29

Post by 333333 »

Use uo.ignore('finditem') in cycle.
Dmitrij
Posts: 14
Joined: 2004-08-13 00:00:02

Post by Dmitrij »

thanks, this is result of my reserch:

Code: Select all

sub FindSequence(type,color,container)
   UO.FindType(type,color,container);
   if (UO.FindCount() > 0) then
      UO.Ignore("finditem");
      return UO.GetSerial("finditem");
   else
      UO.IgnoreReset();
      UO.FindType(type,color,container);
      UO.Ignore("finditem");
      return UO.GetSerial("finditem");
   endif
end sub


calling this function in sequence returns ID (serial) every object of assigned type / color / container...

after minor repair get same set of serials, but last call of function returns serial "0x00000000" (empty result -> e.g. for finishing cycles):

Code: Select all

sub FindSequence(type,color,container)
   UO.FindType(type,color,container);
   if (UO.FindCount() > 0) then
      UO.Ignore("finditem");
      return UO.GetSerial("finditem");
   else
      UO.IgnoreReset();
      return UO.GetSerial("finditem");
   endif
end sub
Post Reply