Yoko

All sides of Injection
It is currently 2024-03-28 11:05:38

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2007-06-30 15:12:26 
Offline

Joined: 2007-06-30 14:47:09
Posts: 8
В этом скрипте, есть недочеты, а именно:
-синхронизация скрипта с антимакрос системой(по отдельности оба)
-после разгрузки из пака,не встает на новый круг
-при появлении и гвардов и игроков, начинает тупить, делает сразу по несколько реколов
Скрипт:
Code:
sub AntiMacros() 
   while not uo.dead()
      if uo.LastGump('text',0) == 'Antimacros System' then
         wait(250)
       uo.lclick(uo.LastGump('x')+140, uo.LastGump('y')+210)
         wait(500)     
         IF UO.InJournal("protection") then
            uo.say (uo.LastGump('text',2))
          wait(500)
          uo.lclick(uo.LastGump('x')+140, uo.LastGump('y')+210)
          UO.DeleteJournal()
            wait(2000)             
       endif
      end if
      uo.usetype(0x0F43)
   wait(20000)
   
   wend
end sub
sub Mining()
VAR a = 0 # 0 <=> ???????????? ??????? ??????? # 1 <=> ???????????? ??????? ?? ??????? #
uo.setglobal('recal', '1') #???????? ?? ???????????? ?? ??????#
uo.setglobal('place', '1') #???????? ?? ??????????? ???? ?? ?????#
uo.setglobal('circle', '1') #???????? ?? ???????????? ? ????????? ????? ??? ?????? ??????? ?????#
uo.setglobal('back', '0') #???????? ?? ????????????? ??????????? ?? ????? ????? ????? ???????#
if a == 1 then
  uo.print('??????? ???? ? ????')
  uo.exec('addobject Home')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 1')
  uo.exec('addobject mine1')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 2')
  uo.exec('addobject mine2')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 3')
  uo.exec('addobject mine3')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 4')
  uo.exec('addobject mine4')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 5')
  uo.exec('addobject mine5')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 6')
  uo.exec('addobject mine6')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 7')
  uo.exec('addobject mine7')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 8')
  uo.exec('addobject mine8')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 9')
  uo.exec('addobject mine9')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 10')
  uo.exec('addobject mine10')
  while uo.targeting()
    wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 11')
  uo.exec('addobject mine11')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 12')
  uo.exec('addobject mine12')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 13')
  uo.exec('addobject mine13')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 14')
  uo.exec('addobject mine14')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
  uo.print('??????? ???? ? ????? 15')
  uo.exec('addobject mine15')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 16')
  uo.exec('addobject mine16')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 17')
  uo.exec('addobject mine17')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 18')
  uo.exec('addobject mine18')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 19')
  uo.exec('addobject mine19')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 20')
  uo.exec('addobject mine20')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 21')
  uo.exec('addobject mine21')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 22')
  uo.exec('addobject mine22')
  while uo.targeting()
      wait(100)
  wend
  wait(1000)
    uo.print('??????? ???? ? ????? 23')
  uo.exec('addobject mine23')
  while uo.targeting()
      wait(100)
  wend
  return
endif
uo.exec('exec CheckingItems')
end sub

sub CheckingItems()
VAR b
uo.findtype('0x0F0E') #??? ?????? ???????#
if uo.findcount() > 0 then
  uo.moveitem('finditem', '-1', 'Sunduk1')
  wait(1000)
  checklag()
endif
DIM Ore[4]
Ore[0] = '0x19B9' #??? 4?? ? ????? ????#
Ore[1] = '0x19B8' #??? 3?? ????#
Ore[2] = '0x19BA' #??? 2?? ????#
Ore[3] = '0x19B7' #??? 1?? ???#
for var a = 0 to 3
  uo.findtype(Ore[a])
  while uo.findcount() > 0
    uo.moveitem('finditem', '-1', 'Sunduk2')
    wait(1000)
    checklag()
    uo.findtype(Ore[a])
  wend
