Скрипт на бс (шард на подобие зулу)
Posted: 2006-10-16 10:46:11
в общем скрипт работает нормально... он выбирает мна гампе делать там что-то и чар делает 10 штук.. потом плавит и инготы в общую стопку кидает... но дело в том, что если логанет немного то чар может сделать тве вещи сразу и появится два сообщения в журнале в один момент... а скрипт естественно увидит одно и делит журнал.. в итоге когда чар делает 10 итемов с лагами, инжект ловит не все 10... как можно выкрутится в этой ситуации?
[/code]
Code: Select all
sub main()
## Created By LeXuS
## icq 384383
var k;
uo.exec("disarm");
UO.Exec('terminate Reconnector')
UO.Exec('exec Reconnector')
Nuke_hungry()
wait(2000)
uo.set("distance","1")
var items;
while not uo.dead()
items=0;
If UO.Count ("0x1BF2") == 0 Then
wait (1000)
Nuke_hungry()
UO.Waittargetground ('0x1BF2') # copper ingots
wait (100)
UO.exec('ongump anygump 0x0402')
UO.Usetype ("0x0fb4") #Neaa? hammer
k = 0;
##wait (65000)
UO.DeleteJournal();
while ( k < 10 )
wait(200);
if UO.InJournal("You create the item") then
k=k+1;
items=items+1;
UO.Print('gotovo');
endif
if UO.InJournal("You make an exceptional item") then
k=k+1;
UO.Print('Except! :o)');
items=items+1;
endif
if UO.InJournal("You destroy some ingots") then
k=k+1;
UO.Print('Fail :o(');
endif
if UO.InJournal("your tool broke") then
k=10;
UO.Print('Slomalas! suka');
endif
UO.DeleteJournal();
Wend
plav(items)
wait(1000)
dropi()
#While (UO.ObjAtLayer('Bpack') == '')
#wait(10000)
wend
Nuke_hungry()
else
#aueeauaaai eiaiou ia iie
dropi()
wait (500)
endif
wend
end sub
sub plav(items)
var i=0
var j;
while i < items
j=1;
uo.waittargettype('0x1413')# cooper
uo.usefromground('0x0FB1')# a Home forge
UO.DeleteJournal ()
while j>0
wait (500)
if UO.InJournal ("You fail, and destroy") then
j=0;
endif
if uo.InJournal("manage to get a bit of material") then
j=0;
endif
UO.DeleteJournal ()
wend
i = i+1
wend
i=0
wait(2000)
end sub
sub dropi()
UO.Exec("set finddistance 1")
var d = '0x1BF2'
drop(d)
end sub
sub drop(d)
var serial=0
var color=-1
var container = "ground"
while UO.Count(d) > 0
UO.FindType(d,-1,"my")
serial=UO.GetSerial("finditem")
color=UO.GetColor(serial)
UO.Ignore(serial)
if container=="ground" then
UO.FindType(d,color,"ground")
if UO.FindCount()>0 then
UO.MoveItem(serial,"0","finditem","0","0","0")
else
UO.DropHere(serial)
endif
else
UO.MoveItem(serial,"0",container)
endif
wait(1000)
UO.IgnoreReset()
end sub
[/code]