Yoko

All sides of Injection
It is currently 2024-03-28 11:29:30

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-06-27 23:41:27 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
Discussion:______________
http://yoko.netroof.net/forum/viewtopic ... 7&start=15
Author or poster:_________
Edred, tercia@spb.lanck.net
Tested on:_______________
The Cytadel http://ultima.e-burg.ru Sphere 0.55
Must work:_______________
Sphere emu
Customization required:____
Yes/place (0x404331B7 change to drop box serial)
Description:______________
Скрипт берет из кучек на полу 1 шт. меда, 1 бутылку lesser poison,
травит мед, сбрасывает отравленный мед и пустую бутылку в рядом стоящий сундук.
В переменную Sunduk надо занести сериал контейнера, стоящего рядом с чаром.см. заголовок скрипта
Yoko comment:___________
Автор не указал, а зря, что под словами "травит" скрипт подразумевает использование прицела от бутылки яда на мёд.
Таким образом скрипт малотранспортабелен, на большинсте шардов скилл Poisoning работает при его прямом использовании. Для обычного случая скрипт имеет примерно следующий вид:
while ...
uo.poison("object_to_poison")
wait(delay_ms)
wend
Подробнее о команде poison должно быть написано здесь: http://yoko.netroof.net/help/index.php? ... tem=poison
________________________
Code:
sub poison()
; v. 1.02 (c) Edred
; Положите рядом с чаром на пол побольше меду и lesser poison,
; поставьте рядом сундук, занесите его сериал в переменную
; Sunduk (туда будут сбрасываться пустые бутылки и отравленный мед)
; Если что-то не берет - значит положили далеко от чара,
; поправьте цифру в команде set finddistance
;
   VAR Sunduk = '0x404331B7'
   VAR Med = '0x09EC'
   VAR LesPois = '0x0F0A'
   VAR EmpBot = '0x0F0E'
   VAR MedSer, k
   UO.Exec('set finddistance 2')
   While TRUE
      UO.FindType( Med, -1, 1 )
      If UO.FindCount() == 0 Then
         UO.Print("Jars not found, script terminated")
         return
      Endif
      UO.Grab( '1', 'finditem' )
      wait( 2000 )
      UO.FindType( LesPois, -1, 1 )
      If UO.FindCount() == 0 Then
         UO.Print("Bottle of Poison not found, script terminated")
         return
      Endif
      UO.Grab( '1', 'finditem' )
      wait( 2000 )
      UO.DeleteJournal()
      UO.WaitTargetType( Med )
      UO.UseObject( 'finditem' )
      k = 0
      while NOT UO.InJournal('You apply lesser poison') AND NOT UO.InJournal('You fail to apply lesser poison') AND ( k < 30 )
         k = k + 1
         wait(500)
      wend
      UO.Print( 'meda v pake ' + str( UO.Count( Med ) ) )
      if UO.Count( Med ) > 0 then
         UO.FindType( Med, -1, 'backpack' )
         UO.MoveItem( 'finditem', 0, Sunduk )
         wait( 2000 )
         UO.Print( 'Jar dropped' )
      end if
      if UO.Count( EmpBot ) > 0 then
         UO.FindType( EmpBot, -1, 'backpack' )
         UO.MoveItem( 'finditem', 0, Sunduk )
         wait( 2000 )
         UO.Print( 'Empty bottle dropped' )
      end if
   Wend
end sub


Top
   
 Post subject:
PostPosted: 2004-11-14 18:36:24 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
Discussion:______________
http://yoko.netroof.net/forum/viewtopic.php?p=9527#9527
Author or poster:_________
doomhammer@ua.fm 175727175
Tested on:_______________
Alkar-Realms www.ultima.alkar.net
Must work:_______________
RunUO emu
Customization required:____
No
Description:______________
На сфере играл мало, поэтому думаю, что будет работать только под рануо.
Сначала записываются типы и объекты. Потом записывается значение скила поизонинг в переменную и начинается работа. При прокачке на 0.3 меняется еда.
для работы необходимо:
Бочка с ядом(их можно менят в процессе работы), бутылка(1), сумка, кол-во еду не меньше 3 в кучке.
Может работать выливая яд из бочки, а может и просто с бутылками.
Настройки не требует.

Коментарий: бочка юзается за 15.5 минут и прокачивает в среднем(после 80%) на 1.5%
Yoko comment:___________
напоминаю, что не у всех команда uo.say может печатать русский текст. если такое произойдёт, и комадна uo.sayu не помогает, замените тексты на транслит.
________________________
Code:
sub main()
var p1,p2,dp
uo.say(',exec bandcure')
uo.say('Запущена система контроля хп')
uo.say('Покажи как выглядит бочка с ядом.')
uo.addtype('keg')
while uo.targeting()
wait(100)
wend
uo.say('Покажи как выглядит еда.')
uo.addtype('food')
while uo.targeting()
wait(100)
wend
uo.say('Покажи как выглядит яд.')
uo.addtype('poison')
while uo.targeting()
wait(100)
wend
uo.say('Покажи сумку с едой.')
uo.addobject('sum')
while uo.targeting()
wait(100)
wend

g:

    uo.findtype('food','-1','sum')
    uo.grab('1','finditem')
    uo.say('Достал еду из сумки')
   wait(2000)
   goto cond



pp:
uo.usetype('keg')
wait(500)
uo.waittargettype('poison')
uo.useskill('Poisoning')
wait(1000)
uo.findtype('food','-1')
wait(1000)
uo.target('1','finditem')
wait(11000)
goto cond1



cond:
p1=uo.skillval('Poisoning')
uo.say('Значение скила Пойзонинг записано в переменную p1')
goto pp


cond1:
p2=uo.skillval('Poisoning')
dp=p2-p1
if dp>2 then
uo.say('Значение скила поднялось на 0.3, беру другую порцию еды для работы.')
uo.findtype('food','-1')
uo.setreceivingcontainer('sum')
wait(500)
uo.findtype('food')
uo.grab('1','finditem')
uo.say('Ложу еду в сумку.')
wait(1000)
uo.unsetreceivingcontainer()
goto g
else
goto pp
endif

end sub

sub bandcure()
repeat
if uo.poisoned('self') and uo.count('bandage')>0 then
uo.bandageself()
uo.say('Бинтуюсь!')
wait(10000)
end if
if uo.poisoned('self') and uo.count('cure')>0 then
uo.usetype('cure')
uo.say('Пью антидот!')
wait(1000)
end if
wait(1000)
until uo.life<0
end sub


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 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