Yoko

All sides of Injection
It is currently 2025-11-05 23:44:45

All times are UTC+02:00




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 2008-07-07 00:59:11 
Offline
User avatar

Joined: 2005-01-21 10:00:30
Posts: 64
Location: 74
не могу понять в чем ошибка
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 и все :?


Last edited by uisran on 2008-07-07 01:47:06, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2008-07-07 01:23:48 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
В кол-ве элементов массива


Top
   
 Post subject:
PostPosted: 2008-07-07 01:46:13 
Offline
User avatar

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

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


Top
   
 Post subject:
PostPosted: 2008-07-07 05:10:23 
Offline
User avatar

Joined: 2006-11-06 21:45:23
Posts: 137
Code:
UO.FindType(Smelt[i],-1,'my')
uo.WaitTargetObject('finditem')

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


Top
   
 Post subject:
PostPosted: 2008-07-07 05:23:51 
Offline
User avatar

Joined: 2005-01-21 10:00:30
Posts: 64
Location: 74
сделал вот так
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:


Last edited by uisran on 2008-07-07 14:11:56, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2008-07-07 11:29:09 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
DIM Smelt[3] 
DIM Smelt[6]


Top
   
 Post subject:
PostPosted: 2008-07-07 13:02:34 
Offline
User avatar

Joined: 2005-04-04 18:23:12
Posts: 187
Scripts Writer wrote:
Code:
DIM Smelt[3] 
DIM Smelt[6]

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


Top
   
 Post subject:
PostPosted: 2008-07-07 14:11:28 
Offline
User avatar

Joined: 2005-01-21 10:00:30
Posts: 64
Location: 74
Purgen wrote:
Scripts Writer wrote:
Code:
DIM Smelt[3] 
DIM Smelt[6]

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


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


Top
   
 Post subject:
PostPosted: 2008-07-07 20:13:30 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
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


Top
   
 Post subject:
PostPosted: 2008-07-27 11:49:16 
Offline
User avatar

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

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

_________________
СМЕРТЬ ФЛУДЕРАМ!


Top
   
 Post subject:
PostPosted: 2008-07-27 13:29:39 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
DIM chain[7]
на
Code:
DIM chain[8]


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 11 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited