Page 1 of 3
Pomogite dobavitj paru strok
Posted: 2007-01-03 21:56:36
by DenjaGanjubass
Etot scp lovit ribu v to4ke, adnoi, pri polomke udo4ki menjajet, pri vese razrezaet ribu, vsjo delaet v haide, u nas na serve riba sama kladjotsa v sumku, no kagda vilavlevajutsa interesnije vewi, oni brosajutsa podnogi, v etom scripte on vsjo wto videt pod nogami, kladjot v sumku, a mne nenado , wtob on v sumku klal vsjakuju grazj, esli zdelatj s masivom, on pol goga proverjajet vewi, posle kazdova zabrasivanije, v etom scp on berjot vsjo , no ja xotelbi wtob on

IGNORIROVAL nenuznije ITEMI

, scp v studiju !
Code: Select all
sub FISHING()
DIM ULOVtype[4]
ULOVtype[0] = '0x09CC' #fish1
ULOVtype[1] = '0x09CD' #fish2
ULOVtype[2] = '0x09CE' #fish3
ULOVtype[3] = '0x09CF' #fish4
VAR udochka = '0x0DBF'
VAR nozh = '0x0F52'
VAR NumTile = '6043'
VAR MaxWeigth = 353
VAR i, x, y, k
wait(100)
UO.Equipt('Rhand', udochka)
start:
for x=-1 to 1
for y=-1 to 1
ToHide()
UO.Print("!_FISHING_IN_POINT_!: " + str(x) + " " + str(y))
UO.DeleteJournal()
while not UO.InJournal("no fish here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in water")
k = 0
if UO.Weight > MaxWeigth then
goto finish
endif
ToHide()
UO.DeleteJournal()
UO.WaitTargetTile(NumTile, str(UO.GetX()+x), str(UO.GetY()+y), str(UO.GetZ()))
UO.UseType(udochka)
while not (UO.InJournal("in water") or UO.InJournal("far away") or UO.InJournal("but fail") or UO.InJournal("You pull") or UO.InJournal("no fish here") or UO.InJournal("location") or k==50)
k = k + 1
wait(100)
if UO.InJournal("you fail") then
goto start
endif
wend
#ZDESJ NADO DOVAVITJ WTOB ON IGNORIROVAL MUSOR
if UO.InJournal("You put") then
UO.Set('finddistance','1') #
UO.Ignore('self')
UO.FindType('-1', '-1', 'ground')
while UO.FindCount() > 0 #
UO.MoveItem('finditem')
wait(200)
UO.FindType('-1', '-1', 'ground')
wend
UO.IgnoreReset()
endif
wend
next
next
finish:
UO.Print("!_MAX_WEIGHTH_!")
wait(100)
#ðåæåì ðûáó
UO.Print("!_SLICING_FISH_!")
for i=0 to 3 #!!!!!!
UO.WaitTargetType(ULOVtype[i])
UO.UseType(nozh)
wait(100)
next
if UO.Weight < MaxWeigth-5 then
goto start
endif
UO.Print("!_FISHING_FINISHES_!")
endsub
SUB ToHide()
while not UO.Hidden()
UO.WarMode(0)
UO.DeleteJournal()
UO.Print("!_HIDING_!")
UO.UseSkill('Hiding')
while not (UO.InJournal("You have hidden") or UO.InJournal("You can't seem"))
wait(100)
wend
wend
endsub
#-----------------------------------------------------------------------#
#########################################################################
используем кнопку edit [Nmy]
Posted: 2007-01-04 20:51:25
by DenjaGanjubass
NMY, xotj ti pomogi pozalujsto, tam ze ne nadolgo. OOOO4enj nado
Posted: 2007-01-05 01:45:00
by Nmy
Code: Select all
if UO.InJournal("You put") then
UO.Set('finddistance','1') #
UO.Ignore('self')
UO.FindType('-1', '-1', 'ground')
while UO.FindCount() > 0 #
UO.MoveItem('finditem')
wait(200)
UO.FindType('-1', '-1', 'ground')
wend
UO.IgnoreReset()
endif
здесь зделай чтоб он искал вещи заданые в массиве
Code: Select all
Dim find[2]
find[1] = '0x0001'
find[2] = '0x0002'
if UO.InJournal("You put") then
UO.Set('finddistance','1') #
UO.Ignore('self')
for n = 1 to 2
UO.FindType( find[n] , '-1', 'ground')
while UO.FindCount()
UO.MoveItem('finditem')
wait(200)
UO.FindType( find[n] , '-1', 'ground')
wend
next
UO.IgnoreReset()
endif
Posted: 2007-01-05 14:32:04
by DenjaGanjubass
tipo zdelatj vtoroi masiv dlja loota ?? tak ja ze gavarju, nexa4u wtob on v masive iskal , pol goda proxodit poka naidjot

Posted: 2007-01-05 14:34:29
by DenjaGanjubass
pomoimu tam nado dobavitj 4oto tipo tavo
Code: Select all
if not uo.GetGraphic('finditem') == '0x0DD6' then
#loot ...
else
uo.Ignore('finditem')
end if
#...
uo.IgnoreReset()
nu gde ze vi experti ???
Posted: 2007-01-05 14:43:17
by Nmy
он ищет в одну клетку... ты недумай а зделай- експерты знают лудше не?
Posted: 2007-01-05 14:56:14
by DenjaGanjubass
esli zdelatj s masivom, on pol goga proverjajet vewi, posle kazdova zabrasivanije, v etom scp on berjot vsjo , no ja xotelbi wtob on

IGNORIROVAL nenuznije ITEMI

v tom scripte katorij ja skinul pervij, u menja masiv itemov ogromnij vawe, tam vse weaponi, armori krome letherov, tam poka on budet iskatj posle kazdova zabrasivanije, pol goda proxodit

Posted: 2007-01-05 14:58:21
by Nmy
DenjaGanjubass wrote:esli zdelatj s masivom, on pol goga proverjajet vewi, posle kazdova zabrasivanije, v etom scp on berjot vsjo , no ja xotelbi wtob on

IGNORIROVAL nenuznije ITEMI

v tom scripte katorij ja skinul pervij, u menja masiv itemov ogromnij vawe, tam vse weaponi, armori krome letherov, tam poka on budet iskatj posle kazdova zabrasivanije, pol goda proxodit

говорю же он небудет пол года проверять :!:
с другой стороны сколько вещей надо игнорить?
Posted: 2007-01-05 15:05:11
by DenjaGanjubass
10, a esli masiv delatj, v masiv nado gdeto 60 vewej, ja uze delal s masivom , eto fishing zamedljajetsa v raza 4
Posted: 2007-01-05 16:22:32
by yxTbl
патом поделишся скриптом =))))
Posted: 2007-01-05 16:25:53
by Nmy
все 10 типов в студию
Posted: 2007-01-05 16:26:24
by DenjaGanjubass
davai vmeste enemy prositj, n-m-y ! n-m-y!

