извините, но...

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
dioXido
Posts: 37
Joined: 2005-09-20 09:39:03

извините, но...

Post by dioXido »

Извините уважаемые скриптеры мне нужно подправить чтобы улетал от всех, а не только от ПК. И выходит ошибка serial index
sub maning()
#BETEP™#
var mx, my, mz, i, j, jor, ser, noto
Uo.exec("set norbcheck 1"); для рекола
uo.exec("set norbcalc 1"); тоже

uo.print('!!Выбери Лопату!! ')
uo.exec('addobject Shovel')
while uo.targeting()
wait(100)
wend

uo.print('!!Выбери Рунбук!! ')
uo.exec('addobject Runebook')
while uo.targeting()
wait(100)
wend

na4alo:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my -4 to my+4
while not UO.Hidden()
UO.Warmode("0")
uo.print("Прячемся...")
UO.UseSkill("Hiding")
wait(4000)
wend
UO.Print("Копаем в координатах: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock") and not UO.InJournal("Iron Ore") and not UO.InJournal("Copper") and not UO.InJournal("Rusty Ore")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("Shovel")
while not UO.InJournal("You put") and not UO.InJournal("heavy") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock")
wait (500)
if uo.injournal("heavy") or uo.dead() then
pwav()
Pause()
endif
for jor = 0 to 9
ser = uo.journalserial(jor)
noto = uo.getnotoriety(ser)
if noto <> 1 and noto <> 0 and not uo.injournal("Ziper") then
if uo.waiting() then

uo.canceltarget()
endif
Save()
pwavw()
wait(300) ; время в секундах при ожидании пока уйдет ПК
loot()
wait(3000)
goto reccal
endif
next
wend
if uo.weight > 400 then ; Максимальный вес при котором домой с рудой
goto end
endif
wend
UO.DeleteJournal()
next
next
goto na4alo
end:
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall Runebook 21") ; домой ( в рунбуке слот 1 )
wait(10000)
loot()
wait(3000)
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall Runebook 94") ; в шахту ( в рунбуке слот 8 )
mx = UO.GetX("self")
my = UO.GetY("self")
wait(10000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then
goto reccal
endif
goto na4alo
end sub

sub loot() ; перекладка руды в сундук
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x4024B087' ; АЙДИ сундука для руды
DIM Ore[5]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 3
Exit=0
repeat
UO.FindType(Ore[a])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
end sub

sub Save() ; Реколл от ПК при их появлении (в паке рунка в безопасное место и реги)
var mx, my
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
mx = UO.GetX("self")
my = UO.GetY("self")
UO.DeleteJournal()
UO.FindType('0x1F14',-1,'my')
wait(200)
UO.Cast('Recall','finditem')
wait(4000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then
goto reccal
endif
end sub

sub pwav() ; звук при выкапывании ЭЛЕМЕНТАЛА
uo.playwav("E:\UO\inject\SOUND\chanting sound 01.wav")
endsub

sub pwavw(); звук при появлении ПК
uo.playwav("E:\UO\inject\SOUND\chanting sound 01.wav")
endsub

sub Pause() ; Пауза скрипта если выкопали Элема (продолжить сказав GO )
UO.DeleteJournal()
REPEAT
WAIT(3000)
UO.Print("!!!СКРИПТ НА ПАУЗЕ!!!!")
UNTIL UO.InJournal('GO')
UO.Print("!!!СКРИПТ ПРОДОЛЖЕН!!!!")
endif
end sub
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

for jor = 0 to 9 
   ser = uo.journalserial(jor)
   
   if uo.IsNPC(ser) and (ser <> uo.GetSerial()) then
      if uo.waiting() then
         uo.canceltarget()
      endif
      Save()
      pwavw()
      wait(300) ; время в секундах при ожидании пока уйдет ПК
      loot()
      wait(3000)
      goto reccal
   endif
next
dioXido
Posts: 37
Joined: 2005-09-20 09:39:03

Post by dioXido »

А что с ним делать?
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

искать и изменять...
dioXido
Posts: 37
Joined: 2005-09-20 09:39:03

Post by dioXido »

я не соображаю в этом
Rivory
Posts: 205
Joined: 2005-01-06 11:49:28

Re: извините, но...

Post by Rivory »

Code: Select all

Извините уважаемые скриптеры мне нужно подправить чтобы улетал от всех, а не только от ПК. И выходит ошибка serial index
[quote]sub maning()
#BETEP™#
var mx, my, mz, i, j, jor, ser, noto
Uo.exec("set norbcheck 1"); для рекола
uo.exec("set norbcalc 1"); тоже

uo.print('!!Выбери Лопату!! ')
uo.exec('addobject Shovel')
while uo.targeting()
wait(100)
wend
 
uo.print('!!Выбери Рунбук!! ')
uo.exec('addobject Runebook')
while uo.targeting()
wait(100)
wend

na4alo:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my -4 to my+4
while not UO.Hidden()
UO.Warmode("0")
uo.print("Прячемся...")
UO.UseSkill("Hiding")
wait(4000)
wend
UO.Print("Копаем в координатах: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock") and not UO.InJournal("Iron Ore") and not UO.InJournal("Copper") and not UO.InJournal("Rusty Ore")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("Shovel")
while not UO.InJournal("You put") and not UO.InJournal("heavy") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock")
wait (500)
if uo.injournal("heavy") or uo.dead() then
pwav()                   
Pause()
endif
for jor = 0 to 9
   ser = uo.journalserial(jor)
   
   if uo.IsNPC(ser) and (ser <> uo.GetSerial()) then
      if uo.waiting() then
         uo.canceltarget()
      endif
      Save()
      pwavw()
      wait(300) ; âðåìÿ â ñåêóíäàõ ïðè îæèäàíèè ïîêà óéäåò ÏÊ
      loot()
      wait(3000)
      goto reccal
   endif
next
wend
if uo.weight > 400 then  ; Максимальный вес при котором домой с рудой
goto end
endif
wend
UO.DeleteJournal()
next
next
goto na4alo
end:
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall Runebook 21") ; домой ( в рунбуке слот 1 )
wait(10000)
loot()
wait(3000)
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall Runebook 94") ; в шахту ( в рунбуке слот 8 )
mx = UO.GetX("self")
my = UO.GetY("self")
wait(10000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then
goto reccal
endif
goto na4alo
end sub

sub loot()    ; перекладка руды в сундук
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x4024B087' ; АЙДИ сундука для руды 
DIM Ore[5]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 3
Exit=0
repeat
UO.FindType(Ore[a])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
end sub

sub Save() ; Реколл от ПК при их появлении (в паке рунка в безопасное место и реги)
var mx, my
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
mx = UO.GetX("self")
my = UO.GetY("self")
UO.DeleteJournal()
UO.FindType('0x1F14',-1,'my')
wait(200)
UO.Cast('Recall','finditem')
wait(4000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then
goto reccal
endif
end sub

sub pwav() ; звук при выкапывании ЭЛЕМЕНТАЛА
uo.playwav("E:\UO\inject\SOUND\chanting sound 01.wav")
endsub

sub pwavw(); звук при появлении ПК
uo.playwav("E:\UO\inject\SOUND\chanting sound 01.wav")
endsub

sub Pause() ; Пауза скрипта если выкопали Элема (продолжить сказав GO )
UO.DeleteJournal()
REPEAT
WAIT(3000)
UO.Print("!!!СКРИПТ НА ПАУЗЕ!!!!")
UNTIL UO.InJournal('GO')
UO.Print("!!!СКРИПТ ПРОДОЛЖЕН!!!!")
endif
end sub
Post Reply