Yoko

All sides of Injection
It is currently 2025-10-15 09:49:31

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2010-04-29 09:43:35 
Offline

Joined: 2010-04-20 19:39:06
Posts: 8
Всем привет. Прошу помочь со скриптом на плавку руды(по 500 наверное). Чтобы прыгал по 1 руне к дому, брал из мешка по 500 руды, прыгал по 2 руне к плавилке, плавил, рекол к 1 месту, сброс ингов и по кругу.
Спасибо за помощь.


Top
   
PostPosted: 2010-04-29 11:04:19 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
просто из любопытства... А плавильню дома никак поставить рядом с сундуком? :roll:

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


Top
   
PostPosted: 2010-04-29 18:04:28 
Offline

Joined: 2010-04-20 19:39:06
Posts: 8
Нету возможности установить, вот поплавлю айрон, продам и установлю) А пока денег нет, помогите со скриптом плз.


Top
   
PostPosted: 2010-04-30 14:54:49 
Offline

Joined: 2010-04-20 19:39:06
Posts: 8
Попробовал сам сделать. Скрипт то делает все, что мне нужно, но сделан он конечно криворуко. В общем, кому нужно пользуйтесь, кто хочет покритиковать - выслушаю с удовольствием и по возможности исправлю.
Code:
################################
VAR Meshok = '0x40E5068D'
sub main()
uo.Print('Укажите руну к печке')
uo.Exec('addobject pe4ka')
while uo.Targeting()
wait(100)
wend
uo.Print('Укажите руну к ящику с рудой')
uo.Exec('addobject cont_s_rudoi')
while uo.Targeting()
wait(100)
wend




sub plavka()
VAR Meshok = '0x40E5068D'; Сериал мешка c рудой
VAR Ruda = '0x19b9'; Тип руды
VAR Ingi = '0x1bef'; Тип ингов
VAR Ingi1 = '0x1BF2';Тип ингов
VAR Ingi2 = '0x1BE3';Тип ингов
VAR Ingi3 = '0x0F8E';Тип ингов
VAR Ingi4 = '0x1BE6';Тип ингов
VAR Kolvo = 500 ; Брать руды
VAR Pechka = '0x40021643'; Сериал печки
VAR k = 0
repeat
While TRUE
UO.FindType( Ruda, -1, Meshok )
If UO.FindCount() == 0 Then
UO.Print("Nety irona")
return
Endif
UO.Grab( Str( Kolvo ), 'finditem' )
wait( 2000 )
med()
takereg()
Recall('pe4ka')
While UO.Count( Ruda ) > 1
UO.DeleteJournal()
UO.WaitTargetType(Ruda)
UO.UseObject(Pechka)
k = 0
while NOT UO.InJournal('You put') AND NOT UO.InJournal('не удалось') AND ( k < 9 )
k = k + 1
wait(500)
wend
if UO.Count( Ingi ) > 0 then
Recall('cont_s_rudoi')
UO.FindType( Ingi, -1, -1 )
UO.MoveItem( 'finditem', 0, Meshok )
wait( 1000 )
UO.Print( 'Ingots moved' )
end if
if UO.Count( Ingi1 ) > 0 then
Recall('cont_s_rudoi')
UO.FindType( Ingi1, -1, -1 )
UO.MoveItem( 'finditem', 0, Meshok )
wait( 1000 )
UO.Print( 'Ingots moved' )
end if
if UO.Count( Ingi2 ) > 0 then
Recall('cont_s_rudoi')
UO.FindType( Ingi2, -1, -1 )
UO.MoveItem( 'finditem', 0, Meshok )
wait( 1000 )
UO.Print( 'Ingots moved' )
end if
if UO.Count( Ingi3 ) > 0 then
Recall('cont_s_rudoi')
UO.FindType( Ingi3, -1, -1 )
UO.MoveItem( 'finditem', 0, Meshok )
wait( 1000 )
UO.Print( 'Ingots moved' )
end if
if UO.Count( Ingi4 ) > 0 then
Recall('cont_s_rudoi')
UO.FindType( Ingi4, -1, -1 )
UO.MoveItem( 'finditem', 0, Meshok )
wait( 1000 )
UO.Print( 'Ingots moved' )
end if
Wend
Wend
until UO.Dead()
end sub
###################################
sub med()
VAR LastTimer
UO.DeleteJournal()
while UO.Mana<UO.Int
LastTimer=UO.Timer()
UO.UseSkill('Meditation')
repeat
  wait(100)
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200
UO.DeleteJournal()
wait(200)
wend
end sub
#########################################
sub takereg()
DIM reg[3]
var i,n
reg[1]='0x0F86'; MR
reg[2]='0x0F7A'; BP
reg[3]='0x0F7B'; BM

UO.UseObject('Meshok')
for i=1 to 3
  while UO.Count(reg[i])<5
    UO.FindType(reg[i],-1, Meshok)
    n=UO.Count(reg[i])
    UO.Grab(str(5-n),'finditem')
    wait(200)
  wend 
next
end sub
###################################
sub Recall(dest)
var b
uo.print('Recoll')
for b=1 to 1
  uo.deletejournal()
  uo.cast('Recall',dest)
  if WaitForRecall()==1 then
    return 1
  end if
next
return 0
end sub
###################################
sub WaitForRecall()
var Text1=uo.getname()+": The spell fizzles."
var mess='',lastX=uo.getX(),lastY=uo.getY()
for var v=0 to 200
  mess=uo.journal(0)
  if uo.Journal(0)==Text1 then
    return 0
  end if
  if uo.getX()<>lastX OR uo.getY()<>LastY then
    return 1
  end if
  wait(50)
next
return 0
end sub

Не пойму почему проверка на физл не работает.
в начале задал var WaitForRecall = 1, а эффекта 0.


Top
   
PostPosted: 2010-04-30 18:26:03 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
сори но имхо скрипт должен состоит из 4 строк.
Взять металл
реколл
плавишь реколл назад
скинуть инги

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


Top
   
PostPosted: 2010-04-30 19:11:04 
Offline

Joined: 2010-04-20 19:39:06
Posts: 8
По смыслу он такой и есть + добор регов, медитация.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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