Yoko

All sides of Injection
It is currently 2025-10-27 15:11:19

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2006-02-25 23:29:41 
Offline
User avatar

Joined: 2005-06-19 19:21:28
Posts: 159
Не могли бы вы добавить в скрипт Спирит спик
Например 20 раз промедецировал
Потом Спирит Спик и кушает катлетку, потом все снова

Code:
sub Meditation() 
var Exit, LastTimer, CharMana
uo.Print('Выбери Курсу: ')
uo.Exec('addobject Curse')
while uo.Targeting()
wait(100)
wend
wait(300)
uo.DisArm()
wait(2000)
exit=0
while Exit <> 1
CharMana=uo.INT
CheckLag()
uo.WaitTargetType('0x0190')
uo.UseObject('Curse')
wait(500)
uo.Canceltarget()

if uo.InJournal('no target to cansel') then
uo.DeleteJornal()
end if

repeat
wait(500)
until uo.Mana<CharMana
CheckLag()
LastTimer=uo.Timer()

repeat
uo.DisArm()
uo.Print('Медитируем...')
uo.Useskill('Meditation')
wait(4000)
until uo.Mana==uo.INT or LastTimer+300<uo.Timer()
wend
end sub

sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub


Top
   
 Post subject:
PostPosted: 2006-02-26 17:00:53 
Offline
User avatar

Joined: 2005-06-19 19:21:28
Posts: 159
Никто не поможет :(
Помогите пожалуйста


Top
   
 Post subject:
PostPosted: 2006-02-26 19:05:42 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Эту функцию добавь в конец файла со скриптом:

Code:
#####################################################################
; Spirit Speak v.1.00b (c) Edred
;
; Разовая прокачка спирит спика. Предназначена для вызова из других скриптов.
;
sub SpSpeak()
   VAR mod = UO.WarMode(), num
   VAR fizzle = 'You fail your attempt'
   VAR success = 'You establish a connection'
   UO.WarMode( 0 )
   DeleteJournal( success )
   repeat
      DeleteJournal( fizzle )
      UO.UseSkill( 'Spirit Speak' )
      num = 1
      repeat
         wait(100)
         num = num + 1
      until UO.InJournal( fizzle ) OR UO.InJournal( success ) OR num > 600
   until UO.InJournal( success )
   UO.WarMode( mod )
endsub
#####################################################################
Sub DeleteJournal( string1 )
   VAR nom = UO.InJournal( string1 )
   If nom > 0 Then
      UO.SetJournalLine( Nom - 1, 'string replaced' )
      DeleteJournal( string1 )
   Endif
endsub


В тексте скрипта в начале добавь (где переменные):

Code:
VAR SpiritTime = UO.Timer()


А там где хочешь чтобы запускался спирит:

Code:
If ( UO.Timer() - SpiritTime ) / 600 > 5 Then
   ; Прошло 5 минут с момента последней прокачки Spirit Speak
   SpSpeak()
   SpiritTime = UO.Timer()
Endif


Top
   
 Post subject:
PostPosted: 2006-02-26 19:20:28 
Offline
User avatar

Joined: 2005-06-19 19:21:28
Posts: 159
Все добавил
При запуске пишет
Variable undefinet - SPirititme


Top
   
 Post subject:
PostPosted: 2006-02-26 19:23:55 
Offline
User avatar

Joined: 2005-06-19 19:21:28
Posts: 159
Все разобрался...
Вот у меня что получилось

Code:
sub Meditation() 
VAR SpiritTime = UO.Timer()
var Exit, LastTimer, CharMana
uo.Print('Выбери Курсу: ')
uo.Exec('addobject Curse')
while uo.Targeting()
wait(100)
wend
wait(300)
uo.DisArm()
wait(2000)
exit=0
while Exit <> 1
CharMana=uo.INT
CheckLag()
uo.WaitTargetType('0x0190')
uo.UseObject('Curse')
wait(500)
uo.Canceltarget()

if uo.InJournal('no target to cansel') then
uo.DeleteJornal()
end if

repeat
wait(500)
until uo.Mana<CharMana
CheckLag()
LastTimer=uo.Timer()

repeat
uo.DisArm()
If ( UO.Timer() - SpiritTime ) / 600 > 1 Then
   ; Прошло 5 минут с момента последней прокачки Spirit Speak
   SpSpeak()
   SpiritTime = UO.Timer()
Endif

uo.Print('Медитируем...')
uo.Useskill('Meditation')
wait(4000)
until uo.Mana==uo.INT or LastTimer+300<uo.Timer()
wend
end sub

sub CheckLag()
Endif
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub


sub SpSpeak()
   VAR mod = UO.WarMode(), num
   VAR fizzle = 'You fail your attempt'
   VAR success = 'You establish a connection'
   UO.WarMode( 0 )
   DeleteJournal( success )
   repeat
      DeleteJournal( fizzle )
      UO.UseSkill( 'Spirit Speak' )
      num = 1
      repeat
         wait(100)
         num = num + 1
      until UO.InJournal( fizzle ) OR UO.InJournal( success ) OR num > 600
   until UO.InJournal( success )
   UO.WarMode( mod )
endsub
#####################################################################
Sub DeleteJournal( string1 )
   VAR nom = UO.InJournal( string1 )
   If nom > 0 Then
      UO.SetJournalLine( Nom - 1, 'string replaced' )
      DeleteJournal( string1 )
   Endif
endsub


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

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 10 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited