Stránka 1 z 1

Sbírání šípů a šipek + rudy

Napsal: 04.07.2009 11:56:22
od Papez
Ahoj lidi, napsal jsem takový jednoduchý skriptík na sbírání šípů:

Kód: Vybrat vše

#------------------------------------------
sub sbirejsipy()
#------------------------------------------
UO.DeleteJournal()
var x, y, i, cas, nasel
nasel=1
cas=2000
x = UO.GetX('self') 
y = UO.GetY('self')
var sipy='0x0F3F'

while NOT UO.Dead()
x = UO.GetX('self') 
y = UO.GetY('self')
nasel=0
UO.Print('Hledam sipy...')
repeat
UO.findtype(sipy,'0x0000','ground')
if UO.GetDistance('finditem') <5>= 0 then
	UO.GRAB(0,'finditem')
	wait(1000)
	nasel=1
else
UO.Ignore('finditem')
endif
until UO.FindCount()==0


UO.Print('Sipy nenalezena, udelej krok.')
UO.IgnoreReset()
while x== UO.GetX('self') AND y == UO.GetY('self')
	wait(500)
wend
wend
end sub
Další je na sbírání šipek:

Kód: Vybrat vše

#------------------------------------------
sub sbirejsipky()
#------------------------------------------
UO.DeleteJournal()
var x, y, i, cas, nasel
nasel=1
cas=2000
x = UO.GetX('self') 
y = UO.GetY('self')
var sipky='0x1BFB'

while NOT UO.Dead()
x = UO.GetX('self') 
y = UO.GetY('self')
nasel=0
UO.Print('Hledam sipky...')
repeat
UO.findtype(sipky,'0x0000','ground')
if UO.GetDistance('finditem') <5>= 0 then
	UO.GRAB(0,'finditem')
	wait(1000)
	nasel=1
else
UO.Ignore('finditem')
endif
until UO.FindCount()==0 
UO.Print('Sipky nenalezena, udelej krok.')
UO.IgnoreReset()
while x== UO.GetX('self') AND y == UO.GetY('self')
	wait(500)
wend
wend
end sub
Poslední je další variací, tentokrát umožňující sbírání rudy v dole:

Kód: Vybrat vše

------------------------------------------
sub sbirejrudu()
#------------------------------------------
UO.DeleteJournal()
var x, y, i, cas, ruda
ruda=1
cas=2000
x = UO.GetX('self') 
y = UO.GetY('self')
dim typ_ore[4]
typ_ore[0]=0x19B7 # 1
typ_ore[1]=0x19BA # 2
typ_ore[2]=0x19B8 # 3
typ_ore[3]=0x19B9 # 4
while NOT UO.Dead()
x = UO.GetX('self') 
y = UO.GetY('self')
ruda=0
UO.Print('Hledam rudu...')
for i=0 to 3
repeat
UO.findtype(typ_ore[i],0x0000,'ground')
if UO.GetDistance('finditem') <5> 0 then
	UO.GRAB(0,'finditem')
	wait(1000)
	ruda=1
else
UO.Ignore('finditem')
endif
until UO.FindCount()==0
next

UO.Print('Ruda nenalezena, udelej krok.')
UO.IgnoreReset()
while x== UO.GetX('self') AND y == UO.GetY('self')
	wait(2000)
wend
wend
end sub

Použití: nejprve sebere všechno v okolí, a pak dostanete zprávu, že je třeba udělat krok a opět něco sebere. Tak pokračuje i v případě, že jste přetížení.