Скрипт на фишинг

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Tukula
Posts: 10
Joined: 2006-03-17 20:23:57
Contact:

Скрипт на фишинг

Post by Tukula »

Я вот только сегодня нашол ваш форум и решил поделится скриптами :)

Фишинг:
Сам ишит де ловить, дроп и т.д всё есть!

var RandomFlag = 0
var UpOrFish = 1
var GZExist = 0
var GZTimer = 0
var NextDot = 0
var bandages = "0x02e1"
var meal = "0x097b"
var SOSBP = "ground"
var MapBP = "ground"
var Enemy = "self"
var WType = "0x0F51"
var fPole = "0x0dbf"
var fTime = 3500
var fPoleSize = 0
var GlobalFileMap = 'fpoint.map'
var FishLagTimer = 0

sub main()
Init()
var EnemyExists, EatTimer, fPoint
DIM FishingMap[121]
DIM FishingStuff[6]
FishingStuff[0] = "0x09CC" # Grey Fish
FishingStuff[1] = "0x09CD" # Green Fish
FishingStuff[2] = "0x09CE" # Blue Fish
FishingStuff[3] = "0x09CF" # Yellow Fish
FishingStuff[4] = "0x099F" # SOS bottle
FishingStuff[5] = "0x14ED" # old tattered map

if CheckFExist(GlobalFileMap) then
ReadFile(GlobalFileMap, FishingMap)
else
fPoleSize = CreateMap(FishingMap)
SToFile(FishingMap, fPoleSize, GlobalFileMap)
endif
FishLagTimer = UO.Timer()
SetFishTime(FishingMap[0])
fPoint = 0
repeat
CheckSave()
If ((UO.Timer() - EatTimer) > 3000) then
EatCheck()
EatTimer = UO.Timer()
EndIf
While CheckDanger()
TryToRes(1)
UO.DeleteJournal()
WEnd
CheckEq(fPole)
If UpOrFish Then
if NextDot Then
fPoint = fPoint + 1
NextDot = 0
else
fPoint = fPoint
endif
if (fPoint == fPoleSize) then
fPoint = 0
endif
Else # UpOrFish
if RandomFlag then
fPoint = UO.Random(fPoleSize)
else # RandomFlag
fPoint = fPoint + 1
if (fPoint == fPoleSize) then
fPoint = 0
endif # fPoint == fPoleSize
endif # RandomFlag
EndIf # UpOrFish
If ((UO.Timer() - FishLagTimer) > 9000) then
SetFishTime(FishingMap[fPoint])
FishLagTimer = UO.Timer()
EndIf
Fish(FishingMap[fPoint])
If (UO.Weight > 370) Then
DropIt(FishingStuff)
EndIf
until false
end sub

sub GZCheck()
var GZE = 0
CheckSave()
UO.ServerPrint('.guards')
Wait(5000)
if CheckMsg('This area is not watched','System') then
UO.Print('No guards')
else
GZE = 1
UO.Print('Guard Zone!')
endif
return GZE
end sub

sub Init()
UO.TextOpen()
UO.TextPrint('Ne?eio noa?oiaae: '+MakeTime())
UO.Exec('terminate Reconnector')
UO.Exec('exec Reconnector')
Wait(2000)
UO.Print('An exceptional fishing script v1.0 Release [crafted by Tpynuk]')
Wait(2000)
GZTimer = UO.Timer()
GZExist = GZCheck()
UO.Set('norbcheck','1')
UO.Set('norbcalc','1')
UO.Set('finddistance','3')
UO.Set('distance','2')
end sub

sub CreateMap(mapArray)
DIM tileArray[7]
tileArray[0] = '0'
tileArray[1] = '6039'
tileArray[2] = '6040'
tileArray[3] = '6041'
tileArray[4] = '6042'
tileArray[5] = '6043'
tileArray[6] = '6044'
DIM FishMsg[6]
FishMsg[0] = 'You catch'
FishMsg[1] = 'You find'
FishMsg[2] = 'That location'
FishMsg[3] = 'That is too far'
FishMsg[4] = 'There does'
FishMsg[5] = 'You can'
var mX, mY, mZ, StopFuckingSearch, nTileNum, cDelta, dX, dY
cDelta = 5
mX = UO.GetX()
mY = UO.GetY()
mZ = '251'
var mSize = 0
nTileNum = 0
for dX = -cDelta to cDelta
for dY = -cDelta to cDelta
StopFuckingSearch = 0
nTileNum = 0
repeat
CheckSave()
CheckEq(fPole)
UO.Print('Fishing @: '+tileArray[nTileNum]+' '+STR(mX+dX)+' '+STR(mY+dY)+' '+mZ)
Fish(tileArray[nTileNum]+' '+STR(mX+dX)+' '+STR(mY+dY)+' '+mZ)
if (CheckMsg(FishMsg[0],'System') or CheckMsg(FishMsg[1],'System')) Then
mapArray[mSize] = tileArray[nTileNum]+' '+STR(mX+dX)+' '+STR(mY+dY)+' '+mZ
mSize = mSize + 1
StopFuckingSearch = 1
else
if CheckMsg(FishMsg[2],'System') then
StopFuckingSearch = 1
endif
endif
UO.DeleteJournal()
nTileNum = nTileNum + 1
if (nTileNum == 7) then
StopFuckingSearch = 1
endif
until StopFuckingSearch
next
next
Return mSize
end sub

sub CheckMsg(cMsg, mAuthor)
var ij
ij = UO.InJournal(cMsg)
if ij Then
if (UO.JournalSerial(ij+1) == mAuthor) then
return ij+1
else
if (mAuthor == 'System') and (UO.JournalSerial(ij+1) == '0x01010101') then
return ij+1
endif
endif
else
return 0
endif
end sub

sub CheckFExist(fName)
var FileResult = 0
var xx = file(fName)
FileResult = safe call xx.Open()
Return FileResult
end sub

sub SToFile(wtSave, wtsSize, fName)
var wtsLNum
var f=file(fName)
f.Create()
f.Open()
f.WriteLn(STR(wtsSize))
for wtsLNum = 0 to (wtsSize - 1)
f.WriteLn(wtSave[wtsLNum])
next
f.Close()
end sub

sub ReadFile(fName, Pole)
var tFile = file(fName)
var LLLine, lNum, lSize
tFile.Open()
lSize = safe call tFile.ReadNumber()
fPoleSize = lSize
safe call tFile.ReadLn()
if ((lSize > 0) and IsNumber(lSize)) then
for lNum = 0 to fPoleSize - 1
LLLine = safe call tFile.ReadLn()
Pole[lNum] = Left(LLLine,LEN(LLLine)-1)
next
else
Message('Oaee iono')
UO.Exec("terminate all")
endif
UO.TextPrint('Eiee?anoai oi?ae aueiaa: '+STR(lSize))
tFile.Close()
end sub

