Yoko
http://forum.yoko.com.ua/

Kill agro npc+loot. DRW
http://forum.yoko.com.ua/viewtopic.php?f=20&t=12226
Page 1 of 1

Author:  Scripts Writer [ 2007-07-16 08:13:27 ]
Post subject:  Kill agro npc+loot. DRW

Code:
############################# 
# created by Scripts Writer #
#        Dragon World       #
#          16.07.07         #
#######################################
# Kill agressive npc without moving   #
#######################################
# Description in icq: 424131028       #
#######################################

sub main()

uo.Set('finddistance','3')

DIM sk[1]

sk[0]=0x0032
#sk[1]=

var i,npc
var weapon=0x400D5CA4
var bone=0x0F7E

repeat
 for i=0 to 0
  uo.FindType(sk[i],'-1','ground')
  if not uo.FindCount() then
    if uo.Hidden() then
      if uo.GetHp('self') <= uo.STR-10 then
        repeat
          wait(2000)
          uo.BandageSelf()
        until uo.hp>=uo.STR-10
        uo.UseObject(weapon)
        wait(500)
      else
        wait(500)
      end if
    else
      uo.UseSkill('Hiding')
      uo.print('Hiding...')
      wait(3000)
    end if
  else
    npc=uo.GetSerial('finditem')
    uo.Attack(npc)
    repeat
      wait(100)
    until uo.GetMaxHp(npc)==0
    CheckLag()
    uo.WaitTargetObject('lastcorpse')
    uo.UseObject(weapon)
    wait(500)
    uo.FindType(bone,'-1','lastcorpse')
    if uo.FindCount() then
      uo.moveitem('finditem','all')
      wait(750)
    end if
    uo.Ignore('lastcorpse')
    uo.WarMode(0)
  end if
 next
 wait(1000)
 CheckLag()
until uo.Dead()
end sub

sub CheckLag()
  uo.DeleteJournal()
  uo.Click('backpack')
  repeat
    wait(100)
  until uo.InJournal('backpack')
end sub

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/