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 to use this.
| 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 these:
| /doability "Sneak"
| /doability "Hide"
#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
/zapvar
/declare DestArraySize global
/declare tempvar global
/declare DestroyArray array
/varset DestroyArray(0) "Tattered Cloth Sandal"
/varset DestroyArray(1) "Rusty Dagger"
/varset DestroyArray(2) "Fish Scales"
/varset DestroyArray(3) "Item to destroy"
/varset DestroyArray(4) "Item2 to destroy"
|Add as many more of these lines as you want. Just add 1 to the number in () and add 1 to DestArraySize for each.
/varset DestArraySize 4
:Fish
/if n $char(ability,"Fishing")>0 {
/delay 1s
/if "$char(casting)"=="FALSE" {
/if "$cursor()"=="NULL" {
/doability Fishing
/doevents
}
}
}
/if n $char(ability,"Sneak")>0 {
/if "$char(casting)"=="FALSE" {
/doability "Sneak"
}
}
/if n $char(ability,"Hide")>0 {
/if "$char(casting)"=="FALSE" {
/doability "Hide"
}
}
/if "$cursor()"!="NULL" /call ItemSub
/doevents
/if "$cursor()"!="NULL" /call ItemSub
/goto :Fish
/return
Sub ItemSub
:cursorloop1
/for tempvar 0 to @DestArraySize
/if "$cursor(name)"~~"@DestroyArray(@tempvar)" {
/destroy
/delay 1
}
/next tempvar
/if "$cursor()"=="TRUE" {
/autoinventory
/delay 1
/if "$cursor()"=="TRUE" /goto :cursorloop1
}
/return
Sub Event_NeedPole
/cast item "Fisherman's Companion"
/delay 11s
/autoinventory
/delay 1
:cursorloop2
/if "$cursor()"=="TRUE" {
/autoinventory
/delay 1
/goto :cursorloop2
}
/return
Sub Event_PrimaryHand
/cast item "Fisherman's Companion"
/delay 11s
/autoinventory
/delay 1
:cursorloop3
/if "$cursor()"=="TRUE" {
/autoinventory
/delay 1
/goto :cursorloop3
}
/return
Sub Event_OutOfBait
/if "$char(state)"=="STAND" /sit
/camp desktop
/endmacro
/return


