Yoko

All sides of Injection
It is currently 2025-12-03 00:25:07

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2007-11-27 17:46:56 
Offline

Joined: 2007-11-16 13:20:20
Posts: 12
Вот скрипт. Довольно хороший) Для прокачки в нб данже на ДРВ подходит в самый раз) Но глюк в нем присутствует.. да и несколько доп. функций не помешают... И еще расскажу в кратце что из себя представляет скрипт:
Ищет Ластобьектом монстра, когда находит, идет к нему и атачит, как убил Лутит командой ",emptycontainer 550", после лута идет в середину комнаты... и снова ищет ластобектом монстра.
Итак, что нужно:
Чтобы атачил монстра, когда стоит в упор к нему...(это и есть глюк)
Чтобы Лут складывался в отдельный мешок(чтобы удобней было)
Чтобы после лута и отхода в исходное место, врубал Хайду(чтобы не атачили другие монстры).
Заранее премного благодарен)

Code:
sub KillThemAll() 
;var Victim=0x0032 #тип животного 1
var Victim=0x03CA #тип животного 2
var CuttingTool=0x13C6 #Чем рЭзать(оружие)
var n=6
var x=uo.GetX()
var y=uo.GetY()
;uo.print('001')
uo.ignorereset()
;uo.print('002')
;uo.forget('far')
;uo.print('003')
;uo.forget('counters')
;uo.print('004')
uo.SetGlobal('KillCount', 0)
;uo.print('005')

uo.Set('finddistance',str(n))

Repeat
   wait(500)
   uo.FindType(victim, -1,'ground')
   if uo.FindCount() then
      wait(100)
      if uo.IsNPC('finditem') then
;         uo.info('finditem')
         while uo.IsNPC('finditem')
            if uo.GetDistance('finditem') > 1 then
               MoveTo('finditem', 1)
               uo.attack('finditem')
            end if
            wait(100)
         wend
         uo.SetGlobal('KillCount', val(uo.GetGlobal('KillCount'))+1)
         uo.forget('finditem')
;        uo.warmode(0)
         uo.waittargetobject('lastcorpse')
         wait(100)
         uo.usetype(CuttingTool)
         wait(100)
         uo.useobject('lastcorpse')
         wait(550)
         uo.waittargetobject('lastcorpse')
         uo.say(',emptycontainer 550')
         while uo.waiting()
            wait(100)
         wend
;         uo.disarm()
         n=1
      else
         uo.Ignore('finditem')
      end if
   else
      n=n+1
      if n > 20 then
         if (uo.GetX() <> x) or (uo.GetY() <> y) then
            MoveToXY(x, y, 1)
         end if
         n=1
      end if
   end if
Until uo.Dead()
end sub

sub Stat()
   uo.charprint(257, 'Х-ха! Уже '+uo.GetGlobal('KillCount')+' скелетов заготовлено!')
end sub

sub Abs(num)
   if num < 0 then
      return -num
   end if
   return num
end sub

sub Sig(num)
if num < 0 then
   return -1
else
   if num == 0 then
      return 0
   endif
endif
return 1
end sub
       
sub MoveToXY(x, y, prec)
   var dx, dy
   dim Key[9]
      Key[0]=37
      Key[1]=35
      Key[2]=40
      Key[3]=36
      Key[4]=12
      Key[5]=34
      Key[6]=38
      Key[7]=33
      Key[8]=39
      dx=x-uo.GetX()
      dy=-y+uo.GetY()
   while (Abs(dx) > prec) or (Abs(dy) > prec)
      dx=x-uo.GetX()
      dy=-y+uo.GetY()
      uo.Press(Key[(sig(dy)+1)*3+1+sig(dx)])
      wait(10)
   wend
end sub   

sub MoveTo(object, prec)
   var dx, dy
   dim Key[9]
      Key[0]=37
      Key[1]=35
      Key[2]=40
      Key[3]=36
      Key[4]=12
      Key[5]=34
      Key[6]=38
      Key[7]=33
      Key[8]=39
   while uo.GetDistance(object) > prec
      dx=uo.GetX(object)-uo.GetX()
      dy=-uo.GetY(object)+uo.GetY()
      uo.Press(Key[(sig(dy)+1)*3+1+sig(dx)])
      wait(10)
   wend
end sub   

sub ExtendedInfo()

  var ObjectSerial
  var ObjectGraphics
  var ObjectIsNPC
  var ObjectNotoriety

  UO.Print('Select object to explore')
  UO.AddObject('ObjectToExplore')
  While UO.Targeting()==2
    Wait(50)
  WEnd
 
  UO.Click('ObjectToExplore')
  Wait(500)
 
  UO.Print('Object name is: '+UO.GetName('ObjectToExplore'))
 
  ObjectSerial = UO.GetSerial('ObjectToExplore')
  UO.Print('Object serial is : '+ObjectSerial)
  ObjectGraphics = UO.GetGraphic('ObjectToExplore')
  UO.Print('Object type is : '+ObjectGraphics)
  ObjectIsNPC = UO.IsNPC('ObjectToExplore')
  UO.Print('Object IsNPC number is : '+str(ObjectIsNPC))
  ObjectNotoriety = UO.GetNotoriety('ObjectToExplore')
  UO.Print('Object notoriety is : '+str(ObjectNotoriety))


Top
   
 Post subject:
PostPosted: 2007-11-28 16:25:02 
Offline

Joined: 2007-11-16 13:20:20
Posts: 12
Ну тчо? Никто не поможет?) Если че с меня пиво)


Top
   
 Post subject:
PostPosted: 2007-11-28 16:53:42 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
да уж ;) поздевался над скриптом хорошо;) помнит ся там овци изначально были;)


Top
   
 Post subject:
PostPosted: 2007-11-28 17:37:34 
Offline

Joined: 2007-11-16 13:20:20
Posts: 12
Grin wrote:
да уж ;) поздевался над скриптом хорошо;) помнит ся там овци изначально были;)


))
Ну так его поправить возможно или нет?)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 11 guests


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