Помогите найти ошибку?

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Dron D.
Posts: 190
Joined: 2004-12-13 01:27:00

Помогите найти ошибку?

Post by Dron D. »

Code: Select all

sub fix()
var dx=uo.getx('lasttarget'),dy=uo.gety('lasttarget')

uo.print(STR(uo.getX('self')))
uo.print(STR(uo.getY('self')))

uo.findtype('0x0F36','-1','my') #Type of item 4fix
if uo.FindCount() then

uo.waittargetobject('finditem')

if uo.getx('lasttarget')>uo.getx('self') then
uo.print('Fixed!')
uo.print('Fixed!')
dx=uo.getx('lasttarget')
dx=dx+1
#dy=dy-1
endif

if uo.getx('lasttarget')<uo.getx('self') then
uo.print('Fixed!')
uo.print('Fixed!')
dx=uo.getx('lasttarget')
dx=dx-1
#dy=dy+1
endif

if uo.gety('lasttarget')<uo.gety('self') then
uo.print('Fixed!')
uo.print('Fixed!')
dy=uo.gety('lasttarget')
dy=dy-1
#dx=dx+1
endif


if uo.gety('lasttarget')>uo.gety('self') then
uo.print('Fixed!')
uo.print('Fixed!')
dy=uo.getY('lasttarget')
dy=dy+1
#dx=dx-1
endif

uo.drop('0',STR(dx),STR(dy),STR(uo.getY('lasttarget')))

uo.print(STR(dx)+" "+STR(dy))
wait(100)
uo.canceltarget()
uo.set('lasttarget','laststatus')

endif

end sub


Етот скрипт кидает айтем зади врага, исходя из ваших координат, но почему то скрипт либо не рабоатет иногда, либо кидает на "большую высоту"
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Code: Select all

uo.drop('0',STR(dx),STR(dy),STR(uo.getY('lasttarget'))) 

Code: Select all

uo.drop('0',STR(dx),STR(dy),STR(uo.getZ('lasttarget'))) 
Dron D.
Posts: 190
Joined: 2004-12-13 01:27:00

Post by Dron D. »

спасибо.
Но еще есть вопросы:
1. Почему цель выдается на айтем, когда у нас есть строка определяющяя, что кидать.
2. Почему после блокировки, пропадает таргет с обьекта и его сново приходится искать в толпе?
Dron D.
Posts: 190
Joined: 2004-12-13 01:27:00

Post by Dron D. »

непонятки Щ_Щ
ап
Beyonder
Expert!
Posts: 388
Joined: 2005-04-23 10:19:43
Contact:

Post by Beyonder »

В самом начале сделай:
var Enemy=UO.GetSerial("laststatus")
И дальше юзай переменную Enemy, она никуда не пропадет. А разные глобальные указатели очень не постоянные.
Post Reply