sub AutoLootSelf()
var CorpseType, CorpseID, SelfID
SelfID = UO.GetSerial()
UO.Click(SelfID)
UO.IgnoreReSet()
If (UO.GetGraphic(UO.GetSerial()) == '0x0190') Then
CorpseType = '0x2006'
Else
CorpseType = '0x2006'
EndIf
UO.FindType(CorpseType,'-1','ground')
If (UO.FindCount() > 0) then
repeat
UO.FindType(CorpseType,'-1','ground')
CorpseID = UO.GetSerial('finditem')
UO.Click(CorpseID)
if (Right(UO.GetName(CorpseID),Len(UO.GetName(SelfID))) == UO.GetName(SelfID)) Then
UO.Emptycontainer('50',CorpseID)
Wait(500)
UO.Emptycontainer('50',CorpseID)
Wait(500)
endif
UO.Ignore(CorpseID)
UO.FindType(CorpseType,'-1','ground')
until (UO.FindCount() == 0)
endif
end sub

sub CheckSpells()
VAR Si, nStop, Result, JPos
JPos = 0
Si = 0
nStop = 1
Result = 0
DIM BadSpells[20]
BadSpells[0] = "In Por Ylem"
BadSpells[1] = "An Mani"
BadSpells[2] = "Vas Flam"
BadSpells[3] = "In Nox"
BadSpells[4] = "Des Sanct"
BadSpells[5] = "In Flam Grav"
BadSpells[6] = "Ort Grav"
BadSpells[7] = "In Jux Hur Ylem"
BadSpells[8] = "Por Corp Wis"
BadSpells[9] = "An Ex Por"
BadSpells[10] = "Corp Por"
BadSpells[11] = "Vas Ort Flam"
BadSpells[12] = "In Ex Grav"
BadSpells[13] = "Vas Flam"
BadSpells[14] = "Kal Vas Xen"
BadSpells[15] = "attacking you*"
BadSpells[16] = "Ort Rel"
BadSpells[17] = "Ort Sanct"
BadSpells[18] = "Flam Kal Des Ylem"
BadSpells[19] = "In Vas Por"
While nStop
JPos = UO.InJournal(BadSpells[Si])
If JPos Then
UO.TextPrint("?a? '"+UO.GetName(UO.JournalSerial(JPos-1))+"' - caoeene?iaaia aoaea.")
UO.ServerPrint(UO.GetName(UO.JournalSerial(JPos-1))+" ne kill pliz ya nub na macrose!!!")
Result = 1
EndIf
Si = Si + 1
If ((Si == 20) or (Result == 1)) Then
nStop = 0
EndIf
WEnd
Return Result
end sub

sub IsDanger(dcNum)
DIM PEnemy[4]
PEnemy[0] = '0x0010'
PEnemy[1] = '0x0096'
PEnemy[2] = '0x0190'
PEnemy[3] = '0x0191'
VAR Danger_cnt, Cycle_cnt, EmergencyFlag, EnemyId
EnemyId = 0
EmergencyFlag = 0
UO.IgnoreReset()
UO.Set('finddistance','10')
if (dcNum < 4) Then
UO.IgnoreReSet()
UO.FindType(PEnemy[dcNum],'-1','ground')
Danger_cnt = UO.FindCount()
If Danger_cnt > 0 Then
For Cycle_cnt = 0 To Danger_cnt - 1
UO.FindType(PEnemy[dcNum],'-1','ground')
EnemyId = UO.GetSerial('finditem')
If ((UO.GetNotoriety(EnemyId) >= 3) and (UO.GetSerial(EnemyId) <> UO.GetSerial())) Then
UO.Click(EnemyId)
UO.TextPrint('Iaeaai iioaioeaeuiue a?aa, eiy ?a?a: '+UO.GetName(EnemyId))
EmergencyFlag = 1
Enemy = EnemyId
EndIf
UO.Ignore(EnemyId)
Next
EndIf
EndIf
UO.IgnoreReSet()
If (dcNum == 4) Then
EmergencyFlag = CheckSpells()
EndIf
Return EmergencyFlag
end sub

sub TryToRes(HealFlag)
var ResFlag = 0
If UO.Dead() Then
Repeat
UO.Recall('self','1')
Wait(6000)
Until (NOT UO.Dead())
AutoLootSelf()
ResFlag = 1
EndIf
if HealFlag Then
if ResFlag then
AutoLootSelf()
DropRangerStuff()
endif
Heal()
endif
end sub

sub DropRangerStuff()
var iX
DIM RangerTool[3]
RangerTool[0] = "0x13B2"
RangerTool[1] = "0x0F4F"
RangerTool[2] = "0x13FD"

DIM RangerArr[3]
RangerArr[0] = "0x0F3F"
RangerArr[1] = "0x1BFB"
RangerArr[2] = "0x1BFB"
For iX = 0 to 2
UO.FindType(RangerTool[iX],'-1','my')
UO.Drophere(UO.GetSerial('finditem'))
Wait(500)
Stack(RangerArr[iX])
Wait(500)
Next
end sub

sub GetRangerStuff()
var iX = 0, StopMe = 0
DIM RangerTool[3]
RangerTool[0] = "0x13B2"
RangerTool[1] = "0x0F4F"
RangerTool[2] = "0x13FD"

DIM RangerArr[3]
RangerArr[0] = "0x0F3F"
RangerArr[1] = "0x1BFB"
RangerArr[2] = "0x1BFB"
repeat
UO.FindType(RangerTool[iX],'-1','ground')
If (UO.FindCount() and (not StopMe)) Then
WType = RangerTool[iX]
UO.Grab('0',UO.GetSerial('finditem'))
Wait(500)
UO.FindType(RangerArr[ix],'-1','ground')
if UO.FindCount() Then
UO.Grab('100',UO.GetSerial('finditem'))
Wait(500)
endif
StopMe = 1
endif
iX = iX + 1
until (StopMe or (iX == 3))
Return WType
end sub

sub Guards()
if ((UO.Timer() - GZTimer) >= 100) then
UO.ServerPrint('.guards')
Wait(500)
UO.ServerPrint('.guards')
GZTimer = UO.Timer()
endif
end sub

sub TryToKill()
var TTKi,TTKStop, TTKUse, TTKGrabN, WTWeap
TTKi = 0
TTKStop = 0
TTKGrabN = 0
If (GZExist and (UO.GetNotoriety() < 3)) then
Guards()
Else
DropRangerStuff()
Wait(500)
GetRangerStuff()
If (UO.GetGraphic(UO.ObjAtLayer('Rhand')) <> WType) Then
UO.Disarm()
Wait(500)
EndIf
Wait(200)
UO.EquipT('Rhand',WType)
Wait(500)
Repeat
UO.WarMode(1)
UO.Attack(Enemy)
Wait(3000)
Heal()
Until ((UO.GetHP(Enemy) == 0) or UO.Dead(Enemy) or UO.Dead() or (UO.GetDistance(Enemy) > 12))
DropRangerStuff()
EndIf
end sub