Posted: 2007-01-05 16:27:19
by DenjaGanjubass
a ti mozew tam napisatj prosto xxxxx, a ja potom sam vvedu, wa sro4no nado vijti, u pacanov strela
Posted: 2007-01-05 16:44:02
by Nmy
наверно так
Code: Select all
sub FISHING()
DIM ULOVtype[4]
ULOVtype[0] = '0x09CC' #fish1
ULOVtype[1] = '0x09CD' #fish2
ULOVtype[2] = '0x09CE' #fish3
ULOVtype[3] = '0x09CF' #fish4
VAR udochka = '0x0DBF'
VAR nozh = '0x0F52'
VAR NumTile = '6043'
VAR MaxWeigth = 353
VAR i, x, y, k
wait(100)
UO.Equipt('Rhand', udochka)
start:
for x=-1 to 1
for y=-1 to 1
ToHide()
UO.Print("!_FISHING_IN_POINT_!: " + str(x) + " " + str(y))
UO.DeleteJournal()
while not UO.InJournal("no fish here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in water")
k = 0
if UO.Weight > MaxWeigth then
goto finish
endif
ToHide()
UO.DeleteJournal()
UO.WaitTargetTile(NumTile, str(UO.GetX()+x), str(UO.GetY()+y), str(UO.GetZ()))
UO.UseType(udochka)
while not (UO.InJournal("in water") or UO.InJournal("far away") or UO.InJournal("but fail") or UO.InJournal("You pull") or UO.InJournal("no fish here") or UO.InJournal("location") or k==50)
k = k + 1
wait(100)
if UO.InJournal("you fail") then
goto start
endif
wend
if UO.InJournal("You put") then
UO.Set('finddistance','1') #
UO.Ignore('self')
UO.FindType('-1', '-1', 'ground')
while UO.FindCount()
if uo.GetGraphic('finditem') <> '0x0001' and uo.GetGraphic('finditem') <> '0x0002' and uo.GetGraphic('finditem') <> '0x0003' and uo.GetGraphic('finditem') <> '0x0004' and uo.GetGraphic('finditem') <> '0x0005' and uo.GetGraphic('finditem') <> '0x0006' and uo.GetGraphic('finditem') <> '0x0007' and uo.GetGraphic('finditem') <> '0x0008' and uo.GetGraphic('finditem') <> '0x0009' and uo.GetGraphic('finditem') <> '0x0010' then
UO.MoveItem('finditem')
wait(200)
else
uo.ignore('finditem')
endif
UO.FindType('-1', '-1', 'ground')
wend
endif
wend
next
next
finish:
UO.Print("!_MAX_WEIGHTH_!")
wait(100)
UO.Print("!_SLICING_FISH_!")
for i=0 to 3 #!!!!!!
UO.WaitTargetType(ULOVtype[i])
UO.UseType(nozh)
wait(100)
next
if UO.Weight < MaxWeigth-5 then
goto start
endif
UO.Print("!_FISHING_FINISHES_!")
endsub
SUB ToHide()
while not UO.Hidden()
UO.WarMode(0)
UO.DeleteJournal()
UO.Print("!_HIDING_!")
UO.UseSkill('Hiding')
while not (UO.InJournal("You have hidden") or UO.InJournal("You can't seem"))
wait(100)
wend
wend
endsub
Posted: 2007-01-05 16:48:16
by DenjaGanjubass
Code: Select all
sub FISHING()
DIM ULOVtype[4]
ULOVtype[0] = '0x09CC' #fish1
ULOVtype[1] = '0x09CD' #fish2
ULOVtype[2] = '0x09CE' #fish3
ULOVtype[3] = '0x09CF' #fish4
VAR udochka = '0x0DBF'
VAR nozh = '0x0F52'
VAR NumTile = '6043'
VAR MaxWeigth = 340
VAR i, x, y, k
wait(100)
UO.Equipt('Rhand', udochka)
start:
for x=-1 to 1
for y=-1 to 1
ToHide()
UO.Print("!_FISHING_IN_POINT_!: " + str(x) + " " + str(y))
UO.DeleteJournal()
while not UO.InJournal("no fish here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in water")
k = 0
if UO.Weight > MaxWeigth then
goto finish
endif
ToHide()
UO.DeleteJournal()
UO.WaitTargetTile(NumTile, str(UO.GetX()+x), str(UO.GetY()+y), str(UO.GetZ()))
UO.UseType(udochka)
while not (UO.InJournal("in water") or UO.InJournal("far away") or UO.InJournal("but fail") or UO.InJournal("You pull") or UO.InJournal("no fish here") or UO.InJournal("location") or k==50)
k = k + 1
wait(100)
if UO.InJournal("you fail") then
goto start
endif
wend
#ñîáèðàåì óëîâ
if UO.InJournal("You put") then
UO.Set('finddistance','0') #
UO.Ignore('self')
UO.FindType('-1', '-1', 'ground')
while UO.FindCount()
if uo.GetGraphic('finditem') <> '0x0C2C' and uo.GetGraphic('finditem') <> '0x0DD6' and uo.GetGraphic('finditem') <> '0x1CEF' and uo.GetGraphic('finditem') <> '0x1CF0' and uo.GetGraphic('finditem') <> '0x0E31' and uo.GetGraphic('finditem') <> '0x1717' and uo.GetGraphic('finditem') <> '0x0007' and uo.GetGraphic('finditem') <> '0x0008' and uo.GetGraphic('finditem') <> '0x0009' and uo.GetGraphic('finditem') <> '0x0010' then
UO.MoveItem('finditem')
wait(200)
else
uo.ignore('finditem')
endif
UO.FindType('-1', '-1', 'ground')
wend
endif
wend
next
next
finish:
UO.Print("!_MAX_WEIGHTH_!")
wait(100)
#ðåæåì ðûáó
UO.Print("!_SLICING_FISH_!")
for i=0 to 3 #!!!!!!
UO.WaitTargetType(ULOVtype[i])
UO.UseType(nozh)
wait(100)
next
if UO.Weight < MaxWeigth-5 then
goto start
endif
UO.Print("!_FISHING_FINISHES_!")
endsub
SUB ToHide()
while not UO.Hidden()
UO.WarMode(0)
UO.DeleteJournal()
UO.Print("!_HIDING_!")
UO.UseSkill('Hiding')
while not (UO.InJournal("You have hidden") or UO.InJournal("You can't seem"))
wait(100)
wend
wend
endsub
pacani, muziki ! u nas na serve mnogaja riba s odinakovimi tipami, u menja v masive 4 tipa, a rib gdeto ewo 4-5 s takimizhe tipami, Tobiw, on razrezaet ne vsju, a toka 4astj, 4o delatj ??

