Yoko

All sides of Injection
It is currently 2025-10-13 01:06:27

All times are UTC+02:00




Post new topic  Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 2008-04-05 15:48:26 
Offline

Joined: 2008-04-05 15:44:51
Posts: 4
Смысл скрипта в том что бы чар стоял и окапывался скидывая на пол 1 вид руды,после того как накопает определенный вес что бы просто закрывал окно УО.
Помогите,очень надо! :(


Top
   
 Post subject:
PostPosted: 2008-04-05 23:42:45 
Offline
User avatar

Joined: 2008-03-24 18:18:53
Posts: 50
=)) васья нашёл теперь и ты ищи )


Top
   
 Post subject:
PostPosted: 2008-04-06 01:47:55 
Offline

Joined: 2008-04-05 15:44:51
Posts: 4
Incognito2008 wrote:
=)) васья нашёл теперь и ты ищи )

Ну если нашел,дай ссылку,я просто уже более 200 тем просмотрел,ничего похожего не нашел! :(


Top
   
 Post subject:
PostPosted: 2008-04-06 14:56:14 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
0_o wrote:
Incognito2008 wrote:
=)) васья нашёл теперь и ты ищи )

Ну если нашел,дай ссылку,я просто уже более 200 тем просмотрел,ничего похожего не нашел! :(


Найди любой примтивный Майнинг и подправь под себя, ну на кройняк выложи здесь, у кого будет время тот поправит.


Top
   
 Post subject:
PostPosted: 2008-04-07 01:43:44 
Offline

Joined: 2008-04-05 15:44:51
Posts: 4
Kynep wrote:
0_o wrote:
Incognito2008 wrote:
=)) васья нашёл теперь и ты ищи )

Ну если нашел,дай ссылку,я просто уже более 200 тем просмотрел,ничего похожего не нашел! :(


Найди любой примтивный Майнинг и подправь под себя, ну на кройняк выложи здесь, у кого будет время тот поправит.


Ну вот что то типо этого,только что бы просто стоял на месте.

Code:
sub main()
var kirka
var mx, my, mz, i, j
mx = Uo.GetX()
my = Uo.GetY()
mz = Uo.GetZ()

#Uo.AddObject("Kirka")
#while Uo.Targeting()
#     wait(100)
#wend     

for i = mx - 2 to mx + 2
for j = my - 2 to my + 2

repeat
  while not UO.Hidden()
    UO.Warmode("0")
    UO.UseSkill("Hiding")
    wait(4000)
  wend
  Uo.DeleteJournal()
  Uo.WaitTargetTile("1341", str(i), str(j), str(mz))
  Uo.UseObject("Kirka")
repeat
     wait(100)
Until Uo.InJournal("You put") or Uo.InJournal("You loosen some rock but fail to find any useable ore")
     Uo.Print("???????? ?????? ? " + str(i),str(j))
Until Uo.InJournal("??? ?? ???????? ????.")
     Uo.Print("???????? ????? " + (str(i)),(str(j)))
next
next
end sub

sub GetOre()
var CheckTime
var x, y
for y=-2 to 2
for x=-2 to 2
 
If UO.waiting() Then
     UO.canceltarget()
EndIf
REPEAT


     UO.WaitTargetTile("1341",STR( UO.GetX() + x ),STR( UO.GetY() + y ), 0) 
     UO.Useobject("Kirka")
     UO.DeleteJournal()
REPEAT
     wait(300)
until Uo.InJournal("You put") ## or Uo.InJournal("") or Uo.InJournal("")
until Uo.InJournal("You loose") or Uo.InJournal('Try mining elsewhere.') ## or Uo.InJournal("")
Next
Next
End sub

sub minround()
VAR Kirka = '0x0E85'   ; ??? ?????
VAR MaxVes = 550   ; ???????????? ???, ?????????? ????? ????? 10-15 ???????
VAR TileNum = '1339'   ; ???? ???? ?????? (???????? ???????????????? ???)
VAR x, y, t, k
VAR MaxTime = 100   ; ?????????? ? 1/10 ???.
VAR ms1 = "There is nothing here to mine for."
VAR ms2 = "You can't use"
VAR ms3 = "You put the"
VAR ms4 = "You loosen some rocks"
VAR ms5 = "You are too far away"
VAR ms6 = "Try mining elsewhere."
VAR ms7 = "That is too far away."
VAR ms8 = "You have no line of sight to that location"
for y=-2 to 2
for x=-2 to 2
#while not UO.Hidden()
#UO.Warmode("0")
#uo.print("????????...")
#UO.UseSkill("Hiding")
#wait(4000)
#wend
      k = 0
      repeat
          #while not UO.Hidden()
          #     UO.Warmode("0")
          #     uo.print("????????...")
          #     UO.UseSkill("Hiding")
          #     wait(4000)
          #wend
              uo.findtype('0x19B9','0x0000','backpack')
               uo.moveitem('finditem','-1','ground')
               #uo.findtype('0x19B9','0x0486','backpack')
               #uo.moveitem('finditem','-1','ground')
           UO.DeleteJournal()
         t = UO.Timer()
         k = k + 1
         UO.WaitTargetTile( TileNum, STR( UO.GetX() + x ), STR( UO.GetY() + y ), 0)
         UO.UseType( Kirka )
         repeat
            wait(300)
         until UO.InJournal(ms2) OR UO.InJournal(ms3) OR UO.InJournal(ms1) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) or ((t + MaxTime) < UO.Timer())
         If UO.Weight > MaxVes Then
            UO.Print(" Overweight!" )
            return
         Endif
      until UO.InJournal(ms4) AND NOT UO.InJournal(ms3) OR UO.InJournal(ms1) OR UO.InJournal(ms8) or (k > 10)
   next