sub CheckDanger()
Var dX, DangerFactor, DangerResult
dX = 0
DangerFactor = 0
DangerResult = 0
dX = 0
Repeat
DangerResult = IsDanger(dX)
If (DangerResult > 0) Then
If (dX < 4) Then
TryToKill()
Else
UO.ServerPrint('Vaxanekillpliz!!!')
EndIf
DangerFactor = 1
EndIf
dX = dX + 1
Until (dX == 5) or (DangerResult)
Return DangerFactor
end sub


sub EatCheck()
var GHS, Hung_i, Meal
GHS = 0
Meal = '0x097b'
GHS = GetHungryStatus()
UO.TextPrint('GHS = '+STR(GHS))
If (GHS > 1) then
For Hung_i = 0 To (GHS - 2)
Eat(Meal)
Wait(350)
Next
EndIf
end sub

sub Eat(wtEat)
If UO.Count(wtEat) then
UO.UseType(wtEat)
else
If UO.CountGround(wtEat) then
UO.UseFromGround(wtEat)
else
UO.Print('No meal found.')
endif
endif
end sub

sub GetHungryStatus()
VAR Ret_i, Cycle_i, LastStr
DIM HArr[11]
HArr[0] = "You are absolutely stuffed!"
HArr[1] = "You are stuffed"
HArr[2] = "You aren't hungry at all"
HArr[3] = "You are a little hungry"
HArr[4] = "You are somewhat hungry"
HArr[5] = "You are REALLY hungry"
HArr[6] = "Your stomash hurts"
HArr[7] = "Your stomash hurts and you feel dizzy"
HArr[8] = "You are starving"
HArr[9] = "You are almost dying of hunger"
HArr[10] = "You are DYING of hunger..."
UO.DeleteJournal()
UO.ServerPrint(".hungry")
Ret_i = 0
Cycle_i = 0
Wait(400)
For Cycle_i = 0 To 10
If CheckMsg(HArr[Cycle_i],'System') Then
Ret_i = Cycle_i
EndIf
Next
RETURN Ret_i
end sub

sub Stack(StackType)
var GroundItem, PackItem
PackItem = ''
GroundItem = ''
if UO.Count(StackType) then
PackItem = '^'+StackType
endif
if UO.CountGround(StackType) then
GroundItem = '~'+StackType
endif
if ((PackItem <> '') and (GroundItem <> '')) then
UO.MoveItem(PackItem,STR(UO.GetQuantity(PackItem)),GroundItem,'0','0','0')
else
UO.DropHere('^'+StackType)
Endif
end sub

sub Heal()
If UO.Poisoned() Then
if (UO.SkillVal('Healing') > 730) then
Repeat
UO.WaitTargetObject(UO.GetSerial('self'))
UO.UseFromGround('0x0E21')
Wait(5000)
Until ((Not UO.Poisoned()) or UO.Dead())
else
Repeat
UO.ServerPrint("Cure")
UO.UseFromGround('0x0F07')
Wait(4000)
Until ((Not UO.Poisoned()) or UO.Dead())
endif
EndIf
If ((UO.GetHP() < UO.GetMaxHP()) and UO.Life) Then
if (UO.SkillVal('Healing') > 0) then
Repeat
UO.WaitTargetObject(UO.GetSerial('self'))
UO.UseFromGround('0x0E21')
Wait(5000)
Until ((UO.GetHP() == UO.GetMaxHP()) or UO.Dead())
else
Repeat
UO.ServerPrint("Heal")
UO.UseFromGround('0x0F0C')
Wait(4000)
Until ((UO.GetHP() == UO.GetMaxHP()) or UO.Dead())
endif
EndIf
end sub

sub CheckEq(cType)
if (UO.Hex2Int(UO.GetGraphic(UO.ObjAtLayer('Lhand'))) <> UO.Hex2Int(cType)) Then
UO.Unequip('Lhand')
UO.Unequip('Rhand')
Wait(1000)
if UO.Count(cType) then
UO.UseType(cType)
Wait(400)
else
UO.FindType(cType,'-1','ground')
if UO.FindCount() Then
UO.Grab('1',UO.GetSerial('finditem'))
Wait(1000)
UO.UseType(cType)
Else
if (UO.Count(cType)+UO.CountGround(cType) == 0) then
UO.ServerPrint('Vaxa, u menya kon4ilis udochki!!!')
UO.Exec('terminate all')
UO.CloseUO()
endif
EndIf
EndIf
EndIf
end sub

sub CheckSave()
If CheckMsg("Saving World State",'System') Then
UO.Print("WorldSave: "+MakeTime())
UO.DeleteJournal()
Wait(25000)
EndIf
end sub

sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub

sub DropIt(WTF)
var DropCnt
For DropCnt = 0 to 3
if UO.Count(WTF[DropCnt]) Then
Stack(WTF[DropCnt])
EndIf
Next
While (UO.Count(WTF[4]) > 0)
UO.MoveItem('^'+WTF[4],'1',SOSBP)
Wait(400)
WEnd
While (UO.Count(WTF[5]) > 0)
UO.MoveItem('^'+WTF[5],'1',MapBP)
Wait(400)
WEnd
end sub

sub Fish(tPoint)
UO.WarMode(0)
CheckSave()
UO.Exec('waittargettile '+tPoint)
UO.UseObject(UO.ObjAtLayer('Lhand'))
Wait(fTime)
If CheckMsg('There does','System') then
NextDot = 1
EndIf
end sub

sub SetFishTime(fTile)
var fRes = 0
var fTmp
CheckEq(fPole)
fTime = 0
Fish(fTile)
fTmp = UO.Timer()
repeat
Wait(50)
until (CheckMsg('You catch','System') or CheckMsg('They','System') or CheckMsg('Your tool','System') or CheckMsg('There does','System') or CheckMsg('You find','System') or UO.Dead() or CheckMsg('I am already','System'))
fRes = UO.Timer() - fTmp
fTime = fRes * 100
if ((fTime < 3400) or (fTime > 6000)) Then
fTime = 3400
endif
end sub

sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LDblClick(357,164)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
UO.Exec('terminate main')
UO.Exec('exec main')
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub
Tukula
Posts: 10
Joined: 2006-03-17 20:23:57
Contact:

Post by Tukula »

Лимбер:
рубит при определённом весе несёт дерево на лодку
кординаты лодки:
var near_lodka_x = 2982
var near_lodka_y = 238
кординаты борта:
var on_board_x = 2979
var on_board_y = 238
иди ключа:
var id_keys = "0x57869D1C"
иди трапа:
var id_trap = "0x5A338098"
тайлы деревьев:
a[1] = "3288 2984 237 0"
a[2] = "3283 2984 240 0"
a[3] = "3293 2984 246 0"
a[4] = "3290 2988 249 0"
a[5] = "3280 2988 246 0"
a[6] = "3283 2988 243 0"
a[7] = "3299 2988 240 0"
a[8] = "3286 2992 234 0"
a[9] = "3283 2992 240 0"
a[10] = "3290 2992 246 0"
a[11] = "3280 2996 237 0"
a[12] = "3280 2996 234 0"
a[13] = "3290 2996 246 0"
a[14] = "3280 2996 249 0"
a[15] = "3288 2996 252 0"

Code: Select all

var command_use = 0 
var wood_needed = 1 

var near_lodka_x = 2982 
var near_lodka_y = 238 

var on_board_x = 2979
var on_board_y = 238 

var id_keys = "0x57869D1C" 
var id_trap = "0x5A338098" 

var opt_weight = 240 

sub main() 
uo.exec ("terminate reconnector") 
uo.exec ("exec reconnector") 
uo.deletejournal() 
uo.exec ("set finddistance 1") 
uo.exec ("useobject backpack") 
var i,b,f,tile,xx,yy,j 
dim x[50] 
dim y[50] 
dim t[50] 
dim a[50] 

start: 

a[1] = "3288 2984 237 0" 
a[2] = "3283 2984 240 0" 
a[3] = "3293 2984 246 0" 
a[4] = "3290 2988 249 0" 
a[5] = "3280 2988 246 0" 
a[6] = "3283 2988 243 0" 
a[7] = "3299 2988 240 0" 
a[8] = "3286 2992 234 0" 
a[9] = "3283 2992 240 0" 
a[10] = "3290 2992 246 0" 
a[11] = "3280 2996 237 0" 
a[12] = "3280 2996 234 0" 
a[13] = "3290 2996 246 0" 
a[14] = "3280 2996 249 0" 
a[15] = "3288 2996 252 0" 



lodka() 
for j = 1 to 50 
if a[j] then 
b = a[j] 
i = 1 
t[j] = b[0] 
while b[i] <> " " 
t[j] = t[j] + b[i] 
i = i + 1 
wend 
i = i + 1 
x[j] = b[i] 
while b[i] <> " " 
x[j] = x[j] + b[i+1] 
i = i + 1 
wend 
i = i + 1 
y[j] = b[i] 
while b[i] <> " " 
y[j] = y[j] + b[i+1] 
i = i + 1 
wend 
xx = val(x[j]) 
yy = val(y[j]) 
tile = val(t[j]) 
uo.print("Tile: "+t[j]+" X: "+x[j]+" Y: "+y[j]) 
uo.print("Tree number "+str(j)) 
rubka(xx,yy,tile) 
endif 
next 
goto start: 
end sub 

sub rubka(xx,yy,tile) 
uo.deletejournal() 
var a,b,c 
uo.print (str(xx)+" "+str(yy)) 
var D = 1 
var T = "True" 
var x = xx 
var y = yy 
GoToTile(x,y,d,t) 
c = uo.timer() 
uo.exec ("waittargettile "+str(tile)+" "+str(xx)+" "+str(yy)+" 0") 
wait (500) 
uo.exec ("usetype 0x0F47") ### hachet 
repeat 
wait (500) 
until uo.injournal("There's not enough wood here to chop") or uo.timer() > c + 1800 or uo.injournal("That is too far away") 
vibros() 
wait(2000) 
a = uo.getx() 
b = uo.gety() 
lodka() 
end sub 


sub lodka() 
var x = near_lodka_x 
var y = near_lodka_y 
var prec = 0 
if uo.weight > opt_weight or command() == 1 then 
var d,t 
var f = 0 
d = 1 
t = "True" 
gototile(x,y,d,t) 
while uo.getdistance(id_trap) > 1 
uo.exec ("useobject "+id_trap+";useobject "+id_trap) ### ID trapa 
wait (2000) 
wend 
vibros() 
if command() == 1 then 
uo.print("terminate") 
f = 1 
endif 
hungry() 
if f == 1 then 
uo.exec ("closeuo") 
uo.exec("terminate all") 
endif 
while uo.getdistance(id_trap) < 2 
uo.exec ("useobject "+id_trap) 
gotoxy(uo.getx(id_trap),uo.gety(id_trap),0) 
wait (3000) 
wend 
endif 
end sub 

sub vibros() 
uo.exec ("set finddistance 1") 
var i,l 
var type = "0x1BDD" 
var container, color 
dim derevo[17] 
derevo[1] = "0x0000" # normum 
derevo[2] = "0x0362" # jade 
derevo[3] = "0x010D" # oak 
derevo[4] = "0x0094" # karund 
derevo[5] = "0x01B0" # leshram 
derevo[6] = "0x01A2" # turmalit 
derevo[7] = "0x0026" # emerint 
derevo[8] = "0x00CB" # legrand 
derevo[9] = "0x094A" # solmur 
derevo[10] = "0x092B" # kleor 
derevo[11] = "0x0931" # logradum 
derevo[12] = "0x093F" # vialonit 
derevo[13] = "0x0074" # stardust 
derevo[14] = "0x09EF" # pironil 
derevo[15] = "0x006F" # mystic 
derevo[16] = "0x0119" # elvin 
derevo[17] = "0x000B" # elkris 
var nugnoe = wood_needed 
# vibros ne nugnogo dereva 
if nugnoe > 1 then 
for i = 1 to nugnoe - 1 
color = derevo[i] 
l = 0 
container = "ground" 
drop(type,color,l,container) 
next 
endif 
# skladivanie nugnogo dereva 
if uo.getx() == on_board_x and uo.gety() == on_board_y then 
uo.print ("Dropping") 
for i = nugnoe to 17 
if uo.count(type) <> 0 then 
color = derevo[i] 
l = 1 
container = "ground" 
drop(type,color,l,container) 
wait (750) 
endif 
next 
endif 
if uo.count("0x097B") <= 1 then 
uo.exec ("findtype 0x097B -1 ground") 
uo.exec ("moveitem finditem 10 backpack") 
endif 
end sub 

sub drop(type,color,l,container) 
var serial=0 
if l == 1 then 
UO.FindType(type,color,"backpack") 
if uo.findcount() <> 0 then 
serial=UO.GetSerial("finditem") 
UO.Ignore(serial) 
if container=="ground" then 
UO.FindType(type,color,"ground") 
if UO.FindCount()>0 then 
if uo.getquantity("finditem") < 59000 then 
UO.MoveItem(serial,"0","finditem","0","0","0") 
else 
UO.DropHere(serial) 
endif 
else 
uo.ignore ("finditem") 
UO.DropHere(serial) 
endif 
else 
UO.MoveItem(serial,"0",container) 
endif 

