Yoko

All sides of Injection
It is currently 2025-12-28 00:08:22

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: unneeded ore drop.
PostPosted: 2009-02-09 18:57:10 
Offline

Joined: 2009-02-09 17:12:23
Posts: 38
I want script that will drop unneeded ores.
when i run script, if he finds iron cooper or bronze he drops it.
sub dropore()
var iron ='type,colour'
var cooper ='type,colour'
var bronze ='type,colour' ; ??? right
.....


Top
   
 Post subject: Re: unneeded ore drop.
PostPosted: 2009-02-09 19:15:14 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
Ever1x wrote:
I want script that will drop unneeded ores.
when i run script, if he finds iron cooper or bronze he drops it.
??? right
.....


No, here is algorytm, next think your self:

Code:
sub dropore()
   var i, a
   DIM color[10]
   DIM types[4]

   color[0] = ' '
   color[1] = ' '
   color[2] = ' '
   ...
   color[9] = ' '

   types[0] =  ' '
   types[1] =  ' '
   types[2] =  ' '
   types[3] =  ' '
 
   for a = 0 to 3
      for i = 0 to 9
         UO.FindType(types[a], color[i], 'backpack')
         If UO.FindCount() > 0 then
            repeat
               UO.MoveItem('finditem', '-1', 'ground')
               wait(1000)
               UO.FindType(types[a], color[i], 'backpack')
            until NOT UO.FindCount()
         endif
      next
   next
end sub


Last edited by Kynep on 2009-02-09 20:43:14, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2009-02-09 20:42:31 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
I make some mistake, sorry :oops: . Try new script.


Top
   
 Post subject:
PostPosted: 2009-02-09 20:51:11 
Offline

Joined: 2009-02-09 17:12:23
Posts: 38
you only changed types and colors?

Quote:
sub mine()
UO.DeleteJournal()
var x, y, i, tmp, inside, moveX, moveY, st, first
st=0
first=UO.GetX()
start:
inside=0
for y=-2 to 2
for x=-2 to 2

try:
UO.Exec ("waittargettile "+" 1340 "+STR(UO.GEtX()+x)+" "+STR(UO.GetY()+y)+" 0")
UO.exec ("usetype 0x0E85")
#UO.Print (""+STR(x))
#UO.Print (""+STR(y))
i=0
while i< 100
if UO.InJournal("You loosen some rocks but fail to find any useable ore") then
wait (300)
i=200
UO.DeleteJournal()
goto try
endif
if UO.InJournal("Try mining elsewhere") then
i=200
UO.DeleteJournal()
endif
if UO.InJournal("You must wait to perform another action") then
wait (300)
i=200
UO.DeleteJournal()
goto try
endif
if uo.InJournal("till")then
uo.playwav("C:\WINDOWS\Media\ringin.wav")
gumpclick()
wait(300)
i=200
UO.DeleteJournal()
goto try
endif
if uo.InJournal("Elemental") or uo.InJournal("is attacking you")then
uo.playwav("C:\WINDOWS\Media\ringin.wav")
killelem()
uo.useobject("sword")
i=200
UO.DeleteJournal()
goto try
endif
if UO.InJournal("There is nothing here to mine for") then
wait (200)
i=200
UO.DeleteJournal()
endif
if UO.InJournal("You have no line of sight to that location") then
wait (300)
i=200
UO.DeleteJournal()
endif
wait (500)
;UO.FindType(0x19B9, 0x06D6, 2)
;UO.Drop('0',STR(UO.GetX('self')),STR(UO.GetY('self')),STR(UO.GetZ('self')),'finditem')
i=i+1
wend
next
next

if st == 0 then
no_ore()
uo.print("!! RUDA ZAKONCHILAS !!")
endif
endsub


What does these things mean?


Top
   
 Post subject:
PostPosted: 2009-02-09 21:46:26 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
Ever1x wrote:
you only changed types and colors?

No. I add new for-next cicle. Fist script not work corectly.


Top
   
 Post subject:
PostPosted: 2009-02-09 22:25:57 
Offline

Joined: 2009-02-09 17:12:23
Posts: 38
what does i mean? I can't get it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 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:  
Powered by phpBB® Forum Software © phpBB Limited