Алхимия на яде+отрава оружия

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
EARNEST
Posts: 13
Joined: 2006-02-01 20:36:10

Алхимия на яде+отрава оружия

Post by EARNEST »

Code: Select all

## Created by EARNEST. Использовался принцип скриптов Aslaneli и ВЕТЕР'а
##
##
## !!!!!!!!!!!!!!! Функции
VAR reconnect=1 # 0 выключить фильтры и реконнект, 1 - работает
VAR SSF=1 # 0 - не кушать во время работы и не использовать Spirit Speak, 1 - работает
VAR hiding=0 # 0 - не использовать после отравы бутылки Hiding, 1 - работает
## !!!!!!!!!!!!!!!
VAR Reg=5 ##  количество реагентов, которые чар берёт
VAR BOT=5 ## бутылки
VAR LastTimer,p
VAR LastTimer2
VAR box1='0x402FB6A5' ## ящик, откуда берем реагенты и бутылки
var dagger='0x404D2A5D' ## ID оружия или еды, которую травить будем
sub alchemy() # начинаем
## <-- Фильтры и реконнектор
if reconnect==1 then
uo.Exec("filterspeech clear")
uo.Exec("filterspeech on")
uo.Exec("filterspeech add 'guards'") # желательно не менять ничего.
uo.Exec('terminate Reconnector')
wait(1000)
uo.Exec('exec Reconnector')
wait(1000)
end if
## --->
uo.useobject('backpack')
Cheklag()
uo.useobject(box1)
Cheklag()
wait(1000)
if SSF==1 then 
UO.DeleteJournal()
LastTimer=uo.Timer()
Food()
while not uo.dead()
   if Hiding==1 then
ToHide()
end if
   if uo.Timer()>(LastTimer+3000) then
      if uo.skillval("Spirit Speak",1)<1000 then
         uo.print("Spirit Speak...")
         p=0
         repeat
            p=p+1
            uo.useskill("Spirit Speak")
            uo.deletejournal()
            repeat
               wait(10)
            until uo.InJournal("netherworld") or uo.InJournal("You must wait to perform another action") or uo.dead()
         until (uo.InJournal("You establish a connection to the netherworld.")) or (p>=10) or uo.dead()
      end if
      Food()
      LastTimer=uo.Timer()
   end if
end if

if uo.count('0x0F0E','0x0000')< 4 then
      uo.FindType('0x0F0E','0x0000',box1)
      cheklag()
      uo.moveitem('finditem',STR(BOT),'backpack')
      wait(1000)
      cheklag()
   end if
   if uo.count('0x0F88','0x0000')<4 then
      uo.FindType('0x0F88','0x0000',box1)
      cheklag()
      uo.moveitem('finditem',STR(Reg),'backpack')
      wait(1000)
      cheklag()
   end if
LastTimer2=UO.Timer()
UO.DeleteJournal()

UO.UseType('0x0F88')
UO.WaitMenu('What','(2)')       
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed")
wait(500)
wend
If UO.InJournal("You toss the failed") then
repeat
wait(100)
until UO.Timer()>=LastTimer2+100
Else 
EndIf

UO.FindType('0x0F0E','0x0998')
if UO.GetQuantity('finditem')>0 then
if uo.skillval("Poisoning",1)<1000 then
uo.deletejournal()
LastTimer=UO.Timer()
uo.waittargetobject(dagger,'finditem')
uo.useskill('Poisoning')
repeat
wait(10)
until UO.InJournal("You fail to apply") OR UO.InJournal("You apply the poison") OR (UO.Timer()>LastTimer+200)
else
if uo.weight > 200 then
UO.SetReceivingContainer(box1)
wait(200)
UO.Grab('0','finditem')
wait(200)
UO.UnSetReceivingContainer()
end if
end if
end if

wend
end sub
 

Sub Food()
if uo.count('0x097B','0x0000')<20 then ## Кушаем рыбные стейки
   uo.findtype('0x097B','0x0000',0x402FB6A5)
   if uo.findcount()>0 then
      Cheklag()
      uo.moveitem('finditem',STR(50-uo.count('0x097B','0x0000')),'backpack')
      wait(1000)
   end if
end if

uo.deletejournal()
repeat
   if uo.count('0x097B','0x0000')==0 then
      return
   end if
   uo.usetype('0x097B','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(70000) # WorldSave защита
      uo.Say('')
      Wait(5000)
      uo.Say('')
      Wait(5000)
      uo.Say('')
      Wait(5000)
      uo.LDblClick(357,164)
      uo.LClick(616,459)
      Wait(5000)
   WEnd
   Wait(3000)
   if (RFlag == 0) and (ReconnectTime <> '0') Then
      uo.TextOpen()
      uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
      uo.RClick(196,193)
      wait(2000)
      uo.RClick(196,193)
      wait(2000)
      uo.useobject('self')
      wait(2000)
      uo.useobject('backpack')
      wait(2000)
      uo.Exec('terminate alchemy')
      wait(5000)
      uo.Exec('exec alchemy')
      wait(5000)
      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

Sub ToHide()
while not uo.hidden()
   uo.exec("warmode 0")
   uo.DeleteJournal()
   uo.useskill("Hiding")
   repeat
      wait(10)
   until uo.InJournal("You have hidden yourself well") or uo.InJournal("You can't seem to hide here.") or uo.InJournal("You are preoccupied with thoughts of battle.")
   if uo.InJournal("You are preoccupied with thoughts of battle.") then
      uo.exec("warmode 0")
   end if
wend
end sub
Sub cheklag()
uo.deletejournal()
uo.click('backpack')
repeat
   wait(10)
until uo.InJournal("backpack")
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

ну и?
Post Reply