AOS Mining
Posted: 2004-11-19 00:11:55
сбросьте пожалуйста хоть маленький примерчик а то что то ваще не догоняю (( пытался сделать через Асм ничего не получилось.....
Code: Select all
sub Min()
var T
var Jurn
var Сli1="cliloc# 0xAD03"
var Сli2="cliloc# 0xAD00"
var Сli3="cliloc# 0x6B31"
var Сli4="cliloc# 0xEE46"
var Сli5="cliloc# 0xA2DE"
REPEAT
uo.deletejournal()
UO.waittargettile("lasttile")
UO.usetype("pickaxe")
wait(200)
T = UO.Timer()
REPEAT
wait(150)
Jurn=UO.Journal(0)
UNTIL ((UO.Timer()-T) > 40 or Jurn[10] == "5" or Jurn == Сli1 or Jurn == Сli2 or Jurn == Сli3 or Jurn == Сli4 or UO.GetHP()==0)
UNTIL Jurn == Сli3 or Jurn == Сli2 or Jurn == Сli4 or Jurn == Сli5 or UO.GetHP()==0
end sub
volt wrote:а примерчик мона как должен выглядить синтаксис таблицы.... ?
Code: Select all
sub mine_spot()
# var Pickaxe = '0x0E86' #I'm going to try shovels instead
var Pickaxe = '0x0F39' #This number is for shovels
var safemeasure = 1
var result = 0
var MaxWeight = 418 #put here the maximum weight you can carry minus 24 you may carry... so you will still be able to recall..
var countpicks = 0
uo.deletejournal()
# This is part of my script. I've a routine to check for attacks and react to them.. you can skip this :)
# if (reactattack() == 1) then
# result = 1
# return result
# end if
# If we're over the maximum weight - Exit 2
if (uo.Weight >= MaxWeight) then
result = 2
return result
end if
# If we've no shovels - Exit 2
if (uo.count(pickaxe) == 0) then
result = 2
return result
end if
# Get's out actual position to mine just under our feet.
UO.WaitTargetTile(0,STR(UO.GetX()),STR(UO.GetY()),"0")
#used to prevent hanging on the script.
safemeasure = 1
UO.UseType(pickaxe)
repeat
wait (200)
# again my routine to check for attacks... not included...
# if (reactattack() == 1) then
# result = 1
# end if
safemeasure = safemeasure + 1
countpicks = uo.count(pickaxe)
until (uo.InJournal('cliloc# 0x5D') OR uo.Injournal('cliloc# 0xAD03') OR uo.InJournal('cliloc# 0xAD00') OR (Safemeasure >= 50) or uo.Injournal('cliloc# 0xA866') or (countpicks == 0))
# keep mining - Exit 0
if (uo.Injournal('cliloc# 05D') OR uo.Injournal('cliloc# 0xAD03') OR (Safemeasure >= 50)) then
result = 0
endif
# no more mining here - Exit 3
if (uo.InJournal('cliloc# 0xAD00') OR uo.Injournal('cliloc# 0xA866')) THEN
result = 3
endif
return result
end sub