Yoko

All sides of Injection
It is currently 2024-04-16 20:33:32

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Алхимия для FW
PostPosted: 2011-08-31 14:12:44 
Offline

Joined: 2006-11-07 00:52:08
Posts: 14
Location: Russia, Saratov
Простенький скрипт на алхимию на лессер хилках.

Code:
sub Alchemy()

var gs, RegCont, keg, EmptyBottle, HealPotion, a, b, t

   uo.print("Где лежит гинсенг?")
   uo.exec('addobject GinsChest')
   while uo.targeting()
   wait(100)
   wend
   uo.useobject('GinsChest')

RegCont = uo.getserial('GinsChest')
keg = '0x1940'
gs = '0x0F85'
EmptyBottle = '0x0F0E'
HealPotion = '0x0F0C'

DIM Gump[2]
Gump[0] = 'Miscellaneous'
Gump[1] = 'Heal'

while not uo.dead()
   if uo.gs < 1 then
      uo.findtype(gs,'-1',RegCont)
         if uo.fincount() > 0 then
            uo.moveitem('finditem', '1000','backpakc')
            wait(1000)
         else
            uo.print("There is no ginseng here...")
            return
         endif
   endif

   CheckLag()
   uo.warmode('0')
   uo.usetype('0x0E9B')

   for b = 0 to 1
      t = 0
      repeat
         wait(100)
         t = t + 1
      until uo.LastGump('text',b) == Gump[b] or t > 50
 
      if b == 0 then
         uo.lclick(200,200)
      else
         uo.lclick(290,333)
      endif
   next

   t = 0
   repeat
      wait(100)
      t = t + 1
   until uo.count(HealPotion) or t > 50

   uo.waittargettype(HealPotion)
   uo.usetype(keg)
      t = 0
      repeat
         wait(100)
         t = t + 1
      until uo.count(EmptyBottle) or t > 50
wend

endsub


Last edited by Vitle on 2011-08-31 15:25:41, edited 1 time in total.

Top
   
PostPosted: 2011-08-31 14:42:04 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
если оно работает то хорошо. Но я бы сделал чуть чуть по другому:
1) Сомневаюсь что там не получится использовать ловушки на меню - избегаем работу с гампами и кликами в экран. Если ловушки не сработают то другое дело...
2)
Code:
   uo.findtype(gs)
      if uo.getquantity('finditem') < 1 then
         uo.findtype(gs,'-1',RegCont)
         if uo.getquantity('finditem') > 1000 then
            CheckLag()
            uo.moveitem('finditem', '1000')
            wait(1000)
         else
            uo.print("There is no ginseng here...")
            return
         endif
      endif
это чуть чуть косметически подкрашивается и получается вот так:

Code:
      if uo.GS < 1 then 
         uo.findtype(gs,'-1',RegCont)
            if UO.FindCount() > 0 Then  ; тебе нужно в принципе наличие реагента
            uo.moveitem('finditem', '1000', 'backpack') ; правила хорошего тона ;)
            wait(1000)
         else
            uo.print("There is no ginseng here...")
            return
         endif
      endif

3) Проверять по журналу наличие вещи тоже не айс. Соответственно:
until uo.injournal('Lesser Heal') or t > 50
и
until uo.injournal('empty bottle') or t > 50

меняем на
until uo.count( empty_bottle ) or t > 50 ; тип пустой бутылки вбивается в var
until uo.count( Lesser_Heal ) or t > 50 ; тип зелья выше в var
и убираем все делжурналы.

4) Чеклаги ПЕРЕД движением не нужны. А вот там где нужно
Code:
uo.useobject('GinsChest')
CheckLag()   ;   вот тут
не стоИт.

А так ниче. Имеет право быть.

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2011-08-31 15:06:34 
Offline

Joined: 2006-11-07 00:52:08
Posts: 14
Location: Russia, Saratov
кул, спс! Щас перелопачу.

