Проблема с бутылками
Posted: 2007-04-28 18:18:24
Ниже часть большого скрипта на пвп, после пропущенной строки идет часть скрипта в которой заключается проблема, при ее присутствии скрипт не делает вообще ничего ни при каких уловиях, если ее вырезать, работает нормально, она отвечает за использование бутылок, подскажите что в ней не так?
Code: Select all
sub StartPvP()
var replay, x, y, dx, dy, hp, str, dex, int, mana, id, name, serial = '0x00000000'
str = uo.str
dex = uo.dex
int = uo.int
uo.deletejournal()
while not uo.dead()
replay = 0
name = uo.getname('lastattack')
if serial <> uo.getserial('lastattack') then
uo.concolor('0x0085')
uo.print('New Aim Detected')
uo.print('Spell: Clumsy >>> '+name)
uo.concolor('0x0000')
uo.deletejournal('Uus jux')
uo.deletejournal('The spell fizzles.')
mana = uo.mana
uo.cast('Clumsy', 'lastattack')
repeat
wait(10)
until uo.injournal('Uus Jux')
uo.msg(' ')
uo.msg(' ')
uo.msg(' ')
repeat
wait(100)
until uo.injournal('The spell fizzles.') or uo.mana < mana
uo.attack('lastattack')
serial = uo.getserial('lastattack')
else
serial = uo.getserial('lastattack')
endif
if uo.injournal('You are frozen') then
uo.setglobal('CancelSpell', '1')
replay = 1
x = uo.getx('self')
y = uo.gety('self')
hp = uo.life()
uo.findtype('0x0F03', '0x09CF')
if uo.findcount() > 0 then
uo.concolor('0x0085')
uo.print('Frozen Detected')
uo.print('Spell: Magic Arrow >>> Antifreeze')
uo.concolor('0x0000')
repeat
uo.deletejournal('The spell fizzles.')
uo.deletejournal('In Por Ylem')
uo.waittargetobject('finditem')
uo.cast('Magic Arrow')
repeat
wait(10)
until uo.injournal('In Por Ylem')
uo.msg(' ')
uo.msg(' ')
uo.msg(' ')
repeat
wait(100)
dx = uo.getx('self')
dy = uo.gety('self')
until x <> dx or y <> dy or uo.injournal('The spell fizzles.') or uo.life < hp
until not uo.injournal('The spell fizzles.')
else
uo.concolor('0x0085')
uo.print('!!!Antifreeze not found!!!')
uo.concolor('0x0000')
repeat
wait(100)
dx = uo.getx('self')
dy = uo.gety('self')
until x <> dx or y <> dy
endif
uo.deletejournal('You are frozen')
uo.attack('lastattack')
uo.setglobal('CancelSpell', '0')
else
if val(uo.getglobal('BottleTime')) == 0 then
if replay == 0 then
if uo.life < (str/3) then
replay = 1
uo.usetype('0x0F0E', '0x09BB')
uo.exec('exec BottleTimer')
else
if uo.mana < (int-50) then
replay = 1
uo.usetype('0x0F0E', '0x09BB')
uo.exec('exec BottleTimer')
else
if uo.stamina < (dex/5) then
replay = 1
uo.usetype('0x0F0E', '0x0997')
uo.exec('exec BottleTimer')
else
wait(10)
endif
endif
endif
else
wait(10)
endif
else
wait(100)
endif
endif
wend
end sub
sub BottleTimer()
uo.setglobal('BottleTime', '1')
wait(10000)
uo.setglobal('BottleTime', '0')
end sub