Каст со скроллов.

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
golod
Posts: 13
Joined: 2011-08-01 10:32:33

Каст со скроллов.

Post by golod »

Пожалуйста! Измените что бы из сундука брал определенное кол-во скроллов Magic Arrow и кастовал с них, а не с реагентов.
Если много переделывать, может есть уже похожий скрипт на форуме, подскажите.

Code: Select all

#©]daRk[::c00pEr::
VAR eda = '0x097B'        #Тип еды.
VAR Sunduk = '0x4006149F' #ID Сундука с регами.
VAR obj = '0x000140BC'    #ID чара куклы.
VAR Kushaem = 1           #Если кушаем, то 1.
VAR cnt = 0

sub strelka()
   VAR NS='0x0F88' ; Тип Nighshade.
   VAR BP='0x0F7A' ; Тип Black Pearls.
   VAR LastTimer
   
   UO.Exec('terminate Reconnector')
   wait(1000)
   UO.Exec('exec Reconnector')
   wait(1000)
   UO.UseObject(Sunduk)
   wait(1000)
   If Kushaem == 1 then
      Eda()
   endif
 
   while not uo.dead()

      If Kushaem == 1 then
         If cnt == 100 then
            Eda()
            cnt = 0
         end if
      endif
      cnt = cnt + 1

     
      If UO.NS < 10 Then
         wait(1000)
         UO.FindType(NS, '-1', Sunduk)
         wait(100)
         UO.MoveItem('finditem', '200', 'backpack')
         wait(1000)
      Endif
     
      If UO.BP < 10 Then
         wait(1000)
         UO.FindType(BP, '-1', Sunduk)
         wait(100)
         UO.MoveItem('finditem', '200', 'backpack')
         wait(1000)
      Endif
     
      if uo.mana > 15 then
         cheklag()
         UO.Cast('Magic Arrow', obj)
         wait(2000)
      else
         UO.Say('no mana')
         While UO.Mana < UO.Int
            UO.DeleteJournal()
            UO.WarMode(0)
            wait(1000)
            UO.Useskill('Meditation')
            Repeat
               wait(100)
            until UO.InJournal("You are") OR UO.InJournal("You lose")
         Wend         
      endif
   wend
end sub

Sub cheklag()
   uo.deletejournal()
   uo.click('backpack')
   repeat
      wait(10)
   until uo.InJournal("backpack")
end sub

Sub Eda()
   if uo.count(eda,'0x0000') < 20 then ## Жрачка, кушаем до изнеможения
      uo.findtype(eda, '0x0000', sunduk)
      Cheklag()
      uo.moveitem('finditem',STR(20-uo.count(eda,'0x0000')),'backpack')
      wait(1000)
   end if
   uo.deletejournal()
   repeat
      uo.usetype(eda,'0x0000')
      wait(1000)
   until uo.injournal("You are stuffed!") or uo.injournal("You can't think of a way to use that item.")
end sub

Sub Reconnector()
   var ReconnectTime, RFlag
   ReconnectTime = '0'
   RFlag = 1
   Repeat
      While (UO.ObjAtLayer('Bpack') == '')
         if RFlag Then
            ReconnectTime = MakeTime()
            RFlag = 0
         endif
         Wait(40000) # WorldSave Protection
         UO.Say('')
         Wait(13000)
         UO.Say('')
         Wait(13000)
         UO.Say('')
         Wait(13000)
         UO.LDblClick(357,164)
         UO.LClick(616,459)
         Wait(13000)
      WEnd
      Wait(13000)
      if (RFlag == 0) and (ReconnectTime <> '0') Then
         UO.Exec('terminate strelka')
         UO.Exec('exec strelka')
         UO.TextOpen()
         UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
         RFlag = 1
         ReconnectTime = '0'
      endif
   Until false
end sub

Sub MakeTime()
   VAR D, T, Ret, i
   Ret = STR(UO.Time())
   T = ""
   For i = 0 To Len(Ret)
      T = Ret[Len(Ret)-i] + T
      If (I == 2) OR (I == 4) Then
         T = ":" + T
      EndIf
   Next
   Ret = STR(UO.Date())
   D = ""
   For i = 0 To Len(Ret)
      D = Ret[Len(Ret)-i] + D
      If (I == 2) OR (I == 4) Then
         D = "." + D
      EndIf
   Next
   Ret = T + " @ " + D
   RETURN Ret
end sub
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Каст со скроллов.

Post by Mirage »

переделать несколько строк.

Code: Select all

