Yoko

All sides of Injection
It is currently 2026-01-23 05:31:41

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2007-10-24 10:36:11 
Offline

Joined: 2004-08-26 13:00:26
Posts: 18
Сообственно вот этот скрипт
Code:
sub main()
; + EDIT +++++++++++++++++++++++++++++++++++++++++++++++
var zona = 6;
; ++++++++++++++++++++++++++++++++++++++++++++++++++
var m, i, a, tX, tY, tr = 1
tX = UO.GetX('self')
tY = UO.GetY('self')
for i=1 to zona
if tr then
m = - 5
else
m = 5
endif
for a=1 to zona
tY = tY + m
GotoXY(tX,tY)
Lamber()
next
tX = tX - 5
if tr then
tr = 0
else
tr = 1
endif
next
endsub

sub Lamber()
; + EDIT +++++++++++++++++++++++++++++++++++++++++++++++
var MaxFailCount = 10; fizzle
var MaxRange = 3; 3 tiles
var mDebug = false;
; ++++++++++++++++++++++++++++++++++++++++++++++++++

var X, Y, Z, FailCount = 0, LTimer, Tiles
var mX, mY, mZ, TrWeight, TrT, TrW, adX, adY

; ** Debug ***********************
if mDebug then
UO.TextOpen()
UO.TextClear()
endif
; ********************************

mX = UO.GetX('self')
mY = UO.GetY('self')
mZ = UO.GetZ('self')
for Y = MaxRange - ( MaxRange * 2 ) to MaxRange
for X = MaxRange - ( MaxRange * 2 ) to MaxRange
Tiles = F_HarvestTiles(mX+X, mY+Y)
if Tiles then
  adX = mX+X
  adY = mY+Y
  repeat
   F_DelJournalMine();
   UO.Warmode(0)
   UO.WaitTargetTile(Tiles, mX+X, mY+Y, mZ)

; ********************************
   if UO.Count(0x0F43) then
    UO.UseType(0x0F43); <-- Axe
   else
    return 1
   endif
; ********************************

; ************ Triger ************
; ErrorExitTimer
   LTimer=UO.Timer()
   TrT = UO.Timer() > LTimer + 60; !!! 60/10 = 6 sec !!!
; MyWeight + Ore
   TrWeight = UO.Weight
   TrW = UO.Weight <> TrWeight
; ********************************

   repeat
    wait(100)
   until UO.InJournal("useable wood|You can|That is too far away|here to chop") || TrT || UO.Dead()

; ********* ON=@FailCount ********
   if TrW then
    FailCount = 0
   else
    FailCount = FailCount + 1
   endif
; ********************************

; ***** Debug Harvest Tiles ******
   if mDebug then
    if TrT then
     UO.TextPrint(Tiles); !Harvest
    else
;       UO.TextPrint(Tiles);  Harvest
    endif
   endif
; ********************************

  until UO.InJournal("here to chop|You can|That is too far away") || FailCount >= MaxFailCount || UO.Dead()
endif
next
next
UO.Sound(61)
return 0
end sub

sub F_HarvestTiles(X,Y)
var i
if UO.PrivateGetTile(X, Y, -1, 3274, 3302) then
for i=3274 to 3302
if UO.PrivateGetTile(X, Y, -1, i, i) then

; ***** Patch ********************************************
  if i==3278 || i==3279 || i==3281 || i==3282 then
   return 0
  endif
  if i==3284 || i==3285 || i==3287 || i==3289 then
   return 0
  endif
  if i==3291 || i==3292 || i==3294 || i==3295 then
   return 0
  endif
  if i==3297 || i==3298 || i==3300 || i==3301 then
   return 0
  endif
; **************************************************

  return i
end if
next
end if
return 0
end sub

sub F_DelJournalMine()
F_DeleteJournal("useable wood");
F_DeleteJournal("That is too far away");
F_DeleteJournal("You can")        ;
F_DeleteJournal("here to chop");
end sub

sub F_DeleteJournal( string1 )
var nom = UO.InJournal( string1 )
if nom > 0 then
UO.SetJournalLine( Nom - 1, "string replaced" )
F_DeleteJournal( string1 )
endif
end sub
# **************************************************

sub GotoXY(x,y)
var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0
for i=1 to 60

myX=UO.GetX();
myY=UO.GetY();
if LastX==myX and LastY==myY then
halt=halt+1
else
halt=0
end if
if halt>=10 then
if UO.GetDir()==1 then
  for z=0 to 8
   UO.Press(40)
  next
end if
if UO.GetDir()==3 then
  for z=0 to 8
   UO.Press(37)
  next
end if
if UO.GetDir()==5 then
  for z=0 to 8
   UO.Press(38)
  next
end if
if UO.GetDir()==7 then
  for z=0 to 8
   UO.Press(39)
  next
end if
halt=15
end if
if Numb(x-myX)<=1 and Numb(y-myY)<=2 then
return 1
end if
if x<=myX then
if y<=myY then
  for z=0 to 3
   UO.Press(38)
  next
else
  for z=0 to 3
   UO.Press(37)
  next
end if
else
if y<=myY then
  for z=0 to 3
   UO.Press(39)
  next
else
  for z=0 to 3
   UO.Press(40)
  next
end if
end if
lastX=myX
lastY=myY
wait(200)
next
return 0
end sub

sub Numb(num)
if num>=0 then
return num
else
return num*(-1)
end if
end sub



Нада сделать так чтобы выкидывал треш логи (сервер OLDP.net) если нужно сделаю название логов которые выкидывать цвет и тип или дайте просто я сам пропишу всё что надо


Top
   
 Post subject:
PostPosted: 2007-10-24 17:34:15 
Offline
User avatar

Joined: 2007-10-12 20:48:07
Posts: 100
Ну попробуй после этой строчки
Quote:
until UO.InJournal("here to chop|You can|That is too far away") || FailCount >= MaxFailCount || UO.Dead()

вставить
Code:
uo.findtype(тут тип логов,тут цвет логов,'backpack')
if uo.findcount() then
uo.drop(0,0,0,0,'finditem')
endif

Это если только один тип логов...

_________________
Image
Image


Top
   
 Post subject:
PostPosted: 2007-10-24 18:08:49 
Offline

Joined: 2004-08-26 13:00:26
Posts: 18
спасибо помогло есть еше один вопросик

куда вставить это чтобы работало автоубиство риперов(я взял из мининга и переделал)

Code:
if uo.InJournal("Reaper") or uo.InJournal("is attacking you")then
killelem()
wait(1000)
endif

это первая часть(незнаю куда ее в скрипте вставить)

и вот сам скрипт
Code:
sub killelem()
VAR Count,Elem

uo.equipt('Rhand','0x13B1') #tip oruzija kotorim budem bitj elementa
UO.DeleteJournal()
UO.Exec('warmode 1')

UO.FindType('0x002F',-1,'ground')
Elem=UO.GetSerial('finditem')
wait (300)
UO.Attack(Elem)

repeat
wait(1000)
If UO.Life<110 Then
UO.WaitMenu('Camping','Healing Campfie')
UO.UseType(0x0DE1)
Endif
If UO.Life<70 Then
UO.UseType(0x182E)
Endif
until UO.IsNPC(Elem)==0
wait(3000)
UO.Exec('warmode 0')
wait(1000)

UO.Print("poka!")

end sub


Top
   
 Post subject:
PostPosted: 2007-10-24 18:49:42 
Offline
User avatar

Joined: 2007-02-21 20:15:57
Posts: 479
там же где и в мининге было, после сообщений
Code:
  until UO.InJournal("here to chop|You can|That is too far away") || FailCount >= MaxFailCount || UO.Dead() 
endif

_________________
Шард Антарес
Ururu


Top
   
 Post subject:
PostPosted: 2007-10-24 22:48:20 
Offline

Joined: 2004-08-26 13:00:26
Posts: 18
ок спс проверю, а там next next это ничего не трогать просто вставить if и endif потом?


Top
   
 Post subject:
PostPosted: 2007-10-26 22:16:22 
Offline

Joined: 2004-08-26 13:00:26
Posts: 18
Так и не смог убийство риперов сделать, помогите чем нибудь хотябы какиенить свои наброски, может сам что смогу, просто когда рипер вылез одел лук и начал его мочить, остальное сам сделаю


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited