Фишинг

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Фишинг

Post by Leo »

Вот слепил скрипт на фишинг. Рыбачит у дома. Ставите рядом сундук и трешкен (вместо треша можно и любой другой контейнер, если нужна рыба), чар ходит по 4 координатам, при вылавливании карты, чар кладёт её в мешок, находящийся в сундуке.
Не было возможности протестить, кладутся ли карты в новый мешок, если первый мешок заполнен.

Code: Select all

VAR Cont = '0x401260D2'  # сейф с мешками, где будут карты              
VAR trash = '0x400E5E23' # треш кэн                           
VAR pole = '0x0DBF'      # тип удочки                         
VAR foodT = '0x097B'     # тип еды                            
VAR BagCount = '0x0E76'  # тип мешков                         
VAR Item = '0x14EB'      # тип карт                          
var walkwait=500                                              
var QB                                                        
var inWalk=1, inFishing=0                                    
var time, k=0, oldX, oldY.                                    
var fizl=0, control=8, cel='', glX, glY, whGo=1.              

sub main() 
DIM xM[4] 
xM[1] = 2015 
xM[2] = 2015 
xM[3] = 2015 
xM[4] = 2015
DIM yM[4] 
yM[1] = 534 
yM[2] = 536
yM[3] = 538 
yM[4] = 540
var x, y, z=UO.GetZ("self") 
DIM text[8] 
text[1] = 'Tattered treasure' 
text[2] = 'You pull out a' 
text[3] = 'You fish a while' 
text[4] = 'That is too far away' 
text[5] = 'Try fishing in water' 
text[6] = 'There are no fish here' 
text[7] = 'location' 
UO.Set('finddistance','20') 
if UO.GetX()<>1053 OR UO.GetY()<>3501 then 
endif 
While True 
if whGo<4 then 
whGo=whGo+1 
else 
whGo=1 
endif 
for x=-6 to 6 
for y=-6 to 6 
inFishing=0 
Repeat 
UO.DeleteJournal() 
ToHide() 
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+Y),z) 
UO.UseType(pole) 
time=UO.Timer() 
Repeat 
wait(500) 
Until UO.InJournal(text[2]) OR UO.InJournal(text[3]) OR UO.InJournal(text[4]) OR UO.InJournal(text[5]) OR UO.InJournal(text[6]) OR UO.InJournal(text[7]) OR UO.Timer()>time+250 
if UO.InJournal(Text[2]) then 
fizl=0 
Find()
trash()
endif 
if UO.InJournal(text[3]) then 
fizl=fizl+1 
endif 
if fizl==control then 
wait(8000) 
fizl=0 
FastLootCheck() 
endif 
if NOT (UO.InJournal(text[1]) OR UO.InJournal(text[3])) then 
inFishing=1 
else 
if UO.InJournal(text[1]) OR UO.InJournal(text[2]) then 
Find()
UnLoadItem()
trash()
endif 
endif 
Food() 
Until inFishing==1 
next 
next 
if inWalk==1 then 
Walk(xM[whGo],yM[whGo],'') 
else 
inWalk=1 
endif 
endif 
Wend 
end sub

sub trash()
DIM Fish[6]
Fish[1]='0x09CC' 
Fish[2]='0x09CD' 
Fish[3]='0x09CE' 
Fish[4]='0x09CF' 
Fish[5]='0x0DD6' 
Fish[6]='0x0DCA' 
var s
for s=1 to 6 
uo.findtype(Fish[s],'-1','ground') 
wait(100) 
while uo.findcount()>0 
uo.moveitem('finditem','-1',trash) 
wait(500) 
uo.findtype(Fish[s],'-1','ground') 
wait(100) 
wend 
next 
end sub 

sub UnLoadItem() 
VAR BagID 
VAR i=0 
VAR m=0 
Repeat 
UO.DeleteJournal() 
UO.FindType(BagCount,'-1',Cont) 
UO.Click('finditem') 
m = 0 
Repeat 
Wait(1000) 
Until UO.InJournal("a bag") 
If UO.InJournal("a bag") Then 
BagID=UO.JournalSerial(UO.InJournal("a bag")-1) 
UO.SetJournalLine(UO.InJournal("a bag")-1,"") 
UO.FindType('-1','-1',BagID) 
If UO.FindCount('finditem') < 250 then 
m = UO.FindCount('finditem') 
UO.SetReceivingContainer(BagID) 
UO.FindType(Item,'-1','me') 
UO.Grab('0','finditem') 
UO.ConColor('0x0021') 
UO.Set('quiet','0') 
UO.Print(UO.Print('In BagPack#'+Str(i+1)+' items '+Str(m)+'')) 
UO.Set('quiet','1') 
UO.ConColor('0x0035') 
Wait(1000) 
UO.UnSetReceivingContainer() 
Else 
i = i + 1 
UO.Ignore(BagID, 'on') 
EndIf 
EndIf 
If i == QB Then 
UO.IgnoreReset() 
i = 0 
EndIf 
UO.FindType(Item,'-1','me') 
Until UO.FindCount('finditem') < 1 
end sub

sub ToHide() 
while NOT UO.Hidden() 
UO.DeleteJournal() 
UO.Exec('warmode 0') 
UO.UseSkill('Stealth') 
wait(2000) 
time=UO.Timer() 
repeat 
wait(500) 
until UO.InJournal('You have hidden') OR UO.InJournal('seem to') OR UO.InJournal('preoccupied') OR time+200<UO.Timer() 
wend 
end sub 

sub Find() 
UO.Set('finddistance','2') 
var find = '0x14EB' ;tattered map 
UO.Set('finddistance','2') 
UO.Findtype(find,-1,1) 
if UO.FindCount()>0 then 
UO.MoveItem('finditem',0,'backpack') 
wait(500)
endif 
UO.Set('finddistance','20') 
end sub 

sub CheckLag() 
UO.DeleteJournal() 
UO.Click('backpack') 
Repeat 
wait(200) 
Until UO.InJournal('backpack') 
end sub 

sub FastLootCheck() 
UO.DeleteJournal() 
wait(500) 
if UO.InJournal("FastLoot") OR UO.InJournal("World save") then 
CheckLag() 
endif 
end sub 

sub Food() 
if k==100 then 
UO.DeleteJournal() 
repeat 
UO.UseType(foodT) 
wait(500) 
until UO.InJournal('simply too full') 
k=1 
else 
k=k+1 
endif 
end sub 

sub Walk(x,y,Target) 
VAR Step, dX, dY, Exit=0, dirW=0, result 
While Exit<>1 
if Target<>"" then 
cel=Target 
dX=UO.GetX(Target)-UO.GetX() 
dY=UO.GetY(Target)-UO.GetY() 
if UO.GetDistance(Target)<2 then 
Exit=1 
endif 
else 
dX=x-UO.GetX() 
dY=y-UO.GetY() 
glX=dX 
glY=dY 
if dX==0 AND dY==0 then 
Exit=1 
endif 
endif 
if Exit==0 then 
if dX>0 AND dY>0 then 
dirW=9 ;number 2 
endif 
if dX>0 AND dY<0 then 
dirW=7 ;number 6 
endif 
if dX<0 AND dY>0 then 
dirW=3 ;number 4 
endif 
if dX<0 AND dY<0 then 
dirW=5 ;number 8 
endif 
if dX<>0 AND dY==0 then 
if dX>0 then 
dirW=8 ;number 3 
else 
dirW=4 ;number 7 
endif 
endif 
if dX==0 AND dY<>0 then 
if dY>0 then 
dirW=2 ;number 1 
else 
dirW=6 ;number 9 
endif 
endif 
result=Go(dirW) 
if result==0 then 
result=Go(dirW-2) 
if result==0 then 
result=Go(dirW+2) 
endif 
endif 
endif 
Wend 
endsub 

sub Go(dir) 
var xGo, yGo, check=1, dirStart=UO.GetDir() 
xGo=UO.GetX() 
yGo=UO.GetY() 
DIM key[12] 
key[0] = 34 ;number 3 
key[1] = 40 ;number 2 
key[2] = 35 ;number 1 
key[3] = 37 ;number 4 
key[4] = 36 ;number 7 
key[5] = 38 ;number 8 
key[6] = 33 ;number 9 
key[7] = 39 ;number 6 
key[8] = 34 ;number 3 
key[9] = 40 ;number 2 
key[10] = 35 ;number 1 
key[11] = 37 ;number 4 
DIM dirS[12] 
dirS[0] = 2 ;number 3 
dirS[1] = 3 ;number 2 
dirS[2] = 4 ;number 1 
dirS[3] = 5 ;number 4 
dirS[4] = 6 ;number 7 
dirS[5] = 7 ;number 8 
dirS[6] = 0 ;number 9 
dirS[7] = 1 ;number 6 
dirS[8] = 2 ;number 3 
dirS[9] = 3 ;number 2 
dirS[10] = 4 ;number 1 
dirS[11] = 5 ;number 4 

While UO.GetDir()<>dirS[dir] 
UO.Press(key[dir]) 
wait(walkwait) 
if UO.GetDir()==dirStart then 
CheckLag() 
endif 
if (cel<>"" AND UO.GetDistance(cel)<2) OR (glX==0 AND glY==0) then 
return 1 
endif 
Wend 

UO.Press(key[dir]) 
wait(walkwait) 
if xGo==UO.GetX() AND yGo==UO.GetY() then 
CheckLag() 
UO.Press(key[dir]) 
wait(walkwait) 
endif 
if xGo==UO.GetX() AND yGo==UO.GetY() then 
return 0 
else 
return 1 
endif 
end sub 
baigaiz
Posts: 5
Joined: 2005-07-24 00:30:18

Post by baigaiz »

script prosta klassssssss!!!! senks dolga iskal :D :D :D
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Post by Leo »

baigaiz wrote:script prosta klassssssss!!!! senks dolga iskal :D :D :D
Я тоже долго искал, потом взял и сделал свой :wink:
Lord
Posts: 56
Joined: 2005-01-14 20:05:16
Contact:

Post by Lord »

Лео, а можешь сделать так, чтобы этот скрипт работал на RunUO?
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Post by Leo »

Lord wrote:Лео, а можешь сделать так, чтобы этот скрипт работал на RunUO?
Ниразу не играл на RunUO, так что тут я помочь не могу. :wink:
netol
Posts: 138
Joined: 2005-01-22 10:29:34

Post by netol »

ммм фишинг в 4 точках небойсь карт 30-90 за ночь :lol:
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Post by Leo »

netol wrote:ммм фишинг в 4 точках небойсь карт 30-90 за ночь :lol:
Да я этот скрипт делал не для того, что бы карты удить, а что бы фишинг прокачать.
Post Reply