Подкорректируйте скрипт на собирание предметов плиз

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Mihail
Expert!
Posts: 548
Joined: 2005-05-20 20:30:10
Contact:

Подкорректируйте скрипт на собирание предметов плиз

Post by Mihail »

Code: Select all

sub up()
var x
if uo.getglobal('woodS')=='1' then
uo.print('**Warning! gathering rubbish is allready running!!')
goto exit2
end if
uo.setglobal('woodS','1')
dim a[6]
  a[1]=0x0000
  a[2]=0x0000
 a[3]=0x0000
 a[4]=0x0000
 a[5]=0x0000
 a[6]=0x0000
  for x=1 to 6
      uo.findtype(a[x],"-1","ground")
    if UO.FindCount()>0 and Uo.GetDistance("finditem")<=3 then
      uo.moveitem("finditem")
      uo.print('...up...')
           wait(500)
    end if
    uo.setglobal('woodS','0')
  uo.print('.end script.')
  exit2:
  end sub

вместо того, чтобы поднять заданные предметы он сразу переходит к завершению пишет что мол скрипт закончен и вырубает..(
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Re: Подкорректируйте скрипт на собирание предметов плиз

Post by flake »

1. У тебя нету Next-a
2. Пропиши типы в массив.

Code: Select all

sub up()
var x
if uo.getglobal('woodS')=='1' then
uo.print('**Warning! gathering rubbish is allready running!!')
goto exit2
end if
uo.setglobal('woodS','1')
dim a[6]
  a[1]=0x0000
  a[2]=0x0000
 a[3]=0x0000
 a[4]=0x0000
 a[5]=0x0000
 a[6]=0x0000
  for x=1 to 6
      uo.findtype(a[x],"-1","ground")
    if UO.FindCount()>0 and Uo.GetDistance("finditem")<=3 then
      uo.moveitem("finditem")
      uo.print('...up...')
           wait(500)
    end if
  Next
    uo.setglobal('woodS','0')
  uo.print('.end script.')
  exit2:
  end sub
Post Reply