Yoko

All sides of Injection
It is currently 2026-01-17 00:53:10

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2004-08-22 12:24:40 
Offline

Joined: 2004-04-17 12:58:55
Posts: 12
вот никак не могу впихнуть условие вылавливания монстра,помогите плз
Code:
sub main() 
hide()
var mx, my, mz, i, j
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
for i = mx+2 to mx+6
for j = my-6 to my+6
UO.Print("Now Fishing In: "+str(mx-i)+" "+str(my-j))
uo.deletejournal()
if UO.InJournal(":") and uo.injournal("Sea Serpent") then
uo.exec("terminate main")
uo.exec("exec killsea")
endif
uo.deletejournal()
if UO.InJournal(":") and uo.injournal("Water Elemental") then
uo.exec("terminate main")
uo.exec("exec killelem")
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype("0x0DBF")
while not UO.InJournal("You pull") and not UO.InJournal("location") and not UO.InJournal("no fish") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in water")
wait(100)
wend
next
next
uo.sayu("Forward")
wait(6000)
uo.sayu("stop")
unloadc("0x4005B361")
uo.exec("exec main")
end sub

sub unloadc(container)
uo.canceltarget()
uo.ignorereset()
uo.findtype("-1","-1","backpack")
while uo.findcount()
uo.print(str(uo.findcount())+" left")
if (uo.getgraphic("finditem")<>"0x0DF0" and uo.getgraphic("finditem")<>"0x0E21" and uo.getgraphic("finditem")<>"0x1769" and uo.getgraphic("finditem")<>"0x176B" and uo.getgraphic("finditem")<>"0x0EFA") or uo.getquantity("finditem")>1 then
uo.moveitem("finditem","-1",container)
wait(200)
end if
uo.ignore("finditem")
uo.findtype("-1","-1","backpack")
wend
end sub

sub hide()
   while NOT UO.Hidden()
      UO.DeleteJournal()
      uo.warmode(0)
      UO.UseSkill('Stealth')
      repeat
         wait(100)
      until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide')
   wend
   wait(100)
end sub

sub killsea()

   VAR LastTimer, Sea
   
   UO.UnSetcatchbag()
   LastTimer=UO.Timer()

   UO.UseType('0x0DF0')  ;weapon
   wait(1000)
   UO.UseType('0x0F60')  ;shield
   wait(500)

   UO.DeleteJournal()
   UO.Exec('warmode 1')

   UO.FindType('0x0096',-1,'ground')
   Sea=UO.GetSerial('finditem')
   UO.Attack(Sea)
   repeat
      wait(1000)
      If UO.Life<90 Then
      repeat
         UO.Bandageself()
         wait(2500)
         UO.Attack(Sea)
      until UO.Life>=115
      Endif


   until UO.IsNPC(Sea)==0
   wait(3000)


   UO.Attack(Sea)
   UO.FindType('0x0096',-1,'ground')
   If UO.GetQuantity('finditem')>0 Then
      wait(500)
      UO.Attack(Sea)
      killsea()
   Endif

   UO.Exec('warmode 0')
   wait(1000)

   UO.Print("Sdoh skotina!")
   UO.SetEasyUO(99,'0')

   LastTimer=UO.Timer()
   if UO.Life<159 then
      repeat
         UO.BandageSelf()
         wait(4000)
                   until UO.Life>159 OR LastTimer+300<UO.Timer()

   UO.Print("Killing Done!")
uo.exec("exec main")
end sub

sub killelem()

   VAR LastTimer, elem
   
   UO.UnSetcatchbag()
   LastTimer=UO.Timer()

   UO.UseType('0x1B76')  ;weapon
   wait(1000)
   UO.UseType('0x0F60')  ;shield
   wait(500)

   UO.DeleteJournal()
   UO.Exec('warmode 1')

   UO.FindType('0x0010',-1,'ground')
   Sea=UO.GetSerial('finditem')
   UO.Attack(elem)
   repeat
      wait(1000)
      If UO.Life<90 Then
      repeat
         UO.Bandageself()
         wait(2500)
         UO.Attack(elem)
      until UO.Life>=115
      Endif


   until UO.IsNPC(elem)==0
   wait(3000)


   UO.Attack(elem)
   UO.FindType('0x0010',-1,'ground')
   If UO.GetQuantity('finditem')>0 Then
      wait(500)
      UO.Attack(elem)
      killelem()
   Endif

   UO.Exec('warmode 0')
   wait(1000)

   UO.Print("Sdoh skotina!")
   UO.SetEasyUO(99,'0')

   LastTimer=UO.Timer()
   if UO.Life<159 then
      repeat
         UO.BandageSelf()
         wait(4000)
                   until UO.Life>159 OR LastTimer+300<UO.Timer()

   UO.Print("Killing Done!")
uo.exec("exec main")
end sub

можно ли сделать так,чтобы журнал проверялся после каждого заброса?


Top
   
 Post subject:
PostPosted: 2004-08-22 14:38:21 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Сколько видов монстров ты можешь выловить?

_________________
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-08-22 21:29:10 
Offline

Joined: 2004-04-17 12:58:55
Posts: 12
только 2 ,елементаля и серпента.чар когда вылавливает монстра не переходит к скрипту на убийство :(((


Top
   
 Post subject:
PostPosted: 2004-08-23 10:17:25 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Code:
#...
mustkill = 0
uo.findtype("тип монстра1","-1","ground")
if uo.findcount() then
  mustkill = 1
endif
uo.findtype("тип монстра2","-1","ground")
if uo.findcount() then
  mustkill = 1
endif
if mustkill then
  #kill
endif
#...

проверь, включена ли Track World Items

_________________
Без труда не выловишь и рыбку из пруда,

А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-08-23 12:03:36 
Offline

Joined: 2004-04-17 12:58:55
Posts: 12
спасибо большое все рабтает!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited