Yoko

All sides of Injection
It is currently 2026-01-17 00:49:21

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2004-09-20 04:24:03 
Offline

Joined: 2004-08-26 16:47:05
Posts: 51
Этот скрипт написан под ЕП. Но может кому пригодится. Идея такова чар ходит по шахте и копает, а при перевесе относит руду в дом..... Может что подскажете я не против.... ато не давно за скрипты тока сел.... Ламер кароче =) Еще щас плнируется сделать чтобы чар еще и сам ресался....
sub main()
VAR Xi,Yi,Y,NoLopati,myx,myy,ox,oy,maxves,noore,fizl,vremianahaid,dver
dver=0
vremianahaid=8000
fizl=0
noore=0
maxves=500 #Ìàêñèìàëüíûé âåñ íà ÷àðå
start:
FOR Xi = -3 TO 3
FOR Yi = -3 TO 3

While not UO.Hidden()
UO.Useskill("Hiding")
Wait(vremianahaid)
Wend

Y=0
NoLopati=0
UO.DeleteJournal()
While UO.InJournal("There is no ore")==0 and Y < 100 and NoLopati==0 and UO.InJournal("You put the Proto")==0 and UO.InJournal("You put the Common")==0 and UO.InJournal("Try mining in rock")==0 and UO.InJournal("That is too far away")==0 and UO.InJournal("You have no line of sight to that location")==0 and UO.InJournal("Try")==0
UO.Exec("waittargettile 3126 "+STR(UO.GetX()+Xi)+" "+STR(UO.GetY()+Yi)+" 0")
UO.Exec("usetype 0x0E85")
Waiter()
If UO.Count(0x0E85)==0 then
NoLopati=1
End if
If UO.InJournal("You loosen some rocks") then
Y = Y + 1
End if
If UO.InJournal("You put the") then
noore = noore - 1
End if
If UO.InJournal("You put the Proto") then
noore = noore + 2
End if
If UO.InJournal("You put the Common") then
noore = noore + 2
End if
If UO.InJournal("There is no ore") then
noore = noore + 1
End if
if (noore < 1) then
noore=0
end if
if (noore == 25) then
fizl=fizl+1
noore=0
goto idti
end if
if (UO.Weight > maxves) then
goto idti
endif
Wend

Wait(1500)

NEXT
NEXT
goto start

#Ïóòü èç øàõòû â äîì

idti:
myx = uo.getx("self")
myy = uo.gety("self")
repeat
myx = uo.getx("self")
myy = uo.gety("self")
if (myx == 2382) and (myy == 905) and (UO.Weight > maxves) then
ox=2379
oy=908
end if
if (myx == 2379) and (myy == 908) and (UO.Weight > maxves) then
ox=2381
oy=910
end if
if (myx == 2381) and (myy == 910) and (UO.Weight > maxves) then
ox=2382
oy=913
end if
if (myx == 2382) and (myy == 913) and (UO.Weight > maxves) then
ox=2382
oy=922
end if
if (myx == 2382) and (myy == 922) and (UO.Weight > maxves) then
ox=2363
oy=942
end if
if (myx == 2363) and (myy == 942) and (UO.Weight > maxves) then
ox=2363
oy=955
end if
if (myx == 2363) and (myy == 955) and (UO.Weight > maxves) then
ox=2356
oy=953
end if
if (myx == 2356) and (myy == 953) and (UO.Weight > maxves) and (dver == 0) then
goto dver1
end if
if (myx == 2356) and (myy == 953) and (UO.Weight > maxves) and (dver == 1) then
dver=0
goto sbros
end if

#Îáðàòíûé ïóòü â øàõòó


if (myx == 2356) and (myy == 953) and (UO.Weight < maxves) then
ox=2363
oy=955
end if
if (myx == 2363) and (myy == 955) and (UO.Weight < maxves) then
ox=2363
oy=942
end if
if (myx == 2363) and (myy == 942) and (UO.Weight < maxves) then
ox=2382
oy=922
end if
if (myx == 2382) and (myy == 922) and (UO.Weight < maxves) then
ox=2382
oy=913
end if
if (myx == 2382) and (myy == 913) and (UO.Weight < maxves) then
ox=2381
oy=910
end if
if (myx == 2381) and (myy == 910) and (UO.Weight < maxves) then
ox=2379
oy=908
end if
if (myx == 2379) and (myy == 908) and (UO.Weight < maxves) then
ox=2382
oy=905
end if
if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 0) then
goto start
end if

