Yoko
http://forum.yoko.com.ua/

Помогите найти ошибку?
http://forum.yoko.com.ua/viewtopic.php?f=20&t=5392
Page 1 of 1

Author:  Dron D. [ 2005-10-06 22:16:51 ]
Post subject:  Помогите найти ошибку?

Code:
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


Етот скрипт кидает айтем зади врага, исходя из ваших координат, но почему то скрипт либо не рабоатет иногда, либо кидает на "большую высоту"

Author:  Destruction [ 2005-10-07 00:21:33 ]
Post subject: 

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

Code:
uo.drop('0',STR(dx),STR(dy),STR(uo.getZ('lasttarget'))) 

Author:  Dron D. [ 2005-10-07 19:34:54 ]
Post subject: 

спасибо.
Но еще есть вопросы:
1. Почему цель выдается на айтем, когда у нас есть строка определяющяя, что кидать.
2. Почему после блокировки, пропадает таргет с обьекта и его сново приходится искать в толпе?

Author:  Dron D. [ 2005-10-08 13:48:40 ]
Post subject: 

непонятки Щ_Щ
ап

Author:  Beyonder [ 2005-10-08 18:59:29 ]
Post subject: 

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

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/