Yoko

All sides of Injection
It is currently 2024-04-27 23:34:35

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2007-01-11 07:53:23 
Offline

Joined: 2007-01-11 07:45:54
Posts: 2
В общем есть вот такои скриптик, хилинг + паринг, хилитса, как только сломался щит, бирет другои, если чар умер то скрипт заканчивается. Мне надо небольшое его исправление, чтоб была проверка на хп, если хп меньше 25 то чтоб чар отходил на 1 клетку на South, при этом продолжая все так же хилитса, как тока здоровье становилось больше 60 хп чтоб возвращался на изночальную точку, тоесть двигался на 1 клетку на North, заранее большое спасибо.
Quote:
sub healingwp()
var done = 0
var Lhand = uo.GetGraphic(uo.ObjAtLayer('Lhand'))
uo.set('distance', 2)
repeat
uo.waittargetself()
uo.useFromGround('0x0E21')
wait(4000)
if Uo.life == 0 then
done = 1
end if
if (uo.GetGraphic(uo.ObjAtLayer('Lhand')) <> Lhand and Lhand <> '0x0000') then
if (uo.Count(Lhand)) then
uo.Equipt('Lhand', Lhand)
wait(750)
uo.print('Equip Lhand device')
else
done = 0
uo.print('no more Lhand devices')
end if
end if
wait(200)
until done
uo.textopen()
uo.textprint("The end!")
end sub


Top
   
PostPosted: 2007-01-11 12:09:13 
Offline

Joined: 2007-01-11 07:45:54
Posts: 2
Kostik wrote:
В общем есть вот такои скриптик, хилинг + паринг, хилитса, как только сломался щит, бирет другои, если чар умер то скрипт заканчивается. Мне надо небольшое его исправление, чтоб была проверка на хп, если хп меньше 25 то чтоб чар отходил на 1 клетку на South, при этом продолжая все так же хилитса, как тока здоровье становилось больше 60 хп чтоб возвращался на изночальную точку, тоесть двигался на 1 клетку на North, заранее большое спасибо.
Quote:
sub healingwp()
var done = 0
var Lhand = uo.GetGraphic(uo.ObjAtLayer('Lhand'))
uo.set('distance', 2)
repeat
uo.waittargetself()
uo.useFromGround('0x0E21')
wait(4000)
if Uo.life == 0 then
done = 1
end if
if (uo.GetGraphic(uo.ObjAtLayer('Lhand')) <> Lhand and Lhand <> '0x0000') then
if (uo.Count(Lhand)) then
uo.Equipt('Lhand', Lhand)
wait(750)
uo.print('Equip Lhand device')
else
done = 0
uo.print('no more Lhand devices')
end if
end if
wait(200)
until done
uo.textopen()
uo.textprint("The end!")
end sub

Или даите хотябы команду и как должны выглядить передвижение на одну клетку. Остальное сам напишу (


Top
   
PostPosted: 2007-01-15 19:12:08 
Offline
User avatar

Joined: 2005-04-06 05:53:47
Posts: 124
Kostik wrote:
Kostik wrote:
В общем есть вот такои скриптик, хилинг + паринг, хилитса, как только сломался щит, бирет другои, если чар умер то скрипт заканчивается. Мне надо небольшое его исправление, чтоб была проверка на хп, если хп меньше 25 то чтоб чар отходил на 1 клетку на South, при этом продолжая все так же хилитса, как тока здоровье становилось больше 60 хп чтоб возвращался на изночальную точку, тоесть двигался на 1 клетку на North, заранее большое спасибо.
Quote:
sub healingwp()
var done = 0
var Lhand = uo.GetGraphic(uo.ObjAtLayer('Lhand'))
uo.set('distance', 2)
repeat
uo.waittargetself()
uo.useFromGround('0x0E21')
wait(4000)
if Uo.life == 0 then
done = 1
end if
if (uo.GetGraphic(uo.ObjAtLayer('Lhand')) <> Lhand and Lhand <> '0x0000') then
if (uo.Count(Lhand)) then
uo.Equipt('Lhand', Lhand)
wait(750)
uo.print('Equip Lhand device')
else
done = 0
uo.print('no more Lhand devices')
end if
end if
wait(200)
until done
uo.textopen()
uo.textprint("The end!")
end sub

Или даите хотябы команду и как должны выглядить передвижение на одну клетку. Остальное сам напишу (




Мда таких скриптов тут валом (сам скачивал)
вот тебе пример скрипта (только там нет чтоб брал щит если он сломался, про ходилку там читай - всё есть)
Тебе нужно вставить проверку с репитом на то чтоб он проверял на наличие щита в руке у персонажа - извеняй но саму строку подсказать несмогу я незнаю


Code:
#Aвтор скрипта Stranger[BV]#

sub fight()


while 1
   gotoxy(2676,294,0) # куда подходить чтоб драться
   UO.usetype("0x1B76") # щит
   uo.usetype("0x0F51") # оужие
   UO.Exec("attack 0x001624C5") #2-й чар кого бить
   Repeat
      wait (500)
   if uo.injournal("destroyed")then
   UO.usetype("0x0F51") # оружие
   uo.deletejournal()
   endif
   Until ((UO.GetHP("0x0001D90B") <75)or (UO.GetHP("0x001624C5")  <100)) #
#проверка хп у первого и вторго чара
   repeat
   UO.Exec("warmode 0") # вармод
   UO.Press(35) # отходим End
   UO.Press(35) # отходим End
   until (gotoxy(2676,295,0)) # куда отходить лечиться 
      UO.DeleteJournal()
   Repeat
      UO.Usetype("0x0E21") #Bandages
      UO.Exec("waittargetobject 0x001624C5") # 2-й чар
      wait(3500)
   Until (UO.InJournal("need you"))
      UO.DeleteJournal()
   Repeat
      UO.Usetype("0x0E21") #Bandages
      UO.Exec("waittargetobject 0x0001D90B")  # 1-й чар
      wait(3500)
   Until (UO.InJournal("need healing"))
wend
end sub

sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if
ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if
if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(35)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub

sub Healing()
   UO.SetArm('CWeapon')
   UO.Exec("bandageself")
   wait(500)
   
   UO.Arm('CWeapon')
end sub   

###############################################################
#и еще последняя координата z должна быть равной 0 иначе чар ходить не будет
#пример (2676,294,0) (координата х, координата у, координата z)

_________________
=== ? Como es tas ? ===


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 27 guests


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:  
Powered by phpBB® Forum Software © phpBB Limited