Yoko

All sides of Injection
It is currently 2025-10-15 07:45:09

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-06-26 23:39:41 
Offline

Joined: 2004-06-11 12:26:31
Posts: 11
Вот скрипт, помоги разобраться, некопает и всё :((


Sub Main()
UO.DeleteJournal()
UO.Exec('exec BeginMiningcommon')
EndSub

sub DropDownOre(color)
UO.Print("Dropping down junk ore...")
wait(100)
UO.FindType("TVJ",color)
if UO.FindCount()>0 then
UO.Drop("0","0","0","finditem")
endif
UO.FindType("GWJ",color)
if UO.FindCount()>0 then
UO.Drop("0","0","0","0","finditem")
endif
UO.FindType("EWJ",color)
if UO.FindCount()>0 then
UO.Drop("0","0","0","0","finditem")
endif
UO.FindType("DWJ",color)
if UO.FindCount()>0 then
UO.Drop("0","0","0","0","finditem")
endif
wait(100)
end sub

sub GrabTreasurePiese(TrType)
var i
UO.findtype(TrType,"-1","ground")
if uo.findcount()>0 then
for i=1 to uo.findcount()
UO.grab("0", "~"+TrType)
wait(400)
UO.usetype(TrType)
wait(350)
next
endif
end sub

sub GrabTreasureOne()
var i
UO.set("finddistance","3")
DropDownOre("0x0000")
wait(200)
DropDownOre("0x0944")
wait(200)
DropDownOre("0x06D6")
wait(200)
DropDownOre("0x03DA")
wait(200)
GrabTreasurePiese("QGK")
GrabTreasurePiese("EGK")
GrabTreasurePiese("DGK")
GrabTreasurePiese("IGK")
GrabTreasurePiese("HGK")
GrabTreasurePiese("JGK")
GrabTreasurePiese("GGK")
GrabTreasurePiese("VKK")
GrabTreasurePiese("KGK")
GrabTreasurePiese("FGK")
UO.findtype("DWJ","0x0944","ground")
if uo.findcount()>0 then
for i=1 to uo.findcount()
UO.grab("0", "finditem")
wait(400)
next
endif
UO.findtype("DWJ","0x06D6","ground")
if uo.findcount()>0 then
for i=1 to uo.findcount()
UO.grab("0", "finditem")
wait(400)
next
endif
UO.findtype("DWJ","0x03DA","ground")
if uo.findcount()>0 then
for i=1 to uo.findcount()
UO.grab("0", "finditem")
wait(400)
next
endif
wait(2000)
endsub

sub MiningOne(x,y)
var index=0
var finished=0

wait(100)
UO.DeleteJournal()
UO.exec("waittargettile tile " + str(UO.GetX() + x) + " " + str(UO.gety() + y) + " " + str(UO.GetZ()))
UO.SetGlobal("Errors","2")
UO.findtype("NPF")
if UO.FindCount()>0 then
UO.UseObject("finditem")
UO.SetGlobal("Errors","0")
end if
UO.FindType("TWF")
if UO.FindCount()>0 then
UO.UseObject("finditem")
UO.SetGlobal("Errors","0")
end if
wait(500)
while (index<=80) and (not (finished))
if UO.InJournal("You put") then
finished=1
wait(200)
end if
if UO.InJournal("useable ore.") then
index=80
UO.SetGlobal("NextCell","0")
wait(200)
end if
if UO.InJournal("distribe") or UO.InJournal("Try mining") or UO.InJournal("reach") or UO.InJournal("no ore") then
index=80
UO.SetGlobal("NextCell","1")
wait(200)
end if
if UO.InJournal("treasure") then
UO.Print("I found treasure!!!")
GrabTreasureOne()
index=80
UO.SetGlobal("NextCell","1")
end if
if UO.InJournal("too heavy") and (not (UO.InJournal("Some")))then
RecallForMining()
index=80
UO.SetGlobal("Errors","1")
end if
if UO.InJournal("You put the Some with ore at your feet.") and UO.InJournal("Elemental") then
index=80
UO.SetGlobal("NextCell","1")
wait(300)
uo.say("Guards")
end if
if (uo.countground(0x0F0D)>0) then
while (uo.countground(0x0F0D)>0)
uo.findtype(0x0F0D,-1,1)
uo.grab(0,'finditem')
wait(300)
wend
endif

index=index+1
wait(100)
wend
if finished==1 and UO.GetGlobal("RareOre")=="2" then
UO.SetGlobal("NextCell","0")
if UO.InJournal("Iron Ore") then
# DropDownOre("0x0000")
UO.SetGlobal("NextCell","0")
end if
if UO.InJournal("Rusty Ore") then
DropDownOre("0x0750")
UO.SetGlobal("NextCell","1")
end if
if UO.InJournal("Dull Copper Ore") then
DropDownOre("0x060A")
UO.SetGlobal("NextCell","1")
end if
if UO.InJournal("Old Copper Ore") then
DropDownOre("0x0590")
UO.SetGlobal("NextCell","0")
end if
if UO.InJournal("Copper Ore") then
DropDownOre("0x04BB")
UO.SetGlobal("NextCell","1")
end if
end if
if finished==1 and UO.GetGlobal("RareOre")=="1" then
if UO.InJournal("Iron Ore") then
UO.SetGlobal("NextCell","0")
end if
if UO.InJournal("Rusty Ore") then
UO.SetGlobal("NextCell","0")
end if
if UO.InJournal("Dull Copper Ore") then
UO.SetGlobal("NextCell","0")
end if
if UO.InJournal("Old Copper Ore") then
UO.SetGlobal("NextCell","0")
end if
if UO.InJournal("Copper Ore") then
UO.SetGlobal("NextCell","0")
end if
if UO.InJournal(" attacking you") then
UO.Say("Guards")
wait(1500)
endif
end if
end sub

sub PerformMiningProcess()
var x=-2
var y=-2
UO.SetGlobal("Errors","0")
wait(100)
while ((x+y)<=4) and (UO.GetGlobal("Errors")=="0")
UO.Print("Digging: x = "+str(x)+" y = "+str(y))
MiningOne(x,y)
if UO.GetGlobal("NextCell")=="1" then
wait(100)
if x<2 then
x=x+1
else
if y<2 then
y=y+1
x=-2
end if
if y==3 then
y=y+1
end if
end if
end if
wait(100)
wend
#if UO.GetGlobal("Errors")=="2" then
#Message("Maybe you shoul find some tools to dig?")
#end if
if UO.GetGlobal("Errors")=="3" then
end if
if (UO.GetGlobal("Errors")=="0") or (UO.GetGlobal("Error")=="1") then
UO.Print("Successfuly finished mining here.")
end if
end sub

sub BeginMiningCommon()
UO.SetGlobal("RareOre","1")
PerformMiningProcess()
end sub

sub BeginMiningRares()
UO.SetGlobal("RareOre","2")
PerformMiningProcess()
end sub


end sub


Top
   
 Post subject:
PostPosted: 2004-06-27 00:57:55 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
надеюсь здесь есть ктото у кого много времени чтобы читать скрипты длиннее 5 строк, потому что у меня его нет


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited