Yoko

All sides of Injection
It is currently 2026-01-16 05:21:50

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Array of items ..
PostPosted: 2005-02-10 01:15:30 
Offline

Joined: 2005-02-05 22:28:14
Posts: 5
Hey YOKO or someone, I wish to make an array of items on my backpack.. is there any automatic function that outputs an array or i could do something such as:

For i=0 to Totalbpitems

myarray[i] = FindType()[totalbpitems]

next

a loop like such.. something like that, so i could easily separate force / might / power etc stuff from my backpack

thanks..


Top
   
 Post subject:
PostPosted: 2005-02-10 11:42:06 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Code:
Sub CreateArrayBpack( items )
   VAR i
   UO.TextOpen()
   UO.TextClear()
   for i = 0 to 255
      items[i] = ''
   next
   i = 0
   UO.Findtype( '-1', '-1' )
   While UO.FindCoutn() > 0
      items[i] = UO.GetSerial('finditem')
      UO.TextPrint( 'I found item with ID=' + item[i] )
      UO.Ignore('finditem')
      i = i+1
      If i > 255 Then
         UO.Print( 'Error scaning backpack! You need drop and move to trash your backpack! )
         return
      Endif
      UO.Findtype( '-1', '1' )
   Wend
endsub


Use:

sub main()
DIM items[255]
.........................
CreateArrayBpack( items )
.........................
you can use this array but you must remember what some elements of array are empty

...........
endsub


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited