Code: Select all
| - Fish.mac -
| Updated fishing macro.
| Mainly for people who have a fisherman's companion.
| Put your fisherman's companion in an inventory slot and hotkey
| it to your 10th hotkey slot.
| This macro will fish until out of bait, summoning poles when you
| need a new one. Once out of bait it will sit you down and camp you out.
| be sure to edit the array so that it destroy's only what you don't want
| to keep. If you add or remove entries update the /varset DestArraySize.
|
| Also if you are not a rogue you may want to disable the
| /doability "Sneak"
| /doability "Hide"
| section at the begining of the script and in the #event subs.
#event PrimaryHand "You need to put your fishing pole in your primary hand."
#event OutOfBait "You can't fish without fishing bait, go buy some."
#event NeedPole "You can't fish without a fishing pole, go buy one."
#define DestArraySize v40
#define LoopCount v41
Sub Main
/cleanup
/varset a(1,0) "Tattered Cloth Sandal"
/varset a(1,1) "Rusty Dagger"
/varset a(1,2) "Fish Scales"
/varset a(1,3) "Dragon Bay"
/varset a(1,4) "Fresh Fish"
/varset DestArraySize 5
/varset LoopCount 0
/doability "Sneak"
/doability "Hide"
:Fish
/if "$cursor()"!="NULL" /call ItemSub
/if n $char(ability,"Fishing")>0 {
/delay 1s
/if "$cursor()"=="NULL" {
/doability Fishing
}
}
/doevents
/if "$cursor()"!="NULL" /call ItemSub
/goto :Fish
/return
Sub ItemSub
:itemchecker
/if "$cursor(name)"~~"$a(1,$LoopCount)" {
/click left destroy
/delay 1s
}
/varadd LoopCount 1
/if "$cursor()"!="NULL" {
/if n $LoopCount<$DestArraySize /goto :itemchecker
}
/if "$cursor()"!="NULL" {
/click left auto
/delay 1s
}
/varset LoopCount 0
/return
Sub Event_NeedPole
/press 0
/delay 11s
/click left auto
:cursorloop
/if "$cursor()"=="TRUE" {
/click left auto
/goto :cursorloop
}
/doability "Sneak"
/doability "Hide"
/return
Sub Event_PrimaryHand
/press 0
/delay 11s
/click left auto
/delay 1s
:cursorloop
/if "$cursor()"=="TRUE" {
/click left auto
/goto :cursorloop
}
/doability "Sneak"
/doability "Hide"
/return
Sub Event_OutOfBait
/sit off
/sit
/camp
/endmacro
/return


