Yoko

All sides of Injection
It is currently 2025-11-12 12:36:57

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2006-02-24 04:43:46 
Offline

Joined: 2006-02-04 22:59:40
Posts: 13
i need a fast smelting script that will separate the ore 1 at a time into my pack then smelt it then grab more ore then smelt it etc...i have 2 already, one smelts really slowly, and the other only smelts once for some reason....here they are...

####################################
#############Smelting by evil_Gremlin, v 1.1
sub smelt_ground()
var r
var i,k=0
var max =((UO.Str*4)+30) #Calculating of max weight based on character strenght
DIM ore[4]
ore[1]=0x19B8
ore[2]=0x19B9
ore[3]=0x19BA
ore[4]=0x19B7
while k==0
r=0
If UO.Weight>=max-30 then
clean()
endif

for i=1 to 4
UO.FindType(ore[i],-1,'ground')
If UO.FindCount()>0 then
r=0
UO.Exec('moveitem finditem 1')
repeat
wait(50)
until Uo.ContainerOf('finditem')==UO.Getserial('backpack')
UO.Useobject('finditem')
else
#UO.Print('Not Found')
r=r+1
endif
next
if r==4 then
k=1
Uo.Print('No ore to smelt')
endif
wend
endsub
#############Ingots dropping sub
sub Clean()
var i,t,l,col
DIM type[5]
type[1]=0x1BEF
type[2]=0x1BF5
type[3]=0x1BE3
type[4]=0x1BE9
UO.Print('Overload. Cleaning')
col=0
repeat
col=0
for t=1 to 4
Uo.FindType(type[t],'-1','backpack')
If UO.FindCount()>0 then
UO.Print('Found')
l=0
Uo.Exec('drophere finditem')
repeat
wait(100)
until Uo.ContainerOf('finditem')<>Uo.GetSerial('backpack')
else
col=col+1
endif
next
until col>=4
UO.Print('Cleaned....')
end sub
###########################################################

sub Smelt()
VAR Ruda1 = '0x19B9' ; ??? ????
VAR Ruda2 = '0x19B8' ; ??? ???? - 3 ??.
VAR Ruda3 = '0x19BA' ; ??? ???? - 2 ??.
VAR Ruda4 = '0x19B7' ; ??? ???? - 1 ??.
VAR Ing1 = '0x1BEF' ; ??? ????? ????????
VAR Ing2 = '0x1BF2' ; ??? ????? ?????????
VAR MaxVes = 500 ; ???????????? ??? ????
repeat
UO.Findtype( Ruda1, -1, 1 ) ; ???? ???? ?? ?????
If UO.Findcount() == 0 Then
UO.Findtype( Ruda2, -1, 1 )
If UO.Findcount() == 0 Then
UO.Findtype( Ruda3, -1, 1 )
If UO.Findcount() == 0 Then
UO.Findtype( Ruda4, -1, 1 )
If UO.Findcount() == 0 Then
UO.Print( "No more ore for smelt..." )
Return
Endif
Endif
Endif
Endif
UO.Exec( "moveitem finditem 1" ) ; ????? 1 ? ???
Wait( 1000 )
UO.Useobject( 'finditem' ) ; ????????????
Wait( 1000 )
If UO.Weight > MaxVes Then
; ???????????? ??? ???? ???????? - ????????????
UO.Findtype( Ing1, -1, -1 )
If UO.Findcount() > 0 Then
UO.Drophere( 'finditem' )
#Wait( 1000 )
Endif
UO.Findtype( Ing2, -1, -1 )
If UO.Findcount() > 0 Then
UO.Drophere( 'finditem' )
Wait( 1000 )
Endif
Endif
until NOT Uo.CountGround( Ruda1 ) AND NOT UO.CountGround( Ruda2 ) AND NOT UO.CountGround( Ruda3 ) AND NOT UO.CountGround( Ruda4 )
UO.Print( "No more ore for smelt..." )
endsub


i commented out the waits in the second one which speeds it up, but it is still slow. can somebody help me out?


Top
   
 Post subject:
PostPosted: 2006-02-26 10:01:29 
Offline

Joined: 2004-07-29 16:29:52
Posts: 55
wait( 1000 ) = wait one second... 1000 = 1000 mili seconds

commenting out the waits won't allow Injection the "time" it needs to reset/refresh between commands specially when moving items because it has to be able to see/find the objects after the movement.

if you want crazy speed from the script simply change all the wait ( 1000 ) to wait( 100 )

thus 1/10th of a second, mind you factors such as your computer and connection to the server (ping rates) you may have to try ( 200 ), ( 300 ) etc..


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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