Yoko

All sides of Injection
It is currently 2026-01-17 14:11:51

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-12-11 10:18:31 
Offline

Joined: 2004-04-14 20:15:13
Posts: 1
Location: Washington, USA
Code:
########################
####  Equip v1.0b   ####
####                ####
#### By: pr0totype  ####
########################

sub grabregs()

# If you use healing put a 1 if not put a 0
   var H
   H = 0

# If you use healing edit this to the amount of aids you want to have in your pack.
   var A
   A = 51

# Edit N to how many of each reg you want to have in your pack.
   var N
   N = 51
   
# D = Delay, Edit this to fit the server you play, I prefer 600ms on RunUO servers.
   var D
   D = 600

# Editing beyond this point is not required.

var AD
var BM
var BP
var GA
var GS
var MR
var NS
var SA
var SS
AD = A-UO.B
BM = N-UO.BM
BP = N-UO.BP
GA = N-UO.GA
GS = N-UO.GS
MR = N-UO.MR
NS = N-UO.NS
SA = N-UO.SA
SS = N-UO.SS
UO.Print("GrabRegs initialized.")

start:
   UO.DeleteJournal()
   
      if UO.B<A and H>0 then
         UO.FindType("0x0E21","-1","lastcontainer") #Bandages
         UO.Grab(str(AD),"finditem")
         wait(D)
      end if

regs:   

   if UO.BM<N then
      UO.FindType("0x0F7B","-1","lastcontainer") #Blood Moss
      UO.Grab(str(BM),"finditem")
      wait(D)
   end if
      
   if UO.BP<N then
      UO.FindType("0x0F7A","-1","lastcontainer") #Black Pearl
      UO.Grab(str(BP),"finditem")
      wait(D)
   end if
      
   if UO.GA<N then
      UO.FindType("0x0F84","-1","lastcontainer") #Garlic
      UO.Grab(str(GA),"finditem")
      wait(D)
   end if
      
   if UO.GS<N then
      UO.FindType("0x0F85","-1","lastcontainer") #Ginseng
      UO.Grab(str(GS),"finditem")
      wait(D)
   end if
      
   if UO.MR<N then
      UO.FindType("0x0F86","-1","lastcontainer") #Mandrake Root
      UO.Grab(str(MR),"finditem")
      wait(D)
   end if
      
   if UO.NS<N then
      UO.FindType("0x0F88","-1","lastcontainer") #Nightshade
      UO.Grab(str(NS),"finditem")
      wait(D)
   end if
      
   if UO.SA<N then
      UO.FindType("0x0F8C","-1","lastcontainer") #Sulfurous Ash
      UO.Grab(str(SA),"finditem")
      wait(D)
   end if
         
   if UO.SS<N then
      UO.FindType("0x0F8D","-1","lastcontainer") #Spiders' Silk
      UO.Grab(str(SS),"finditem")
      wait(D)
   end if
      
   goto check
   
check:
   if UO.InJournal("cliloc# 0xA197") then
      wait(D)
      goto start
      else
      goto end
   end if
end:
   UO.Print("Finished..")
end sub


I tried putting them all in an array but could never get it to work right. ;/
But yeah, it works good and smooth, for the lazy uo player. :P Have fun.


Top
   
 Post subject:
PostPosted: 2004-12-11 12:26:22 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
Try to change:
BM = N-UO.BM --> BM = N-UO.Count("0x0F7B")
and others.


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