• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Shrooms.mac (1 Viewer)

The_Answer

New member
Joined
Dec 7, 2005
RedCents
I'm trying to get this macro to work again, it's for picking up the ground spawn mushrooms in Kaladim for the Kaladim Constitutional's. I know it stopped working when they changed item target. The 2nd code is what someone said to change to the original macro to get it to work after the item target change, but it's still not working for me. Basicly it isn't targeting the items still. If anyone could help me with this it would be greatly appreciated.

Rich (BB code):
|---------------
| shrooms.mac
| harvests the kaladim fungi
| original macro was by psychotik
| Heavily modified by BrainDeath Last Update: 10-18-04

#turbo
#chat tell
#event Full "#*#There was no place to put that#*#"
#include common.inc

Sub Main
   /if (${GameState.Equal[CHARSELECT]}) /endmacro
   /cleanup
   /call ClearCursor
   /call DefineOuters
   /call CheckForPCs
   /doevents
   /varset BlueCount 0
   /call Harvest
/return

Sub DefineOuters
   /declare DummyTime string outer
   /declare DummyMsg string outer
   /declare BlueCount int outer
   /varset DummyTime 15m
   /varset DummyMsg Stepped away for a minute...I'll be back soon
/return

Sub Harvest
   /if (${GameState.Equal[CHARSELECT]}) /endmacro
   /notify actionsmainpage AMP_WalkButton leftmouseup
   /afk off
   /delay 1s
   /sit off
   /delay 1s
:HarvestLoop
   /if (${GameState.Equal[CHARSELECT]}) /endmacro
   /call GetNextTarget
   /if (${Macro.Return.Equal[NOTFOUND]}) /goto :Pause
   /call CheckForPCs
   /doevents
   /call MoveToTarget
   /call GetIt
/goto :HarvestLoop

:Pause
   /notify actionsmainpage AMP_RunButton leftmouseup
   /delay 1s
   /target clear
   /face loc 661,-107
   /keypress CENTERVIEW
   /delay 1s
   /delay 1s
   /afk ${DummyMsg}
   /echo Countdown to next Harvest...
   /echo 6 minutes...
   /delay 1m
   /echo 5 minutes...
   /delay 1m
   /echo 4 minutes...
   /delay 1m
   /echo 3 minutes...
   /delay 1m
   /echo 2 minutes...
   /delay 1m
   /echo 1 minute...
   /delay 1m
   /echo Preparing to Harvest...
   /delay ${Math.Rand[300]}
   /call CheckForPCs
   /doevents
   /varset BlueCount 0
   /afk off
   /delay 1s
   /delay 1s
   /notify actionsmainpage AMP_WalkButton leftmouseup
   /goto :HarvestLoop
/return

Sub MoveToTarget
:KeepMoving
   /face loc ${Ground.Y}, ${Ground.X}
   /delay 5
   /keypress forward hold
   /if (${Ground.Distance}>15) /goto :KeepMoving
:StopMoving
   /keypress forward
/return

Sub DummyMode
   /beep
   /beep
   /beep
   /echo Entering Dummy Mode...
   /delay 1s
   /afk ${DummyMsg}
   :waitabit
   /delay ${DummyTime}
   /if (${Spawn[gm].ID} || (${SpawnCount[pc radius 150 loc -140 640]}>1)) /goto :waitabit
   /afk off
   /delay 1s
/return


Sub CheckForPCs
   /if (${Spawn[gm].ID}) {
      /echo GM in Zone!
      /call DummyMode
   }
   /if (${SpawnCount[pc radius 150 loc -140 640]}>1) {
      /echo PC nearby!
      /call DummyMode
   }
/return


Sub GetIt
   /click left item
   /call WaitForPickup
   /delay 1s
   /delay ${Math.Rand[10]}
   /if (${String[${Cursor}].Find[Mushroom]}) {
      /varcalc BlueCount ${BlueCount}+1
      /if (${BlueCount}>7) /destroy
   }
   /autoinv
   /call WaitForDrop
   /delay 1s
   /delay ${Math.Rand[10]}
   /doevents
/return


Sub GetNextTarget
   /declare BlueDistance local
   /declare RedDistance local
   /squelch /itemtarget *Blue
   /if (${Target.Distance}) {
      /varset BlueDistance ${Target.Distance}
   } else {
      /varset BlueDistance 999
   }
   /squelch /itemtarget *Red
   /if (${Target.Distance}) {
      /varset RedDistance ${Target.Distance}
   } else {
      /varset RedDistance 999
   }
   /if (${RedDistance}<${BlueDistance}) {
      /squelch /itemtarget *Red
   } else {
      /squelch /itemtarget *Blue
   }
   /if (${Ground.Distance}>115) /return NOTFOUND
/return FOUND


Sub Event_Chat
   /if (!${Me.AFK}) {
      /reply AFK Message: ${DummyMsg}
      /afk ${DummyMsg}
   }
   /echo Received a Tell...Ending.
   /beep
   /beep
   /beep
   /endmacro
/return


Sub Event_Full
   /call EndMacro "Your inventory is full...Ending."