wait(1000) 
endif 
else 
uo.findtype(type,color,"backpack") 
if uo.findcount() <> 0 then 
uo.exec ("drop 0 0 0 0 finditem") 
wait (500) 
endif 
wait (500) 
endif 
UO.IgnoreReset() 
end sub 


var need_hungry_level = 1 
sub hungry() 
var i,htest,htime,htest2 
dim a[11] 
a[0] = "You are absolutely stuffed" 
a[1] = "You are stuffed" 
a[2] = "You aren't hungry at all" 
a[3] = "You are a little hungry" 
a[4] = "You are somewhat hungry" 
a[5] = "You are REALLY hungry" 
a[6] = "Your stomash hurts" 
a[7] = "Your stomash hurts and you feel dizzy" 
a[8] = "You are starving" 
a[9] = "You are almost dying of hunger" 
a[10] = "You are DYING of hunger" 
htest = 0 
repeat 
uo.deletejournal() 
uo.serverprint(".hungry") 
wait (1000) 
i = 0 
htest2 = 0 
if uo.count("0x097B") > 0 then 
repeat 
if uo.injournal(a[i]) then 
if (i - need_hungry_level) > 0 then 
uo.exec("usetype 0x097B") 
repeat 
wait (50) 
until uo.injournal("Tasty!") or uo.injournal("Good!") or uo.injournal("Yum!") or uo.injournal("I am already") or uo.injournal("123") 
htest2 = 1
else 
htest = 1 
htest2 = 1 
endif 
endif 
i = i + 1 
until i == 11 or htest2 == 1 
else 
htest = 1 
endif 
until htest == 1 
endsub 

#Ïðè ðàáîòå äîëæíà áûòü "îòæàòà" êíîïêà NumLock 
Var MoveDelay=500 # Ïðîìåæóòîê ìåæäó øàãàìè 
Var MoveNumber=1 # Êîëè÷åñòâî øàãîâ ïðè ñìåíå äèñëîêàöèè 
Var Ep=0.174 # Çíà÷åíèå øèðèíû óãëà õîæäåíèÿ ïðè îïðåäåëåíèè íàïðàâëåíèÿ. Åñëè íà ïóòè âñòðå÷àþòñÿ ñëîæíûå è øèðîêèå ïðåïÿòñòâèÿ - óâåëè÷èòü. 0.172 - ñáàëàí÷èðîâàííûé. 
Sub Perp(Dir) 
Var D 
D=Dir 
If Dir==1 Then 
D=3 
EndIf 
If Dir==2 Then 
D=4 
EndIf 
If Dir==3 Then 
D=-1 
EndIf 
If Dir==4 Then 
D=-2 
EndIf 
If Dir==-1 Then 
D=-3 
EndIf 
If Dir==-2 Then 
D=-4 
EndIf 
If Dir==-3 Then 
D=1 
EndIf 
If Dir==-4 Then 
D=2 
EndIf 
RETURN D 
EndSub 

Sub MoveOnce(Dir,Del,Rev) 
Var Num 
If Rev Then 
Num=MoveNumber+1 
Else 
Num=MoveNumber 
EndIf 
If (Num>0) and (Dir<>0) Then 
If Dir==1 Then 
UO.Press(38,Num,Del) 
EndIf 
If Dir==2 Then 
UO.Press(33,Num,Del) 
EndIf 
If Dir==3 Then 
UO.Press(39,Num,Del) 
EndIf 
If Dir==4 Then 
UO.Press(34,Num,Del) 
EndIf 
If Dir==-1 Then 
UO.Press(40,Num-1,Del) 
EndIf 
If Dir==-2 Then 
UO.Press(35,Num,Del) 
EndIf 
If Dir==-3 Then 
UO.Press(37,Num,Del) 
EndIf 
If Dir==-4 Then 
UO.Press(36,Num,Del) 
EndIf 
If Rev Then 
If Dir<>-1 Then 
UO.Press(40,1,Del) 
EndIf 
EndIf 
EndIf 
EndSub 

Sub GetQDir(x,y) 
Var J=0 
If X==0 Then 
J=1 
Else 
If (Y/X)<ep Then 
J=3 
Else 
If (X/Y)<ep Then 
J=1 
Else 
J=2 
EndIf 
EndIf 
EndIf 
RETURN J 
EndSub 

sub GetDir(myx,myy,ox,oy) 
Var I,J 
J=0 
Var X=ox-myx 
Var Y=oy-myy 
I=GetQDir(Abs(X),Abs(Y)) 
If X>=0 Then 
If Y>=0 Then 
If I==1 Then 
J=-2 
Else 
If I==2 Then 
J=-1 
Else 
If I==3 Then 
J=4 
EndIf 
EndIf 
EndIf 
Else 
If I==1 Then 
J=2 
Else 
If I==2 Then 
J=3 
Else 
If I==3 Then 
J=4 
EndIf 
EndIf 
EndIf 
EndIf 
Else 
If Y>=0 Then 
If I==1 Then 
J=-2 
Else 
If I==2 Then 
J=-3 
Else 
If I==3 Then 
J=-4 
EndIf 
EndIf 
EndIf 
Else 
If I==1 Then 
J=2 
Else 
If I==2 Then 
J=1 
Else 
If I==3 Then 
J=-4 
EndIf 
EndIf 
EndIf 
EndIf 
EndIf 
RETURN J 
endsub 

sub abs(a) 
Var b 
If a<0 Then 
b=-a 
Else 
b=a 
endif 
return b 
endsub 

Sub PermResend() 
Var Mn=9 
Repeat 
UO.Resend() 
Wait(MoveDelay*Mn) 
Until (1>2) 
EndSub 

sub max(A,B) 
Var C 
If A>B Then 
C=A 
Else 
C=B 
EndIf 
Return C 
EndSub 

sub GetDistance(X,Y) 
return max(abs(X-uo.getx()),abs(Y-uo.gety())) 
endsub 

