Yoko
http://forum.yoko.com.ua/

AOS Mining
http://forum.yoko.com.ua/viewtopic.php?f=1&t=1994
Page 1 of 1

Author:  volt [ 2004-11-19 00:11:55 ]
Post subject:  AOS Mining

сбросьте пожалуйста хоть маленький примерчик а то что то ваще не догоняю (( пытался сделать через Асм ничего не получилось.....

Author:  Ugrum. [ 2004-11-19 02:16:37 ]
Post subject: 

Code:
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 пропиши в типах.

Author:  volt [ 2004-11-20 13:23:22 ]
Post subject: 

а через UO.asmWaitTargetStaticTile кто нить знает как сделать ?

Author:  AGRS [ 2004-11-20 13:34:19 ]
Post subject: 

Там же в доке по asmWaitTargetXXXTile пример есть. :) Чем он тебя не устраивает.

Author:  volt [ 2004-11-21 00:19:49 ]
Post subject: 

Он меня устраивает я просто не понял там он загружает таблицу типов карты и статики..... вот откуда ее взять я что то не догнал.....

Author:  AGRS [ 2004-11-21 01:09:13 ]
Post subject: 

Составить самому, или ждать пока я не выложу готовую. (ориентировочно к декабрю)

Author:  volt [ 2004-11-21 10:55:45 ]
Post subject: 

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

Author:  AGRS [ 2004-11-21 15:20:48 ]
Post subject: 

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


Все в хелпе. Там есть описание всех функций.

Author:  Shaud [ 2004-11-23 17:21:22 ]
Post subject: 

к минингу. там в инсталяции ультимы есть какие то txt с номерами тайлов для некоторых поверхностей. например номера тайлов пола в пещере для составления карт я брал оттуда.

Author:  Drakull [ 2004-11-26 15:18:12 ]
Post subject: 

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:

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

Author:  Shaud [ 2004-11-27 16:21:49 ]
Post subject: 

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()))

Author:  punkesito [ 2004-12-11 03:55:58 ]
Post subject: 

http://yoko.netroof.net/forum/viewtopic.php?t=1473

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/