###################################Õîäèò ïî ëóíêàì########################

#Ëóíêà íîìåð ðàç

if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 1) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight < maxves) and (fizl == 1) then
goto start
end if

#Ëóíêà íîìåð äâà

if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 2) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight < maxves) and (fizl == 2) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight < maxves) and (fizl == 2) then
goto start
end if

#Ëóíêà íîìåð òðè
if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 3) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight < maxves) and (fizl == 3) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight < maxves) and (fizl == 3) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight < maxves) and (fizl == 3) then
goto start
end if

#Íîìåð ÷åòûðå

if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 4) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight < maxves) and (fizl == 4) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight < maxves) and (fizl == 4) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight < maxves) and (fizl == 4) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (UO.Weight < maxves) and (fizl == 4) then
goto start
end if

#Íîìåð ïÿòü

if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 5) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight < maxves) and (fizl == 5) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight < maxves) and (fizl == 5) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight < maxves) and (fizl == 5) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (UO.Weight < maxves) and (fizl == 5) then
ox=2401
oy=909
end if
if (myx == 2401) and (myy == 909) and (UO.Weight < maxves) and (fizl == 5) then
goto start
end if

#Íîìåð øåñòü

if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 6) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight < maxves) and (fizl == 6) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight < maxves) and (fizl == 6) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight < maxves) and (fizl == 6) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (UO.Weight < maxves) and (fizl == 6) then
ox=2401
oy=909
end if
if (myx == 2401) and (myy == 909) and (UO.Weight < maxves) and (fizl == 6) then
ox=2401
oy=915
end if
if (myx == 2401) and (myy == 915) and (UO.Weight < maxves) and (fizl == 6) then
goto start
end if

#Íîìåð ñåìü

if (myx == 2382) and (myy == 905) and (UO.Weight < maxves) and (fizl == 7) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight < maxves) and (fizl == 7) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight < maxves) and (fizl == 7) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight < maxves) and (fizl == 7) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (UO.Weight < maxves) and (fizl == 7) then
ox=2401
oy=909
end if
if (myx == 2401) and (myy == 909) and (UO.Weight < maxves) and (fizl == 7) then
ox=2401
oy=915
end if
if (myx == 2401) and (myy == 915) and (UO.Weight < maxves) and (fizl == 7) then
ox=2396
oy=917
end if
if (myx == 2396) and (myy == 917) and (UO.Weight < maxves) and (fizl == 7) then
goto start
end if

###################################Ïîøëè îáðàòíî ïî ëóíêàì##########################

#Ïåðâàÿ

if (myx == 2387) and (myy == 905) and (UO.Weight > maxves) and (fizl == 1) then
ox=2382
oy=905
end if

#Âòîðàÿ

if (myx == 2391) and (myy == 910) and (UO.Weight > maxves) and (fizl == 2) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight > maxves) and (fizl == 2) then
ox=2382
oy=905
end if

#Òðåòüÿ

if (myx == 2395) and (myy == 909) and (UO.Weight > maxves) and (fizl == 3) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight > maxves) and (fizl == 3) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight > maxves) and (fizl == 3) then
ox=2382
oy=905
end if

#×åòûðå

if (myx == 2397) and (myy == 905) and (UO.Weight > maxves) and (fizl == 4) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight > maxves) and (fizl == 4) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight > maxves) and (fizl == 4) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight > maxves) and (fizl == 4) then
ox=2382
oy=905
end if

#Ïÿòü

if (myx == 2401) and (myy == 909) and (UO.Weight > maxves) and (fizl == 5) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (UO.Weight > maxves) and (fizl == 5) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight > maxves) and (fizl == 5) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight > maxves) and (fizl == 5) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight > maxves) and (fizl == 5) then
ox=2382
oy=905
end if

#Øåñòü

if (myx == 2401) and (myy == 915) and (UO.Weight > maxves) and (fizl == 6) then
ox=2401
oy=909
end if
if (myx == 2401) and (myy == 909) and (UO.Weight > maxves) and (fizl == 6) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (UO.Weight > maxves) and (fizl == 6) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight > maxves) and (fizl == 6) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight > maxves) and (fizl == 6) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight > maxves) and (fizl == 6) then
ox=2382
oy=905
end if

