Page 1 of 1

Вставка рес

Posted: 2015-01-31 23:50:04
by dubd
Привет! Вот кусочек из скрипта на мининг (ресалка). Скажите пожалуйста как правильней её вставить в другой скрипт?

Code: Select all

sub Resurrector()
   var oldX,oldY
   while 1
      if uo.dead() then
         uo.exec('terminate main')
         uo.exec('terminate Reconnector')
         uo.TextOpen()
         uo.TextPrint('- dead - @ '+MakeTime())
         wait(5000)
         oldX = Uo.GetX()
         oldY = Uo.GetY()
         uo.useobject('self')
         checklag()
         wait(700)
         repeat
            uo.lclick(helpX,helpY)
            checklag()
            wait(700)
            uo.lclick(264,308)
            checklag()
            wait(700)     
            uo.lclick(175,203)
            checklag()
            wait(5000)   
         until oldX<>UO.GetX() OR oldY<>UO.GetY()
         repeat
            uo.press(39)
            wait(2000)
         until UO.GetY()<534
         repeat
            uo.useobject('0x4001BDF0')
            wait(3000)
         until uo.life>0
         Open(uo.getserial('backpack'))
         wait(100000)
         oldX = Uo.GetX()
         oldY = Uo.GetY()         
         uo.recall(Runebook,Runenr)
         repeat
            wait(700)
         until oldX<>uo.getx('self') && oldY<>uo.gety('self')
         Open(Chest)
         RegCheck()
         GrabBlankRune()
         Mark(Blankrune,1)
         if uo.waiting() then
            uo.canceltarget()
         endif
         uo.exec('exec main')
      endif
      wait(5000)
   wend
endsub

Re: Вставка рес

Posted: 2015-02-01 09:20:25
by Mirage
Слово Resurrector() вставить в другой скрипт в нужное тебе место. :roll:

Code: Select all

sub main()
; какойто скрипт
 if какое то событие then
    Resurrector()
 endif
endsub

Re: Вставка рес

Posted: 2015-02-01 16:50:36
by dubd
Мираж спасибо! Да, в начало потому, что он проверяет условие не мёртвый ли чар? Чтобы воскреснуть!
Вот начало куска скрипта на мининг (с которого взята воскрешалка):)

Code: Select all

sub main()
   var markflag
   uo.exec('exec Reconnector')
   if not uo.getglobal('flagRes')=='1' then
      uo.exec('exec Resurrector')
      uo.setglobal('flagRes','1')
   endif
   wait(1000)   
   uo.print('Dont forget track world items!')
   uo.findtype(rune,-1,'backpack')
   if uo.findcount() then
      Runehome=uo.getserial('finditem')
   else
      uo.print('Runehome not found! Terminate.')
      uo.exec('terminate all')
   endif
   Open(Chest)
   GrabBlankRune()
   while not uo.dead()
      Open(Runebag)
      uo.findtype(rune,-1,Runebag)


а вот начало куда хочетца вставить: как лучче это сделать? скажите пожалуйста!

Code: Select all

sub maning()
var mx, my, mz, i, j, jor, ser, noto
Uo.exec("set norbcheck 1")
uo.exec("set norbcalc 1")

uo.exec('addobject Shovel')
while uo.targeting()
wait(100)
wend
 
uo.exec('addobject Runebook')
while uo.targeting()
wait(100)
wend

start:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my -4 to my+4
while not UO.Hidden()