Yoko
http://forum.yoko.com.ua/

переплавка чайников ДРВ
http://forum.yoko.com.ua/viewtopic.php?f=20&t=13762
Page 1 of 1

Author:  uisran [ 2008-07-07 00:59:11 ]
Post subject:  переплавка чайников ДРВ

не могу понять в чем ошибка
Code:
sub smelt()
var Forge  = '0x401431B9'
var Sunduk = '0x401B8549'
var Ingot  = '0x1BEF'

DIM Smelt[3]
Smelt[0] = '0x13BB' ;chainmail coif
Smelt[1] = '0x13BF' ;chaimail tunic
Smelt[2] = '0x13BE' ;chainmail leggins
Smelt[3] = '0x13EC' ;ringmail tunic
var i
for i = 0 to 3
UO.FindType(Smelt[i], '-1','my')
if uo.GetQuantity('finditem') then
repeat
if uo.Weight > 500 then
uo.UseObject(Sunduk)
uo.FindType(ingot,'-1','my')
uo.moveitem(ingot,'500',Sunduk)
else
wait(100)
end if 
uo.FindType(Smelt[i],-1,'my')
uo.WaitTargetObject('Smelt[i]')
uo.UseObject( Forge )
wait(750)
until uo.Count(Smelt[i]) == 0
else
uo.Print('nothing to smelt')
end if
next
end sub   


unhandled exception и все :?

Author:  Scripts Writer [ 2008-07-07 01:23:48 ]
Post subject: 

В кол-ве элементов массива

Author:  uisran [ 2008-07-07 01:46:13 ]
Post subject: 

Scripts Writer wrote:
В кол-ве элементов массива

это да :lol:
но плавитьвсе равно не хочет "Select an item to smelt"

Author:  GAUHAR [ 2008-07-07 05:10:23 ]
Post subject: 

Code:
UO.FindType(Smelt[i],-1,'my')
uo.WaitTargetObject('finditem')

или
Code:
#UO.FindType(Smelt[i],-1,'my')
uo.WaitTargetType(Smelt[i])

Author:  uisran [ 2008-07-07 05:23:51 ]
Post subject: 

сделал вот так
Code:
sub smelt()
var Forge  = '0x401431B9'
var Sunduk = '0x401B8549'
var Ingot  = '0x1BEF'

DIM Smelt[6]
Smelt[0] = '0x13BB' ;chainmail coif
Smelt[1] = '0x13BF' ;chaimail tunic
Smelt[2] = '0x13BE' ;chainmail leggins
Smelt[3] = '0x13EC' ;ringmail tunic
Smelt[4] = '0x13EB' ;ringmail gloves
Smelt[5] = '0x13EE' ;ringmail steeves
Smelt[6] = '0x13F0' ;ringmail leggins
var i
for i = 0 to 6
UO.FindType(Smelt[i], '-1','my')
if uo.GetQuantity('finditem') then
repeat
if uo.Weight > 600 then
uo.UseObject(Sunduk)
uo.FindType(ingot,'-1','backpack')
uo.moveitem(ingot,'500',Sunduk)
else
wait(100)
end if 
uo.FindType(Smelt[i],-1,'backpack')
uo.WaitTargetObject('finditem')
uo.UseObject( Forge )
wait(750)
until uo.Count(Smelt[i]) == 0
else
uo.Print('nothing to smelt')
end if
next
end sub   


в итоге он сплавил только первую и последнюю позицию массива, хотя смета типов местами ни к чему не привела.. странно :?

добавил несколько позиций, ринг плавит на ура, а вот чайник игнорит :shock:

Author:  Scripts Writer [ 2008-07-07 11:29:09 ]
Post subject: 

Code:
DIM Smelt[3] 
DIM Smelt[6]

Author:  Purgen [ 2008-07-07 13:02:34 ]
Post subject: 

Scripts Writer wrote:
Code:
DIM Smelt[3] 
DIM Smelt[6]

меня всегда улыбала оптимизация твоих постов :)

Author:  uisran [ 2008-07-07 14:11:28 ]
Post subject: 

Purgen wrote:
Scripts Writer wrote:
Code:
DIM Smelt[3] 
DIM Smelt[6]

меня всегда улыбала оптимизация твоих постов :)


:D не, это я здесь запарился ) в скрипте все норм )

Author:  Scripts Writer [ 2008-07-07 20:13:30 ]
Post subject: 

1
Code:
DIM Smelt[6] 
Smelt[0] = '0x13BB' ;chainmail coif
Smelt[1] = '0x13BF' ;chaimail tunic
Smelt[2] = '0x13BE' ;chainmail leggins
Smelt[3] = '0x13EC' ;ringmail tunic
Smelt[4] = '0x13EB' ;ringmail gloves
Smelt[5] = '0x13EE' ;ringmail steeves
Smelt[6] = '0x13F0' ;ringmail leggins

Арифметика

2
Code:
if uo.Weight > 600 then 
  uo.UseObject(Sunduk)
  uo.FindType(ingot,'-1','backpack')
  if uo.FindCount() then
    uo.moveitem(ingot,'500',Sunduk)
    wait(750)
  else
    wait(100)
  end if
end if

Author:  ZWERb [ 2008-07-27 11:49:16 ]
Post subject: 

Code:
sub SmelthingForIron() 
var Forge='0x40438D73'
var i
var Sunduk='0x40437B11'
var ingot='0x1BEF'
DIM chain[7]
    chain[0]='0x13EC'
    chain[1]='0x13F0'
    chain[2]='0x13BF'
    chain[3]='0x13BB'
    chain[4]='0x13EE'
    chain[5]='0x13EB'
    chain[6]='0x13BE'
    chain[7]='0x1B76'
    for i = 0 to 7
      uo.FindType(chain[i],'-1','backpack')
      if uo.GetQuantity('finditem') then
        repeat
          uo.FindType(chain[i],-1,'backpack')
          uo.WaitTargetObject('finditem')
          uo.UseObject(Forge)
          wait(750)
        until uo.Count(chain[i]) == 0
      else
    uo.Print('There are no chainmail armor')
    end if
    next
    mov()
end sub   

Sub mov()
uo.UseObject('0x4035BF59')
uo.findtype('0x1BEF','-1','my')   
uo.moveitem('finditem',0,'0x40437B11')
wait(1000)
uo.findtype('0x1BEF','0x0000','ground')   
uo.moveitem('finditem',0,'0x40437B11')
end sub

Я вот такой вот пользуюсь

Author:  Scripts Writer [ 2008-07-27 13:29:39 ]
Post subject: 

Code:
DIM chain[7]
на
Code:
DIM chain[8]

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/