#Ñåìü

if (myx == 2396) and (myy == 917) and (UO.Weight > maxves) and (fizl == 7) then
ox=2401
oy=915
end if
if (myx == 2401) and (myy == 915) and (UO.Weight > maxves) and (fizl == 7) then
ox=2401
oy=909
end if
if (myx == 2401) and (myy == 909) and (UO.Weight > maxves) and (fizl == 7) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (UO.Weight > maxves) and (fizl == 7) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (UO.Weight > maxves) and (fizl == 7) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (UO.Weight > maxves) and (fizl == 7) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (UO.Weight > maxves) and (fizl == 7) then
ox=2382
oy=905
end if

#Èäåò áåç âåñà åñëè çàêîí÷èëàñü ðóäà

if (myx == 2396) and (myy == 917) and (fizl > 7) then
ox=2401
oy=915
end if
if (myx == 2401) and (myy == 915) and (fizl > 7) then
ox=2401
oy=909
end if
if (myx == 2401) and (myy == 909) and (fizl > 7) then
ox=2397
oy=905
end if
if (myx == 2397) and (myy == 905) and (fizl > 7) then
ox=2395
oy=909
end if
if (myx == 2395) and (myy == 909) and (fizl > 7) then
ox=2391
oy=910
end if
if (myx == 2391) and (myy == 910) and (fizl > 7) then
ox=2387
oy=905
end if
if (myx == 2387) and (myy == 905) and (fizl > 7) then
ox=2382
oy=905
fizl=0
end if


if (ox > myx) and (oy > myy) then
uo.press(40)
wait(50)
endif
if (ox > myx) and (oy < myy) then
uo.press(39)
wait(50)
endif
if (ox < myx) and (oy < myy) then
uo.press(38)
wait(50)
endif
if (ox < myx) and (oy > myy) then
uo.press(37)
wait(50)
endif
if (ox == myx) and (oy > myy) then
uo.press(35)
wait(50)
endif
if (ox > myx) and (oy == myy) then
uo.press(34)
wait(50)
endif
if (ox == myx) and (oy < myy) then
uo.press(33)
wait(50)
endif
if (ox < myx) and (oy == myy) then
uo.press(36)
wait(50)
endif
until (myx == ox) and (myy == oy)
goto idti

dver1:
UO.Exec("usefromground '0x06a5'")
wait(500)
UO.Exec("usefromground '0x06a6'")
wait(500)
UO.Exec("usefromground '0x06a5'")
wait(500)
dver=1
goto idti


sbros:
While UO.Count(0x19b9) > 0
UO.Setreceivingcontainer(0x403aaafb)
UO.Waittargettype(0x19b9)
UO.Grab()
Wait(1500)
wend
if (UO.Weight < maxves) then
goto idti
endif
end sub

sub Waiter()
VAR Zdat = 0
UO.DeleteJournal()
While UO.InJournal("You put the")==0 and UO.InJournal("You loosen some rocks")==0 and UO.InJournal("You must wait")==0 and UO.InJournal("There is no ore")==0 and UO.InJournal("Try mining in rock")==0 and UO.InJournal("That is too far away")==0 and Zdat < 200 and UO.InJournal("You have no line of sight to that location")==0 and UO.InJournal("Try")==0
Wait(100)
if UO.InJournal("You must wait") then
wait(1000)
end if
Zdat = Zdat + 1
Wend
end sub


Top
   
 Post subject:
PostPosted: 2004-09-20 16:28:33 
Offline

Joined: 2004-08-30 22:57:17
Posts: 22
только пояснения подправь пожалуйста, а так спасибо =)


Top
   
 Post subject:
PostPosted: 2004-09-21 00:06:20 
Offline

Joined: 2004-08-26 16:47:05
Posts: 51
knox wrote:
только пояснения подправь пожалуйста, а так спасибо =)

Загони в ворд и сделай декодировку через юникод....просто лень править =)


Top
   
 Post subject:
PostPosted: 2004-09-26 07:38:00 
Offline

Joined: 2004-04-06 10:16:31
Posts: 4
шАдевр
в цикл все if-ы не судьба было загнать?


Top
   
PostPosted: 2004-09-28 10:39:41 
Offline

Joined: 2004-09-28 09:03:59
Posts: 1
Location: Планета Земля
а можно так что бы он её на пол бросал


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 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