next
uo.useobject('Sunduk1')
wait(1000)
checklag()
DIM Reg[3]
Reg[0] = '0x0F7A' #Black Pearl# 
Reg[1] = '0x0F7B' #Bood Moss#   
Reg[2] = '0x0F86' #Mandrake Root#         
for b = 0 to 2
  if uo.count(Reg[b]) < 50 then
    uo.findtype(Reg[b], '-1', 'Sunduk1')
    if uo.findcount() > 0 then
      uo.moveitem('finditem', '50')
      wait(1000)
      checklag()
    else
      uo.print('??? ???????????? ?????????? ????? ? ???????')
      return
    endif
  endif
next
if uo.count('0x0F08') < 5 then #??? ???????#
  uo.findtype('0x0F08', '-1', 'Sunduk1')
  if uo.findcount() > 0 then
    uo.moveitem('finditem', '5')
    wait(1000)
    checklag()
  else
    uo.print('??? ???????????? ?????????? ??????? ? ???????')     
    ;return
  endif
endif
uo.findtype('0x0E85') #??? ?????#
while uo.findcount() < 7
  uo.findtype('0x0E85', '-1', 'Sunduk1')
  if uo.findcount() > 0 then
    uo.moveitem('finditem', '1')
  else
    uo.print('??? ???????????? ?????????? ????? ? ???????')
    return
  endif
  wait(1000)
  checklag()
  uo.findtype('0x0E85')
wend
if val(uo.getglobal('back')) == 1 then
  wait(50)
else
  uo.exec('exec Teleportation')
endif
end sub

sub Teleportation()
VAR a, b, c
VAR d = uo.getx('self')
repeat
  while uo.mana < 11
    uo.warmode('0')
    uo.useskill('Meditation')
    wait(1000)
  wend
  a = 0
  if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
    uo.usetype('0x0F08')
    uo.closeuo()
  else
    wait(50)
  endif
  uo.deletejournal()
  if val(uo.getglobal('recal')) == 1 then
    uo.waittargetobject('mine1')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 2 then
    uo.waittargetobject('mine2')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 3 then
    uo.waittargetobject('mine3')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 4 then
    uo.waittargetobject('mine4')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 5 then
    uo.waittargetobject('mine5')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 6 then
    uo.waittargetobject('mine6')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 7 then
    uo.waittargetobject('mine7')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 8 then
    uo.waittargetobject('mine8')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 9 then
    uo.waittargetobject('mine9')
    uo.cast('Recall')
  else
    wait(50)
  endif
  if val(uo.getglobal('recal')) == 10 then
    uo.waittargetobject('mine10')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 10 then
    uo.waittargetobject('mine10')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 11 then
    uo.waittargetobject('mine11')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 12 then
    uo.waittargetobject('mine12')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 13 then
    uo.waittargetobject('mine13')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 14 then
    uo.waittargetobject('mine14')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 15 then
    uo.waittargetobject('mine15')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 16 then
    uo.waittargetobject('mine16')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 17 then
    uo.waittargetobject('mine7')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 18 then
    uo.waittargetobject('mine18')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 20 then
    uo.waittargetobject('mine20')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 21 then
    uo.waittargetobject('mine21')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 22 then
    uo.waittargetobject('mine22')
    uo.cast('Recall')
  else
    wait(50)
  endif
    if val(uo.getglobal('recal')) == 23 then
    uo.waittargetobject('mine123')
    uo.cast('Recall')
  else
    wait(50)
  endif
  repeat
    wait(100)
    a = a + 1
  until a > 35 or d <> uo.getx('self') or uo.injournal('The spell fizzles.')
  wait(500)
until not uo.injournal('The spell fizzles.')
b = val(uo.getglobal('recal')) + 1
uo.setglobal('recal', str(b))
if val(uo.getglobal('recal')) > 23 then
  uo.setglobal('recal', '1')
endif
uo.set('finddistance', '7')
uo.findtype('0x000E', '-1', '1') #??? ??????????#
if uo.findcount() > 0 then
  uo.usetype('0x0F08')
  uo.exec('exec Teleportation')
  return
endif
if val(uo.getglobal('back')) == 0 then
  uo.exec('exec CheckingPlayers')
  uo.setglobal('place', '1')
  uo.setglobal('circle', '1')
  uo.exec('exec Obkopka') 
else
  uo.setglobal('back', '0')
endif
end sub


sub CheckingPlayers()
VAR a, b
uo.ignore('self', 'on')
DIM Chars[2]
Chars[0] = '0x1190' #??? ?????? ???????? ????#
Chars[1] = '0x1191' #??? ?????? ???????? ????#
while not uo.dead()
  for a = 0 to 1
    if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
      uo.usetype('0x0F08')
      uo.closeuo()
    else
      wait(50)
    endif     
    while val(uo.getglobal('find')) == 1
      wait(50)
    wend
    uo.set('finddistance', '15')
    uo.findtype(Chars[a], '-1', '1') 
    if uo.findcount() > 0 then
      uo.usetype('0x0F08')
      uo.exec('terminate Teleportation')
      uo.exec('terminate Obkopka')
      uo.exec('terminate ChengePlace')
      uo.exec('exec Teleportation')
      return
    else
      wait(500)
    endif
  next
wend
end sub

sub Obkopka()
VAR mx, my, mz, a, b, c, d, e, f
while not uo.dead()
  if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
    uo.usetype('0x0F08')
    uo.closeuo()
  else
    wait(50)
  endif     
  uo.deletejournal()
  mx = uo.getx('self')
  my = uo.gety('self')
  mz = uo.getz('self')
  for a = mx-2 to mx+2
    for b = my-2 to my+2
      while not uo.Hidden()
        c = 0
        uo.warmode('0')
        uo.useskill('Stealth')
        repeat
          wait(100)
          c = c + 1
        until uo.Hidden() or c > 40
      wend
      uo.print('!!!?????? ???!!!>>> : '+str(mx-a)+' '+str(my-b))
      d = val(uo.getglobal('place')) + 1
      uo.setglobal('place', str(d))
      while not uo.injournal('no ore here') and not uo.injournal('location') and not uo.injournal('far away') and not uo.injournal('in rock') and not uo.injournal('You broke')
        if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
          uo.usetype('0x0F08')
          uo.closeuo()
        else
          wait(50)
        endif     
        uo.deletejournal()
        if uo.waiting() then
          uo.canceltarget()
        else
          wait(50)
        endif
        uo.waittargettile('1341', str(a), str(b), str(mz))
        uo.usetype('0x0E85') #??? ?????#
        while not uo.injournal('You put') and not uo.injournal('location') and not uo.injournal('no ore') and not uo.injournal('but fail') and not uo.injournal('far away') and not uo.injournal('in rock') and not uo.injournal('You broke')
          wait(500)
        wend
        uo.setglobal('find', '1')
        wait(200)
        uo.set('finddistance', '7')
        uo.findtype('0x000E', '-1', '1') #??? ??????????#
        if uo.findcount() > 0 then
          uo.setglobal('find', '0')
          uo.usetype('0x0F08')
          uo.exec('exec Teleportation')
          uo.exec('terminate CheckingPlayers')
          return
        else
          uo.setglobal('find', '0')
        endif     
        if val(uo.getglobal('place')) > 25 then
          uo.setglobal('place', '1')
          uo.exec('exec ChengePlace')         
          return
        else
          wait(50)
        endif
        if uo.weight > 600 then #???????????? ???#
          uo.setglobal('back', '1')
          uo.exec('terminate CheckingPlayers')
          GoHome()
          CheckingItems()
          Teleportation()
          Back()
          uo.exec('exec CheckingPlayers')
        else
          wait(50)
        endif
      wend
      if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
        uo.usetype('0x0F08')
        uo.closeuo()
      else
        wait(50)
      endif     
      uo.deletejournal()
    next
  next
wend
end sub

