Yoko

All sides of Injection
It is currently 2025-10-31 00:58:27

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2008-03-24 12:57:36 
Offline

Joined: 2008-03-24 10:03:05
Posts: 5
Вот скрипт, кто-нибудь потесте его (придётся изменять координаты и некоторые значения) и исправьте, потому что он был выложен тут с ошибками (все ## (текст) надо удалить):

sub main()
VAR DigDistance, TileNum, LastTimer
DIM BaseX[7], BaseY[7] ## (порядковое значение последних координат - отсчёт начинается с 0)
VAR BaseZ, WayPoint, WayPoints
VAR MaxWeight, elem

elem='Yes'
MaxWeight=740
DigDistance=2
WayPoints=8 ## (количество координат)

;uo.exec('exec Reconnector')
;uo.exec('exec Alert')
;uo.exec('exec closer')
uo.exec('msg Хочу Фулл Cargo!!!')

## Координаты №1 ## (не забудьте поставить знак # в начале строк с координатами в последней точке)
BaseX[0]=1455
BaseY[0]=846
BaseZ=0

## Координаты №2
BaseX[1]=1455
BaseY[1]=845

## Координаты №3
BaseX[2]=1455
BaseY[2]=844

## Координаты №4
BaseX[3]=1455
BaseY[3]=843

## Координаты №5
BaseX[4]=1455
BaseY[4]=842

## Координаты №6
BaseX[5]=1455
BaseY[5]=841

## Координаты №7
BaseX[6]=1456
BaseY[6]=841

## Координаты №8
#BaseX[7]=1456
#BaseY[7]=840

sub CheckLag()
UO.UseObject('Sunduk')
LastTimer=UO.Timer()
Repeat
wait(500)
Until UO.InJournal('You can') OR UO.InJournal('What is the') OR UO.Timer()>LastTimer+100

If UO.InJournal('see the') Then
UO.Say("Подойдите к сундуку и навидите прицелом!")
UO.AddObject('Sunduk')
While UO.Targeting()==2
wait(500)
Wend
UO.SaveConfig()
UO.UseObject('Sunduk')
Else
UO.Say("Атлична! Типерь нада кападь, поцан!.")
end if
uo.deletejournal()
While NOT UO.Dead()

For WayPoint=0 to WayPoints-1
WalkMe(BaseX[WayPoint],BaseY[WayPoint],'')
digitstay(MaxWeight,DigDistance,elem,BaseX[WayPoint],BaseY[WayPoint])
Next
wend
end sub



;-------------------- Try to mine under self ------------------

sub digitstay(MaxWeight,MaxDistance,elem,BaseX,BaseY)
VAR x,y,z='0',TileNum='1339'
VAR Last=0, LastTimer
VAR MaxTimer=110

For x=-MaxDistance to MaxDistance
For y=-MaxDistance to MaxDistance
Repeat
CheckLag()
Del('There is nothing|elsewhere|location|You cannot|Region|Elemental|attacking you|You stop')

dig:
UO.WaitTargetTile(TileNum,STR(UO.GetX()+x),STR(UO.GetY()+Y),z)
UO.UseType('0x0E85')

LastTimer=UO.Timer()

Repeat
wait(500)
until UO.InJournal('There is nothing|elsewhere|location|You cannot|Region|Elemental|attacking you|You stop') OR LastTimer+250<UO.Timer() OR uo.life < uo.str

If UO.InJournal('Elemental|attacking you') or uo.life < uo.str then
If elem=='Yes' Then
elem()
Endif
Endif

If UO.InJournal('you stop') then
UO.UseType('0x0E85')
GoTo dig
Endif

If UO.Weight>=MaxWeight then
unloadore()
Endif
Until UO.InJournal('There is nothing|location|Region|You cannot|elsewhere') OR LastTimer+250<UO.Timer()
Next
Next
end sub


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 15 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