скрипти саваджа
Posted: 2004-04-04 00:01:23
надеюсь хозайн не обидеца што виложил его скрипти !
Code: Select all
#==============================================================
# Healing() - memoryzed current weapon, bandageself, armed
#--------------------------------------------------------------
sub Healing()
UO.SetArm('CWeapon')
UO.Exec("bandageself")
wait(300)
UO.Arm('CWeapon')
end sub
#==============================================================
# Arrow() - cast magic arrow on laststatus
#--------------------------------------------------------------
sub Arrow()
VAR ManaNeed=4
UO.Set('lasttarget','laststatus')
if UO.Mana>=ManaNeed then
UO.Cast('Magic Arrow','laststatus')
else
UO.Print("Low mana!!!")
endif
end sub
#==============================================================
# Poison() - cast poison on laststatus if target-char not
# poisoned and your char have enought mana
#--------------------------------------------------------------
sub Poison()
VAR ManaNeed=9
VAR ScrollManaNeed=4
UO.Set('lasttarget','laststatus')
If NOT UO.Poisoned('lasttarget') Then
UO.FindType('0x1F40',-1,'my')
If UO.GetQuantity('finditem')>0 Then
If UO.Mana>=ScrollManaNeed Then
UO.WaitTargetObject('lasttarget')
UO.UseObject('finditem')
UO.Print("Scroll")
Else
UO.Print("Low mana!!! Scroll!")
Endif
Else
If UO.Mana>=ManaNeed Then
UO.Cast('Poison','laststatus')
Else
UO.Print("Low mana!!!")
Endif
Endif
Else
UO.Print("Character already poisoned!")
Endif
end sub
#==============================================================
# Cure() - cast cure to self from scroll, if she found
# or from spellbook
#--------------------------------------------------------------
sub Cure()
VAR ManaNeed=6
VAR ManaNeedScroll=3
If UO.Poisoned() Then
UO.FindType('0x1F37',-1,'my')
If UO.FindCount()>0 Then
If UO.Mana>=ManaNeedScroll Then
UO.WaitTargetSelf()
UO.UseObject('finditem')
UO.Print("Scroll!!!")
Else
UO.Print("Low mana scroll!!!")
Endif
Else
If UO.Mana>=ManaNeed Then
UO.Cast('Cure','self')
UO.Print("Spell!!!")
Else
UO.Print("Low mana spell!!!")
Endif
Endif
Else
UO.Print("You allready not sick!!!")
Endif
end sub
#==============================================================
# Heal() - cast heal to self from scroll, if she found
# or from spellbook
#--------------------------------------------------------------
sub Heal()
VAR ManaNeed=4
VAR ManaNeedScroll=2
If UO.Life<UO.Str Then
UO.FindType('0x1F31',-1,'my')
If UO.FindCount()>0 Then
If UO.Mana>=ManaNeedScroll Then
UO.WaitTargetSelf()
UO.UseObject('finditem')
UO.Print("Scroll!!!")
Else
UO.Print("Low mana scroll!!!")
Endif
Else
If UO.Mana>=ManaNeed Then
UO.Cast('Heal','self')
UO.Print("Spell!!!")
Else
UO.Print("Low mana spell!!!")
Endif
Endif
Else
UO.Print("Your HP at maximum!!!")
Endif
end sub
#==============================================================
# GHeal() - cast greater heal to self from scroll, if she
# found or from spellbook
#--------------------------------------------------------------
sub GHeal()
VAR ManaNeed=11
VAR ManaNeedScroll=5
If UO.Life<UO.Str Then
UO.FindType('0x1F49',-1,'my')
If UO.FindCount()>0 Then
If UO.Mana>=ManaNeedScroll Then
UO.WaitTargetSelf()
UO.UseObject('finditem')
UO.Print("Scroll!!!")
Else
UO.UseType('0x0F0E','0x09DF') ; total mana potion
Endif
Else
If UO.Mana>=ManaNeed Then
UO.Cast('Greater Heal','self')
UO.Print("Spell!!!")
Else
UO.Print("Low mana spell!!!")
Endif
Endif
Else
UO.Print("Your HP at maximum!!!")
Endif
end sub
#==============================================================
# Paral() - cast Paralyze to last status from scroll, if she
# found or from spellbook
#--------------------------------------------------------------
sub Paral()
UO.Set('lasttarget','laststatus')
UO.FindType('0x1F52',-1,'my')
If UO.GetQuantity('finditem')>0 then
if UO.Mana>=14 then
UO.WaitTargetObject('lasttarget')
UO.UseObject('finditem')
else
endif
else
if UO.Mana>=28 then
UO.Cast('Paralyze','laststatus')
else
endif
endif
end sub
#==============================================================
# Flame() - cast Flame Strike to last status from scroll,
# if she found or from spellbook
#--------------------------------------------------------------
sub Flame()
UO.Set('lasttarget','laststatus')
UO.FindType('0x1F5F',-1,'my')
If UO.GetQuantity('finditem')>0 then
if UO.Mana>=22 then
UO.WaitTargetObject('lasttarget')
UO.UseObject('finditem')
UO.Say("An Ex Por")
else
endif
else
if UO.Mana>=45 then
UO.Cast('Flame Strike','laststatus')
else
endif
endif
end sub
#==============================================================
# Light() - cast Lighting to last status from scroll,
# if she found or from spellbook
#--------------------------------------------------------------
sub Light()
UO.Set('lasttarget','laststatus')
UO.FindType('0x1F4A',-1,'my')
If UO.GetQuantity('finditem')>0 then
if UO.Mana>=10 then
UO.WaitTargetObject('lasttarget')
UO.UseObject('finditem')
UO.Print("Scroll")
else
UO.Print("Low mana!!! Scroll!")
endif
else
if UO.Mana>=20 then
UO.Cast('Lightning','laststatus')
UO.Print("Spell")
else
UO.Print("Low mana!!! Spell!")
endif
endif
end sub
#==============================================================
# Trm()-Tra() - Traccking scripts
#--------------------------------------------------------------
sub trm()
UO.WaitMenu('Tracking','Monsters')
UO.UseSkill('Tracking')
; UO.CancelMenu()
end sub
sub trp()
UO.WaitMenu('Tracking','Players')
UO.UseSkill('Tracking')
; UO.CancelMenu()
end sub
sub tra()
UO.WaitMenu('Tracking','Animals')
UO.UseSkill('Tracking')
; UO.CancelMenu()
end sub
###############################################################
###############################################################
;
; Alchemy Sub
;
###############################################################
###############################################################
#==============================================================
# Alchemy(reagent, min_reg, choice) - main alchemi script
#
# reagent - type of reagent
# min_reg - min count reagets to make potion
# choice - menu choice after using reagents
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub Alchemy(reagent, min_reg, choice)
while UO.Count('0x0F0E','0x0000')>0 AND UO.Count(reagent)>=min_reg
UO.DeleteJournal()
UO.Exec("waitmenu 'What sort of potion do you want to' "+choice)
UO.UseType(reagent)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed")
wait(300)
wend
wend
gong(2)
end sub
#==============================================================
# makedpoison() - toss deadly poison potion
#--------------------------------------------------------------
sub makedpoison()
alchemy('0x0F88', 8, "'Deadly Poison'")
end sub
#==============================================================
# makeinvis() - toss invisibility potion
#--------------------------------------------------------------
sub makeinvis()
alchemy('0x0F91', 4, "'Invisibility'")
end sub
#==============================================================
# maketm() - toss total mana potion
#--------------------------------------------------------------
sub maketm()
alchemy('0x0F87', 6, "'Total Mana'")
end sub
#==============================================================
# makegh() - toss total mana potion
#--------------------------------------------------------------
sub makegh()
alchemy('0x0F85', 7, "'Greater Heal'")
end sub
#==============================================================
# makess() - toss stoneskin potion
#--------------------------------------------------------------
sub makess()
alchemy('0x0F85', 1, "'Stoneskin'")
end sub
###############################################################
###############################################################
;
; Tinkering Sub
;
###############################################################
###############################################################
#==============================================================
# MakeBottle() - crafting empty bottle
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub makebottle()
VAR c
while NOT UO.Dead()
ToHide()
UO.FindType('0x1BEF','0x0000','backpack')
if UO.GetQuantity('finditem')<=10 then
UO.FindType('0x0F0E','0x0000','backpack')
If UO.GetQuantity('finditem')>0 Then
UO.SetReceivingContainer('0x400704F3')
wait(1000)
UO.Grab('all','finditem')
wait(1000)
UO.UnSetReceivingContainer()
Endif
UO.FindType('0x1BEF','0x0000','0x40079475')
wait(1000)
UO.Grab('1000','finditem')
wait(1000)
endif
CheckLag()
UO.Exec("waitmenu 'Tinkering' 'Tools' 'Tools' 'empty bottle'")
UO.UseType('0x1EBC') ; tinker tools
while NOT UO.InJournal("You put") AND NOT UO.InJournal("Tinkering failed")
wait(300)
wend
wend
end sub
###############################################################
###############################################################
;
; Inscription Sub
;
###############################################################
###############################################################
#==============================================================
# Inscript() - main Inscription sub
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub Inscript()
while UO.Count('0x0E34')>0 ; blank scroll
UO.DeleteJournal()
UO.UseType('0x0E34') ; blank scroll
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You fail")
wait(500)
wend
wend
end sub
#==============================================================
# SPar() - crafting Paralize scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub spar()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 5','Paralyze')
UO.AutoMenu('Spell Circles','Fifth Circle')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# SFS() - crafting FlameStrike scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub sfs()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 7','Flamestrike')
UO.AutoMenu('Spell Circles','Seventh Circle')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# Spoison() - crafting Poison scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub spoison()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 3','Poison')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# SLi() - crafting Lighting scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub sli()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 4','Lightning')
UO.AutoMenu('Spell Circles','Fourth Circle')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# SRecall() - crafting Recall scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub srecall()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 4','Recall')
UO.AutoMenu('Spell Circles','Fourth Circle')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# SHeal() - crafting Heal scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub sheal()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 1','Heal')
UO.AutoMenu('Spell Circles','First Circle')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# SGHeal() - crafting Great Heal scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub sgheal()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 4','Greater')
UO.AutoMenu('Spell Circles','Fourth Circle')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# SGTravell() - crafting Gate Travel scroll
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub sgtravel()
UO.CancelMenu()
UO.AutoMenu('Spell Circle 7','Gate Travel')
UO.AutoMenu('Spell Circles','Seventh Circle')
Inscript()
UO.CancelMenu()
gong(2)
end sub
#==============================================================
# herd() - Herding training script
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub herd()
VAR LastTimer
while NOT UO.Dead()
UO.WaitTargetObject('0x000AD7CE') ; mustang
UO.UseType('0x13F4') ; crock
wait(1000)
UO.LClick(410,219)
LastTimer=UO.Timer()
UO.DeleteJournal()
while NOT UO.InJournal("You don") AND LastTimer+200<UO.Timer()
wait(100)
wend
wend
gong(10)
end sub
Smelting Ore
sub strs()
VAR Cont=0x400D1BFC
repeat
ToHide()
UO.FindType('0x19B9','0x0000',Cont)
UO.Grab('3','finditem')
CheckLag()
UO.SetReceivingContainer(Cont)
UO.FindType('0x19B8','0x0000','backpack')
UO.Grab('2','finditem')
UO.UnSetReceivingContainer()
CheckLag()
UO.SetCatchBag(Cont)
UO.UseType('ore1')
wait(1000)
UO.UnSetCatchBag()
until UO.Weight>700
UO.FindType('0x1BEF','0x0000','backpack')
UO.SetReceivingContainer(Cont)
UO.Grab('0','finditem')
UO.UnSetReceivingContainer()
end sub
sub bs()
VAR Exit=0, LastTimer
while Exit<>1
ToHide()
UO.DeleteJournal()
LastTimer=UO.Timer()
UO.WaitMenu('Blacksmithing','Weapons','Weapons','Swords','Swords','dagger')
UO.UseType(0x1BEF) ; iron ings
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
wait(500)
wend
If UO.InJournal("You have failed") then
repeat
wait(100)
until UO.Timer()>=LastTimer+100 ;time to make a dagger
EndIf
UO.FindType('0x0F51',-1,'backpack')
wait(500)
If UO.GetQuantity('finditem') then
UO.WaitTargetObject('finditem')
UO.UseObject(0x400D22C9) ;forge
Endif
UO.FindType('0x1BEF',-1,'backpack')
If UO.GetQuantity('finditem')<10 then
UO.FindType('0x1BEF','0x0000','0x400D1BFC')
wait(1000)
UO.Grab('1000','finditem')
Endif
wait(1000)
wend
gong(2)
end sub
sub reg()
VAR StoreRegCont=0x40150D14
VAR CharRegBag
VAR CountReg=60
VAR WaitTime=600
VAR MainSafe=0x40150D14
UO.FindType('0x09B0','0x0044','backpack')
If UO.GetQuantity('finditem')>0 Then
CharRegBag='finditem'
Else
CharRegBag='0x400C7242'
Endif
UO.UseObject(MainSafe)
UO.UseObject(StoreRegCont)
UO.SetReceivingContainer(CharRegBag)
wait(WaitTime)
if UO.BM<CountReg then
UO.FindType('0x0F7B','-1',StoreRegCont) ; BM
UO.Grab(STR((CountReg-UO.BM)),'finditem')
wait(WaitTime)
endif
if UO.BP<CountReg then
UO.FindType('0x0F7A','-1',StoreRegCont) ; BP
UO.Grab(STR(CountReg-UO.BP),'finditem')
wait(WaitTime)
endif
if UO.GA<CountReg then
UO.FindType('0x0F84','-1',StoreRegCont) ; GA
UO.Grab(STR(CountReg-UO.GA),'finditem')
wait(WaitTime)
endif
if UO.GS<CountReg then
UO.FindType('0x0F85','-1',StoreRegCont) ; GS
UO.Grab(STR(CountReg-UO.GS),'finditem')
wait(WaitTime)
endif
if UO.MR<CountReg then
UO.FindType('0x0F86','-1',StoreRegCont) ; MR
UO.Grab(STR(CountReg-UO.MR),'finditem')
wait(WaitTime)
endif
if UO.NS<CountReg then
UO.FindType('0x0F88','-1',StoreRegCont) ; NS
UO.Grab(STR(CountReg-UO.NS),'finditem')
wait(WaitTime)
endif
if UO.SA<CountReg then
UO.FindType('0x0F8C','-1',StoreRegCont) ; SA
UO.Grab(STR(CountReg-UO.SA),'finditem')
wait(WaitTime)
endif
if UO.SS<CountReg then
UO.FindType('0x0F8D','-1',StoreRegCont) ; SS
UO.Grab(STR(CountReg-UO.SS),'finditem')
endif
end:
UO.UnsetReceivingContainer()
end sub
sub sparring()
VAR Char1='0x000BF49A'
VAR Char2='0x000B0029'
VAR Enemy, ESelf, EEnemy
if UO.GetSerial('self')==Char1 then
Enemy=Char2
EEnemy=90
ESelf=80
else
Enemy=Char1
EEnemy=80
ESelf=90
endif
UO.SetEasyUO(ESelf,"0")
while NOT UO.Dead()
repeat
wait(500)
until UO.GetEasyUO(ESelf)=="0" AND UO.GetEasyUO(EEnemy)=="0"
UO.Exec("warmode 1")
UO.Attack(Enemy)
while UO.Life>=50 AND UO.GetEasyUO(EEnemy)=="0"
wait(100)
wend
UO.SetEasyUO(ESelf,"1")
UO.Exec("warmode 0")
while UO.Life<UO.Str
UO.Exec("warmode 0")
healing()
wait(6000)
wend
UO.UseType('0x13E3')
UO.CancelTarget()
UO.SetEasyUO(ESelf,"0")
wend
end sub
sub alchtrain()
VAR Exit=0, LastTimer, TryToPoison
while Exit<>1
ToHide()
UO.DeleteJournal()
UO.FindType('0x0F0E',-1,'backpack')
If UO.GetQuantity('finditem')<10 then
UO.FindType('0x0F0E','0x0000','0x400704F3')
wait(1000)
UO.Grab('500','finditem')
wait(1000)
Endif
UO.FindType('0x0F88','0x0000','backpack')
If UO.GetQuantity('finditem')<20 then
UO.FindType('0x0F88','0x0000','0x400704F3')
wait(1000)
UO.Grab('1000','finditem')
wait(1000)
Endif
LastTimer=UO.Timer()
UO.WaitMenu('What','(last)')
UO.UseType(0x0F88) ; NightShade
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()>=LastTimer+100 ;time to make a dagger
Else
TryToPoison=1
repeat
UO.FindType('0x0F0E','0x0998','my')
If UO.GetQuantity('finditem')>0 then
UO.WaitTargetObject('0x4012DB8E','finditem')
UO.UseSkill('Poisoning')
wait(4000)
Else
TryToPoison=0
Endif
until TryToPoison==0
EndIf
wend
end sub
sub bowcraft()
VAR Exit=0
repeat
UO.DeleteJournal()
UO.FindType('0x1BDD','0x0000','0x400F7FEE')
if UO.GetQuantity('finditem')>0 then
UO.Grab('3','finditem')
UO.SetReceivingContainer('0x400F7FEE')
UO.Grab('2','finditem')
UO.WaitMenu('What','shaft')
UO.WaitTargetObject('finditem')
UO.UseType('0x0F51')
while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail')
wait(500)
wend
UO.FindType('0x1BD4','0x0000','my')
if UO.GetQuantity('finditem')>0 then
UO.Grab('all','finditem')
Endif
UO.UnSetReceivingContainer()
Else
Exit=1
endif
until Exit==1
end sub
sub taming()
VAR Creature='0x0008AE17'
while NOT UO.Dead()
UO.DeleteJournal()
UO.WaitTargetObject(Creature)
UO.UseType('0x13F8')
repeat
wait(1000)
until UO.InJournal('You fail') OR UO.InJournal('It seems')
If Uo.InJournal('It seems') Then
UO.Say('All release')
Endif
wend
end sub