AOS Mining

General Injection issues

Moderators: Murderator+, Murderator

Post Reply
volt
Posts: 12
Joined: 2004-07-31 17:29:29

AOS Mining

Post by volt »

сбросьте пожалуйста хоть маленький примерчик а то что то ваще не догоняю (( пытался сделать через Асм ничего не получилось.....
Ugrum.
Posts: 69
Joined: 2004-04-05 11:59:21
Location: RunUO

Post by Ugrum. »

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

Простенький примерчик.В шахте клик на кирку таргет на пол,потом запускаешь эту процедурку.Копает в одной точке пока все не выкопает,или не умрет :) Да и pickaxe пропиши в типах.
volt
Posts: 12
Joined: 2004-07-31 17:29:29

Post by volt »

а через UO.asmWaitTargetStaticTile кто нить знает как сделать ?
AGRS
Expert!
Posts: 1007
Joined: 2004-04-04 21:40:09
Contact:

Post by AGRS »

Там же в доке по asmWaitTargetXXXTile пример есть. :) Чем он тебя не устраивает.
volt
Posts: 12
Joined: 2004-07-31 17:29:29

Post by volt »

Он меня устраивает я просто не понял там он загружает таблицу типов карты и статики..... вот откуда ее взять я что то не догнал.....
AGRS
Expert!
Posts: 1007
Joined: 2004-04-04 21:40:09
Contact:

Post by AGRS »

Составить самому, или ждать пока я не выложу готовую. (ориентировочно к декабрю)
volt
Posts: 12
Joined: 2004-07-31 17:29:29

Post by volt »

а примерчик мона как должен выглядить синтаксис таблицы.... ?
AGRS
Expert!
Posts: 1007
Joined: 2004-04-04 21:40:09
Contact:

Post by AGRS »

volt wrote:а примерчик мона как должен выглядить синтаксис таблицы.... ?


Все в хелпе. Там есть описание всех функций.
Shaud
Posts: 87
Joined: 2004-09-27 21:42:27
Contact:

Post by Shaud »

к минингу. там в инсталяции ультимы есть какие то txt с номерами тайлов для некоторых поверхностей. например номера тайлов пола в пещере для составления карт я брал оттуда.
Drakull
Posts: 36
Joined: 2004-07-01 06:02:22

Post by Drakull »

I don't understand a word of what's on the previous posts (sorry, but I don't speak russian), but if what you ask for is a mining routine for AOS, at least this one works fine on runUO servers with AOS.... just check the error messages to check if they match your shard (the cliloc ones).
This routine will allow you integrating it onto your scripts and act depending on it's result (example: if it's ok to mine, then keep mining, if not run home or recall... you may choose what to do depending on the result obtained from it).

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
Shaud
Posts: 87
Joined: 2004-09-27 21:42:27
Contact:

Post by Shaud »

for me that don't work fine. (RunUO RC0, AoS)
UO.WaitTargetTile(0,STR(UO.GetX()),STR(UO.GetY()),"0")
instead 0 for Tile I set real Tile number for uo.getx(),uo.gety(),uo.getz().
uo.WaitTargetTile(TileNum,STR(UO.GetX()),STR(UO.GetY()),STR(UO.GetZ()))
punkesito
Posts: 46
Joined: 2004-10-16 12:30:54
Location: Argentina
Contact:

Post by punkesito »

Post Reply