next
endsub

sub start()
var k = 0
repeat
     if k == 0 then
          minround()
          wait(1000)
          k = k + 1
     end if
     if k == 1 then
          gotoxy((Uo.GetX() - 4),(UO.GetY()),0)
          wait(100)
          minround()
          wait(100)
          k = k + 1
     end if
     if k == 2 then
          gotoxy((Uo.GetX()),(UO.GetY() - 4),0)
          wait(100)
          minround()
          wait(100)
          k = k + 1
     end if
     if k == 3 then
          gotoxy((Uo.GetX() + 4),(UO.GetY()),0)
          wait(100)
          minround()
          wait(100)
          k = k + 1
     end if     
     if k == 4 then
          gotoxy((Uo.GetX()),(UO.GetY() + 4),0)
          wait(100)
          minround()
          wait(100)
          k = 0
     end if     
wait(50)     
until Uo.Dead()
end sub
SUB GoToXY(x,y,prec)
#original (c) ...
#modification 2.00 (c) SerrouS
  dim turn[8] ; ?????? - ??????, ???????? ??????? ??????? ??? 45 ????????
  turn[0] = 39
  turn[1] = 34
  turn[2] = 40
  turn[3] = 35
  turn[4] = 37
  turn[5] = 36
  turn[6] = 38
  turn[7] = 33
  dim deltax[8]; ?????? - ??????????, ???????? - ????????? ?????????? ??? ??????? ??????
  dim deltay[8]
  deltax[0] =  1
  deltax[1] =  1
  deltax[2] =  1
  deltax[3] =  0
  deltax[4] = -1
  deltax[5] = -1
  deltax[6] = -1
  deltax[7] =  0

  deltay[0] = -1
  deltay[1] =  0
  deltay[2] =  1
  deltay[3] =  1
  deltay[4] =  1
  deltay[5] =  0
  deltay[6] = -1
  deltay[7] = -1
var dx,dy

  var mx,my ; current coords
  var lx = 0, ly = 0, ld = -1 ; last move coords
 
var pathFind = 0 ; as logical 0 - norm, 1 - block
var ind
var recursInd = 0
var fout = 0

var stepdelay = 1000

InitStack()
repeat
  mx=UO.GetX()
  my=UO.GetY()

  ; calculating for precision coming
  dx = mx - x 
  If dx < 0 Then 
    dx = 0 - dx
  EndIf ;get ABS diff

  dy = my - y 
  If dy < 0 Then 
    dy = 0 - dy
  EndIf
  If dy > dx Then
    dx = dy
  EndIf
  If dx <= prec Then
    Return
  EndIf
   
  if mx == x and my == y then   
    return
  endif
 
  lx = mx
  ly = my
  ld = UO.GetDir() ; cause once pressing can only change the direcction

  if mx == x and my >  y then
    UO.Press(33)
  endif
  if mx == x and my  < y then
    UO.Press(35)
  endif
  if mx  < x and my == y then
    UO.Press(34)
  endif
  if mx  < x and my >  y then
    UO.Press(39)
  endif
  if mx  < x and my  < y then
    UO.Press(40)
  endif
  if mx >  x and my == y then
    UO.Press(36)
  endif
  if mx >  x and my >  y then
    UO.Press(38)
  endif
  if mx >  x and my  < y then
    UO.Press(37)
  endif