sub GoToTile(OX,OY,N,S) 
var myx, myy, MD, J 
var Lx1 ,Ly1 
var Lx2 ,Ly2 
var Sx ,Sy 
var T 
var Des=N 
J=1 
MD=MoveDelay*1.5 
myx=uo.getx() 
myy=uo.gety() 
MoveOnce(GetDir(uo.getx(),uo.gety(),ox,oy),MD,False) 
Sx=0 
Sy=0 
Lx1=uo.getx()/2 
Ly1=uo.gety()/2 
Lx2=Lx1/2 
Ly2=Ly1/2 
T=UO.Timer() 
If (GetDistance(ox,oy)<>N) or ((not S) and GetDistance(ox,oy)>N) Then 
UO.Exec('exec PermResend') 
EndIf 
While ((GetDistance(ox,oy)<>N) or ((not S) and GetDistance(ox,oy)>N)) and (OX>=0) and (OY>=0) 
If ((UO.Timer()-T)*15>MoveDelay) Then 
T=UO.Timer() 
UO.Print(Str(uo.getx())+' '+Str(uo.gety())+' '+Str(ox)+' '+Str(oy)+' '+Str(GetDir(uo.getx(),uo.gety(),ox,oy))+' '+Str(T)) 
Lx2=Lx1 
Ly2=Ly1 
Lx1=myx 
Ly1=myy 
myx=uo.getx() 
myy=uo.gety() 
endIf 
MD=MoveDelay 
If ((OX-uo.getx())*(OX-uo.getx())+(OY-uo.gety())*(OY-uo.gety())>0) Then 
MD=MD*3/GetDistance(ox,oy) 
EndIf 
wait(MD) 
If GetDistance(OX,OY)>Des Then 
MoveOnce(GetDir(uo.GetX(),uo.GetY(),ox,oy),MD,False) 
Else 
If S Then 
If GetDistance(OX,OY)<Des Then 
If GetDistance(OX,OY)<>0 Then 
MoveOnce(GetDir(ox,oy,uo.GetX(),uo.GetY()),MD,False) 
Else 
MoveOnce(GetDir(uo.GetX(),uo.GetY(),Lx2,Ly2),MD,False) 
EndIf 
EndIf 
EndIf 
EndIf 
If GetDistance(OX,OY)<>Des Then 
If (Lx2==uo.getx()) and (Ly2==uo.gety()) Then 
If (Sx<>uo.getx()) or (Sy<>uo.gety()) Then 
J=1 
EndIf 
J=J+1 
UO.Resend() 
Sx = uo.getx() 
Sy = uo.gety() 
Stun(ox,oy,J) 
EndIf 
EndIf 
Wend 
UO.Exec('terminate PermResend') 
endsub 

Sub Stun(X,Y,N) 
Var I 
Var myx 
Var myy 
myx = uo.getx() 
myy = uo.gety() 
For I=1 to N 
MoveOnce(perp(GetDir(myx,myy,x,y)),MoveDelay,False) 
Next 
Wait(MoveDelay) 
UO.Resend() 
If (myx==uo.getx()) and (myy==uo.gety()) Then 
For I=1 to N 
MoveOnce(-perp(GetDir(myx,myy,x,y)),MoveDelay,False) 
Next 
Wait(MoveDelay) 
UO.Resend() 
EndIf 
If (myx==uo.getx()) and (myy==uo.gety()) Then 
For I=1 to N 
MoveOnce(-GetDir(myx,myy,x,y),MoveDelay,False) 
Next 
Wait(MoveDelay) 
Stun(x,y,N) 
EndIf 
EndSub 

sub NearTile(Obj,Des) 
var ox, oy, myx, myy, MD, J 
var Lx1 ,Ly1 
var Lx2 ,Ly2 
var Sx ,Sy 
var T 
UO.Click(Obj) 
MD=MoveDelay*1.5 
ox=uo.GetX(Obj) 
oy=uo.GetY(Obj) 
J=1 
myx = uo.getx() 
myy = uo.gety() 
Sx=0 
Sy=0 
Lx1=myx/2 
Ly1=myy/2 
Lx2=Lx1/2 
Ly2=Ly1/2 
T=UO.Timer() 
If not (UO.GetDistance(Obj)==Des) Then 
UO.Exec('exec PermResend') 
EndIf 
While not (UO.GetDistance(Obj)==Des) 
ox=uo.GetX(Obj) 
oy=uo.GetY(Obj) 
If ((UO.Timer()-T)*15>MoveDelay) Then 
T=UO.Timer() 
UO.Print('Go to '+Str(Des)+' to '+UO.GetName(Obj)) 
UO.Print(Str(UO.GetDistance(Obj))) 
UO.Print(Str(uo.GetX())+' '+Str(uo.GetY())+' '+Str(uo.GetX(Obj))+' '+Str(uo.GetY(Obj))+' '+Str(GetDir(uo.GetX(),uo.GetY(),uo.GetX(Obj),uo.GetY(Obj)))+' '+Str(T)) 
Lx2=Lx1 
Ly2=Ly1 
Lx1=myx 
Ly1=myy 
myx=uo.getx() 
myy=uo.gety() 
endIf 
MD=MoveDelay*1.5 
If (UO.GetDistance(Obj)>0) Then 
MD=MD/UO.GetDistance(Obj) 
EndIf 
wait(MD) 
If UO.GetDistance(Obj)>Des Then 
MoveOnce(GetDir(uo.GetX(),uo.GetY(),uo.GetX(Obj),uo.GetY(Obj)),MD,False) 
Else 
If UO.GetDistance(Obj)<Des Then 
If UO.GetDistance(Obj)<>0 Then 
MoveOnce(GetDir(uo.GetX(obj),uo.GetY(obj),uo.GetX(),uo.GetY()),MD,False) 
Else 
MoveOnce(GetDir(uo.GetX(),uo.GetY(),Lx2,Ly2),MD,False) 
EndIf 
EndIf 
EndIf 
If UO.GetDistance(Obj)<>Des Then 
If (Lx2==uo.getx()) and (Ly2==uo.gety()) Then 
If (Sx<>uo.getx()) or (Sy<>uo.gety()) Then 
J=1 
EndIf 
J=J+1 
UO.Resend() 
Sx = uo.getx() 
Sy = uo.gety() 
Stun(uo.GetX(Obj),uo.GetY(Obj),J) 
EndIf 
EndIf 
Wend 
UO.Exec('terminate PermResend') 
endsub 



var max_wait = 3 #(v secundax) 
sub gotoxy(x,y,prec) 
var ld=0,ldc=0 
var dx,dy 
var mx,my 
var ox,oy,mk,k 
start: 
mx=UO.GetX() 
my=UO.GetY() 
dx=mx-x 
if dx<0 then 
dx=0-dx 
endif 
dy=my-y 
if dy<0 then 
dy=0-dy 
endif 
if dy>dx then 
dx=dy 
end if 
if dx<=prec then 
return 
end if 
if not ldc then 
uo.print("Lag") 
end if 
if dx<3 then 
mk=70 
else 
mk=15 
end if 

ox=mx 
oy=my 
for k=1 to mk 
mx=UO.GetX() 
my=UO.GetY() 
if mx<>ox or my<>oy then 
goto sdidapl 
end if 
wait(10) 
next 
sdidapl: 