sub ChengePlace()
VAR a, b, c, d, e, f, g, h, i, j, k
if val(uo.getglobal('circle')) > 3 then
  uo.setglobal('circle', '1')
  uo.exec('terminate CheckingPlayers')
  uo.exec('exec Teleportation')
  return
endif
if val(uo.getglobal('circle')) == 1 then
  if uo.getdir('self') == 3 then
    a = 1
  else
    a = 2
  endif
  for b = 1 to a
    uo.press(40)
    wait(300)
  next
  for c = 1 to 3
    uo.press(34)
    wait(300)
  next
  for d = 1 to 2
    uo.press(39)
    wait(300)
  next
  endif
endif
if val(uo.getglobal('circle')) == 2 then
  if uo.getdir('self') == 1 then
    a = 1
  else
    a = 2
  endif
  for e = 1 to a
    uo.press(39)
    wait(300)
  next
  for f = 1 to 3
    uo.press(33)
    wait(300)
  next
  for g = 1 to 2
    uo.press(38)
    wait(300)
    next
  endif
if val(uo.getglobal('circle')) == 3 then
  if uo.getdir('self') == 7 then
    a = 1
  else
    a = 2
  endif
  for h = 1 to a
    uo.press(38)
    wait(300)
  next
  for i = 1 to 3
    uo.press(36)
    wait(300)
  next
  for j = 1 to 2
    uo.press(37)
    wait(300)
  next
endif
k = val(uo.getglobal('circle')) + 1
uo.setglobal('circle', str(k))
uo.exec('exec Obkopka')
end sub

sub checklag()
uo.click('backpack')
while not uo.injournal('backpack')
  wait(100)
wend
uo.deletejournal('backpack')
end sub

sub GoHome()
VAR a, b, c, d, e
uo.warmode('0')
a = uo.getx('self')
repeat
  while uo.mana < 11
    uo.warmode('0')
    uo.useskill('Meditation')
    wait(1000)
  wend
  if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
    uo.usetype('0x0F08')
    uo.closeuo()
  else
    wait(50)
  endif 
  b = 0
  uo.deletejournal()
  uo.waittargetobject('Home')
  uo.cast('Recall')
  repeat
    wait(100)
    b = b + 1
  until b > 35 or a <> uo.getx('self') or uo.injournal('The spell fizzles.')
until not uo.injournal('The spell fizzles.')
for c = 1 to 6
  uo.press(33)
  wait(300)
next
uo.opendoor()
wait(500)
uo.press(33)
wait(300)
uo.opendoor()
for d = 1 to 6
  uo.press(33)
  wait(300)
next
e = val(uo.getglobal('recal')) - 1
uo.setglobal('recal', str(e))
end sub

sub Back()
VAR a, b, c, d, e, f, g, h, i, j
if val(uo.getglobal('circle')) > 1 then
  if uo.getdir('self') == 3 then
    f = 1
  else
    f = 2
  endif
  for a = 1 to f
    uo.press(40)
    wait(300)
  next
  for b = 1 to 3
    uo.press(34)
    wait(300)
  next
  for c = 1 to 2
    uo.press(39)
    wait(300)
  next
endif
endif
if val(uo.getglobal('circle')) > 2 then
  if uo.getdir('self') == 1 then
    f = 1
  else
    f = 2
  endif
  for d = 1 to f
    uo.press(39)
    wait(300)
  next
sub main()
   UO.Print("Hello from function MAIN")
end sub



Top
   
 Post subject:
PostPosted: 2007-07-01 22:35:26 
Offline
User avatar

Joined: 2004-12-30 18:13:16
Posts: 175
Location: Russia
Скрипт чей ?
Правила читал ?
Сам не мог подредактировать ?
Тот вообще раздел то ?


переехали ©Mirage

_________________
Design, webdev, coding, c#, php, asp.net, xml, perl, sql, ajax, drawing, illustrating, restoration, photo, photoshop, schedule, pron, guitar, lead-guitar, js, jsp, java, dom, html, *nix, struts, cs, etc


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 24 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