Поправил.
Остался вопрос по гампам: В таком виде работает хорошо, гампы даже появлятся не успевают.
Поводу ловушек: я по-другому с гампами пока не умею работать. :( Пишу инфогамп и оттуда координаты кнопачек копи-пастю... Что за ловушки? Где почитать про них? Какие команды?


Top
   
PostPosted: 2011-08-31 18:37:17 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
руками процесс зельеварения прогони и скрин окна крафта выложи.
Сдается мне что мможно обойтись чем то вроде

Code:
 UO.WaitMenu ('What sort of potion do you want to', 'Heal potion') 


но надо посмотреть картинку и проверить регистр букв - он важен.

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2011-08-31 19:56:28 
Offline

Joined: 2006-11-07 00:52:08
Posts: 14
Location: Russia, Saratov
Юзаю морктарку, выскакивает:

Image

Code:
_____infogump_______
serial   0x000bd11e
gumpid   0x0000003b
X   0
Y   0
1393   packet size
0   reply packet size
Buttons: ________
 page 0
    1 [  802] image=0x01F5 at 200:200
    2 [   21] image=0x08B0 at 285:243
    3 [   22] image=0x08B0 at 285:263
    4 [   23] image=0x08B0 at 285:283
    5 [   24] image=0x08B0 at 285:303
    6 [   25] image=0x08B0 at 285:323
    7 [   26] image=0x08B0 at 285:343
    8 [   27] image=0x08B0 at 285:363
    9 [   28] image=0x08B0 at 475:243
   10 [   29] image=0x08B0 at 475:263
   11 [   30] image=0x08B0 at 475:283
Checks&Radios: __
Entryes: ________
All commands: ____
    1] page 0
    2] gumppic 200 200 500
    3] page 1
    4] button 200 200 501 501 1 2 802
    5] gumppic 245 405 50
    6] gumppic 430 405 50
    7] tilepic 250 210 3849
    8] tilepic 225 243 3960
    9] tilepic 220 263 3966
   10] tilepic 230 283 3985
   11] tilepic 225 303 3983
   12] tilepic 225 320 3965
   13] tilepic 225 347 3975
   14] tilepic 225 367 3975
   15] tilepic 425 240 3982
   16] tilepic 425 260 3969
   17] tilepic 420 280 3978
   18] button 285 243 2224 2224 1 0 21
   19] button 285 263 2224 2224 1 0 22
   20] button 285 283 2224 2224 1 0 23
   21] button 285 303 2224 2224 1 0 24
   22] button 285 323 2224 2224 1 0 25
   23] button 285 343 2224 2224 1 0 26
   24] button 285 363 2224 2224 1 0 27
   25] button 475 243 2224 2224 1 0 28
   26] button 475 263 2224 2224 1 0 29
   27] button 475 283 2224 2224 1 0 30
   28] text 290 210 50 0
   29] text 269 240 0 9
   30] text 267 260 0 10
   31] text 267 280 0 11
   32] text 267 300 0 12
   33] text 267 320 0 13
   34] text 267 340 0 10
   35] text 267 360 0 12
   36] text 310 240 94 1
   37] text 310 260 94 2
   38] text 310 280 94 3
   39] text 310 300 94 4
   40] text 310 320 94 5
   41] text 310 340 94 6
   42] text 310 360 94 7
   43] text 310 380 94 8
   44] text 457 240 0 14
   45] text 500 240 94 15
   46] text 457 260 0 16
   47] text 500 260 94 17
   48] text 457 280 0 14
   49] text 500 280 94 18
Text: ____________
    0] Miscellaneous
    1] Shrink
    2] Bless
    3] Invisibility
    4] Lava Bomb
    5] Total Heal
    6] Mana Refresh
    7] Total Mana
    8] Refresh
    9] 2
   10] 3
   11] 4
   12] 6
   13] 9
   14] 5
   15] Trance
   16] 4
   17] Antidotum
   18] Stoneskin


Листаю, выскакивает другой:

Image

Code:
_____infogump_______
serial   0x000bd11e
gumpid   0x0000003a
X   0
Y   0
1791   packet size
0   reply packet size
Buttons: ________
 page 0
    1 [  801] image=0x01F5 at 200:200
    2 [  803] image=0x01F6 at 556:200
    3 [   11] image=0x08B0 at 290:243
    4 [   12] image=0x08B0 at 290:263
    5 [   13] image=0x08B0 at 290:333
    6 [   14] image=0x08B0 at 290:353
    7 [   15] image=0x08B0 at 290:373
    8 [   16] image=0x08B0 at 480:243
    9 [   17] image=0x08B0 at 480:313
   10 [   18] image=0x08B0 at 480:333
   11 [   19] image=0x08B0 at 480:353
   12 [   20] image=0x08B0 at 480:373
