Macro for Fishing/Baking in PoV/PoS, New UI, FC (needs work)

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Forza
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sun Mar 14, 2004 8:39 am

Macro for Fishing/Baking in PoV/PoS, New UI, FC (needs work)

Post by Forza » Sun Mar 14, 2004 8:49 am

This is my first attempt at a macro, I've used a few bases I've found on these forums to learn/apply the code.

There is one section I still need work on, that being, the code terminology for the new UI's window. I am unsure how to write the ability to 1)select an item from your favorites list, and 2) click the combine in the new UI.
Any help or suggestions aside from what I've used (that being a mousepos click) would be much appreciated.

The code is designed to gate on any attack, and will continue to try and cast gate if the spell is interrupted for any reason.

Edit: One other missing part to this is that the new tradeskill UI is broken specifically when adding the favorite "Storm Salmon Filet" into the list of recipes specifically in a "Collapsible Spit".....the favorite is still shown at a regular oven.

Anyway, here it is:

Storm Salmon fishing, and baking Storm Salmon Filets.

Code: Select all

| This Macro is designed by Forza
| It is intended for use in both fishing and Baking skillups
| This macro is reliant on your having a Fisherman's Companion
|    in your first inventory slot, and a collapsible spit
|    in your second inventory slot.
| It is necessary to have all of your Tradeskill windows' "Open with Ctrl+R" Undepressed
| You will have to be either level 55 or be Plane of Storms/Plane of Valor flagged
|    in order to use this, as it is for fishing in PoS/PoV. 
#turbo

#event FullInv "There was no place to put that"
#event ReplacePrim "You need to put your fishing pole in your primary hand"
#event Nobait "You can't fish without fishing bait, go buy some"
#event Brokepole "You can't fish without a pole"
#event WrongComb "You cannot combine these items in this container type!"
#event Interr "Your spell is interrupted"
#event COMBINE_Alt "You have fashioned the items together to create an alternate product"
#event COMBINE_Lack "You lacked the skills to fashion the items together"
#event COMBINE_Succ "You have fashioned the items together to create something new!"
#event COMBINE_Skill "You have become better at Baking!"
#event COMBINE_Triv "You can no longer advance your skill from making this item"
#event Missing "Sorry, but you don't have everything you need for this recipe in your general inventory"
#event MissingFish "You are missing Storm Salmon"

sub Main
   /cleanup
      :Fish
         /call Checkpole
         /if $return==1 /return
         /doability Fishing
         /delay 65
         /call Caught
         /if n $char(hp,pct)<98 /call GateMe
      /goto :fish
   /return

Sub Checkpole
   /if "$equip(primary,name)"~~"Brell's Fishin' Pole" /return 0
   /if $invpanel==FALSE /press i
   /if "$char(state)"=="SIT" /sit
   /delay 4
   /click right inv 0
   /delay 11s
   /autoinventory
   /press i
/return

Sub GateMe
   /delay 6
   /if "$char(state)"=="SIT" /sit
   /cast "Gate"
   /if "$char(casting)==TRUE {
      :wait
      /goto :wait
   }
   /doevents
   /if "$char(state)"=="STAND" /sit
   /camp desktop
   /endmacro
/return

Sub Caught
   /if "$cursor(name)"=="Tattered Cloth Sandal" /destroy
   /if "$cursor(name)"=="Rusty Dagger" /destroy
   /if "$cursor(name)"=="Fish Scales" /destroy
   /if "$cursor(name)"=="Fresh Fish" /destroy
   /if "$cursor(name)"=="Crawdad" /autoinventory
   /if "$cursor(name)"=="Waterleaf Scale" /destroy
   /if "$cursor(name)"=="Vallorian Discus" /destroy
   /if "$cursor(name)"=="Nightmare Cichlid" /autoinventory
   /if "$cursor(name)"=="Storm Salmon" /call Combine
/return


| Before allowing a combine, you will need to open up your Collapsible Spit and have "Storm Salmon Filet"
|    in your recipe Favorites. Meaning you will have to have successfully combined it once and added it. 
| You will also need to find out your mouse's X,Y positions on your screen so that it clicks the correct recipe.
| You can do this by placing your mouse on top of the recipe in your favorites, and typing /mousepos. 
|    This will tell you the X and Y coordinates of your mouse.
|    Replace the X and Y coordinates from "/click left X Y" below with the X,Y coordinates of your mouse.
|    Additionally, you will need to determine the X,Y positioning of the "Combine" button and place the 
|       DIFFERENCE between those coordinates in the +X,+Y line.
   
Sub Combine
   :Combine
      /if "$inv(slot 1,name)"~~"Collapsible Spit" /return 0
      /if "$char(state)"=="SIT" /sit
      /delay 4
      /if $invpanel==FALSE /press i 
      /click right inv 4 
      /delay 5
      /autoinventory
      /click left 656 500
      /delay 10
      /click left +656 +171
      /delay 10
      /doevents
      /delay 5
   /goto :Combine
/return

/return 0

Sub Event_Brokepole
   /call Checkpole
/return

Sub Event_Nobait
   /call GateMe
/return

Sub Event_FullInv
   /call GateMe
/return

Sub Event_WrongComb
   /call Combine
/return

Sub Event_Interr
   /call GateMe
/return

Sub Event_ReplacePrim
   /call Checkpole
/return

Sub Event_COMBINE_Alt
   /autoinventory
/return

Sub Event_COMBINE_Lack
   /return

Sub Event_COMBINE_Succ
   /autoinventory
/return

Sub Event_COMBINE_Skill
   /return

Sub Event_COMBINE_Triv
   /call GateMe
/return

Sub Event_Missing
   /call Main
/return

Sub Event_MissingFish
   /call Main
/return