переплавка чайников ДРВ

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
uisran
Posts: 64
Joined: 2005-01-21 10:00:30
Location: 74
Contact:

переплавка чайников ДРВ

Post by uisran »

не могу понять в чем ошибка

Code: Select all

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 и все :?
Last edited by uisran on 2008-07-07 01:47:06, edited 1 time in total.
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

В кол-ве элементов массива
uisran
Posts: 64
Joined: 2005-01-21 10:00:30
Location: 74
Contact:

Post by uisran »

Scripts Writer wrote:В кол-ве элементов массива
это да :lol:
но плавитьвсе равно не хочет "Select an item to smelt"
GAUHAR
Posts: 137
Joined: 2006-11-06 21:45:23

Post by GAUHAR »

Code: Select all

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

Code: Select all

#UO.FindType(Smelt[i],-1,'my')
uo.WaitTargetType(Smelt[i])
uisran
Posts: 64
Joined: 2005-01-21 10:00:30
Location: 74
Contact:

Post by uisran »

сделал вот так

Code: Select all

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:
Last edited by uisran on 2008-07-07 14:11:56, edited 1 time in total.
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

DIM Smelt[3] 
DIM Smelt[6]
Purgen
Posts: 187
Joined: 2005-04-04 18:23:12

Post by Purgen »

Scripts Writer wrote:

Code: Select all

DIM Smelt[3] 
DIM Smelt[6]
меня всегда улыбала оптимизация твоих постов :)
uisran
Posts: 64
Joined: 2005-01-21 10:00:30
Location: 74
Contact:

Post by uisran »

Purgen wrote:
Scripts Writer wrote:

Code: Select all

DIM Smelt[3] 
DIM Smelt[6]
меня всегда улыбала оптимизация твоих постов :)
:D не, это я здесь запарился ) в скрипте все норм )
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

1

Code: Select all

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: Select all

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 
ZWERb
Posts: 122
Joined: 2006-03-08 11:59:41

Post by ZWERb »

Code: Select all

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
Я вот такой вот пользуюсь
СМЕРТЬ ФЛУДЕРАМ!
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

DIM chain[7]
на

Code: Select all

DIM chain[8]
Post Reply