sub Mining() UO.SetGlobal('action','1') UO.SetGlobal('MaxRange','2') uo.mfgi( 'resend' ) extraction() end sub Sub extraction() VAR mX = UO.GetX('self'), mY = UO.GetY('self'), mZ = UO.GetZ('self') for Y = -val(uo.GetGlobal('MaxRange')) to val(uo.GetGlobal('MaxRange')) for X = -val(uo.GetGlobal('MaxRange')) to val(uo.GetGlobal('MaxRange')) if val(uo.GetGlobal('action')) == 1 then Tiles = MiningTiles(mX+X, mY+Y) end if if Tiles then repeat CheckAll() UO.DeleteJournal() UO.WaitTargetTile(Tiles, mX+X, mY+Y, mZ) Tools() LastTimer=UO.Timer() repeat wait( delay1 ) until UO.InJournal( allmsg ) || UO.Timer()>LastTimer+delay2 || UO.Weight > MaxVes || UO.Dead() CheckAll() until UO.InJournal( endmsg ) || UO.Timer()>LastTimer+delay3 || UO.Weight > MaxVes || UO.Dead() uo.mfgi( 'add', '7847', mX+X, mY+Y, mZ ) end if next next UO.Set('quiet','0') uo.charprint('self', printcolour, 'ÂÑÅ!') UO.Sound(100) end sub Sub CheckAll() If UO.Weight > MaxVes Then UO.Set('quiet','0') uo.charprint('self', printcolour, 'Ïåðåãðóç!') return endif end sub Sub Tools() if val(uo.GetGlobal('action')) == 1 then if UO.Count(Shovel1) then UO.UseType(Shovel1) return else if UO.Count(Shovel2) then UO.UseType(Shovel2) return else if UO.Count(Pickaxe1) then UO.UseType(Pickaxe1) return else if UO.Count(Pickaxe2) then UO.UseType(Pickaxe2) return else UO.Set('quiet','0') uo.charprint('self', printcolour, 'Íå÷åì êîïàòü!') MyTerminate() endif endif endif endif end if end sub Sub MiningTiles(X,Y) 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 end sub Sub Gong(times); play wav-file VAR i for i=1 to times UO.Exec("playwav C:\WINDOWS\Media\ringin.wav") wait(500); time to play sample at once next end sub Sub DeleteJournal(msg) While UO.InJournal(msg) UO.SetJournalLine(UO.InJournal(msg) - 1,'') wend endsub Sub MyTerminate() UO.Set('quiet','1') UO.CancelMenu() UO.IgnoreReset() UO.Set('quiet','0') UO.Exec('terminate all') end sub Sub checklag() DeleteJournal("ackpack") UO.Click("backpack") repeat wait(100) until UO.InJournal("ackpack") end sub sub clean(); î÷èñòêà òî÷åê äîáû÷è var m = 50 for Y = -m to m for X = -m to m uo.mfgi( 'clear', mX+X, mY+Y, mZ ) next next end sub
собственно скрипт зарание благодарю
|