вопрос по WaitTargetTile

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Georg IV
Posts: 14
Joined: 2007-05-29 22:42:06

вопрос по WaitTargetTile

Post by Georg IV »

Граждане, разобраться хочу первый параметр WaitTargetTile - который tilenum. Это вообще тип я так понял поверхности или что?
И нет ли универсалього значения этого tilenum?
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Есть - 0.

Только в некоторых случаях он может не работать.
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Georg IV
Posts: 14
Joined: 2007-05-29 22:42:06

Post by Georg IV »

то-то я смотрю все наши "рудокопы" тут пишут там или 0 или -1....чисто в эксперементальных целях залез в шахту пробовал...нифига.
Но есть ещё товарищи, которые указывают конкретный тайл этого дела, помоему 1393, или что-то в этом роде...залез пробовал...мне кажется находит но не всё...видимо там всё же пол шахты предсталвен несколькими разновидностями....в таких случаях навернео целесообразно применять массив тайлов, и в цикле крутить их на всякое движение рудокопа к тому или иному куску местности...ну это мои измышления.
Savage
Expert!
Posts: 1205
Joined: 2004-04-04 11:13:54
Location: Балаково, Саратовская обл.
Contact:

Post by Savage »

Code: Select all

sub DigItStay(MaxWeight,MaxDistance,BaseX,BaseY)
   VAR x,y,TempX,TempY
   VAR Last=0,LastTimer, ContFlag=1
   VAR MaxTimer=160,Count=1
   VAR TileB=1339
   VAR TileE=1359
   Var Tile

   For x=-MaxDistance to MaxDistance
      For y=-MaxDistance to MaxDistance

         Tile=-1
         Tile=TileB
         While NOT UO.PrivateGetTile(UO.GetX()+x,UO.GetY()+y,-1,Tile,Tile) AND Tile<TileE
            Tile=Tile+1
         Wend

         If Tile<TileE Then

Установка патчей на клеточки в шахте приводит к неработоспособности функции приватгеттайл.
Georg IV
Posts: 14
Joined: 2007-05-29 22:42:06

Post by Georg IV »

Тоесть ты хочешь сказать, что тайлы на полу шахты всегда находятся в пределах
от 1339 до 1359
Savage
Expert!
Posts: 1205
Joined: 2004-04-04 11:13:54
Location: Балаково, Саратовская обл.
Contact:

Post by Savage »

На ранке так. На поле вроде тоже так же, не помню уже. На сфере 1 тип тайла в шахте.
Georg IV
Posts: 14
Joined: 2007-05-29 22:42:06

Post by Georg IV »

ну тогда все более мене просто, не нужно отдельно массивы формировать, циклом можно обойтись.
Тоесть более мене унификация для копания земли достигнута.
А как быть с камнями, или с кажем с песком на предмет песка?
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Post by Mirage »

Code: Select all

Sub HarvestTiles(X,Y)
var i
if UO.PrivateGetTile(X, Y, -1, 616, 618) then
 for i=616 to 618
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 1339, 1363) then
 for i=1339 to 1363
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 2272, 2282) then
 for i=2272 to 2282
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 4963, 4973) then
 for i=4963 to 4973
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 6001, 6012) then
 for i=6001 to 6012
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 13121, 13369) then
 for i=13121 to 13369
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 13446, 13455) then
 for i=13446 to 13455
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 13484, 13492) then
 for i=13484 to 13492
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
if UO.PrivateGetTile(X, Y, -1, 13625, 13628) then
 for i=13625 to 13628
  if UO.PrivateGetTile(X, Y, -1, i, i) then
   return i
  end if
 next
end if
return 0; No Harvest Tiles
end sub

:roll:
Georg IV
Posts: 14
Joined: 2007-05-29 22:42:06

Post by Georg IV »

Я хренею на глазах...
а что это за PrivateGetTile?
Что-то я у Ёко в хелпе такого не вижу....
Post Reply