Page 1 of 1

БС Цвет!

Posted: 2006-10-30 15:17:18
by newman
Вот скрипт:

Code: Select all

sub Blacksmithing() 
var Exit=0, LastTimer, Container='0x4038F7B2', Forge='0x401D7243' ;Cундук в котором инги и форж.
var CountIng=500 ;Скока ингов поднимает чар
var MenuIron="'Blacksmithing' 'Weapons'"
var MenuOther="'Colored' 'Weapons'"
var MenuSwords="Weapons' 'Swords'"
var MenuDagger="'Swords' 'katana'"
var i=0

dim ColorOfIng[6]
dim NameOre[6]

NameOre[0]="'"
NameOre[1]="'Rusty "
NameOre[2]="'Old Copper "
NameOre[3]="'Dull Copper "
NameOre[4]="'Bronze "

ColorOfIng[0]='0x0000' ; Iron
ColorOfIng[1]='0x0750' ; Rusty
ColorOfIng[2]='0x0590' ; Old Copper
ColorOfIng[3]='0x060A' ; Dull Copper
ColorOfIng[4]='0x0488' ; Bronze


uo.UseObject(Container)
while not uo.Dead()
for i=0 to 4
uo.FindType('0x1BEF',ColorOfIng[i],Container)
if uo.GetQuantity('finditem')>10 then
uo.Grab(STR(CountIng),'finditem')
wait(1000)
             
uo.Exec('automenu '+MenuDagger)
uo.Exec('automenu '+NameOre[i]+MenuSwords)
if i>0 Then
uo.Exec('automenu '+MenuOther)
end if
uo.Exec('automenu '+MenuIron)
             
While Exit<>1
uo.DeleteJournal()
LastTimer=uo.Timer()
               
uo.UseType(0x1BEF) 

while not uo.InJournal("You put") and not uo.InJournal("You have failed")
wait(100)
wend

if uo.InJournal("You have failed") then
repeat
wait(100)
until uo.Timer()>=LastTimer+100 ; Время создания дагера
end if
CheckLag()

uo.FindType('0x0F51',-1,'backpack')

if uo.GetQuantity('finditem') then
uo.WaitTargetObject('finditem')
uo.UseObject(Forge) 
wait(3000)
end if

uo.FindType('0x1BEF',-1,'backpack')
if uo.GetQuantity('finditem')<10 then
uo.FindType('0x1BEF',ColorOfIng[i],Container)
if uo.GetQuantity('finditem')<10 then
uo.FindType('0x1BEF',ColorOfIng[i],'backpack')
uo.SetReceivingContainer(Container)
uo.Grab('all','finditem')
uo.UnSetReceivingContainer()
Exit=1
end if
else
wait(1000)
uo.Grab(STR(CountIng-10),'finditem')
end if
wend
Exit=0
uo.CancelMenu()
end if
next
wend   
end sub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec("canceltarget")
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub


Что нужно подправить что бы када оставалась 2 инга например он не сбивалса...а брал новую партию ингов и продолжал работать.

Posted: 2006-10-30 18:17:35
by slonopotam
добавить условие if