I am trying to change my fishing macro so it will recast my pole and autoequip it if my pole breaks, but not sure if i got it right....plz tell me what i got wrong and how to fix it.
#turbo
#event BrokenPole "#*#You can't fish without a fishing pole, go buy one.#*#"
#event NoBait "#*#You can't fish without fishing bait, go buy some.#*#"
Sub Main
/cleanup
:Fish
/call CheckPole
/doability Fishing
/delay 65
/doevents
/if (!${Cursor.ID}) /goto :Fish
/if (${Cursor.Name.Equal[Tattered Cloth Sandal]}) {
/destroy
/delay 1s
} else {
/if (${Cursor.Name.Equal[Rusty Dagger]}) {
/destroy
/delay 1s
} else {
/call KeepItem
}
}
/goto :Fish
/return
Sub KeepItem
/if (${Cursor.Name.NotEqual[Fish Scales]}) /echo Caught ${Cursor.Name}
/notify InventoryWindow IW_CharacterView leftmouseup
/return
Sub CheckPole
/if (${Me.Inventory[mainhand].Name.Find[Brell's Fishin' Pole]}) /return
/echo You need to put your fishing pole in your primary hand.
/endm
/return
Sub Event_BrokenPole
/cast Fisherman's Companion
/return
Sub Event_NoBait
/endmacro
/return
#turbo
#event BrokenPole "#*#You can't fish without a fishing pole, go buy one.#*#"
#event NoBait "#*#You can't fish without fishing bait, go buy some.#*#"
Sub Main
/cleanup
:Fish
/call CheckPole
/doability Fishing
/delay 65
/doevents
/if (!${Cursor.ID}) /goto :Fish
/if (${Cursor.Name.Equal[Tattered Cloth Sandal]}) {
/destroy
/delay 1s
} else {
/if (${Cursor.Name.Equal[Rusty Dagger]}) {
/destroy
/delay 1s
} else {
/call KeepItem
}
}
/goto :Fish
/return
Sub KeepItem
/if (${Cursor.Name.NotEqual[Fish Scales]}) /echo Caught ${Cursor.Name}
/notify InventoryWindow IW_CharacterView leftmouseup
/return
Sub CheckPole
/if (${Me.Inventory[mainhand].Name.Find[Brell's Fishin' Pole]}) /return
/echo You need to put your fishing pole in your primary hand.
/endm
/return
Sub Event_BrokenPole
/cast Fisherman's Companion
/return
Sub Event_NoBait
/endmacro
/return