Yoko

All sides of Injection
It is currently 2024-03-28 21:22:49

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2012-12-25 22:57:00 
Offline

Joined: 2012-12-25 22:52:27
Posts: 1
Code:
sub KillThemAll()
Var Victim=0x00D8
#Var Victim=0x00E7
var CuttingTool=0x13F6 #×åì ðÝçàòü (â äàííîì ñëó÷àå - áóò÷åð)
var n=6
var x=uo.GetX()
var y=uo.GetY()
;uo.print('001')
uo.ignorereset()
;uo.print('002')
;uo.forget('far')
;uo.print('003')
;uo.forget('counters')
;uo.print('004')
uo.SetGlobal('KillCount', 0)
;uo.print('005')

uo.Set('finddistance',str(n))

Repeat
wait(500)
uo.FindType(victim, -1,'ground')
if uo.FindCount() then
wait(100)
if uo.IsNPC('finditem') then
; uo.info('finditem')
while uo.IsNPC('finditem')
if uo.GetDistance('finditem') > 1 then
MoveTo('finditem', 1)
uo.attack('finditem')
end if
wait(100)
wend
uo.SetGlobal('KillCount', val(uo.GetGlobal('KillCount'))+1)
uo.forget('finditem')
; uo.warmode(0)
uo.waittargetobject('lastcorpse')
wait(100)
uo.usetype(CuttingTool)
wait(100)
uo.useobject('lastcorpse')
wait(550)

# ÅÑËÈ ÁÛ ÒÛ ÏÐÎ×ÈÒÀË ÓÐÎÊÈ ÒÎ ÏÎÍßË ÁÛ ×ÒÎ ÑËÅÄÓÞÙÈÅ 2 ÊÎÌÀÍÄÛ È ÅÑÒÜ ËÓÒ!!!
#uo.waittargetobject('lastcorpse')
#uo.say(',emptycontainer 550')
#À ÒÅÁÅ ÍÀÄÎ ÑÄÅÒÀÒÜ ÂÎÒ ÒÀÊ

LootLastCorpse()

while uo.waiting()
wait(100)
wend
; uo.disarm()
n=1
else
uo.Ignore('finditem')
end if
else
n=n+1
if n > 20 then
if (uo.GetX() <> x) or (uo.GetY() <> y) then
MoveToXY(x, y, 1)
end if
n=1
end if
end if
Until uo.Dead()
end sub

sub Stat()
uo.charprint(257, 'Õ-õà! Óæå '+uo.GetGlobal('KillCount')+' ñêåëåòîâ çàãîòîâëåíî!')
end sub

sub Abs(num)
if num < 0 then
return -num
end if
return num
end sub

sub Sig(num)
if num < 0 then
return -1
else
if num == 0 then
return 0
endif
endif
return 1
end sub

sub MoveToXY(x, y, prec)
var dx, dy
dim Key[9]
Key[0]=37
Key[1]=35
Key[2]=40
Key[3]=36
Key[4]=12
Key[5]=34
Key[6]=38
Key[7]=33
Key[8]=39
dx=x-uo.GetX()
dy=-y+uo.GetY()
while (Abs(dx) > prec) or (Abs(dy) > prec)
dx=x-uo.GetX()
dy=-y+uo.GetY()
uo.Press(Key[(sig(dy)+1)*3+1+sig(dx)])
wait(10)
wend
end sub

sub MoveTo(object, prec)
var dx, dy
dim Key[9]
Key[0]=37
Key[1]=35
Key[2]=40
Key[3]=36
Key[4]=12
Key[5]=34
Key[6]=38
Key[7]=33
Key[8]=39
while uo.GetDistance(object) > prec
dx=uo.GetX(object)-uo.GetX()
dy=-uo.GetY(object)+uo.GetY()
uo.Press(Key[(sig(dy)+1)*3+1+sig(dx)])
wait(10)
wend
end sub

sub ExtendedInfo()

var ObjectSerial
var ObjectGraphics
var ObjectIsNPC
var ObjectNotoriety

UO.Print('Select object to explore')
UO.AddObject('ObjectToExplore')
While UO.Targeting()==2
Wait(50)
WEnd

UO.Click('ObjectToExplore')
Wait(500)

UO.Print('Object name is: '+UO.GetName('ObjectToExplore'))

ObjectSerial = UO.GetSerial('ObjectToExplore')
UO.Print('Object serial is : '+ObjectSerial)
ObjectGraphics = UO.GetGraphic('ObjectToExplore')
UO.Print('Object type is : '+ObjectGraphics)
ObjectIsNPC = UO.IsNPC('ObjectToExplore')
UO.Print('Object IsNPC number is : '+str(ObjectIsNPC))
ObjectNotoriety = UO.GetNotoriety('ObjectToExplore')
UO.Print('Object notoriety is : '+str(ObjectNotoriety))

end sub

# À ÍÈÆÅ ÂÏÈÑÀÒÜ ÒÈÏÛ ÒÐÅÁÓÅÌÛÕ ÏÐÅÄÌÅÒÎÂ

sub LootLastCorpse()
   DIM Nado[20]
   Nado[0]  = '0x0F7A'   ; pearls, black pearls
   Nado[1]  = '0x0F7B'   ; bood moss
   Nado[2]  = '0x0F84'   ; garlic
   Nado[3]  = '0x0F85'   ; ginseng
   Nado[4]  = '0x0F86'   ; mandrake root
   Nado[5]  = '0x0F88'   ; night shade
   Nado[6]  = '0x0F8C'   ; sulphorous ash
   Nado[7]  = '0x0F8D'   ; spiders silk
   Nado[8] = '0x0E34'   ; blank scrolls
   Nado[9]  = '0x0F78'   ; batwings   
   Nado[10] = '0x0F7E'   ; bones
   Nado[11] = '0x0F7D'   ; vials of blood
   Nado[12] = '0x0F80'   ; daemons bones
   Nado[13] = '0x0F81'   ; fertile dirt
   Nado[14] = '0x0F82'   ; dragons blood
   Nado[15] = '0x0F87'   ; eyes of newt
   Nado[16] = '0x0F8E'   ; serpents scales
   Nado[17] = '0x0F90'   ; dead woods
   Nado[18] = '0x0F91'   ; wyrms hearts
   Nado[19] = '0x0F8F'   ; volcanic ash
   Nado[20] = '0x1078'   ; Êîæà
   ; ÿ ñïåöèàëüíî îãðàíè÷èëñÿ òîëüêî ðåãàìè è ïàãàí ðåãàìè, âû ñàìè ìîæåòå ðàñøèðÿòü ìàññèâ
   ; íà òå ïðåäìåòû, êîòîðûå õîòèòå ëóòèòü
   VAR i
   ; Äëÿ íà÷àëà îòêðîåì ïîñëåäíèé òðóï íà ýêðàíå
   UO.UseObject( 'lastcorpse' )
   wait(1000)
   For i = 0 To 20
      ; Èùåì ïî î÷åðåäè âåñü ëóò â ïîñëåäíåì òðóïå
      UO.FindType( Nado[i], '-1', 'lastcorpse' )
      ; Ïîêà êîëè÷åñòâî íàéäåííîãî áîëüøå 0
      While UO.FindCount() > 0
         ; Çàáèðàåì íàéäåííîå â ïàê
         UO.MoveItem( 'finditem' )
         wait( 1000 )
         ; Èùåì ñíîâà - âäðóã â òðóïå îáúåêòîâ ñ òàêèì òèïîì áîëüøå îäíîãî
         UO.FindType( Nado[i], '-1', 'lastcorpse' )
      Wend
   Next
   UO.Print( 'The loot was finished' )
   UO.WaitTargetType('0x1078')
   uo.usetype(0x0F9E)
endsub


Есть скрипт на авто ПВМ все работает отлично, но проблема в ходилке очень тупая и не обходит препятствия. Кто хорошо разбирается вставьте в этот скрипт хорошую ходилку плиз.


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 18 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