Yoko

All sides of Injection
It is currently 2026-01-20 02:05:42

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2006-03-03 13:00:51 
Offline

Joined: 2004-12-13 01:27:00
Posts: 190
Привет всем. Хотел только что написать скрипт такой, чтобы подсчитывал сколько в паке осталось гх, ман, инвизок, но что то не пойму смысл и логику скрипта :oops:
Хотел чтобы он выдавал мне вот так инфу:
Code:
"xx Mana refresh" - '0x0F09', '0x0388'
"xx Greater Heal" - '0x0F0C', '0x0000'
"xx Invisibilty" - '0x0F09', '0x0060'


Если не сложно - помогите, буду благодарен.


Top
   
PostPosted: 2006-03-03 13:38:03 
Offline

Joined: 2006-02-03 06:53:36
Posts: 64
Code:
sub countBottles()
   var bottles = 3

   dim bottleType[3]
   dim bottleColor[3]
   dim bottleName[3]

   bottleType[0] = '0x0F09'
   bottleType[1] = '0x0F0C'
   bottleType[2] = '0x0F09'

   bottleColor[0] = '0x0388'
   bottleColor[1] = '0x0000'
   bottleColor[2] = '0x0060'
   
   bottleName[0] = 'Mana refresh'
   bottleName[1] = 'Greater Heal'
   bottleName[2] = 'Invisibilty'
   

   uo.IgnoreReset()

   var bottleCount
   for var f = 0 to bottles - 1
      bottleCount = 0
      repeat
         uo.FindType(bottleType[f], bottleColor[f])
         if (uo.FindCount()) then
            bottleCount = bottleCount + uo.GetQuantity('finditem')
            uo.ignore('finditem')
         end if
      until uo.FindCount() == 0
      uo.print(STR(bottleCount) + ' ' + bottleName[f])
   next
   
   uo.IgnoreReset()
   
end sub


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 4 guests


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