Code:
sub check()
VAR r, q, RegBag = 0x400E8802
Dim reg[3]
reg[1] = 0x0F7B
reg[2] = 0x0F86
reg[3] = 0x0F7A
uo.ignorereset()
if uo.count(reg[1])<>50 or uo.count(reg[2])<>50 or uo.count(reg[3])<>50 then
uo.useobject( RegBag )
CheckLag()
For r = 1 to 3
uo.findtype(reg[r], -1 , RegBag )
If uo.findcount() == 0 then
uo.msg('oops!')
uo.exec('terminate all')
endif
q = 50 - uo.count( reg[r] )
if q <> 0 then
if q > 0 then
uo.moveitem('finditem', STR(q) ,'backpack')
wait(400)
CheckLag()
else
q = q*-1
uo.findtype(reg[r], -1 ,'my')
uo.moveitem('finditem', STR(q) , RegBag )
wait(400)
CheckLag()
endif
endif
next
endif
end sub
мне главное идея, а прочитать свои скрипты всегда легче- вот и собственно неволнуюсь
если хочется все 8 рега:
Code:
sub REGS()
VAR amount = 75
VAR r, q, RegBag = 0x400E8802
Dim reg[8]
reg[1] = 0x0F84
reg[2] = 0x0F85
reg[3] = 0x0F86
reg[4] = 0x0F7A
reg[5] = 0x0F7B
reg[6] = 0x0F8C
reg[7] = 0x0F8D
reg[8] = 0x0F88
uo.ignorereset()
For r = 1 to 8
if uo.count( reg[r] )<>amount then
q = amount - uo.count( reg[r] )
if q <> 0 then
if q > 0 then
uo.useobject( RegBag )
CheckLag()
uo.findtype( reg[r] , -1 , RegBag )
If uo.findcount() == 0 then
uo.msg('You dont have any!')
return
endif
uo.moveitem('finditem', STR(q) ,'backpack')
wait(400)
CheckLag()
else
q = q*-1
uo.findtype( reg[r] , -1 ,'my')
uo.moveitem('finditem', STR(q) , RegBag )
wait(400)
CheckLag()
endif
endif
endif
next
uo.print('!! -= Done =- !!')
end sub
прелесть