mx=UO.GetX() 
my=UO.GetY() 
dx=mx-x 
if dx<0 then 
dx=0-dx 
endif 
dy=my-y 
if dy<0 then 
dy=0-dy 
endif 
if dy>dx then 
dx=dy 
end if 

if dx<=prec then 
return 
end if 
if ld==dx then 
ldc=ldc+1 
if ldc>max_wait then 
uo.print("Can not reach location!") 
return 
end if 
else 
ld=dx 
end if 

if mx==x then 
if my==y then 
return 
endif 
if my>y then 
#UO.Print("UR") 
UO.Press(33) 
goto start 
endif 
#UO.Print("DL") 
UO.Press(35) 
goto start 
end if 
if mx<x then 
if my>y then 
#UO.Print("R") 
UO.Press(39) 
goto start 
endif 
if my==y then 
#UO.Print("DR") 
UO.Press(34) 
goto start 
endif 
#UO.Print("D") 
UO.Press(40) 
goto start 
end if 
if my<y then 
#UO.Print("L") 
UO.Press(37) 
goto start 
endif 
if my==y then 
#UO.Print("LU") 
UO.Press(36) 
goto start 
endif 
#UO.Print("U") 
UO.Press(38) 
goto start 
end sub 

################################################################# 

sub command() 
if command_use == 0 then 
if uo.injournal("go to log out") then 
uo.serverprint("Logouting...") 
return 1 
endif 

if uo.injournal("wait here") then 
repeat 
wait (1000) 
until uo.injournal("continue script") 
endif 

if uo.injournal("openup") then 
if uo.getdistance(id_trap) > 1 then 
gototile(near_lodka_x,near_lodka_y,1,"True") 
endif 
var trap = id_trap 
var kl = id_keys 
uo.exec ("waittargetobject "+trap+"; useobject "+kl) 
uo.serverprint ("Come in on board my friends.") 
var t = uo.timer() 
repeat 
wait (10000) 
uo.exec ("msg .c Hey, man, don't forget to close my ship.") 
until uo.injournal("closedup") or uo.timer() > t + 1200 
if uo.timer() > t + 120 then 
uo.exec ("msg .c Autoclosing") 
endif 
uo.exec ("waittargetobject "+trap+"; useobject "+kl) 
uo.serverprint ("Closed.") 
uo.exec ("showjournal 100") 
endif 
if uo.injournal("speak to you") then 
wait (5000) 
uo.textprint("SPEAKING TO ME:") 
uo.exec ("showjournal 100") 
endif 
return 0 
endif 
endsub 



################################################################################ 
############ 
sub MakeTime() 
VAR D, T, Ret, i 
Ret = STR(UO.Time()) 
T = "" 
For i = 0 To Len(Ret) 
T = Ret[Len(Ret)-i] + T 
If (I == 2) OR (I == 4) Then 
T = ":" + T 
EndIf 
Next 
Ret = STR(UO.Date()) 
D = "" 
For i = 0 To Len(Ret) 
D = Ret[Len(Ret)-i] + D 
If (I == 2) OR (I == 4) Then 
D = "." + D 
EndIf 
Next 
Ret = T + " @ " + D 
RETURN Ret 
end sub 

sub Reconnector() 
var ReconnectTime, RFlag, DisconnectTime 
ReconnectTime = '0' 
RFlag = 1 
Repeat 
While (UO.ObjAtLayer('Bpack') == '') 
if RFlag Then 
ReconnectTime = MakeTime() 
RFlag = 0 
endif 
Wait(30000) # WorldSave Protection 
if (UO.ObjAtLayer('Bpack') == '') then 
DisconnectTime = Maketime() 
UO.Say('') 
Wait(3000) 
UO.Say('') 
Wait(3000) 
UO.Say('') 
Wait(3000) 
UO.LDblClick(357,164) 
UO.LClick(616,459) 
Wait(3000) 
endif 
WEnd 
Wait(3000) 
if (RFlag == 0) and (ReconnectTime <> '0') Then 
UO.Exec('terminate main') 
UO.Exec('exec main') 
UO.TextOpen() 
UO.TextPrint('Disconnected '+DisconnectTime) 
UO.TextPrint('Reconnected '+Maketime()) 
RFlag = 1 
ReconnectTime = '0' 
endif 
Until false 
end sub 

sub test() 
uo.textprint(str(uo.asmmapgettile(2482,3979,0))) 
endsub
Tukula
Posts: 10
Joined: 2006-03-17 20:23:57
Contact:

Post by Tukula »

Мининг:
Бегает по шахте сам копает и тоскает за собой руду (незнаю на коком шарде люди катают могжет не подойти руда т.е тоскать не будить её)

Code: Select all

sub main ()
var i, x, y, z, t, x1, y1, down, pick
UO.exec('terminate reconnector')
UO.exec('exec reconnector')
save()
UO.DeleteJournal ()
UO.Print ("select place to mine")
UO.infotile ()
wait (5000)
t=UO.lasttile (0)
z=UO.lasttile (3)

down = 1

UO.unequip ("Rhand")
wait (1000)
UO.FindType ("0x0E85")
wait (1000)
pick = UO.GetSerial ("finditem")
UO.equip ("Rhand", pick)

while not UO.Dead ()

UO.DeleteJournal ()
x=UO.GetX ()
y=UO.GetY ()

UO.exec ("waittargettile '" + str(t) + "' '" + str(x) + "' '" + str(y) + "' '" + str(z) + "'")
UO.useobject (pick)

while not UO.inJournal ("no more ore") and not UO.inJournal ("tool broke") and not UO.InJournal ("stop mining") and not UO.inJournal ("cannot see that") and not UO.inJournal ("far away")
wait (1000)
if UO.InJournal ("element") then
goto theend
endif
wend

if UO.InJournal ("tool broke") then
UO.FindType ("0x0E85")
wait (1000)
pick = UO.GetSerial ("finditem")
UO.equip ("Rhand", pick)
endif

x1=x+down
y1=y
repeat:
gotoxy (x1, y1, 0)

carry ()

x=UO.GetX ()
y=UO.GetY ()

if x<>x1 or y<>y1 then
if not UO.InJournal ("You are too fatigued to move") then
y=y+1
gotoxy (x, y, 0)
down=-down

carry ()

wait (1000)
UO.findtype ("ore", -1, 1)
UO.grab (2000, "finditem")
wait (1000)

UO.ServerPrint (".hungry")
wait (1000)
if UO.LastMessage () == "You aren't hungry at all" then
UO.exec ("usetype '0x097B'")
wait (2000)
endif
else
wait (60000)
endif
endif
wend
theend:
end sub

sub carry ()
UO.findtype (0x19B9, 0x0602, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0000, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0585, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x006F, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x006F, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0386, 1)
UO.grab (2000, "finditem")
wait (1000)

