Yoko

All sides of Injection
It is currently 2026-01-17 09:17:28

All times are UTC+02:00




Post new topic  Reply to topic  [ 26 posts ]  Go to page 1 2 Next
Author Message
PostPosted: 2005-02-25 11:40:59 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
попытался зделать скрипт на отход при маленьком кол-ве хп )) :
sub main()
if uo.hits<70 then
gotoxy(65535,65535,0)
else
gotoxy(1521,1725,0)
end sub
но он не пашет ))
подскажите че надо зделать чтоб допустим при хп меньше 30 чар отходил в сторону стоял там несколько секунд и опять подходил где стоит


Top
   
 Post subject:
PostPosted: 2005-02-25 11:57:50 
Offline
Expert!
User avatar

Joined: 2004-04-04 11:13:54
Posts: 1205
Location: Балаково, Саратовская обл.
Ну ты отойди кда надо и координаты которые показывает игжект забей в скрипт. Потом подойди, опять координаты забей.


Top
   
 Post subject:
PostPosted: 2005-02-25 13:04:04 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
gotoxy(1521,1725,0)
Смею предположить что у тебя нету ходилки )

_________________
Все просто.
BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 13:11:02 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
НЕТ ЧТО ЭТО ?


Top
   
 Post subject:
PostPosted: 2005-02-25 13:13:33 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
а что за команду ты тогда пишешь: gotoxy() ? В инжекте нет такой встроенной функции, так что если ты такую хочешь использвать - ее надо написать.


Top
   
 Post subject:
PostPosted: 2005-02-25 13:15:56 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
уго
что надо ходилку скачать или можно и без нее ?


Top
   
 Post subject:
PostPosted: 2005-02-25 13:23:45 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
пример ходилки-по простому, скрипт для перемещение на заданые координаты по сложному.

Code:
sub WalkN(x,y,Target) 
VAR i,StepSucess
VAR dx,dy,Exit=0
While Exit<>1   
If Target<>"" Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
If UO.GetDistance(Target)<2 Then
Exit=1
Endif
Else
dx=x-UO.GetX()
dy=y-UO.GetY()
UO.Print('Left '+STR(dx)+' steps to target. ')
If dx==0 AND dy==0 Then
Exit=1
Endif
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
StepSucess=Go(3,40,300) 
If StepSucess==-1 Then
StepSucess=Go(7,38,300) 
StepSucess=Go(1,39,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300) 
Endif
Endif
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300) 
StepSucess=Go(3,40,300) 
If StepSucess==-1 Then
StepSucess=Go(7,38,300) 
Endif
Endif
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300) 
If StepSucess==-1 Then
StepSucess=Go(1,39,300) 
StepSucess=Go(7,38,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
Endif
Endif
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
StepSucess=Go(5,37,300) 
If StepSucess==-1 Then
StepSucess=Go(1,39,300) 
Endif
Endif
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
If StepSucess==-1 Then
StepSucess=Go(1,39,300) 
Endif
StepSucess=Go(2,34,300) 
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300) 
If StepSucess==-1 Then
StepSucess=Go(7,38,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300) 
Endif
StepSucess=Go(6,36,300) 
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300)
Endif
StepSucess=Go(4,35,300)
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300)
If StepSucess==-1 Then
StepSucess=Go(1,39,300)
If StepSucess==-1 Then
StepSucess=Go(7,38,300)
Endif
StepSucess=Go(0,33,300)
Endif
Endif
Endif
Wend
end sub

sub Go(dir,key,walkwait)
VAR x,y, OldDir
x=UO.GetX()
y=UO.GetY()
OldDir=UO.GetDir()
If UO.GetDir()<>dir Then
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
Endif
Endif
UO.Press(key)
wait(walkwait)
if x==UO.GetX() AND y==UO.GetY() Then
Endif
If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then
UO.Press(key)
wait(walkwait)
Endif
If x==UO.GetX() AND y==UO.GetY() Then
Endif
If x==UO.GetX() AND y==UO.GetY() Then
UO.Print("Stuck. Try move else!")
return -1
Else
return 1
Endif
end sub


Скажу сразу что не помню кто написал.
Пример передвежения выглядет так
WalkN(6030,1248'')

_________________
Все просто.

BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 14:17:44 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
вот что смог зделать :
sub main()
if uo.hits<70 then
WalkN(1526,1723,20)
weit (3000)
end sub
выдает ошибку Line 2 : Viriable undefined UO-HITS


Top
   
 Post subject:
PostPosted: 2005-02-25 14:29:02 
Offline
Expert!
User avatar

Joined: 2004-04-04 11:13:54
Posts: 1205
Location: Балаково, Саратовская обл.
walkn(x,y,serial)
два варианта юза либо координаты либо сериал объекта. То есть:
walkn(1234,4321,"")
walkn(0,0,"12345678")


Top
   
 Post subject:
PostPosted: 2005-02-25 14:34:46 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
Profik wrote:
вот что смог зделать :
sub main()
if uo.hits<70 then
WalkN(1526,1723,20)
weit (3000)
end sub
выдает ошибку Line 2 : Viriable undefined UO-HITS


нет надо так
Code:
sub main()
if uo.hits<70 then
WalkN(1526,1723,"")
weit (3000)
end sub

И еще в скрипте надо иметь Ходилку что выложена выше ))

_________________
Все просто.

BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 14:38:15 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
опять скрипт не запускается выдает туже ошибку
это наверно неможет найти жизни ?


Top
   
 Post subject:
PostPosted: 2005-02-25 14:40:45 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
Line 2 : Viriable undefined UO-HITS


Top
   
 Post subject:
PostPosted: 2005-02-25 14:55:12 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
if uo.hits<70 then
меняем на
if uo.life<70 then

_________________
Все просто.

BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 15:12:27 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
sub main()
if uo.life<70 then
WalkN(1523,1725,"")
weit (3000)
WalkN(1526,1722,"")
end sub
теперь пишет Line:8 parse error


Top
   
 Post subject:
PostPosted: 2005-02-25 15:16:39 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
wait (3000)

_________________
Все просто.

BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 15:26:13 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
))))

sub main()
if uo.life<70 then
WalkN(1524,1725,"")
wait(3000)
WalkN(1527,1726,"")
end sub
теперь Line 9: parse error


Top
   
 Post subject:
PostPosted: 2005-02-25 15:27:41 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
sub main()
if uo.life<70 then
WalkN(1524,1725,"")
wait(3000)
WalkN(1527,1726,"")
end if
end sub

_________________
Все просто.

BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 15:36:54 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
запускается токо один раз


Top
   
 Post subject:
PostPosted: 2005-02-25 15:40:23 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
BETEPAH wrote:
sub main()
if uo.life<70 then
WalkN(1524,1725,"")
wait(3000)
WalkN(1527,1726,"")
end if
end sub



sub main()
repeat
wait(3000)
if uo.life<70 then
WalkN(1524,1725,"")
wait(3000)
WalkN(1527,1726,"")
end if
until uo.dead()
end sub

_________________
Все просто.

BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 15:43:07 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
а при запуске с хп ниже 70 пишет на Line 3 : Function not found-WALKN


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 26 posts ]  Go to page 1 2 Next

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited