Yoko

All sides of Injection
It is currently 2026-05-02 14:56:36

All times are UTC+02:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 2008-03-03 17:41:12 
Offline

Joined: 2008-03-03 17:33:37
Posts: 8
Вообщем,вот мой скрипт.
Code:
sub main()
While not UO.Dead()
 If UO.Mana==UO.INT then
    UO.Exec("cast 'Energy Bolt' self")
    wait(3500);
 else
While UO.Hits<Uo.STR
UO.Exec("bandageself")
wend
 while UO.Mana<UO.Int
   UO.UseSkill("Meditation");
   wait(3000);
 wend
 endif
wend
end sub

Мне нужно,чтобы чар кастовал на себя энерджи болт,потом лечился и медитировал(вообще неважно ,в каком порядке).Перебровал уже кучу вариантов подобных скриптов,но этот работал,пока я не вставил в него bandageself.Помогите пожалуйста,подскажите,где ошибка,или поделитесь рабочим.заранее спасибо))

_________________
doesn't matter =D


Top
   
 Post subject:
PostPosted: 2008-03-03 22:30:12 
Offline
User avatar

Joined: 2005-04-05 04:13:24
Posts: 139
Location: DRW
Code:
While UO.Hits<Uo.STR

uo.hits :shock: разве такое есть? может uo.life лучше =)


Top
   
 Post subject:
PostPosted: 2008-03-03 22:45:26 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Лучше uo.getHP() и uo.getMaxHP() соответственно.

Не на все шардах максхп = сила !!!

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2008-03-04 00:44:40 
Offline

Joined: 2008-03-03 17:33:37
Posts: 8
Теперь работает,спасибо,но хилится не хочет почему-то,у меня сейчас вот так
Code:
sub main()
While not UO.Dead()
 If UO.Mana==UO.INT then
    UO.Exec("cast 'Energy Bolt' self")
    wait(3500);
 else
While uo.getHP(30)<uo.getMaxHp(85)
UO.Exec("bandageself")
wait (6000)
wend
 while UO.Mana<UO.Int
   UO.UseSkill("Meditation");
   wait(10000);
 wend
 endif
wend
end sub

Может хилинг переставить в конец? Или задержки еще больше поставить?
шард нова,рануо 2.0

_________________
doesn't matter =D


Top
   
 Post subject:
PostPosted: 2008-03-04 01:04:44 
Offline

Joined: 2007-09-02 13:35:58
Posts: 194
uo.getHP(30)<uo.getMaxHp(85)

Quote:
Описание: GetHP •

Синтакс: number uo.GetHP([object])
Тема: Команды скриптов Ключевые слова: uoscript, objhandling

Возвращает параметр обьекта object (по умолчанию - персонажа игрока) - здоровье персонажа. Для другого персонажа кроме игрока обычно не имеет смысла абсолютное значение здоровья, так как выражается в абстрактных единицах, важно только отношение к максимальному здоровью GetMaxHP.
• Пример использования команд arm и disarm
Пример использования команд arm и disarm
Пример ждёт безоружным пока не пнут, после чего одевает то оружие что было надето при запуске скрипта.

sub test()
uo.setarm("default")
uo.disarm()
while uo.GetHP()==uo.GetMaxHP()
wait(50)
wend
uo.arm("default")
end sub


таким образом ты возвращаешь HP объектов 30 и 85.. в игре их нет.

тебе надо сравнивать полученные этими командами цифры..


Top
   
 Post subject:
PostPosted: 2008-03-04 10:57:17 
Offline

Joined: 2008-03-03 17:33:37
Posts: 8
а поподробнее можно? не понимаю,какие цифры надо сравнивать..

_________________
doesn't matter =D


Top
   
 Post subject:
PostPosted: 2008-03-04 14:46:42 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Code:
sub main() 
While not UO.Dead()
 If UO.Mana==UO.INT then
    UO.Exec("cast 'Energy Bolt' self")
    wait(3500);
 else
While uo.getHP()<uo.getMaxHp()
UO.Exec("bandageself")
wait (6000)
wend
 while UO.Mana<UO.Int
   UO.UseSkill("Meditation");
   wait(10000);
 wend
 endif
wend
end sub


Top
   
 Post subject:
