Bowcraft
Napsal: 11.06.2007 19:27:49
Hodil bym i sem niekto makro na vyrobu sipiek po jednom?
Kód: Vybrat vše
var chest = 0x4003CBF6 ;bedna s logy
var base_chest = 0x4003CBF6
var dagger = 0x0F51
var log = 0x1BDD
var Unfinished_Shafts = 0x1BD6
var shafts = 0x1BD4
var feathers_t = 0x1BD1
var crossbow_bolt_t = 0x1BFB
var arrows_t = 0x0F3F
; dela shafty po jednom
sub make_shaft_by_one()
var max_count = 10
var count
UO.Exec ("cancelmenu")
UO.AutoMenu('What do you want to carve the wood','Shafts')
;UO.Say("bank")
UO.UseObject(base_chest)
Wait(1000)
UO.UseObject(chest)
Wait(1000)
While TRUE
if UO.Count(log, "-1") < 1 then
;UO.Print("LOGS REFILL")
UO.FindType(log, "-1", chest)
If UO.FindCount() < 1 Then
UO.Print("NO LOGS.")
goto end
endif
UO.MoveItem("finditem","1","backpack")
wait(1200)
end if
UO.DeleteJournal()
count = 0
UO.WaitTargetType(log, 0x0000)
UO.UseType(dagger, 0x0000)
Wait(1000)
While NOT UO.InJournal("You put the") AND NOT UO.InJournal("You fail to") AND count <max_count> 0 then
UO.UseType(Unfinished_Shafts, 0x0742)
wait(1000)
end if
; vrat hotove shafts do bedny
UO.FindType(shafts, 0x0000)
if UO.GetQuantity("finditem") > 100 then
UO.MoveItem("finditem", "0", chest)
Wait(2000)
end if
Wend
end:
UO.Exec ("cancelmenu")
end sub
; dala sipky do kuse
sub make_crossbow_bolts()
make_bolts('Crossbow bolts')
end sub
; dela sipy
sub make_arrows()
make_bolts('Arrows')
end sub
Sub make_bolts(what_to_do)
; do not change
var max_count = 10
var count
UO.Exec ("cancelmenu")
UO.AutoMenu('Select arrow type',what_to_do)
UO.UseObject(base_chest)
Wait(1000)
UO.UseObject(chest)
Wait(1000)
While TRUE
if UO.Count(shafts, "-1") < 1 then
;UO.Print("shafts REFILL")
UO.FindType(shafts, "-1", chest)
If UO.FindCount() < 1 Then
UO.Print("NO shafts.")
goto end
endif
UO.MoveItem("finditem","2","backpack")
wait(1200)
end if
if UO.Count(feathers_t, 0x0000) < 1 then
;UO.Print("feathers REFILL")
UO.FindType(feathers_t, -1, chest)
If UO.FindCount() < 1 Then
UO.Print("NO feathers.")
goto end
endif
UO.MoveItem("finditem", 2, "backpack")
wait(1500)
end if
UO.DeleteJournal()
count = 0
;UO.WaitTargetType(shafts, 0x0000)
UO.UseType(shafts, 0x0000)
Wait(1000)
While NOT UO.InJournal("You put the") AND NOT UO.InJournal("You fail to") AND count <max_count> 100 then
UO.MoveItem("finditem", "0", chest)
Wait(2000)
end if
; vrat hotove sipy do bedny
UO.FindType(arrows_t, 0x0000)
if UO.GetQuantity("finditem") > 100 then
UO.MoveItem("finditem", "0", chest)
Wait(2000)
end if
Wend
end:
UO.Exec ("cancelmenu")
end sub
sub my_terminate()
UO.Exec ("cancelmenu")
UO.Exec ("terminate all")
end sub
neni kazdej masochista ako tyTobias píše:na co makro lenochu!
Kód: Vybrat vše
count <max_count>
Kód: Vybrat vše
count < max_count > 100
Kód: Vybrat vše
UO.Exec ("cancelmenu")
Kód: Vybrat vše
sub Sipky()
while 1
if UO.Weight > 500 then
UO.Say(" mam toho moc! ")
goto konec:
endif
UO.FindType('0x1bd1',-1,'ground')
if UO.FindCount() < 1 then
UO.Print("Doslo peri! ")
goto konec:
endif
UO.MoveItem("finditem","1","backpack")
UO.UseType('0x1bd4')
; UO.Exec("waitmenu 'Select arrow type''Arrows'")
UO.Exec("waitmenu 'Select arrow type''Crossbow bolts'")
wait(2000)
wend
konec:
end sub
Kód: Vybrat vše
Sub WaitForJournal(text)
repeat
wait(200)
until UO.InJournal(text)
end sub
Sub addObj(obj)
UO.Set("quiet",1) ;hlasky co je co, si nastav v makru...
UO.addObject(obj)
while UO.targeting()
wait(100)
wend
UO.Set("quiet",0)
end sub
sub Sipky()
UO.Print("Z ktereho pytliku chces brat shafty a peri?")
AddObj("pytlik")
Wait(500)
UO.UseObject("pytlik")
Wait(1000)
while 1 ;blba podminka taky podminka
UO.DeleteJournal()
if UO.Weight > 500 then ;tak co vaha...
UO.Say("Mam toho moc! ")
return 1
endif
UO.FindType("0x1bd4",-1,"bagpack"); mame shafty v bagliku?
if UO.FindCount() < 1 then
UO.Print("Dosly shafty")
return 0
end if
UO.FindType("0x1bd1",-1,"pytlik") ;mame peri?
if UO.FindCount() < 1 then
UO.Print("Doslo peri! ")
return 0
endif
UO.MoveItem("finditem","1","backpack")
Wait(500)
UO.UseType("0x1bd4") ;shaft?
; UO.WaitMenu("Select arrow type","Arrows")
UO.WaitMenu("Select arrow type","Crossbow bolts")
WaitForJournal("You put the|You fail to create|No item|target")
if UO.InJournal("No item found") then ;obcas v lagu to zablbne - nestihne vzit item
UO.Print("Neco doslo...")
return 0
endif
Wait(500)
wend
end sub
Kód: Vybrat vše
UO.FindType("0x1bd4",-1,!!!"bagpack"!!!)
Kód: Vybrat vše
if UO.FindCount() < 1 then
UO.Print("Dosly shafty")
return 0
end if
Kód: Vybrat vše
;obcas v lagu to zablbne - nestihne vzit item