Page 1 of 1

Findobject!

Posted: 2009-11-07 14:21:33
by Ever1x
First of all, is it possible to find items by serial?

Code: Select all

sub objsearch()
uo.findtype('SafeZone',-1,'backpack')
if UO.GetQuantity('finditem') then
uo.print("You can recall to safe zone!")
else
uo.exec('addobject SafeZone')
while uo.targeting()
wait(100)
wend
uo.saveconfig()
end if
end sub


I hope u can understand!

Posted: 2009-11-07 15:41:39
by Scripts Writer

Code: Select all

if uo.GetQuantity(serial) > 0 then
  #do something
endif

Posted: 2009-11-07 16:12:30
by Ever1x
and if its a horse?
If not objatlayer(Horse) and (CANT FIND Horse ID) then
end if

Posted: 2009-11-10 17:40:59
by Ever1x
is it possible?
UP

Posted: 2009-11-10 19:58:09
by Destruction

Code: Select all

If not uo.objatlayer("Horse") and uo.getQuantity("Horse ID") == 0 then
endif
Is the problem?

Posted: 2009-11-23 16:12:27
by Ever1x

Code: Select all

sub main()
var id1=0x01267EC9
UO.Set('finddistance', '15')
UO.FindType('0x0191', -1,'ground')
if uo.findcount() then
uo.print('Found by Type')
if uo.getserial('finditem') ==id1 or uo.getquantity(id1)>0 then
uo.print('Found by serial')
end if
end if
end sub


This scp doesn't print found by serial! Why?

Posted: 2009-11-23 16:14:36
by Savage
var id1='0x01267EC9'
Horse is mobile object, try on TWI checkbox to find by type.
Try uo.print(STR(UO.GetSerial('finditem')))

Posted: 2009-11-24 15:16:03
by Ever1x
Could u tell me what is TWI? U can use russian, I uderstand russian, but not perfect! :(

Oh I uderstood, TWI is Track World Items! :)

It prints out value 0! Should be 1?

Posted: 2009-11-24 16:58:16
by Mirage
mb:

Code: Select all

sub main()
var id1='0x01267EC9'
UO.Set('finddistance', '15')
 UO.FindType('0x0191', -1,'ground')
   if uo.findcount() then
      uo.print('Found by Type')
      if uo.getserial('finditem') == id1 then
         uo.print('Found by serial')
       else
         uo.print('Looozzz!!')
     end if
   end if
end sub

try this

Posted: 2009-11-24 17:38:28
by Ever1x
Worked, but what there is different? :D

Posted: 2009-11-24 21:59:19
by Mirage
var id1='0x01267EC9' <--
Эээ как бы сказать по не нашенски... УЧИ ЯЗЫК екарный бабай! :lol:

Posted: 2009-11-27 15:52:05
by Ever1x
Forgot to put ''! Omg, Cant believe!

Posted: 2009-12-05 13:48:06
by Ever1x
UP

Code: Select all

sub main() 
var id1='Horse'
UO.Set('finddistance', '5')
 UO.FindType('0x00CC', -1,'ground')
   if uo.findcount() then
      uo.print('Found by Type')
      if uo.getserial('finditem') == id1 then
         uo.print('Found by serial')
       else
      uo.exec('addobject Horse')
      while uo.targeting()
        wait(100)
      wend
      uo.saveconfig()
     end if
   end if
end sub


'Horse' Is an object. Added with exec('addobject ')

I want to know the way, how can I use in scp objects/Types which is already in injection!

Posted: 2009-12-05 17:40:31
by Savage
What you mean under: "how can I use in scp objects/Types which is already in injection"?

Posted: 2009-12-05 18:01:54
by Ever1x
I thought that some wouldn't understand.
In Injection there is sections Objects, Object Types. You don't need to declare variables, var Horse in this situation. And u may use exec('addobject XXXX') to Create a new "Variable For Object" or just update old ones.

Posted: 2009-12-05 18:13:10
by Savage

Code: Select all

if uo.getserial('finditem') == 'Horse' then

U need it?

Posted: 2009-12-05 19:06:01
by Ever1x
Yes I need that place! :)

Posted: 2009-12-06 14:26:36
by Ever1x
Found out how! :D No need to reply anyone.