PostPosted: 2008-03-04 15:13:45 
Offline

Joined: 2008-03-03 17:33:37
Posts: 8
Вот спасибо...)))
работает

_________________
doesn't matter =D


Top
   
 Post subject:
PostPosted: 2008-05-18 21:19:04 
Offline

Joined: 2008-04-29 12:48:32
Posts: 7
Прошу помощи.

Скрипт на магию :
Code:
sub Train_Magery()
var tim, k, flag
VAR SpiritTime = UO.Timer()
repeat
   tim=UO.Timer()
   flag=false
   While not flag
         If ( UO.Timer() - SpiritTime ) / 600 > 5 Then
            ;Ïðîøëî 5 ìèíóò ñ ìîìåíòà ïîñëåäíåé ïðîêà÷êè Spirit Speak
            SpSpeak()
            SpiritTime = UO.Timer()
         Else
            wait(500)
         Endif
         UO.DeleteJournal()
         if ((UO.Timer()-tim) > 18000)then
            tim=UO.Timer()
         endif
         While not ((UO.Mana<14) or flag)
               CheckLag()
               UO.Cast('Poison','self')
               MyWait(500)
               if UO.InJournal('lack') then
                  CheckLag()
                  UO.Cast('Poison','self')
                  MyWait(500)
                  if UO.InJournal('lack') then
                     flag=true
                     uo.Print("1")
                  endif
               endif
               MyWait(2000)
         Wend
         CheckLag()
         While UO.Mana<UO.INT
               UO.Warmode(0)
               UO.UseSkill('Meditation')
               k=0
               Repeat
                  k=k+1
                  MyWait(200)
               Until UO.InJournal("You are") or UO.InJournal("You lose") or k>200
               UO.DeleteJournal()
               MyWait(20000)
         Wend
   Wend
   CheckLag()
until UO.Dead() OR uo.skillval('Magery',1)==1000
end sub # TrainMagery

Sub MyWait(time)
var i, i1, count
   count = time/100
   i1 = 1
   for i = 1 to count
       if (i-i1)>=10 then
          i1 = i
       endif
       if UO.Life < (UO.Str - 5) then ; and ((i-i1) == 0) then
          UO.Say("Guards !!!")
          Wait(1000)
       endif
       Wait(100)
   next
; else
;   wait(time)
;endif
end sub # MyWait

Sub SpSpeak()
;Spirit Speak v.1.00b (c) Edred
;Ðàçîâàÿ ïðîêà÷êà ñïèðèò ñïèêà. Ïðåäíàçíà÷åíà äëÿ âûçîâà èç äðóãèõ ñêðèïòîâ.
VAR mod = UO.WarMode(), num1
VAR fizzle = 'You fail your attempt'
VAR success = 'You establish a connection'
UO.WarMode( 0 )
DeleteJournal( success )
repeat
   DeleteJournal( fizzle )
   UO.UseSkill( 'Spirit Speak' )
   num1 = 1
   repeat
      wait(100)
      num1 = num1 + 1
   until UO.InJournal( fizzle ) OR UO.InJournal( success ) OR num1 > 600
until UO.InJournal( success )
UO.WarMode( mod )
end sub

Sub CheckLag()
DeleteJournal( 'backpack' )
UO.Click( 'backpack' )
repeat
   wait(100)
until UO.InJournal( 'backpack' )
return
end sub

Sub DeleteJournal( string1 )
VAR nom = UO.InJournal( string1 )
If nom > 0 Then
   UO.SetJournalLine( Nom - 1, 'string replaced' )
   DeleteJournal( string1 )
Endif
end sub


Реконнектор :

Code:
sub Reconnect() 
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then 
rFlag=0
end if
wait(20000)
uo.Say('')
wait(3000)
uo.Say('')
wait(3000)
uo.Say('')
wait(3000)
uo.LDblClick(357,164)
uo.LClick(616,459)
wait(3000)
wend
wait(3000)
if (rFlag==0) and (ReconnectTime<>'0') then
uo.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
rFlag=1
ReconnectTime='0'
end if
until false
end sub


Реконектор перезаходит в ультиму, но скрипт на магию не включается.
Как их прикрутить правильно друг к другу, я уже измотался эксперементировать :([/code]


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

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