Posted: 2007-01-05 16:59:50
by Nmy
я и так человек занятой
Posted: 2007-01-05 18:16:33
by yxTbl
NMY wrote:Code: Select all
if uo.GetGraphic('finditem') <> '0x0001' and uo.GetGraphic('finditem') <> '0x0002' and uo.GetGraphic('finditem') <> '0x0003' and uo.GetGraphic('finditem') <> '0x0004' and uo.GetGraphic('finditem') <> '0x0005' and uo.GetGraphic('finditem') <> '0x0006' and uo.GetGraphic('finditem') <> '0x0007' and uo.GetGraphic('finditem') <> '0x0008' and uo.GetGraphic('finditem') <> '0x0009' and uo.GetGraphic('finditem') <> '0x0010' then
вместо 0х0001(10) вставлять итемы каторый ненада подбирать ?
и всеравно астанвливаеца када с хидинга выходит

Posted: 2007-01-05 19:31:46
by Nmy
что останавливается?
Posted: 2007-01-05 19:44:03
by yxTbl
NMY wrote:что останавливается?
нехочет больше рыбу лавить =\
в хидинг заходит и астанавливаеца =\
Posted: 2007-01-05 21:21:24
by GAUHAR
Я не знаю как другие отлаживают свои скрипты, но я, если что-то идет не так, в каждом сомнительном месте скрипта, и/или в начале каждого цикла, и/или в функиях которые вызываются из основного скрипта вставляю UO.Print("0"), UO.Print("1") и т.д. и уже смотрю, где скрипт работает не так как я предполагал. Получив, таким образом, информацию, делаю анализ и вношу исправления в скрипт. По крайней мере, я знаю где возникает проблема.
Я не сталкивался с ситуацией, когда мне надо игнорировать найденный предмет, но есть идея создать еще один массив с игнорируемыми предметами:
Code: Select all
DIM IgnoreType[2]
IgnoreType[0] = 'тип игнорируемой вещи'
IgnoreType[1] = 'тип игнорируемой вещи'
или добавить в массив предметы которые надо игнорировать, а там где надо игнорировать организуем цикл:
Code: Select all
FOR i = индекс_первого_игнорируемого_предмета TO индекс_последнего_игнорируемого_предмета
if UO.GetGraphic('finditem') = ULOVtype[i] then
UO.Ignore('finditem')
endif
NEXT
Но если не нравится идея с массивом (которая кажется вам слишком медленной), то рекомендую воспользоваться предложением NMY, так как оно действительно несколько быстрее, чем цикл:
Code: Select all
if uo.GetGraphic('finditem') <> '0x0001' and uo.GetGraphic('finditem') <> '0x0002' and uo.GetGraphic('finditem') <> '0x0003' and uo.GetGraphic('finditem') <> '0x0004' and uo.GetGraphic('finditem') <> '0x0005' and uo.GetGraphic('finditem') <> '0x0006' and uo.GetGraphic('finditem') <> '0x0007' and uo.GetGraphic('finditem') <> '0x0008' and uo.GetGraphic('finditem') <> '0x0009' and uo.GetGraphic('finditem') <> '0x0010' then
Поехали дальше. У вас стопорится после выхода из скрытности, я на ваше месте посмотрел бы функцию ToHide() и сделал бы анализ как она работает, может при провале хайда она получет сообщение которое в скрипте не указано, так как скрипт на ловлю может работать и без нее, и дописал бы это сообщение, так как на каждом шарде могут быть свои ньюансы. Или закомментировал бы вызов этой функции и посмотрел бы как скрипт работает без нее.