Rich (BB code):
Sub GetNextTarget
   /declare BlueDistance local
   /declare RedDistance local
   /squelch /itemtarget *Blue
   /if (${Ground.Distance}) {
      /varset BlueDistance ${Ground.Distance}
   } else {
      /varset BlueDistance 999
   }
   /squelch /itemtarget *Red
   /if (${Ground.Distance}) {
      /varset RedDistance ${Ground.Distance}
   } else {
      /varset RedDistance 999
   }
   /if (${RedDistance}<${BlueDistance}) {
      /squelch /itemtarget *Red
   } else {
      /squelch /itemtarget *Blue
   }
   /echo (${Ground.Distance})
   /if (${Ground.Distance}>115) /return NOTFOUND
/return FOUND
 
Change anything with ${Target.Something} to ${ItemTarget.Something} and /face ${Target} to /face id ${ItemTarget}. Basically anything that used to be ${Target} change to ${ItemTarget}.

-CodeCaster
 
Ok I tried that and it isn't working still, only thing I get is [MQ2] (11.62). No clue what that is. Also, I tried typing in /itemtarget *Red, it said, "Item '*Red Mushroom0' targeted", but it didn't come up on my target window like it used to.
 
Mochila said:
Try adding /target ${ItemTarget} after your /itemtarget lines

Yeah actually the reason they removed it from popping up in the target window is because your target information is actually sent to the server. Thus, sony knows when you have something targetted that you're not supposed to be able to target... DKAA actually saved quite a few asses by changing this.

So yeah circumventing the fix by targetting the item anyway might be bad. :p

-CodeCaster
 
Anybody get this working?

I am a Noob to MQ2 macros, but looking over the code, the "Sub GetIt", is only referencing the Bluecount and "Mushroom", what about "Fungi". Or is this indentified as a "Mushroom" too. Also I went there to Harvest them. The blue count I had was 11. Is this a randon spawn count?

Is there anyway to the total spawncount of both Mushrooms and Fungi and add together and loop though it that way, then once all are harvested then pause until the next spawn time? just a thought.

My thought to would to add some Random Direction Looking before Harvesting, as to memic human looking around. Just a slight R to left and vis versa before picking them up. Just incase somebody is watching.

I will play with this some more. Good script to learn from per the comment about how the targeting window works with sending data to the server... and using the /Squelch.
 
I think this is posted in the public macros at MQ2.com, if not let me know and I'll remove code.

I didn't write this, just posting for whomever wants/needs it. You need both files.
Shrooms.mac
Rich (BB code):
|--------------------------------------------------
| Name:		Shrooms.mac
| Author:	psychotik
| Editted by:	BrainDeath
|--------------------------------------------------
| Automatically picks up the ground spawn fungi's
| Goes into AFK mode if a PC comes into LoS
|--------------------------------------------------

#turbo
#chat tell
#event Full "#*#There was no place to put that#*#"
#include common.inc

Sub Main
   /if (${GameState.Equal[CHARSELECT]}) /endmacro
   /cleanup
   /call ClearCursor
   /call DefineOuters
   /call CheckForPCs
   /doevents
   /varset BlueCount 0
   /varset RedCount 0
   /call Harvest
/return

Sub DefineOuters
   /declare DummyTime string outer
   /declare DummyMsg string outer
   /declare BlueCount int outer
   /declare RedCount int outer
   /varset DummyTime 15m
   /varset DummyMsg please don't bother me
/return

Sub Harvest
   /if (${GameState.Equal[CHARSELECT]}) /endmacro
   /notify actionsmainpage AMP_WalkButton leftmouseup
   /afk off
   /delay 1s
   /sit off
   /delay 1s
:HarvestLoop
   /if (${GameState.Equal[CHARSELECT]}) /endmacro
 
|  /call GetNextTargetR
  /call GetNextTargetB
|  /echo ${BlueCount}
  /if  ( ${BlueCount} > 6) /call GetNextTargetR
   /if (${Macro.Return.Equal[NOTFOUND]}) /goto :Pause
   /call CheckForPCs
   /doevents
   /call MoveToTarget
   /call GetIt
/goto :HarvestLoop

:Pause
   /notify actionsmainpage AMP_RunButton leftmouseup
   /delay 1s
   /target clear
   /face loc 661,-107
   /keypress CENTERVIEW
   /delay 1s
   /delay 1s
   /afk ${DummyMsg}
   /echo Countdown to next Harvest...
   /echo 6 minutes...
   /delay 1m
   /echo 5 minutes...
   /delay 1m
   /echo 4 minutes...
   /delay 1m
   /echo 3 minutes...
   /delay 1m
   /echo 2 minutes...
   /delay 1m
   /echo 1 minute...
   /delay 1m
   /echo Preparing to Harvest...
   /delay ${Math.Rand[300]}
   /call CheckForPCs
   /doevents
   /varset BlueCount 0
   /varset RedCount 0
   /afk off
   /delay 1s
   /delay 1s
   /notify actionsmainpage AMP_WalkButton leftmouseup
   /goto :HarvestLoop
/return

