my first macro - Working Fish.mac

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

Moderator: MacroQuest Developers

Kale Whiteblade
decaying skeleton
decaying skeleton
Posts: 8
Joined: Sun Nov 23, 2003 4:09 am

my first macro - Working Fish.mac

Post by Kale Whiteblade » Sun Nov 23, 2003 11:13 am

Ok, i started up mq and got the follow.mac to work, so i decided it was time to go fishing, after looking at a few of the macro's in the releave/macros folder. Unfortunatly.. Fish.mac didn't work, and i still don't know. Searching through some of the older junk, apparantly the variables need to be changed to a new style? Im not sure. So i looked for a new one, someone had to have fixed Fish.mac and made it work with brells companion. Well, several have tried, but none seemed to have the job done right, so i made my own. But.. i have some questions. Heres the code..

--What it does, Fishes till you run out of bait, if your pole breaks, it summons a new one from your fishermans companion, and auto equips it, drops fish scales, rusty daggers, and tattered cloth sandles on the ground, and keeps only the fish.

Code: Select all

| - Fish.mac - 
| 
#include routines.mac 
#include spellcast.mac 

Sub Main 
   /cleanup 
   :Fish 
      /if $invpanel==TRUE /press i
      /call CheckPole  
      /if $return==1 /return 
      /doability Fishing 
      /delay 55  
      /if "$cursor(name)"=="Tattered Cloth Sandal" /click left
      /if "$cursor(name)"=="Rusty Dagger" /click left
      /if "$cursor(name)"=="Fish Scales" /click left
      /if "$cursor(name)"=="Fresh Fish" /autoinventory 
      /click left auto 
   /goto :Fish 
/return 

Sub CheckPole 
   /if "$equip(primary,name)"~~"Brell's Fishin' Pole" /return 0 
   /if $invpanel==FALSE /press i
   /click right inv slot 0
   /delay 11s
   /autoinventory
   /press i
/return 0 
Now, a few things to clarify first off. I don't have a bait check, because bait can now be used straight out of your backpack. Secondly, i CLOSE the inventory right off.. Why you ask? well i've found that the

Code: Select all

/click left destroy
either do to lag, or other reasons sometimes doesnt work and ends up autoequipping it, taking up apaces i dont want taken up, and making me have to destroy more junk. So i keep the inventory closed, and just /click left, so it drops it. Note you have to have drop without confirmation enabled to do so. But wont this cause a problem when autoequipping your fish? No sir, the /autoinventory command takes care of that.

Now a few questions of my own.

the

Code: Select all

/click right inv slot 0
when changed to 1 - 7 does not actually click the number of slot given, in fact, it just does slot 0, as stated, even if the numbers are changed. Is there a way to remedy this?

Secondly, i read somewhere that "/finditem" is broken? Is this just old board stuff, or is it indeed broken?

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Sun Nov 23, 2003 2:24 pm

use /destroy to destroy stuff you dont want...
Last edited by EqMule on Sat Nov 29, 2003 6:06 pm, edited 1 time in total.
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Mon Nov 24, 2003 12:05 am

Fish2.mac is in the depo and does just this. It's not my current code atm so I'll update it in it's thread too. Here is what I use:

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
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

Guest

question

Post by Guest » Thu Nov 27, 2003 9:07 am

do i have to have the fishermans companion equiped in a certain slot for this to work?

Kale Whiteblade
decaying skeleton
decaying skeleton
Posts: 8
Joined: Sun Nov 23, 2003 4:09 am

Post by Kale Whiteblade » Sat Nov 29, 2003 12:04 pm

first inventory slot

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: question

Post by grimjack » Sat Nov 29, 2003 4:07 pm

Anonymous wrote:do i have to have the fishermans companion equiped in a certain slot for this to work?
Any inv slot for mine.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack