Kód: Vybrat vše
#---------------------------------------------------------------
sub alchemy()
#---------------------------------------------------------------
# Tento Alchemy skript slouzi jako univerzalni skript na umichani lektvaru a preliti do Kade. Neni tedy
# pevne urcen napriklad pro michani TMR apod.
# Po aktivaci skriptu se vam ve hre postupne zobrazi:
# What is Reg? => Zvolte reagent, ze ktereho budete michat
# What is Kad_na_preliti? => Zvolte Kad (muze byt kdekoliv pobliz nebo primo v batuzku)
# What is Vysledny_lektvar? => Vyberte jeden jiz namichany lektvar (aby skript vedel ktere flasky bude prelevat do Kade)
#UO.Exec('exec afkalarm')
#UO.Exec('terminate afkalarm')
var RegG,RegC,RegM,BarvaLektvaru,TypLektvaru,JmenoLektvaru
#UO.AddObject('Reg')
#while uo.targeting()
# wait(100)
#wend
#RegG = uo.GetGraphic('Reg')
#RegC = UO.GetColor('Reg')
UO.FindType('0x0E9B',-1,'backpack')
uo.AddObject('Mortar','finditem');
wait(500)
UO.AddObject('Kad_na_preliti')
while uo.targeting()
wait(300)
wend
wait(500)
UO.AddObject('Vysledny_lektvar')
while uo.targeting()
wait(300)
wend
#nalej do prazdne lahvicky
if uo.GetGraphic('Vysledny_lektvar')=='0x0000' then
uo.waittargettype('0x0F0E')
Uo.UseObject('Kad_na_preliti')
wait(1000)
UO.AddObject('Vysledny_lektvar')
while uo.targeting()
wait(300)
wend
endif
UO.Click('Vysledny_lektvar')
wait(1000)
JmenoLektvaru = UO.GetName('Vysledny_lektvar')
#oprava
if JmenoLektvaru == 'Total Mana Refresh Potion' then
JmenoLektvaru = 'Total Mana Refresh'
RegG = '0x0F87'
RegC = '0x0000'
RegM = 6
endif
#oprava
if JmenoLektvaru == 'Mana Refresh Potion' then
JmenoLektvaru = 'Mana Refresh'
RegG = '0x0F87'
RegC = '0x0000'
RegM = 3
endif
#oprava
if JmenoLektvaru == 'Greater Strength Potion' then
JmenoLektvaru = 'Greater Strength'
RegG = '0x0F86'
RegC = '0x0000'
RegM = 6
endif
#oprava
if JmenoLektvaru == 'Greater Heal Potion' then
JmenoLektvaru = 'Greater Heal'
RegG = '0x0F85'
RegC = '0x0000'
RegM = 7
endif
#oprava
if JmenoLektvaru == 'Greater Cure Potion' then
JmenoLektvaru = 'Greater Cure'
RegG = '0x0F84'
RegC = '0x0000'
RegM = 6
endif
#oprava
if JmenoLektvaru == 'Total Refresh potion' then
JmenoLektvaru = 'Total Refresh'
RegG = '0x0F7A'
RegC = '0x0000'
RegM = 5
endif
if JmenoLektvaru == 'Shrink' then
JmenoLektvaru = 'Shrink'
RegG = '0x0F78'
RegC = '0x0000'
RegM = 3
endif
#oprava
if JmenoLektvaru == 'Deadly Poison potion' then
JmenoLektvaru = 'Deadly Poison'
RegG = '0x0F88'
RegC = '0x0000'
RegM = 10
endif
#ok
if JmenoLektvaru == 'Invisibility' then
JmenoLektvaru = 'Invisibility'
RegG = '0x0F8E'
RegC = '0x0000'
RegM = 6
endif
#ok
if JmenoLektvaru == 'Lava Bomb' then
JmenoLektvaru = 'Lava Bomb'
RegG = '0x0F88'
RegC = '0x0000'
RegM = 6
endif
#oprava
if JmenoLektvaru == 'Nightsight Potion' then
JmenoLektvaru = 'Nightsight'
RegG = '0x0F8D'
RegC = '0x0000'
RegM = 2
endif
#oprava
if JmenoLektvaru == 'Greater Agility potion' then
JmenoLektvaru = 'Greater Agility'
RegG = '0x0F7B'
RegC = '0x0000'
RegM = 3
endif
#oprava
if JmenoLektvaru == 'Agility potion' then
JmenoLektvaru = 'Agility Potion'
RegG = '0x0F7B'
RegC = '0x0000'
RegM = 2
endif
#ok
if JmenoLektvaru == 'Cure Potion' then
JmenoLektvaru = 'Cure Potion'
RegG = '0x0F84'
RegC = '0x0000'
RegM = 3
endif
#ok
if JmenoLektvaru == 'Heal Potion' then
JmenoLektvaru = 'Heal Potion'
RegG = '0x0F85'
RegC = '0x0000'
RegM = 3
endif
#oprava
if JmenoLektvaru == 'Greater Explosion potion' then
JmenoLektvaru = 'Greater Explosion'
RegG = '0x0F8C'
RegC = '0x0000'
RegM = 6
endif
#oprava
if JmenoLektvaru == 'Greater Poison potion' then
JmenoLektvaru = 'Greater Poison'
RegG = '0x0F88'
RegC = '0x0000'
RegM = 7
endif
#oprava
if JmenoLektvaru == 'Lesser Poison potion' then
JmenoLektvaru = 'Lesser Poison'
RegG = '0x0F88'
RegC = '0x0000'
RegM = 2
endif
#oprava
if JmenoLektvaru == 'Poison potion' then
JmenoLektvaru = 'Poison Potion'
RegG = '0x0F88'
RegC = '0x0000'
RegM = 4
endif
#ok
if JmenoLektvaru == 'Lesser Explosion potion' then
JmenoLektvaru = 'Lesser Explosion potion'
RegG = '0x0F8C'
RegC = '0x0000'
RegM = 2
endif
#ok
if JmenoLektvaru == 'Explosion potion' then
JmenoLektvaru = 'Explosion potion'
RegG = '0x0F8C'
RegC = '0x0000'
RegM = 3
endif
#ok
if JmenoLektvaru == 'Hallucination' then
JmenoLektvaru = 'Hallucination'
RegG = '0x0F8E'
RegC = '0x0000'
RegM = 6
endif
#ok
if JmenoLektvaru == 'Lesser Heal Potion' then
JmenoLektvaru = 'Lesser Heal Potion'
RegG = '0x0F85'
RegC = '0x0000'
RegM = 2
endif
if JmenoLektvaru == 'Lesser Cure Potion' then
JmenoLektvaru = 'Lesser Cure Potion'
RegG = '0x0F84'
RegC = '0x0000'
RegM = 2
endif
#oprava
if JmenoLektvaru == 'Refresh potion' then
JmenoLektvaru = 'Refresh Potion'
RegG = '0x0F7A'
RegC = '0x0000'
RegM = 3
endif
#ok
if JmenoLektvaru == 'Strength Potion' then
JmenoLektvaru = 'Strength Potion'
RegG = '0x0F86'
RegC = '0x0000'
RegM = 3
endif
BarvaLektvaru = uo.GetColor('Vysledny_lektvar')
TypLektvaru = uo.GetGraphic('Vysledny_lektvar')
wait(500)
uo.Print("Reg: "+RegG+","+RegC)
uo.Print("Lektvar: "+TypLektvaru+","+BarvaLektvaru+": "+JmenoLektvaru)
while UO.Count(RegG,RegC) >= RegM # Zde je minimalni pocet regu aby pokracovalo michani
UO.DeleteJournal()
#uo.UseObject('Reg')
#uo.UseType(RegG,RegC)
UO.waitmenu ('Vyber typ potionu',JmenoLektvaru)
uo.useObject('Mortar')
repeat
wait(500)
until uo.InJournal('You toss|You completed|make another')
wait(500)
if uo.injournal('You completed') then
uo.useObject('Mortar')
repeat
wait(500)
until uo.InJournal('You put|prazdnou lahev')
if uo.inJournal('prazdnou lahev') then
UO.Print('Dosly lahvicky')
uo.exec('terminate all')
uo.DeleteJournal();
return
endif
endif
if uo.InJournal('make another') then
wait(4500)
endif
if uo.InJournal('You pour') then
repeat
uo.print("Prelejvam lektvar")
uo.UseObject('Kad_na_preliti')
UO.DeleteJournal()
UO.WaitTargetType(TypLektvaru,BarvaLektvaru)
repeat
wait(200)
until uo.InJournal('You put the empty|Targeting Cancelled')
wait(500)
until UO.Count(TypLektvaru,BarvaLektvaru) == 1 Or UO.InJournal('Tohle nejde!')
endif
wait(500)
wend
UO.Exec('terminate afkalarm')
uo.Print('Konec michani.')
end sub