помогите дороботать скрипт

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
-Old Kosyak-
Posts: 43
Joined: 2009-01-08 06:36:54
Location: Не хозяин...

помогите дороботать скрипт

Post by -Old Kosyak- »

sub SortItem()
If UO.Dead() Then
UO.Print("You are Dead")
return
End If
var n_1
UO.Set('grabdelay','250')
UO.IgnoreReset()

;==============================================
; СОРТИРУЕМ ВЕЩИ: НИЖНИЙ ПРАВЫЙ УГОЛ
;==============================================
Dim Items[8]
Items[0] = 7
Items[1] = '0x0E20' ; БИНТЫ БЛУД
Items[2] = '0x0F0E' ; ПУСТЫЕ БУТЫЛКИ
Items[3] = '0x0F3F' ; СТРЕЛЫ
Items[4] = '0x1BFB' ; БОЛТЫ
Items[5] = '0x09B0' ; СУМКА (квадратная) 1
Items[6] = '0x0E79' ; СУМКА (квадратная) 2
Items[7] = '0x0E76' ; СУМКА (Круглая)
;==============================================
; СОРТИРУЕМ ХИМИЮ:
;==============================================
Sort('0x0F0B', '', 142, 65) ; РЕФРЕХИ
Sort('0x0F09', '0x0388', 44, 65) ; МАНА
Sort('0x0F09', '0x0060', 56, 65) ; ИНВИЗ
Sort('0x0F09', '0x084D', 68, 65) ; СТИЛСКИНЫ
Sort('0x0F0C', '', 77, 65) ; ГРЕЙТ ХИЛ
;==============================================
; СОРТИРУЕМ ВЕЩИ:
;==============================================
Sort('0x0E21','' , 97, 65) ; БИНТЫ

For n_1 = 1 TO Items[0]
Sort(Items[n_1],'' , 137, 127) ; ВЕЩИ
Next
UO.IgnoreReset()
UO.FindType('0x0E75','-1','1') ; Анти КРАШ! :)
UO.Print("SortItem Done!")
end sub

Sub Sort(Type, Color, X, Y)
var Wait_Time=500
If Color=='' Then
Color='-1'
End If
If UO.Count(Type) Then
REPEAT
UO.FindType(Type,Color,'2')
If UO.FindCount() Then
If UO.GetX('finditem')<>X or UO.GetY('finditem')<>Y Then
UO.MoveItem('finditem','all','-1',str(X),str(Y),'0')
UO.Ignore('finditem','on')
Wait(Wait_Time)
Else
UO.Ignore('finditem','on')
End If
End If
Until UO.FindCount()==0 or UO.Dead()
End If
end sub

Примерно знаю как, но выскакивает ошибка(я так думаю потому что нетуда встолвляю) Экспы ,агилити и стелскины
GAUHAR
Posts: 137
Joined: 2006-11-06 21:45:23

Post by GAUHAR »

Code: Select all

Sub Sort(Type, Color, X, Y)
   var Wait_Time=500
   If Color=='' Then
      Color='-1'
   EndIf
   If UO.Count(Type) Then
      UO.FindType(Type,Color,'2')
      while not UO.Dead() and UO.FindCount()
         If UO.GetX('finditem')<>X or UO.GetY('finditem')<>Y Then
            UO.MoveItem('finditem','0','-1',str(X),str(Y),'0')
            Wait(Wait_Time)
            UO.Ignore('finditem','on')
          Else
            UO.Ignore('finditem','on')
         EndIf
         UO.FindType(Type,Color,'2')
      wend
   EndIf
endsub
-Old Kosyak-
Posts: 43
Joined: 2009-01-08 06:36:54
Location: Не хозяин...

Post by -Old Kosyak- »

GAUHAR wrote:

Code: Select all

Sub Sort(Type, Color, X, Y)
   var Wait_Time=500
   If Color=='' Then
      Color='-1'
   EndIf
   If UO.Count(Type) Then
      UO.FindType(Type,Color,'2')
      while not UO.Dead() and UO.FindCount()
         If UO.GetX('finditem')<>X or UO.GetY('finditem')<>Y Then
            UO.MoveItem('finditem','0','-1',str(X),str(Y),'0')
            Wait(Wait_Time)
            UO.Ignore('finditem','on')
          Else
            UO.Ignore('finditem','on')
         EndIf
         UO.FindType(Type,Color,'2')
      wend
   EndIf
endsub

по русски, ещё разок)
Post Reply