Code: Select all
| - Fish2.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."
Sub Main
/cleanup
/declare DestArraySize global
/declare LoopCount global
/declare DestroyArray array
/varset DestroyArray(0) "Tattered Cloth Sandal"
/varset DestroyArray(1) "Rusty Dagger"
/varset DestroyArray(2) "Fish Scales"
/varset DestroyArray(3) "Dragon Bay"
/varset DestroyArray(4) "Fresh Fish"
/varset DestArraySize 5
/varset LoopCount 0
: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)"~~"@DestroyArray(@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
}
/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
/returnThanks for any help and sorry for the noob question.


donations for this month's patches.