Скрипт на мининг
Posted: 2006-09-09 12:38:01
Ребят, подскажите пожалуйста, в скрипте в переменно стоит максимальный вес после которого чар улетает и складывает руду. Но проблема в том, что чар не докапывает до данного веса. Подскажите где и что исправить, что бы чар скажем копал до веса 600.
Вот скрипт:
Вот скрипт:
Code: Select all
Var RuneBook = "0x404A4437" # Бука по которой прыгаем по минам и к дому
var Marks = 10 # Количество марков в буке по минам
var WeightLimit = 1050 # Максимальный вес
var Container = "0x4056CE16" # Контейнер у дома в который сыпем
var ContainerLopat = "0x4056CE16" # Контейнер у дома с лопатами
var charkiller;
var MarkNo
var i
var TmpX
var TmpY
var CurX
var CurY
var CurZ
var TileX
var TileY
VAR X
sub main()
UO.Warmode(0)
uo.Exec('exec proverkagm')
uo.Exec('exec Reconnect')
uo.Exec("filterspeech on")
uo.Exec("filterspeech add 'Where do you want to use the pickaxe?'")
start:
for MarkNo = 1 to ( Marks )
RecallTo( MarkNo )
Wait( 1000 )
CurX = UO.GetX("self")
CurY = UO.GetY("self")
CurZ = UO.GetZ("self")
for TileX = -2 to 2
for TileY = -2 to 2
while UO.Dead()
UO.Playwav("C:\sound107.wav")
Wait(2500);
wend
tuktuk:
proverka_pk()
UO.DeleteJournal()
While not UO.Hidden()
UO.Useskill("Hiding")
Wait(9000)
Wend
if UO.Weight > WeightLimit then
GoHome()
Goto tocka_end
end if
UO.Exec("waittargettile * "+STR(CurX + TileX)+" "+STR(CurY + TileY)+" "+STR(CurZ))
UO.Exec("usetype 0x0E85")
X=0
rknd:
If UO.InJournal("There is no ore here to mine") OR UO.InJournal("Try mining in rock") OR UO.InJournal("There is no ore here to mine") OR UO.InJournal("That is too far away.") OR UO.InJournal("You have no line of sight to that location") or UO.InJournal("You put the Proto Ore in your pack.") OR UO.InJournal("You put the Common Ore in your pack.") OR UO.InJournal("You put the Elemental Ore in your pack") then
Wait(2000)
goto konec
End if
If UO.InJournal("You put the Arch Ore in your pack.") OR UO.InJournal("You put the Luxury Ore in your pack.") OR UO.InJournal("You loosen some rocks but fail to find any useable ore") OR X>225 then
;Wait(1000)
goto tuktuk
End if
X=X+1
Wait(100)
goto rknd
konec:
proverka_pk()
next
next
GoHome()
tocka_end:
next
Goto start
end sub
sub RecallTo( i )
TmpX = UO.GetX("self")
TmpY = UO.GetY("self")
UO.Exec("recall "+RuneBook+" "+STR( i ))
Wait (5000)
UO.UseSkill("Hiding")
while TmpX == UO.GetX("self") and TmpY == UO.GetY("self")
Wait(500)
wend
end sub
sub GoHome()
TmpX = UO.GetX("self")
TmpY = UO.GetY("self")
UO.Exec("recall "+RuneBook+" "+STR( 11 ));тут номер метки в тревеле к ДОМУ
Wait (2000)
while TmpX == UO.GetX("self") and TmpY == UO.GetY("self")
Wait(500)
wend
UO.Exec("setreceivingcontainer "+Container)
while not UO.Count("0x19b9") == 0
UO.Exec("waittargettype 0x19b9")
UO.Exec("grab 0")
Wait(2000)
wend
UO.Exec("unsetreceivingcontainer")
uo.Useobject(ContainerLopat)
While UO.Count(0x0E85) < 2
UO.Findtype("0x0E85", "-1",ContainerLopat)
UO.WaitTargetObject('finditem')
UO.Grab()
Wait (2000)
Wend
While UO.Count(0x1f4c) < 1
UO.Findtype("0x1f4c", "-1", ContainerLopat)
UO.WaitTargetObject('finditem')
UO.Exec("grab 30")
Wait (2000)
Wend
rechargeallbook()
While UO.Count(0x1f4c) > 0
Uo.Setreceivingcontainer(ContainerLopat)
Uo.Waittargettype(0x1f4c)
UO.Grab()
Wait(1000)
Wend
Uo.UnSetreceivingcontainer()
end sub
sub proverka_pk()
if uo.InJournal("attaking you") then
charkiller=uo.JournalSerial(uo.InJournal("attaking you")-1)
Uo.Print("killer = "+charkiller)
UO.Playwav("c:\Sound108.wav")
wait(3000)
UO.Playwav("c:\Sound108.wav")
wait(3000)
UO.Playwav("c:\Sound108.wav")
uo.exec("terminate all")
end if
end sub
sub rechargeallbook()
var recalls
var current_book
UO.IgnoreReset()
while 1
UO.FindType('0x1F4C')
if UO.FindCount() < 1 then
UO.Print("No recall scrolls left!")
#return
end if
recalls = UO.GetSerial('finditem')
UO.FindType('0x0EFA', '0x0127')
if UO.FindCount() < 1 then
UO.Print("All books are sucessfully charged!")
return
end if
current_book = UO.GetSerial('finditem')
UO.WaitTargetObject(recalls, current_book)
UO.Msg(".travelbook_recharge")
UO.Ignore(current_book)
Wait(1000)
wend
end sub