
Помогите если можете, авось и поколению пригодится.
Code: Select all
sub Drops()
var t=200; ????? ????????(1???)
var mx, my, md, n, Check = 0, Lock = 0, TMP_ID
var My_Chest='0x41380f42'
Dim Drop_[5]
Drop_[0] = 4
Drop_[1] = 2
Drop_[2] = 2
Drop_[3] = 2
Drop_[4] = 2
If UO.Dead() Then
UO.Print("You are Dead")
Return
End If
If UO.GetGlobal('DropsCheck')<>'on' Then
If UO.Count('0x0f36') >= 4 Then
UO.SetGlobal('DropsCheck','on')
UO.Ignore(My_Chest)
mx = UO.GetX('lasttarget')
my = UO.GetY('lasttarget')
md = UO.GetDir()
REPEAT
Check = Check+1
If ((md == 0 or Drop_[1] == 1) and (Drop_[1] <> 0)) Then
If Lock <> 1 Then
Drop_[1] = 0
End If
TMP_ID = search()
UO.Drop('1',str(mx),str(my-1),'0',TMP_ID)
UO.Forget(TMP_ID)
Wait(t)
End If
If ((md == 4 or Drop_[2] == 1) and (Drop_[2] <> 0)) Then
If Lock <> 1 Then
Drop_[2] = 0
End If
TMP_ID = search()
UO.Drop('1',str(mx),str(my+1),'0',TMP_ID)
UO.Forget(TMP_ID)
Wait(t)
End If
If ((md == 2 or Drop_[3] == 1) and (Drop_[3] <> 0)) Then
If Lock <> 1 Then
Drop_[3] = 0
End If
TMP_ID = search()
UO.Drop('1',str(mx+1),str(my),'0',TMP_ID)
UO.Forget(TMP_ID)
Wait(t)
End If
If ((md == 6 or Drop_[4] == 1) and (Drop_[4] <> 0)) Then
If Lock <> 1 Then
Drop_[4] = 0
End If
TMP_ID = search()
UO.Drop('1',str(mx-1),str(my),'0',TMP_ID)
UO.Forget(TMP_ID)
End If
If Lock <> 1 Then
For n = 1 TO Drop_[0]
If Drop_[n] <> 0 Then
Drop_[n] = 1
End If
Next
End If
Lock = 1
Until Check == 2 or UO.Dead()
UO.SetGlobal('DropsCheck','off')
Else
UO.Print("Not items from drop! > 4")
End If
Else
UO.Print("Wait")
End If
end sub