#©]daRk[::c00pEr::
VAR eda = '0x097B'        #Тип еды.
VAR Sunduk = '0x4006149F' #ID Сундука с регами.
VAR obj = '0x000140BC'    #ID чара куклы.
VAR Kushaem = 1           #Если кушаем, то 1.
VAR cnt = 0
VAR Scroll = 'ТИП свитка'   ;  <===== НЕ ЗАБЫТЬ ПРОПИСАТЬ ТИП СВИТКА
sub strelka()
   VAR LastTimer
   UO.Exec('terminate Reconnector')
   wait(1000)
   UO.Exec('exec Reconnector')
   wait(1000)
   UO.UseObject(Sunduk)
   wait(1000)
   If Kushaem == 1 then
      Eda()
   endif
   while not uo.dead()
      If Kushaem == 1 then
         If cnt == 100 then
            Eda()
            cnt = 0
         end if
      endif
      cnt = cnt + 1
      If uo.count(Scroll) < 1 Then
         wait(1000)
         UO.FindType(Scroll, '-1', Sunduk)
         wait(100)
         UO.MoveItem('finditem', '200', 'backpack')
         wait(1000)
      Endif
      if uo.mana > 15 then
         cheklag()
         uo.waittargetobject( obj )
         uo.UseType( Scroll )
         wait(2000)
      else
         UO.Say('no mana')
         While UO.Mana < UO.Int
            UO.DeleteJournal()
            UO.WarMode(0)
            wait(1000)
            UO.Useskill('Meditation')
            Repeat
               wait(100)
            until UO.InJournal("You are") OR UO.InJournal("You lose")
         Wend         
      endif
   wend
end sub
Sub cheklag()
   uo.deletejournal()
   uo.click('backpack')
   repeat
      wait(10)
   until uo.InJournal("backpack")
end sub
Sub Eda()
   if uo.count(eda,'0x0000') < 20 then ## Жрачка, кушаем до изнеможения
      uo.findtype(eda, '0x0000', sunduk)
      Cheklag()
      uo.moveitem('finditem',STR(20-uo.count(eda,'0x0000')),'backpack')
      wait(1000)
   end if
   uo.deletejournal()
   repeat
      uo.usetype(eda,'0x0000')
      wait(1000)
   until uo.injournal("You are stuffed!") or uo.injournal("You can't think of a way to use that item.")
end sub
Sub Reconnector()
   var ReconnectTime, RFlag
   ReconnectTime = '0'
   RFlag = 1
   Repeat
      While (UO.ObjAtLayer('Bpack') == '')
         if RFlag Then
            ReconnectTime = MakeTime()
            RFlag = 0
         endif
         Wait(40000) # WorldSave Protection
         UO.Say('')
         Wait(13000)
         UO.Say('')
         Wait(13000)
         UO.Say('')
         Wait(13000)
         UO.LDblClick(357,164)
         UO.LClick(616,459)
         Wait(13000)
      WEnd
      Wait(13000)
      if (RFlag == 0) and (ReconnectTime <> '0') Then
         UO.Exec('terminate strelka')
         UO.Exec('exec strelka')
         UO.TextOpen()
         UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
         RFlag = 1
         ReconnectTime = '0'
      endif
   Until false
end sub
Sub MakeTime()
   VAR D, T, Ret, i
   Ret = STR(UO.Time())
   T = ""
   For i = 0 To Len(Ret)
      T = Ret[Len(Ret)-i] + T
      If (I == 2) OR (I == 4) Then
         T = ":" + T
      EndIf
   Next
   Ret = STR(UO.Date())
   D = ""
   For i = 0 To Len(Ret)
      D = Ret[Len(Ret)-i] + D
      If (I == 2) OR (I == 4) Then
         D = "." + D
      EndIf
   Next
   Ret = T + " @ " + D
   RETURN Ret
end sub

golod
Posts: 13
Joined: 2011-08-01 10:32:33

Re: Каст со скроллов.

Post by golod »

Работает скрипт, спасибо огромное!!
golod
Posts: 13
Joined: 2011-08-01 10:32:33

Re: Каст со скроллов.

Post by golod »

Чел кому кастую...хелица только когда я медетирую...в итоге он умирает тк кастов больше чем с регов когда кидаю стрелку.

Можно ли сделать что бы чар останавливался пока не будет у того полное хп?

проверку на хп сделать или как это.?)
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Каст со скроллов.

Post by ZeroDX »

Code: Select all

#©]daRk[::c00pEr::
VAR eda = '0x097B'        #Тип еды.
VAR Sunduk = '0x4006149F' #ID Сундука с регами.
VAR obj = '0x000140BC'    #ID чара куклы.
VAR Kushaem = 1           #Если кушаем, то 1.
VAR cnt = 0
VAR Scroll = 'ТИП свитка'   ;  <===== НЕ ЗАБЫТЬ ПРОПИСАТЬ ТИП СВИТКА
sub strelka()
   VAR LastTimer
   UO.Exec('terminate Reconnector')
   wait(1000)
   UO.Exec('exec Reconnector')
   wait(1000)
   UO.UseObject(Sunduk)
   wait(1000)
   If Kushaem == 1 then
      Eda()
   endif
   while not uo.dead()
      If Kushaem == 1 then
         If cnt == 100 then
            Eda()
            cnt = 0
         end if
      endif
      cnt = cnt + 1
      If uo.count(Scroll) < 1 Then
         wait(1000)
         UO.FindType(Scroll, '-1', Sunduk)
         wait(100)
         UO.MoveItem('finditem', '200', 'backpack')
         wait(1000)
      Endif
      if uo.mana > 15 then
                              if UO.GetHP(obj) >= UO.GetHP(obj) / 5 then
         cheklag()
         uo.waittargetobject( obj )
         uo.UseType( Scroll )
         wait(2000)
                            else
                             wait(100)
                          endif
      else
         UO.Say('no mana')
         While UO.Mana < UO.Int
            UO.DeleteJournal()
            UO.WarMode(0)
            wait(1000)
            UO.Useskill('Meditation')
            Repeat
               wait(100)
            until UO.InJournal("You are") OR UO.InJournal("You lose")
         Wend         
      endif
   wend
end sub
Sub cheklag()
   uo.deletejournal()
   uo.click('backpack')
   repeat
      wait(10)
   until uo.InJournal("backpack")
end sub
Sub Eda()
   if uo.count(eda,'0x0000') < 20 then ## Жрачка, кушаем до изнеможения
      uo.findtype(eda, '0x0000', sunduk)
      Cheklag()
      uo.moveitem('finditem',STR(20-uo.count(eda,'0x0000')),'backpack')
      wait(1000)
   end if
   uo.deletejournal()
   repeat
      uo.usetype(eda,'0x0000')
      wait(1000)
   until uo.injournal("You are stuffed!") or uo.injournal("You can't think of a way to use that item.")
end sub
Sub Reconnector()
   var ReconnectTime, RFlag
   ReconnectTime = '0'
   RFlag = 1
   Repeat
      While (UO.ObjAtLayer('Bpack') == '')
         if RFlag Then
            ReconnectTime = MakeTime()
            RFlag = 0
         endif
         Wait(40000) # WorldSave Protection
         UO.Say('')
         Wait(13000)
         UO.Say('')
         Wait(13000)
         UO.Say('')
         Wait(13000)
         UO.LDblClick(357,164)
         UO.LClick(616,459)
         Wait(13000)
      WEnd
      Wait(13000)
      if (RFlag == 0) and (ReconnectTime <> '0') Then
         UO.Exec('terminate strelka')
         UO.Exec('exec strelka')
         UO.TextOpen()
         UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
         RFlag = 1
         ReconnectTime = '0'
      endif
   Until false
end sub
Sub MakeTime()
   VAR D, T, Ret, i
   Ret = STR(UO.Time())
   T = ""
   For i = 0 To Len(Ret)
      T = Ret[Len(Ret)-i] + T
      If (I == 2) OR (I == 4) Then
         T = ":" + T
      EndIf
   Next
   Ret = STR(UO.Date())
   D = ""
   For i = 0 To Len(Ret)
      D = Ret[Len(Ret)-i] + D
      If (I == 2) OR (I == 4) Then
         D = "." + D
      EndIf
   Next
   Ret = T + " @ " + D
   RETURN Ret
end sub

Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Каст со скроллов.

Post by Mirage »

ZeroDX лодырь, у меня же в подписи отступлялка есть :lol: .
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Каст со скроллов.

Post by ZeroDX »

Она пробелы между функциями не ставит :lol:
rusa
Posts: 22
Joined: 2011-05-02 17:13:51

Re: Каст со скроллов.

Post by rusa »

а что нужно поменять чтобы я в себя эту стрелку кастовал???
точнее пойзан
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Каст со скроллов.

Post by Mirage »

Лучше всего прочитать уроки - там все написано.
А так

Code: Select all

         uo.waittargetobject( obj )
         uo.UseType( Scroll )

кастует скрол в объект. Соответственно прописать свой ID в

Code: Select all

VAR obj = '0x000140BC'    #ID чара куклы.
Post Reply