##################################################################### ; 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
В тексте скрипта в начале добавь (где переменные):
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