Checks&Radios: __
Entryes: ________
All commands: ____
    1] page 0
    2] gumppic 200 200 500
    3] page 1
    4] button 200 200 501 501 1 1 801
    5] button 556 200 502 502 1 3 803
    6] gumppic 245 405 50
    7] gumppic 430 405 50
    8] tilepic 250 210 3849
    9] tilepic 230 243 3974
   10] tilepic 230 263 3974
   11] tilepic 250 300 3852
   12] tilepic 230 333 3973
   13] tilepic 230 373 3973
   14] tilepic 230 353 3973
   15] gumppic 230 280 57
   16] gumppic 260 280 58
   17] gumppic 275 280 58
   18] gumppic 290 280 58
   19] gumppic 305 280 58
   20] gumppic 320 280 58
   21] gumppic 335 280 58
   22] gumppic 350 280 58
   23] gumppic 365 280 58
   24] gumppic 375 280 59
   25] button 290 243 2224 2224 1 0 11
   26] button 290 263 2224 2224 1 0 12
   27] button 290 333 2224 2224 1 0 13
   28] button 290 353 2224 2224 1 0 14
   29] button 290 373 2224 2224 1 0 15
   30] text 290 210 50 0
   31] text 290 300 50 1
   32] text 270 240 0 8
   33] text 270 260 0 11
   34] text 275 330 0 7
   35] text 272 350 0 9
   36] text 272 370 0 12
   37] text 315 240 94 5
   38] text 315 260 94 6
   39] text 315 330 94 4
   40] text 315 350 94 5
   41] text 315 370 94 6
   42] tilepic 450 210 3846
   43] tilepic 420 243 3981
   44] tilepic 450 280 3850
   45] tilepic 420 313 3976
   46] tilepic 420 333 3976
   47] tilepic 420 353 3976
   48] tilepic 420 373 3976
   49] gumppic 420 260 57
   50] gumppic 450 260 58
   51] gumppic 465 260 58
   52] gumppic 480 260 58
   53] gumppic 495 260 58
   54] gumppic 510 260 58
   55] gumppic 525 260 58
   56] gumppic 540 260 58
   57] gumppic 555 260 59
   58] button 480 243 2224 2224 1 0 16
   59] button 480 313 2224 2224 1 0 17
   60] button 480 333 2224 2224 1 0 18
   61] button 480 353 2224 2224 1 0 19
   62] button 480 373 2224 2224 1 0 20
   63] text 480 210 50 2
   64] text 480 280 50 3
   65] text 465 240 0 7
   66] text 462 310 0 9
   67] text 462 330 0 15
   68] text 462 350 0 10
   69] text 462 370 0 13
   70] text 505 240 94 5
   71] text 505 310 94 4
   72] text 505 330 94 5
   73] text 505 350 94 6
   74] text 505 370 94 14
Text: ____________
    0] Strength
    1] Heal
    2] Nightsight
    3] Poison
    4] Lesser
    5] Normal
    6] Greater
    7] 1
    8] 2
    9] 3
   10] 9
   11] 5
   12] 7
   13] 15
   14] Deadly
   15] 6


Top
   
PostPosted: 2011-08-31 20:23:26 
Offline

Joined: 2006-11-07 00:52:08
Posts: 14
Location: Russia, Saratov
Mirage wrote:
руками процесс зельеварения прогони и скрин окна крафта выложи.
Сдается мне что мможно обойтись чем то вроде

Code:
 UO.WaitMenu ('What sort of potion do you want to', 'Heal potion') 


но надо посмотреть картинку и проверить регистр букв - он важен.


Да не, я не настолько безнадежен, чтобы не знать про вейтменю) я про гампы говорю.. как еще кроме лклика с ними обращаться можно? онгамп репит чой-та не хочет с этой алхимией работать. А больше я ниче не знаю)


Top
   
PostPosted: 2011-08-31 20:41:20 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
uo.recall(id ступки, номер кнопки)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 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