Page 1 of 1

мининг и выкладка в сундук(банк)....

Posted: 2005-09-01 14:07:05
by neokron111
Всем превет!Я играю на The Fantasy и копаю в нуби шахте там есть сундук потипу банка, так вот хочется скрипт чтобы копал по по координатам(их я сам укажу, можно в фаиле) подходил к этому сундуку и открывал его и складывал туда все руду.
Обязательно надо чтобы открывал его ...я пробывал скрипт для дрв в ВипШахте , но чар просто сверху кидает на него )) поэтому надо чтобы открывал, причем как только дошол до максимального веса возвращался к сундуку и выкладывал потом обратно!
Возможно просто можно переделать скрипт Для ДРВ на ВипШахту

ПАСИБОООО

Re: мининг и выкладка в сундук(банк)....

Posted: 2005-09-01 14:50:42
by flake
neokron111 wrote:ПАСИБОООО


Да незачто.. 8)

Posted: 2005-09-02 04:57:17
by neokron111
:evil:

Posted: 2005-09-02 10:12:23
by Leo
Нужно что-то такое.

Code: Select all

sub UnLoad()
var cont = '0x0010F829' ##ID сейфа
var i
DIM Item[5]
Item[1]=0x19B9
Item[2]=0x19B7
Item[3]=0x19BA
Item[4]=0x19B8
Item[5]=0x0EED
   UO.UseObject(cont)
   for i = 1 to 5
   UO.FindType(Item[i], '-1', 'backpack')
   while UO.GetQuantity('finditem') > 0
      UO.MoveItem('finditem','-1',cont)
         Wait(1000)         
      UO.FindType(Item[i],'-1','backpack')
   wend
   next
end sub

Posted: 2005-09-02 14:25:40
by neokron111
Это я так понел выкладка руды а вставить ее в скрипт можешь?
Вот скрипт скрипт просто копает вокруг потом отходит и сного копает...Лео можешь в него вставить токо чтобы он подходил к сундуку (по координатам) и надо чтобы это делал при достяжении определённого веса

Code: Select all

sub Mining()
var mx, my, mz, i, j, z
for z = 1 to 100
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
hide()
for i = mx-2 to mx+2
   for j = my -2 to my +2
      UO.Print("Now Mining In: "+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("where") and not UO.InJournal("in rock") and not UO.InJournal("iron")
hide()         
UO.DeleteJournal()
         UO.Waittargettile("1341", str(i), str(j), 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("where") and not UO.InJournal("no ore here") and not UO.InJournal("far away") and not UO.InJournal("in rock")
            wait (100)
         wend
      wend
      UO.DeleteJournal()
   next
next
      UO.Press(34)
         wait(100)
      UO.Press(34)
         wait(100)
      UO.Press(34)
         wait(100)
      UO.Press(34)
         wait(100)
next
end sub

sub hide()
 while not UO.Hidden()
   uo.WarMode("0")
   uo.UseSkill("Hiding")
     wait(1500)
 wend
end sub

Posted: 2005-09-02 14:38:49
by Leo
Не знаю работает или нет

Code: Select all

sub Mining() 
var mx, my, mz, i, j, z
for z = 1 to 100
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
hide()
for i = mx-2 to mx+2
   for j = my -2 to my +2
      UO.Print("Now Mining In: "+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("where") and not UO.InJournal("in rock") and not UO.InJournal("iron")
hide()         
UO.DeleteJournal()
         UO.Waittargettile("1341", str(i), str(j), 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("where") and not UO.InJournal("no ore here") and not UO.InJournal("far away") and not UO.InJournal("in rock")
            wait (100)
         wend
      wend
      if UO.weight>700 then ##вес
      gotoxy(x,y,"") ##куды идти
      UnLoad()
      endif
      UO.DeleteJournal()
   next
next
      UO.Press(34)
         wait(100)
      UO.Press(34)
         wait(100)
      UO.Press(34)
         wait(100)
      UO.Press(34)
         wait(100)
next
end sub

sub hide()
 while not UO.Hidden()
   uo.WarMode("0")
   uo.UseSkill("Hiding")
     wait(1500)
 wend
end sub

sub UnLoad()
var cont = '0x0010F829' ##ID сейфа
var i
DIM Item[5]
Item[1]=0x19B9
Item[2]=0x19B7
Item[3]=0x19BA
Item[4]=0x19B8
Item[5]=0x0EED
   UO.UseObject(cont)
   for i = 1 to 5
   UO.FindType(Item[i], '-1', 'backpack')
   while UO.GetQuantity('finditem') > 0
      UO.MoveItem('finditem','-1',cont)
         Wait(1000)         
      UO.FindType(Item[i],'-1','backpack')
   wend
   next
end sub

sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if

ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:

mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if

if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if

if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub