Yoko

All sides of Injection
It is currently 2025-12-24 00:11:05

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2005-08-16 19:15:50 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Вот, заносим в массив айдишники ваших боевых товарищей, и если кто-то из них упал во время защиты родины, подбегаем к нему, запускаем макр и он его реснет.
З.Ы.
Строку UO.MSG( '.heal' ) переписать под себя. У нас на шарде это команда на юзание бинтов.

Code:
Sub Res_Partner()
VAR num = 3 ; ко-во друзей
var ghost = '0x0192'
VAR i
  Dim friend[3]
    friend[1] = '0x005C8367'   ; Вася
    friend[2] = '0x0039CD15'  ; Петя
    friend[3] = '0x004A2181'   ; Маша
 

  uo.set( 'finddistance', '2' )
 
    for i = 1 to num
      uo.findtype( ghost, '-1', 'ground' )
        if uo.findcount() then
          if uo.getserial( 'finditem' ) == friend[i] then
            uo.setarm( 'CWeapon' )
            uo.waittargetobject( 'finditem' )
            uo.msg( '.heal' )
            wait(600)
            uo.arm( 'CWeapon' )
            uo.print( 'Реснули' )
            goto scriptend
          endif
        endif
    next
  scriptend:
endsub


Top
   
 Post subject:
PostPosted: 2005-08-21 16:06:48 
Offline

Joined: 2004-05-27 18:19:17
Posts: 66
А возможно сделать скрипт чтоб ресал только два различных типа ???
Не определенныи аиди а тип ...???


Top
   
 Post subject:
PostPosted: 2005-08-21 16:11:21 
Offline
Expert!
User avatar

Joined: 2005-01-15 19:15:05
Posts: 791
Location: Dragon World
У меня возникла идея, вместо ID вставить ники друзей, а вместо UO.GetSerial вставить UO.GetName. Это будет удобнее.


Top
   
 Post subject:
PostPosted: 2005-08-21 16:51:55 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Leo wrote:
У меня возникла идея, вместо ID вставить ники друзей, а вместо UO.GetSerial вставить UO.GetName. Это будет удобнее.


Хм, идея интересная, но почему то я не очень доверяю ГетНейму, он даже с ТВИ не всегда сразу возвращает имя.
У меня, по крайней мере.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 6 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:  
Powered by phpBB® Forum Software © phpBB Limited