Почему скрипт не плавит крисы? скрипт в сообщении.
Posted: 2004-10-05 04:04:07
Здравствуйте.
с помощью команды ,info тыкал на кузни и записал 3 типа 0x1982, 0x0FB1, 0x19A2
написал небольшой кусок для поиска кузни и получения ее как обьекта (выделено #####)
После выплавки криса ищу обьект крис в бэкпаке устанавливаю на него прицел и пытаюсь его плавить UseObject(запомненый обьект кузня) (выделено @@@@@@@@@@@@@@@@)
Почему то с кузней 0x19A2 это не работает
Не плавит.
Скажите пожалуйста где я напортачил?
(Скрипт не мой я его только дополняю.)
Спасибо.
sub BlacksmithyIM()
VAR Exit=0, LastTimer,forge1
########################
;Ищем кузню
UO.exec('set finddistance 3')
uo.findtype(0x1982,-1,1)
if uo.findcount()==0 then
uo.findtype(0x0FB1,-1,1)
if uo.findcount()==0 then
uo.findtype(0x19A2,-1,1)
if uo.findcount()==0 then
uo.print('No Blacksmith!!!')
return 0
end if
end if
Forge1=uo.GetSerial('finditem')
############################
var molot=uo.GetSerial(uo.ObjAtLayer('Rhand'));
if uo.GetGraphic(uo.ObjAtLayer('Rhand'))<>"0x13e4" or
uo.GetGraphic(uo.ObjAtLayer('Rhand'))<>"0x13e3" then
uo.findtype(0x13e4,-1,'my')
if uo.findcount()==0 then
uo.print("No smith Hammer!!!")
return 0
end if
molot=uo.GetSerial('finditem')
uo.equip('Rhand','finditem')
end if
while Exit<>1
tohide()
UO.DeleteJournal()
LastTimer=UO.Timer()
;Что куем
UO.WaitMenu('Blacksmithing','Weapons','Weapons','Swords & Blades','Swords & Blades','kryss') ;Что
куем
UO.UseType(0x1BEF) ;Инги айрона
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
wait(500)
wend
If UO.InJournal("You have failed") then
repeat
wait(100)
until UO.Timer()>=LastTimer+100 ;Время создания оружия
EndIf
@@@@@@@@@@@@@@@@@@@
UO.FindType('0x1400',-1,'backpack') ; что плавим
wait(500)
If UO.GetQuantity('finditem') then
UO.WaitTargetObject('finditem')
UO.UseObject("forge1") ; Форж
Endif
@@@@@@@@@@@@@@@@@@@
UO.FindType('0x1BEF',-1,'backpack')
If UO.GetQuantity('finditem')<10 then
UO.FindType('0x1BEF','-1','backpack') ;Cундук с ингами
wait(1000)
UO.Grab('1000','finditem')
Endif
If UO.GetQuantity('finditem')<3 then
Exit=1
Endif
wait(1000)
wend
pwave()
end sub
с помощью команды ,info тыкал на кузни и записал 3 типа 0x1982, 0x0FB1, 0x19A2
написал небольшой кусок для поиска кузни и получения ее как обьекта (выделено #####)
После выплавки криса ищу обьект крис в бэкпаке устанавливаю на него прицел и пытаюсь его плавить UseObject(запомненый обьект кузня) (выделено @@@@@@@@@@@@@@@@)
Почему то с кузней 0x19A2 это не работает

Скажите пожалуйста где я напортачил?
(Скрипт не мой я его только дополняю.)
Спасибо.
sub BlacksmithyIM()
VAR Exit=0, LastTimer,forge1
########################
;Ищем кузню
UO.exec('set finddistance 3')
uo.findtype(0x1982,-1,1)
if uo.findcount()==0 then
uo.findtype(0x0FB1,-1,1)
if uo.findcount()==0 then
uo.findtype(0x19A2,-1,1)
if uo.findcount()==0 then
uo.print('No Blacksmith!!!')
return 0
end if
end if
Forge1=uo.GetSerial('finditem')
############################
var molot=uo.GetSerial(uo.ObjAtLayer('Rhand'));
if uo.GetGraphic(uo.ObjAtLayer('Rhand'))<>"0x13e4" or
uo.GetGraphic(uo.ObjAtLayer('Rhand'))<>"0x13e3" then
uo.findtype(0x13e4,-1,'my')
if uo.findcount()==0 then
uo.print("No smith Hammer!!!")
return 0
end if
molot=uo.GetSerial('finditem')
uo.equip('Rhand','finditem')
end if
while Exit<>1
tohide()
UO.DeleteJournal()
LastTimer=UO.Timer()
;Что куем
UO.WaitMenu('Blacksmithing','Weapons','Weapons','Swords & Blades','Swords & Blades','kryss') ;Что
куем
UO.UseType(0x1BEF) ;Инги айрона
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
wait(500)
wend
If UO.InJournal("You have failed") then
repeat
wait(100)
until UO.Timer()>=LastTimer+100 ;Время создания оружия
EndIf
@@@@@@@@@@@@@@@@@@@
UO.FindType('0x1400',-1,'backpack') ; что плавим
wait(500)
If UO.GetQuantity('finditem') then
UO.WaitTargetObject('finditem')
UO.UseObject("forge1") ; Форж
Endif
@@@@@@@@@@@@@@@@@@@
UO.FindType('0x1BEF',-1,'backpack')
If UO.GetQuantity('finditem')<10 then
UO.FindType('0x1BEF','-1','backpack') ;Cундук с ингами
wait(1000)
UO.Grab('1000','finditem')
Endif
If UO.GetQuantity('finditem')<3 then
Exit=1
Endif
wait(1000)
wend
pwave()
end sub