отход для лечения

General Injection issues

Moderators: Murderator+, Murderator

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

отход для лечения

Post by Profik »

попытался зделать скрипт на отход при маленьком кол-ве хп )) :
sub main()
if uo.hits<70 then
gotoxy(65535,65535,0)
else
gotoxy(1521,1725,0)
end sub
но он не пашет ))
подскажите че надо зделать чтоб допустим при хп меньше 30 чар отходил в сторону стоял там несколько секунд и опять подходил где стоит
Savage
Expert!
Posts: 1205
Joined: 2004-04-04 11:13:54
Location: Балаково, Саратовская обл.
Contact:

Post by Savage »

Ну ты отойди кда надо и координаты которые показывает игжект забей в скрипт. Потом подойди, опять координаты забей.
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

gotoxy(1521,1725,0)
Смею предположить что у тебя нету ходилки )
Все просто.
BETEPAH ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

НЕТ ЧТО ЭТО ?
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Post by Edred »

а что за команду ты тогда пишешь: gotoxy() ? В инжекте нет такой встроенной функции, так что если ты такую хочешь использвать - ее надо написать.
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

уго
что надо ходилку скачать или можно и без нее ?
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

пример ходилки-по простому, скрипт для перемещение на заданые координаты по сложному.

Code: Select all

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 ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

вот что смог зделать :
sub main()
if uo.hits<70 then
WalkN(1526,1723,20)
weit (3000)
end sub
выдает ошибку Line 2 : Viriable undefined UO-HITS
Savage
Expert!
Posts: 1205
Joined: 2004-04-04 11:13:54
Location: Балаково, Саратовская обл.
Contact:

Post by Savage »

walkn(x,y,serial)
два варианта юза либо координаты либо сериал объекта. То есть:
walkn(1234,4321,"")
walkn(0,0,"12345678")
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

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


нет надо так

Code: Select all

sub main()
if uo.hits<70 then
WalkN(1526,1723,"")
weit (3000)
end sub

И еще в скрипте надо иметь Ходилку что выложена выше ))
Все просто.
BETEPAH ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

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

Post by Profik »

Line 2 : Viriable undefined UO-HITS
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

if uo.hits<70 then
меняем на
if uo.life<70 then
Все просто.
BETEPAH ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

sub main()
if uo.life<70 then
WalkN(1523,1725,"")
weit (3000)
WalkN(1526,1722,"")
end sub
теперь пишет Line:8 parse error
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

wait (3000)
Все просто.
BETEPAH ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

))))

sub main()
if uo.life<70 then
WalkN(1524,1725,"")
wait(3000)
WalkN(1527,1726,"")
end sub
теперь Line 9: parse error
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

sub main()
if uo.life<70 then
WalkN(1524,1725,"")
wait(3000)
WalkN(1527,1726,"")
end if
end sub
Все просто.
BETEPAH ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

запускается токо один раз
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

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 ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

а при запуске с хп ниже 70 пишет на Line 3 : Function not found-WALKN
Post Reply