Yoko

All sides of Injection
It is currently 2025-11-10 12:14:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 26 posts ]  Go to page Previous 1 2
Author Message
 Post subject:
PostPosted: 2006-04-12 15:51:39 
Offline
Expert!
User avatar

Joined: 2004-04-04 11:13:54
Posts: 1205
Location: Балаково, Саратовская обл.
К тому что отквоченный кусок кода не будет работать так как ты этого хотел.


Top
   
 Post subject:
PostPosted: 2006-04-12 16:13:16 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Destruction wrote:
Зависит от того, насколько часто пользовать.


В моем мининге/ламбере более сотни глобальных переменных. Несколько потоков скриптов, все одновременно обращаются к этим глобалкам, в половине из них ведутся счетчики... Это мало?

Quote:
Вот ты сам подумай, где инжа глобалы хранит? Прально, где-то внутри, сидит, хранит, память засоряет потихоньку.


Интересное у тебя представление о памяти и программах... :lol:

Quote:
А изиуо грамотно, в реестр, чтобы не мучаться.


Еще интересней...

Quote:
Запусти сначало такой скрипт:
Code:
sub MySub()
var i=0
repeat
i=i+1
uo.setGlobal("MyName",str(i))
until false
endsub


А затем такой:
Code:
sub MySub()
var i=0
repeat
i=i+1
uo.setEasyUO(1,str(i))
until false
endsub


И сравни, который дольше проживёт.


Вот ты предлагаешь мне сравнить, а сам-то запустить пробовал? Я тебе скажу какой проживет дольше - первый. А может, второй. А может, первый. В любом случае раньше чем суток так через десять ты никакого результата не получишь.


Top
   
 Post subject:
PostPosted: 2006-04-12 17:12:55 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Quote:
К тому что отквоченный кусок кода не будет работать так как ты этого хотел.


Не забывай о том что я чайник, ты говоришь про то что у меня ошибка в выше выложеном скрипте или что?


Top
   
 Post subject:
PostPosted: 2006-04-12 23:26:42 
Offline

Joined: 2006-03-29 13:07:47
Posts: 9
Sanch wrote:
Есть небольшой вопросик, можно ли с помощью uo.Print напечатать пробел?

так в твоём скрипте уже есть пример этого
Sanch wrote:
uo.print('!!!КОПАЕМ ТУТ!!!>>> : '+str(mx-a)+' '+str(my-b))
а именно: ' '
Code:
 Если "фразы" в строке и плюсы разделить пробелами, то получится так:
uo.print('!!!КОПАЕМ ТУТ!!!>>> : '   +   str(mx-a)   +   ' '   +   str(my-b))


Top
   
 Post subject:
PostPosted: 2006-04-13 22:04:50 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Саму копалку брал ветровскую, тк так и не смог написать свою, экспириенса пока не хватает, поэтому и не заметил.


Top
   
 Post subject:
PostPosted: 2006-04-14 08:52:42 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Вышейложеная синхронизация поиска не работает, можно ли как нибудь по другому cделать синхронизацию поиска с глобалкой, или добавить паузу как приведено ниже?

Code:
sub CheckingPlayers()
while uo.life > 0
  uo.setglobal('per4', '1')  #отвечает за синхронизацию поиска#
  wait(200)
  uo.set('finddistance', '14')
  uo.findtype('0x0190', '-1', '1') #тип игрока мужского пола#
  if uo.findcount() > 1 then
    uo.usetype('0x0F08')
    wait(100)
    uo.exec('terminate Obkopka')
    wait(500)
    uo.exec('exec Teleportation')
    wait(500)
    return
  else
    wait(200)
    uo.setglobal('per4', '0')
    wait(1000)
  endif
  uo.setglobal('per4', '1')
  wait(200) 
  uo.set('finddistance', '14')
  uo.findtype('0x0191', '-1', '1') #тип игрока женского пола#
  if uo.findcount() > 0 then
    uo.usetype('0x0F08')
    wait(100)
    uo.exec('terminate Obkopka')
    wait(500)
    uo.exec('exec Teleportation')
    wait(500)
    return
  else
    wait(200)
    uo.setglobal('per4', '0')
    wait(1000)
  endif
wend
end sub

sub Obkopka()
VAR mx, my, mz, a, b, c, d
step1:
mx = uo.getx('self')
my = uo.gety('self')
mz = uo.getz('self')
uo.deletejournal()
for a = mx-2 to mx+2
  for b = my-2 to my+2
    while not uo.Hidden()
      uo.warmode('0')
      uo.useskill('Stealth')
      wait(4000)
    wend
    uo.print('!!!КОПАЕМ ТУТ!!!>>> : '+str(mx-a)+' '+str(my-b))
    c = val(uo.getglobal('per2')) + 1
    wait(100)
    uo.setglobal('per2', str(c))
    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')
      uo.deletejournal()
      if uo.waiting() then
        uo.canceltarget()
      else
        wait(100)
      endif
      uo.waittargettile('1341', str(a), str(b), str(mz))
      uo.usetype('0x0E85') #тип кирки#
      while not uo.injournal('You put') and not uo.injournal('heavy') 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
      while val(uo.getglobal('per4')) == 1
        wait(50)
      wend
      uo.set('finddistance', '3')
      uo.findtype('0x000E', '-1', '1') #тип элементаля#
      if uo.findcount() > 0 then
        d = uo.getserial('finditem')
        uo.setglobal('per5', 'd')
        KillElemental()
      else
        wait(100)
      endif
      if val(uo.getglobal('per2')) > 25 then
        uo.setglobal('per2', '1')
        wait(100)
        ChengePlace()
        goto step1
      else
       wait(100)
      endif
      if uo.weight > 600 then #максимальный вес#
        uo.deletejournal()
        wait(100)
        uo.exec('terminate CheckingPlayers')
        wait(500)
        uo.exec('exec GoHome')
        wait(500)
        return
      else
        wait(100)
      endif
    wend
    uo.deletejournal()
  next
next
goto step1
end sub


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 26 posts ]  Go to page Previous 1 2

All times are UTC+02:00


Who is online

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