H-Town Auto Pumpkin Harvesting

Share your guides, how-tos, FAQs, and so forth. This is not for support -- post questions in General Discussion.
Post Reply
Xionu
Posts: 99

H-Town Auto Pumpkin Harvesting

Post by Xionu »

Loop can be on or off-
Loop on will continuously search the field, even if there are no pumpkins present currently
Loop off will stop running the macro once all the pumpkins have been picked up

Go through the Macro Setup section, make sure you have the macro name configured correctly & the container type set
Note that if you have a container with stuff in it already, the macro will not notice this, you may loose your stuff if you arent careful.

Hit play and relax
If you would like to donate a black pumpkin, feel free to, either use The Zohan's gate in the vendor mall and drop the pumpkin in the mailbox, or navigate 5 houses West of Umbra, North side of the road (Umbra Vanity Shop)

*Note: the Jack O' Lanterns are not included in the macro, and I will not be adding them*

Code: Select all

//This macro will run around the field you are currently standing on, pickup pumpkins and set them inside of the container type specified in your bag. Once the bag is nearly full, it will drop the bag and start filling a new one.
//
//Macro Setup
//Change this to the name of the macro
@removelist 'pknn'
@createlist 'pknn'
@pushlist 'pknn' 'Auto Pumpkin Harvest'
//Uncomment the container type you would like to use, comment out all the others
@removelist 'pknc'
@createlist 'pknc'
//@pushlist 'pknc' 0xe79 //Pouch
//@pushlist 'pknc' 0xe75 //Backpack
@pushlist 'pknc' 0xe76 //Bag
//
//
//
//Do Not Touch
//Create list of pumpkins to pick up
@removelist 'pkn'
@createlist 'pkn'
@pushlist 'pkn' 0xc6a
@pushlist 'pkn' 0xc6c
@pushlist 'pkn' 0xc6b
@pushlist 'pkn' 0xc6d
//Search distance
@removelist 'pknd'
@createlist 'pknd'
@pushlist 'pknd' 1
@pushlist 'pknd' 2
@pushlist 'pknd' 3
@pushlist 'pknd' 4
@pushlist 'pknd' 5
@pushlist 'pknd' 6
@pushlist 'pknd' 7
@pushlist 'pknd' 8
@pushlist 'pknd' 9
@pushlist 'pknd' 10
@pushlist 'pknd' 11
@pushlist 'pknd' 12
@pushlist 'pknd' 13
@pushlist 'pknd' 14
@pushlist 'pknd' 15
@pushlist 'pknd' 16
@pushlist 'pknd' 17
@pushlist 'pknd' 18
@pushlist 'pknd' 19
@pushlist 'pknd' 20
@pushlist 'pknd' 21
@pushlist 'pknd' 22
@pushlist 'pknd' 23
@pushlist 'pknd' 24
@pushlist 'pknd' 25
@clearignorelist
//Setup stage
//Check for containers to fill
if counttype pknc[0] 0 'backpack' == 0
  sysmsg 'No more containers to fill'
  stop
endif
//Check for filling container
if not @findalias 'container' or @injournal 'container cannot' 'system'
  clearignorelist
  @findtype pknc[0] 'any' 'backpack'
  @setalias 'container' 'found'
  @clearjournal
  useobject 'container'
  pause 600
endif
//Drop filling container if nearing full
while contents 'backpack' > 100 or weight > 475
  while @findtype pknc[0] 'any' 'backpack'
    if @property 'contents' 'found' > 0
      @setalias 'drop' 'found'
      break
    else
      ignoreobject 'found'
    endif
  endwhile
  if @findalias 'drop'
    @moveitemoffset 'drop' 'ground' 0 1 0
    pause 600
    @unsetalias 'container'
    @unsetalias 'drop'
  endif
endwhile
//Harvesting stage
sysmsg 'Searching'
for 0 to 'pknd'
  sysmsg pknd[]
  while @findtype pkn[0] 0 'ground' 1 pknd[] or @findtype pkn[1] 0 'ground' 1 pknd[]
    if @findtype pkn[0] 0 'ground' 1 pknd[] or @findtype pkn[1] 0 'ground' 1 pknd[]
      headmsg 'here!' 50 'found'
      while not @inrange 'found' 2
        if @x 'found' > x 'self' and @y 'found' > y 'self'
          run 'Southeast'
        elseif @x 'found' < x 'self' and @y 'found' > y 'self'
          run 'Southwest'
        elseif @x 'found' > x 'self' and @y 'found' < y 'self'
          run 'Northeast'
        elseif @x 'found' < x 'self' and @y 'found' < y 'self'
          run 'Northwest'
        elseif @x 'found' > x 'self' and @y 'found' == y 'self'
          run 'East'
        elseif @x 'found' < x 'self' and @y 'found' == y 'self'
          run 'West'
        elseif @x 'found' == x 'self' and @y 'found' > y 'self'
          run 'South'
        elseif @x 'found' == x 'self' and @y 'found' < y 'self'
          run 'North'
        endif
      endwhile
      if @moveitem 'found' 'container'
        pause 600
      endif
    endif
    playmacro pknn[0]
  endwhile
  while @findtype pkn[2] 0 'ground' 1 pknd[] or @findtype pkn[3] 0 'ground' 1 pknd[]
    if @findtype pkn[2] 0 'ground' 1 pknd[]  or @findtype pkn[3] 0 'ground' 1 pknd[]
      headmsg 'here!' 12 'found'
      while not @inrange 'found' 2
        if @x 'found' > x 'self' and @y 'found' > y 'self'
          run 'Southeast'
        elseif @x 'found' < x 'self' and @y 'found' > y 'self'
          run 'Southwest'
        elseif @x 'found' > x 'self' and @y 'found' < y 'self'
          run 'Northeast'
        elseif @x 'found' < x 'self' and @y 'found' < y 'self'
          run 'Northwest'
        elseif @x 'found' > x 'self' and @y 'found' == y 'self'
          run 'East'
        elseif @x 'found' < x 'self' and @y 'found' == y 'self'
          run 'West'
        elseif @x 'found' == x 'self' and @y 'found' > y 'self'
          run 'South'
        elseif @x 'found' == x 'self' and @y 'found' < y 'self'
          run 'North'
        endif
      endwhile
      if @moveitem 'found' 'container'
        pause 600
      endif
    endif
    playmacro pknn[0]
  endwhile
endfor
PM Me if you cross any errors
Vampire337 likes this.
Top
Post Reply