#UO.Print('KeyPressed')
  wait( stepdelay )

  if lx == UO.GetX() and ly == UO.GetY() and ld == UO.GetDir() then
    ; now there is a stop situation
UO.Print('PathFind')
    recursInd = 0
    repeat
#################################################
      ind = ld
      #UO.Print(str(ind))
      fout = 0
      repeat ; ???? ? ????? ???? ?? ??????? ????? ??? ?? ???????? ?????
UO.Print('Iteration')
        mx = UO.GetX()
        my = UO.GetY()
        ld = UO.GetDir()
        UO.Press( turn[ ind ] )
        wait( stepdelay ) 
        if (UO.GetX() == mx and UO.GetY() == my and ld == UO.GetDir()) then
          fout = 1 ; ????????
        else
          dx = UO.GetX() - mx
          dy = UO.GetY() - my
UO.Print('deltas  '+str(dx)+'  '+str(dy))
          if deltax[ ind ] == dx and deltay[ ind ] == dy then
            fout = 2 ; ??????????? ????????
          endif
        endif
      until fout
UO.Print('fout   '+ str(fout))
      if fout == 1 then ; ?????? ?? ????????? ???????
        recursInd = recursInd + 1
        Push( str( ind ) )
        ;ld = ind
      else ; fout == 2
        ; ???? ?????????? ???????????? ???????? ?? ?????, ??? ????? ?? ??????
        #UO.Print('Iter  '+ str(recursInd))
        pathFind = 0
        if recursInd then ; ??????????????
          pathFind = 1
          recursInd = recursInd - 1
          ld = val(Pop()) - 1
          if ld == -1 then
            ld = 7
          endif
          UO.Press( turn[ld] )
          wait ( stepdelay )         ; ? ???? ????, ??? ???? ??????? ?????? ???????????
        endif
      endif
#################################################
    until not recursInd and not pathFind
    #UO.Print('PathFind END')
  endif


until 0
endsub

#(c)SerrouS
Sub InitStack()
  UO.SetGlobal('STACK', '0')
endsub
Sub Push( param )
  var chk = val(UO.GetGlobal('STACK')) ; ?????????? ????????? ? ?????
  UO.SetGlobal('STACK',str(chk + 1))
  UO.SetGlobal('STACK_'+str(chk), param)
end sub
Sub Pop ()
  var chk = val(UO.GetGlobal('STACK')) ; ?????????? ????????? ? ?????
  if chk then
    UO.SetGlobal('STACK',str(chk - 1))
    return UO.GetGlobal('STACK_'+str(chk - 1))
  else
    return ''
  endif
end sub

sub hide()
uo.useskill('Hiding')
end sub


Top
   
 Post subject:
PostPosted: 2008-04-07 12:35:07 
Offline

Joined: 2008-04-05 15:44:51
Posts: 4
Уже и скрипт похожий выложил...если никто не хочет помочь,так и скажите. :(


Top
   
 Post subject:
PostPosted: 2008-04-07 12:53:47 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
0_o wrote:
Уже и скрипт похожий выложил...если никто не хочет помочь,так и скажите. :(


Может просто у людей нет времени?
Code:
sub minround() 
VAR Kirka = '0x0E85' #Тип кирки
VAR MaxVes = 550     #Вес до которого копаем

VAR TileNum = '1339'
VAR x, y, t, k
VAR MaxTime = 100
VAR ms1 = "There is nothing here to mine for."
VAR ms2 = "You can't use"
VAR ms3 = "You put the"
VAR ms4 = "You loosen some rocks"
VAR ms5 = "You are too far away"
VAR ms6 = "Try mining elsewhere."
VAR ms7 = "That is too far away."
VAR ms8 = "You have no line of sight to that location"

while not UO.Dead()
for y=-2 to 2
for x=-2 to 2
while not UO.Hidden()
UO.Warmode("0")
UO.UseSkill("Hiding")
wait(4000)
wend
      k = 0
      repeat
          while not UO.Hidden()
               UO.Warmode("0")
               UO.UseSkill("Hiding")
               wait(4000)
          wend
               uo.findtype('0x19B9','0x0000','backpack') #Тут тип и цвет руды для сброса
               uo.moveitem('finditem','-1','ground')
               #uo.findtype('0x19B9','0x0486','backpack')
               #uo.moveitem('finditem','-1','ground')
           UO.DeleteJournal()
         t = UO.Timer()
         k = k + 1
         UO.WaitTargetTile( TileNum, STR( UO.GetX() + x ), STR( UO.GetY() + y ), 0)
         UO.UseType( Kirka )
         repeat
            wait(300)
         until UO.InJournal(ms2) OR UO.InJournal(ms3) OR UO.InJournal(ms1) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) or ((t + MaxTime) < UO.Timer())
         If UO.Weight > MaxVes Then
            UO.Print(" Overweight!" )
            return
         Endif
      until UO.InJournal(ms4) AND NOT UO.InJournal(ms3) OR UO.InJournal(ms1) OR UO.InJournal(ms8) or (k > 10)
   next
next
wend
endsub


sub hide()
uo.useskill('Hiding')
end sub


Top
   
 Post subject:
PostPosted: 2008-04-07 13:16:52 
Offline
User avatar

Joined: 2005-04-04 18:23:12
Posts: 187
Kynep wrote:
Code:
sub hide() 
uo.useskill('Hiding')
end sub

Обьясните нюбу нафиг это тут надо )