UO.findtype (0x19B9, 0x0042, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x094E, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x009C, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0602 , 1)
UO.grab (2000, "finditem")
wait (1000)
end sub

sub take ()
while not UO.Dead ()
UO.findtype (0x19B9, 0x0000, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x07DF, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0482, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x045E, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x07D6, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x006F, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x05D7, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x094E, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0940, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x09F9, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x094A, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x045E, 1)
UO.grab (2000, "finditem")
wait (1000)
wend
end sub

sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if

ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:

mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if

if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>15 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if

if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub
sub save()
if UO.injournal('Saving World State') then
UO.print('Caaa??ea ne?eioa ia 30 nae.')
UO.Print('-------------------------')
Wait(30000)
UO.deletejournal()
endif
deathchk()
end sub

sub deathchk()
if UO.dead() then
uo.print('Ou oia?!')
UO.Print('-------------------------')
UO.Snap()
UO.exec('terminate all')
endif
end sub
sub Reconnector()
var RFlag
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) Then

RFlag = 1
endif
Until false
end sub

sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub
Tukula
Posts: 10
Joined: 2006-03-17 20:23:57
Contact:

Post by Tukula »

Отличный скрипт на лут:
прописываем в копандах exec looting и на кнопку по нажатии этой кнопки скрипт будит запускатся.

Code: Select all

sub Looting()
   VAR Exit=0, i 
   DIM Loot[48] 



   Loot[0]="0x0EED" ; gp
   Loot[1]="0x0F7E" ; Sceleton Bones 
   Loot[2]="0x0F87" ; Eyes of newt 
   Loot[3]="0x0E76" ; Bag 
   Loot[4]="0x09B0" ; Pounch 
   Loot[5]="0x1BDD" ; Logs 
   Loot[6]="0x1078" ; Hides 
   Loot[7]="0x1BFB" ; Bolts 
   Loot[8]="0x0E34" ; Blanc Scroll 
   Loot[9]="0x0F25" ; Pieces of Amber 
   Loot[10]="0x0F16" ; Ametist 
   Loot[11]="0x0F20" ; Tourmaline 
   Loot[12]="0x0F26" ; Diamond 
   Loot[13]="0x0F30" ; Diamond 
   Loot[14]="0x0F8E" ; Serpent Scales 
   Loot[15]="0x14EB" ; Treassure Map 
   Loot[16]="0x0F79" ; Blackmoor 
   Loot[17]="0x0F3F" ; Arrow 
   Loot[18]="0x0F79" ; Blackmoor 
   Loot[19]="0x0F79" ; Blackmoor 
   Loot[20]="0x0F90" ; Dead Woods 
   Loot[21]="0x0F78" ; Batwigs 
   Loot[22]="0x0F7D" ; Vials of Blood 
   Loot[23]="0x0F8B" ; Pumice 
   Loot[24]="0x0F83" ; Executioner's Caps 
   Loot[25]="0x0F8A" ; Pig Iron 
   Loot[26]="0x0F7F" ; Brimstone 
   Loot[27]="0x0F7C" ; Blood spawn 
   Loot[28]="0x0F89" ; Obsidian 
   Loot[29]="0x0F8F" ; Volcanic Ash 
   Loot[30]="0x0F81" ; Fertile Dirt 
   Loot[31]="0x0F91" ; Worm Hearts
   Loot[32]="0x0F80" ; Demon's Bones  
   Loot[33]="0x0F82" ; Dragon's bloods
   Loot[34]="0x0F8C" ; Sulphurous ashs
   Loot[35]="0x0F7B" ; Blood mosss
   Loot[36]="0x0F88" ; Nightshades
   Loot[37]="0x0F8D" ; Spider's Silks
   Loot[38]="0x0F7A" ; Black Pearls
   Loot[39]="0x0F85" ; Ginsengs
   Loot[40]="0x0F84" ; Garlics
   Loot[41]="0x0F86" ; Mandrake roots
   Loot[42]="0x0F10" ; Emeralds
   Loot[43]="0x0F13" ; Rubies
   Loot[44]="0x0F0F" ; Star sapphires
   Loot[45]="0x0F11" ; Sapphires
   Loot[46]="0x0F15" ; Citrines   
   Loot[47]="0x0F25" ; Piecces of amber
   Loot[48]="0x1BD1" ; Faethers   


for i = 0 to 48 
	uo.exec("findtype "+Loot[i]+" 0xFFFF lastcontainer")
	if uo.findcount() then
	uo.exec("grab 0 finditem")
	wait(500)	
	end if
	
next


end sub
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

когда открыл топ, подумал, что опера тупить начала%) а это творчество оказывается такое большое%) Народ пора привыкать к зипам и к ссылкам на зипы;)
InDependent
Posts: 46
Joined: 2006-02-11 12:47:22

Post by InDependent »

Grin wrote:когда открыл топ, подумал, что опера тупить начала%) а это творчество оказывается такое большое%) Народ пора привыкать к зипам и к ссылкам на зипы;)
Да-а-ам... :D И тебе придётся качать каждый скрипт, чтобы его просмотреть... :!:
С уважением, InDependent... From DRW.
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

нафиг? тут человек не помощи просит...
Поэтому можно просто выложить ссылки...
а так это как замануха минус 200 кб%)
Cyn4uK
Posts: 33
Joined: 2006-03-02 18:33:56

Post by Cyn4uK »

А скрипт на фиш что то не пральное работает :(...
ЗЫ..

Code: Select all

 until StopFuckingSearch 
:lol: :lol:
[color=indigo]Я слишком много видел в жизни чтобы баяцца [b]воображаемой[/b] смерти от [b]воображаемого автомата[/b] (с)[/color]
Tukula
Posts: 10
Joined: 2006-03-17 20:23:57
Contact:

Post by Tukula »

Cyn4uK wrote:А скрипт на фиш что то не пральное работает :(...
ЗЫ..

Code: Select all

 until StopFuckingSearch 
:lol: :lol:

Это скрипты под пол 0.95 версии, или по понятней клиент 200б :)
НЕ знаю будит ли на выших серваках работать :)
Cyn4uK
Posts: 33
Joined: 2006-03-02 18:33:56

Post by Cyn4uK »

так я на таком и играю fof.od.ua
[color=indigo]Я слишком много видел в жизни чтобы баяцца [b]воображаемой[/b] смерти от [b]воображаемого автомата[/b] (с)[/color]
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

2Автор:
PS: Почему столько цитат? А потому, что уже замучался цитировать.

PPS: Автор - сам правь пост.
Tukula
Posts: 10
Joined: 2006-03-17 20:23:57
Contact:

Post by Tukula »

Cyn4uK wrote:так я на таком и играю fof.od.ua
Я тоже там играю!
Удоли в памке с инжой фаил фонт мап
Post Reply