Script na ALchemy

Vaše problémy, rady a skripty týkající se tohoto prográmku
Odpovědět
Emil
Orc Writer
Orc Writer
Příspěvky: 57
Registrován: 12 zář 2016 01:40

Script na ALchemy

Příspěvek od Emil »

Zdravim hraci ultimy,


Nenajde sa niekto kto by mal funkcny script na novu alchemku??

Vdaka za akukolvek pomoc.
Roubicek
Inkless
Inkless
Příspěvky: 31
Registrován: 31 pro 2016 20:49
Kontaktovat uživatele:

Re: Script na ALchemy

Příspěvek od Roubicek »

jop, mame ;-)
takhle si nadefinuj jednotlivy potiony (a flasky na ne)

Kód: Vybrat vše

sub alchemy_TMR()
var pott,potb,kadb,potn
pott='0x0f09'
potb='0x0003'
potn='Total Mana Refresh'
kadb='0x0003'
alchemy(pott,potb,kadb,potn)
end sub
pott = typ potky
potb = barva potky
potn = nazev potiony v alchemy menu
kadb = barva kade

a tohle je hlavni sript, kterej se z tech malejch vola:

Kód: Vybrat vše

sub alchemy(pott,potb,kadb,potn)
var alchemy=uo.skillval('Alchemy',1)
var pokus=0
var uspech=0
var fizz=0
var cas=0

while not uo.dead()

if not uo.count('0x0e9b') then
	uo.print('nemas mortar')
	uo.exec('terminate all')
end if
if not uo.count('0x1843',kadb) then
	uo.print('nemas kad na '+potn)
	uo.exec('terminate all')
end if
while uo.count(pott,potb) 
	uo.waittargettype(pott,potb)
	uo.deletejournal()
	uo.usetype('0x1843',kadb)
	repeat
		wait(100)
	until uo.injournal('You put the empty bottless')
	wait(500)
wend

if not uo.count('0x0f0e','0x0000') then
	uo.print('nemas flasky')
	uo.exec('terminate all')
end if
uo.waitmenu('Vyber typ potionu',potn)
uo.deletejournal()
cas=uo.timer()
uo.usetype('0x0e9b')
repeat
	wait(200)
until uo.injournal('You toss|You completed|You pour the completed|Nemas dostatecny pocet|World Save') or uo.timer()>cas+1200
if uo.injournal('World save') then
	wait(60000)
end if

if uo.injournal('Nemas dostatecny pocet') then
	uo.print('dosly regy')
	uo.exec('terminate all')
end if

uo.textopen()
uo.textclear()
pokus=pokus+1
if uo.injournal('You completed') then
	uspech=uspech+1
end if
if uo.injournal('You toss') then
	fizz=fizz+1
end if
uo.textprint(potn)
uo.textprint('pokus:     '+str(pokus))
uo.textprint('namichano: '+str(uspech))
uo.textprint('fizz:      '+str(fizz))
uo.textprint('skill:     '+str(uo.skillval('Alchemy',1)/10))
uo.textprint('gain:      '+str((uo.skillval('Alchemy',1) - alchemy)/10))


wait(500)
if uo.injournal('You completed') then
	uo.deletejournal()
	uo.usetype('0x0e9b')
	repeat
		wait(200)
	until uo.injournal('You pour the completed')
	wait(500)
end if
	

wend
end sub
Hobbit, the ranger. Born 2001, kidnapped and died in 2014.
Trillian, the Vampire. Born 2003, still alive but retired.
Roubicek, the Craftsman. Born 2017, alive.
Emil
Orc Writer
Orc Writer
Příspěvky: 57
Registrován: 12 zář 2016 01:40

Re: Script na ALchemy

Příspěvek od Emil »

Velka vdaka Roubicku,
Papez
Undead Scriber
Undead Scriber
Příspěvky: 813
Registrován: 19 úno 2007 12:32
Bydliště: Yew
Kontaktovat uživatele:

Re: Script na Alchemku

Příspěvek od Papez »

Trochu složitější, v báglu je třeba mít káď a alespoň jeden lektvar (možná že by se obsluha dala zjedodnodušit jen na cílovou káď, ale myslím si u poisonů budou mít různé druhy stejnou barvu - neověřoval jsem).
Tady je tedy aktuální skript na alchemku pro Yoko:

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.UseType(uo.GetGraphic('Kad_na_preliti'),uo.GetColor('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
Plně automatizovaný skript, který by měl fungovat úplně na vše. jestli ne, dejte mi prosím vědět.

Stejný najdete s pár dalšími skripty na http://forum.laracraft.cz/viewtopic.php?f=3&t=21
Ke stažení zde: http://www.laracraft.cz/wp-content/uplo ... hemka2b.sc
Papez - The Vampire.
Hodny Stistko - The Mage.
Lara Craft - The Craftswoman.
Pytlak Riha - True NB Ranger
Svaty Otec - True NB Cleric
http://www.laracraft.cz
Uživatelský avatar
Xan
Lord Ancestral Grafoman
Lord Ancestral Grafoman
Příspěvky: 1212
Registrován: 20 kvě 2007 16:04
Kontaktovat uživatele:

Re: Script na ALchemy

Příspěvek od Xan »

pokud to tu někdo sleduje, tak první script mi přestal přelívat hotový lektvar z mortaru do lahve (vše jsem měl vč. prázdných lahviček)

Druhý script pro změnu se sekne při savu a po save už se nerozjede :P
shadowking
Misspelling Chicken
Misspelling Chicken
Příspěvky: 4
Registrován: 05 zář 2010 18:39
Kontaktovat uživatele:

Re: Script na ALchemy

Příspěvek od shadowking »

Ani jeden nefunguje :( nemá niekto funkčný?
Odpovědět