Top
   
 Post subject:
PostPosted: 2008-04-07 13:28:55 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
Purgen wrote:
Обьясните нюбу нафиг это тут надо )


А чтоб ньюбы спрашивали ) :roll: :roll: :roll: :lol:


Top
   
 Post subject:
PostPosted: 2008-04-07 14:40:40 
Offline

Joined: 2008-01-26 22:35:57
Posts: 59
кодер видимо любит чтобы все было разложено по функциям ;)
у меня когда то тоже такая болезнь была.... теперь тупо все в одной функции :))) хоть и не всегда удобно :)


Top
   
 Post subject:
PostPosted: 2008-04-07 15:05:44 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
GambiT wrote:
кодер видимо любит чтобы все было разложено по функциям ;)
у меня когда то тоже такая болезнь была.... теперь тупо все в одной функции :))) хоть и не всегда удобно :)


Если честно мне пох )))) Скрипт не мой, это часть скрипта того что сверху, просто не заметил, а щас лень редактировать :lol: 8)


Top
   
 Post subject:
PostPosted: 2008-04-07 15:23:57 
Offline
User avatar

Joined: 2008-03-24 18:18:53
Posts: 50
а былобы очень даже неплохо чтобы ктонибудь сюда выложил скрипт на мининг который не копает айрон ,ходит по шахте , и реколится по руне при виде пк и при перевесе ,
вот это скрипт копает всё , не ходит по шахте , реколиться при перевесе , реколиться при виде любого персонажа, давайте попробуем вместе отредактировать так как я описал выше =) ?
#########################################################################
sub maining()
var mx, my, mz, i, j

UO.print('Выберите киру')
UO.exec('addobject kirka')
while uo.targeting()
wait(100)
wend

UO.print('Выберите рунку')
uo.exec('addobject rune')
while uo.targeting()
wait(100)
wend

start:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
for i = mx-2 to mx+2
for j = my-2 to my+2
hidding()
UO.Print("Копаем в координатах: "+str(mx-i)+" "+str(my-j))
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("Iron Ore") and not UO.InJournal("Copper") and not UO.InJournal("Rusty Ore")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.findman( -1 )
if uo.findcount() then
recal()
uo.exec('terminate mining')
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("kirka")
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")
wait (1000)
if uo.weight>430 then
recal()
endif

uo.findman( -1 )
if uo.findcount() then
recal()
uo.exec('terminate all')
endif

wend
wend
UO.DeleteJournal()
next
next
hidding()
uo.print("Вы закончили обкобку, передите на другое место и напишите: го")

while not uo.dead()
if uo.injournal("го") then
goto start
endif
uo.findman( -1 )
if uo.findcount() then
recal()
uo.exec('terminate all')
endif
wend
end sub
###########################################################################
sub hidding()
while not uo.Hidden()
uo.WarMode("0")
uo.print('Прячемся')
uo.UseSkill("Stealth")
wait(3500)
wend
end sub
###########################################################################
sub recal()
if uo.waiting() then
uo.canceltarget()
endif
uo.print ("Сьбываемся")
uo.waittargetobject('rune')
uo.cast('Recall')
wait(3500)
uo.exec('terminate all')

end sub
####################################################################################################################


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

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:  
Powered by phpBB® Forum Software © phpBB Limited