Pomogite dobavitj paru strok

Anything and all.

Moderators: Murderator+, Murderator

DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Pomogite dobavitj paru strok

Post 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]
Last edited by DenjaGanjubass on 2007-01-04 15:58:54, edited 1 time in total.
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post by DenjaGanjubass »

NMY, xotj ti pomogi pozalujsto, tam ze ne nadolgo. OOOO4enj nado
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post 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
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post by DenjaGanjubass »

tipo zdelatj vtoroi masiv dlja loota ?? tak ja ze gavarju, nexa4u wtob on v masive iskal , pol goda proxodit poka naidjot :cry:
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post 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 ???
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

UO.Set('finddistance','1')


он ищет в одну клетку... ты недумай а зделай- експерты знают лудше не?
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post 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 :cry:
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post 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 :cry:


говорю же он небудет пол года проверять
:!:

с другой стороны сколько вещей надо игнорить?
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post by DenjaGanjubass »

10, a esli masiv delatj, v masiv nado gdeto 60 vewej, ja uze delal s masivom , eto fishing zamedljajetsa v raza 4
yxTbl
Posts: 39
Joined: 2007-01-02 15:09:35

Post by yxTbl »

патом поделишся скриптом =))))
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

все 10 типов в студию
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post by DenjaGanjubass »

davai vmeste enemy prositj, n-m-y ! n-m-y! :lol:
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post by DenjaGanjubass »

a ti mozew tam napisatj prosto xxxxx, a ja potom sam vvedu, wa sro4no nado vijti, u pacanov strela
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post 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
DenjaGanjubass
Posts: 76
Joined: 2006-07-28 00:21:50

Post 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 ?? :(
Last edited by DenjaGanjubass on 2007-01-05 21:16:41, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

я и так человек занятой
yxTbl
Posts: 39
Joined: 2007-01-02 15:09:35

Post 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) вставлять итемы каторый ненада подбирать ?
и всеравно астанвливаеца када с хидинга выходит :(
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

что останавливается?
yxTbl
Posts: 39
Joined: 2007-01-02 15:09:35

Post by yxTbl »

NMY wrote:что останавливается?

нехочет больше рыбу лавить =\
в хидинг заходит и астанавливаеца =\
GAUHAR
Posts: 137
Joined: 2006-11-06 21:45:23

Post 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() и сделал бы анализ как она работает, может при провале хайда она получет сообщение которое в скрипте не указано, так как скрипт на ловлю может работать и без нее, и дописал бы это сообщение, так как на каждом шарде могут быть свои ньюансы. Или закомментировал бы вызов этой функции и посмотрел бы как скрипт работает без нее.
Post Reply