Kód: Vybrat vše
sub CountItems()
; Maximalni vzdalenost hledani
; [ > 0 - vzdalenost
; [ base 15
var findDistance = 15;
var itemCount = 0;
var charCount = 0;
UO.Set("finddistance", findDistance);
UO.FindType(-1, -1, "ground");
while (UO.FindCount())
if (UO.IsNPC("finditem") == 1) then
charCount = charCount + 1;
else
itemCount = itemCount + 1;
endif
UO.Ignore(UO.GetSerial("finditem"));
UO.FindType(-1, -1, "ground");
wend
UO.IgnoreReset();
UO.Print("V okoli " + Str(findDistance) + " policek je " + Str(itemCount) + " itemu a " + Str(charCount) + " characteru.");
end sub