Доделай его так чтобы он портался по 2 моим местам и выклабывал руду в сундук после точек.
На моём шарде рунбуки нету...
Code: Select all
sub Yow4()
Dim PX[100]
Dim PY[100]
Dim CX[100]
Dim CY[100]
PX[0] = 561
PY[0] = 1079
CX[0] = 339
CY[0] = 263
PX[1] = 562
PY[1] = 1076
CX[1] = 385
CY[1] = 246
PX[2] = 566
PY[2] = 1075
CX[2] = 432
CY[2] = 274
PX[3] = 569
PY[3] = 1072
CX[3] = 426
CY[3] = 273
PX[4] = 569
PY[4] = 1072
CX[4] = 446
CY[4] = 292
PX[5] = 577
PY[5] = 1070
CX[5] = 449
CY[5] = 291
PX[6] = 577
PY[6] = 1075
CX[6] = 426
CY[6] = 314
PX[7] = 577
PY[7] = 1080
CX[7] = 367
CY[7] = 314
PX[8] = 582
PY[8] = 1079
CX[8] = 428
CY[8] = 258
PX[9] = 600
PY[9] = 1078
CX[9] = 428
CY[9] = 314
PX[10] = 600
PY[10] = 1082
CX[10] = 365
CY[10] = 261
PX[11] = 595
PY[11] = 1087
CX[11] = 360
CY[11] = 279
PX[12] = 595
PY[12] = 1092
CX[12] = 381
CY[12] = 260
PX[13] = 607
PY[13] = 1092
CX[13] = 443
CY[13] = 306
PX[14] = 603
PY[14] = 1091
CX[14] = 0
CY[14] = 0
PX[15] = 603
PY[15] = 1102
CX[15] = 353
CY[15] = 250
PX[16] = 603
PY[16] = 1104
CX[16] = 383
CY[16] = 312
PX[17] = 597
PY[17] = 1104
CX[17] = 0
CY[17] = 0
PX[18] = 597
PY[18] = 1112
CX[18] = 0
CY[18] = 0
PX[19] = 591
PY[19] = 1112
CX[19] = 362
CY[19] = 291
PX[20] = 559
PY[20] = 1117
CX[20] = 364
CY[20] = 247
PX[21] = 559
PY[21] = 1120
CX[21] = 366
CY[21] = 272
PX[22] = 559
PY[22] = 1120
CX[22] = 355
CY[22] = 305
PX[23] = 554
PY[23] = 1115
CX[23] = 352
CY[23] = 270
PX[24] = 553
PY[24] = 1127
CX[24] = 378
CY[24] = 316
PX[25] = 552
PY[25] = 1129
CX[25] = 379
CY[25] = 271
PX[26] = 552
PY[26] = 1130
CX[26] = 383
CY[26] = 309
PX[27] = 551
PY[27] = 1134
CX[27] = 383
CY[27] = 311
PX[28] = -1
PY[28] = -1
CX[28] = 0
CY[28] = 0
Mining (PX, PY, CX, CY)
end sub
sub Yow5()
Dim PX[100]
Dim PY[100]
Dim CX[100]
Dim CY[100]
PX[0] = 281
PY[0] = 969
CX[0] = 392
CY[0] = 335
PX[1] = 277
PY[1] = 967
CX[1] = 455
CY[1] = 274
PX[2] = 269
PY[2] = 995
CX[2] = 405
CY[2] = 332
PX[3] = 269
PY[3] = 996
CX[3] = 345
CY[3] = 291
PX[4] = 272
PY[4] = 1006
CX[4] = 442
CY[4] = 312
PX[5] = 281
PY[5] = 1002
CX[5] = 427
CY[5] = 309
PX[6] = 281
PY[6] = 1009
CX[6] = 367
CY[6] = 319
PX[7] = 258
PY[7] = 1009
CX[7] = 0
CY[7] = 0
PX[8] = 258
PY[8] = 1014
CX[8] = 361
CY[8] = 287
PX[9] = 258
PY[9] = 1014
CX[9] = 424
CY[9] = 290
PX[10] = 265
PY[10] = 1019
CX[10] = 428
CY[10] = 268
PX[11] = 261
PY[11] = 1021
CX[11] = 386
CY[11] = 337
PX[12] = 250
PY[12] = 1022
CX[12] = 451
CY[12] = 291
PX[13] = 244
PY[13] = 1021
CX[13] = 367
CY[13] = 272
PX[14] = 244
PY[14] = 1021
CX[14] = 360
CY[14] = 309
PX[15] = 252
PY[15] = 1030
CX[15] = 363
CY[15] = 289
PX[16] = 270
PY[16] = 1030
CX[16] = 0
CY[16] = 0
PX[17] = 270
PY[17] = 1043
CX[17] = 0
CY[17] = 0
PX[18] = 274
PY[18] = 1043
CX[18] = 0
CY[18] = 0
PX[19] = 278
PY[19] = 1067
CX[19] = 367
CY[19] = 320
PX[20] = 274
PY[20] = 1063
CX[20] = 334
CY[20] = 285
PX[21] = 274
PY[21] = 1057
CX[21] = 360
CY[21] = 289
PX[22] = 275
PY[22] = 1056
CX[22] = 452
CY[22] = 288
PX[23] = 276
PY[23] = 1052
CX[23] = 365
CY[23] = 267
PX[24] = 276
PY[24] = 1045
CX[24] = 381
CY[24] = 329
PX[25] = 277
PY[25] = 1034
CX[25] = 0
CY[25] = 0
PX[26] = 284
PY[26] = 1034
CX[26] = 398
CY[26] = 301
PX[27] = 285
PY[27] = 1023
CX[27] = 0
CY[27] = 0
PX[28] = 290
PY[28] = 1023
CX[28] = 449
CY[28] = 286
PX[29] = 297
PY[29] = 1021
CX[29] = 432
CY[29] = 294
PX[30] = 309
PY[30] = 1015
CX[30] = 450
CY[30] = 290
PX[31] = 309
PY[31] = 1021
CX[31] = 363
CY[31] = 313
PX[32] = 307
PY[32] = 1023
CX[32] = 365
CY[32] = 290
PX[33] = 314
PY[33] = 1028
CX[33] = 446
CY[33] = 267
PX[34] = -1
PY[34] = -1
CX[34] = 0
CY[34] = 0
Mining (PX, PY, CX, CY)
end sub
sub Mining(PX, PY, CX, CY)
var WaitCounter
var i
var CurX
var CurY
var CurDir
for i=0 to 99
UO.Print("Current position: "+STR(i))
if UO.Weight > 700 then
goto FinishWork
end if
if PX[i]==-1 || PY[i]==-1 then
goto FinishWork
end if
if PX[i]==0 || PY[i]==0 then
goto NextPoint
end if
MoveTo(PX[i], PY[i])
if CX[i]==0 || CY[i]==0 then
goto NextPoint
end if
StartPixaxing:
UO.DeleteJournal()
# UO.Print("Using pixaxe...")
UO.UseType(0x0E85)
wait(500)
WaitCounter = 0
# UO.Print("Wait for aim...")
while UO.InJournal("Where do you want")==0 && WaitCounter<50
WaitCounter = WaitCounter + 1
wait(100)
if UO.Life<150 then
UO.Say("Guards")
UO.Exec("bandageself")
wait(6000)
end if
wend
if WaitCounter>=50 then
goto StartPixaxing
end if
wait(300)
# UO.Print("Start pixaxing...")
UO.LClick(CX[i], CY[i]);
wait(100)
WaitCounter = 0
# UO.Print("Wait for pixaxing result...")
while UO.InJournal("You put")==0 && UO.InJournal("There is no")==0 && WaitCounter<100
WaitCounter = WaitCounter + 1
wait(100)
if UO.Life<150 then
UO.Say("Guards")
UO.Exec("bandageself")
wait(6000)
end if
wend
if UO.InJournal("There is no")==0 then
# UO.Print("Try to pixaxe here again...")
goto StartPixaxing
end if
# UO.Print("There is no ore found, move to next position")
NextPoint:
next
FinishWork:
CurX = UO.GetX()
CurY = UO.GetY()
CurDir = UO.GetDir()
while 1
UO.Print("Work has been finished !")
if CurX<>UO.GetX() || CurY<>UO.GetY() || CurDir<>UO.GetDir() then
return 0
end if
wait(1000)
wend
end sub
sub MoveTo(NeedX, NeedY)
var CurX
var CurY
var CurDir
var CurDirPriority
var i
var WaitCounter
UO.Print("MoveTo: "+STR(NeedX)+","+STR(NeedY))
CurDirPriority = 1
while 1
if UO.Life<150 then
UO.Say("Guards")
UO.Exec("bandageself")
wait(6000)
end if
if UO.GetX() == NeedX && UO.GetY() == NeedY then
return 1
end if
CurX = UO.GetX()
CurY = UO.GetY()
CurDir = UO.GetDir()
UO.Print("Cur: "+STR(CurX)+","+STR(CurY))
if UO.GetX()==NeedX && CurDirPriority==2 then
CurDirPriority = 1
end if
UO.Print("Step direction priority: "+STR(CurDirPriority))
if UO.GetY()<NeedY && CurDirPriority == 1 then
UO.Press(35)
else
if UO.GetY()>NeedY && CurDirPriority == 1 then
UO.Press(33)
else
if UO.GetX()<NeedX then
UO.Press(34)
else
if UO.GetX()>NeedX then
UO.Press(36)
end if
end if
end if
end if
WaitCounter = 0
while UO.GetX()==CurX && UO.GetY()==CurY && UO.GetDir()==CurDir && WaitCounter<50
WaitCounter = WaitCounter + 1
wait(100)
wend
if WaitCounter==50 then
CurDirPriority = 3 - CurDirPriority
end if
wait(100)
wend
end sub