Sub MoveToTarget
:KeepMoving
   /face loc ${Ground.Y}, ${Ground.X}
   /delay 1
   /keypress forward hold
   /if (${Ground.Distance}>15) /goto :KeepMoving
:StopMoving
   /keypress forward
/return

Sub DummyMode
   /beep
   /beep
   /beep
   /echo Entering Dummy Mode...
   /delay 1s
   /afk ${DummyMsg}
   :waitabit
   /delay ${DummyTime}
   /if (${Spawn[gm].ID} || (${SpawnCount[pc radius 150 loc -140 640]}>1)) /goto :waitabit
   /afk off
   /delay 1s
/return


Sub CheckForPCs
   /if (${Spawn[gm].ID}) {
      /echo GM in Zone!
      /call DummyMode
   }
   /if (${SpawnCount[pc radius 150 loc -140 640]}>1) {
      /echo PC nearby!
      /call DummyMode
   }
/return


Sub GetIt
   /click left item
   /call WaitForPickup
   /delay 1s
   /delay ${Math.Rand[10]}
   /if (${Cursor.Name.Find[Mushroom]}) {
      /varcalc BlueCount ${BlueCount}+1
|      /if (${BlueCount}>7) /destroy
   }
   /autoinv
   /call WaitForDrop
   /delay 1s
   /delay ${Math.Rand[10]}
   /doevents
/return


Sub GetNextTargetR

   /declare RedDistance local

   /squelch /itemtarget *Red
   /if (${Target.Distance}) {
      /varset RedDistance ${Target.Distance}
   } else {
      /varset RedDistance 999
   }


   /if (${Ground.Distance}>115) /return NOTFOUND
/return FOUND

Sub GetNextTargetB
   /declare BlueDistance local
   

   /squelch /itemtarget *Blue
   /if (${Target.Distance}) {
      /varset BlueDistance ${Target.Distance}
   } else {
      /varset BlueDistance 999
   }

/if (${BlueCount}>7) /return NOTFOUND
   /if (${Ground.Distance}>115) /return NOTFOUND
/return FOUND

Sub GoGetIt

   /face item

   /keypress forward hold
   :move
   /if (${Ground.Distance}<8) {
      /keypress forward
   } else {
      /goto :move
   }
   
   /delay 1s
   /face item
   /delay 1s
   /click left item
   /delay 2s
   /autoinv

/return


Sub Event_Chat
   /if (!${Me.AFK}) {
      /reply AFK Message: ${DummyMsg}
      /afk ${DummyMsg}
   }
   /echo Received a Tell...Ending.
   /beep
   /beep
   /beep
   /endmacro
/return


Sub Event_Full
   /call EndMacro "Your inventory is full...Ending."
/return
Common.inc
Rich (BB code):
| common.inc Common Subroutines
| Converted 4/30/2004

| Wait for cursor to contain something.
Sub WaitForPickup
:waiting
   /delay 1
   /if (!${Cursor.ID}) /goto :waiting
/return

|Wait for cursor to become empty.
Sub WaitForDrop
:waiting
   /delay 1
   /if (${Cursor.ID}) /goto :waiting
/return

| Send everything on cursor to inventory.
Sub ClearCursor
:Loop
   /if (${Cursor.ID}) {
      /autoinv
      /delay 5
   }
   /if (${Cursor.ID}) /goto :Loop
/return

| Pause while self is targeted.
Sub Pause
   /if (!${String[${Target}].Equal[${Me}]}) /return
   /echo Pausing!! To resume, type /target clear or target something else.
   :HoldingPattern
      /delay 20
      /if (${String[${Target}].Equal[${Me}]}) /goto :HoldingPattern
/return

| Error reporting.
Sub EndMacro(Error)
   /echo ${Error}
   /echo An error has occured.. ending macro.
   /beep
   /endmacro
/return
 
yes the original shrooms.mac works..

so go back to the old code

if yours is not working then get the new MQ2 Code

as you will see on the MQ2 site... in the Kaladim fungal harvester theread...

they fixed it so that when you target ground spawn.. the functions will work
 
i can't access MQ2 site from work.. but if the macro you posted is not in the Macro depot.. then you need to remove it.

i can't remember if its VIP or not.. wil check when i get home if no one else has already

8-)


PS acorn2.mac will work for this also .. just change the coding a little..
 
Got the Shroom.mac posted above. Went there for a few hours and ended the day with over 400 of each shroom. Woot! Awesome guys. Thanks for the info.
 
armysoldier said:
you don't need that at all code..

with the 20 dec update.. its fixed

Well, I'm just saying you can't do a /target ${ItemTarget}... It won't work because ${ItemTarget} returns an id, and to target an id, you have tell /target that you want to target an id... You don't need it for this macro, but I was just telling you why your testing wasn't working. ;)

-CodeCaster
 
Was sitting in the garden today running this mac and what do you think I see ......3 shrooms that pop and are not named as a red or blue shroom ....but as a Spell.....now this would seem to me that SoE has put something in here to check and see if ppl are macro'ing .....cause the Macro will not tgt nor will it pick them up .....so user beware here .....just my 2 cents ...
 
Shrooms.mac

Users who are viewing this thread

Back
Top