Moderator: MacroQuest Developers

Code: Select all
:HarvestLoop
/if (${GameState.Equal[CHARSELECT]}) /endmacro
| /call GetNextTargetR
/call GetNextTargetB
| /echo ${BlueCount}
/if ( ${BlueCount} > [color=red]8[/color]) /call GetNextTargetR
/if (${Macro.Return.Equal[NOTFOUND]}) /goto :Pause
/call CheckForPCs
/doevents
/call MoveToTarget
/call GetIt
/goto :HarvestLoop no . .. you were asking for help on an afk mac and specifically told that you probably would not get a lot of help because it was an afk mac.Jeepster wrote:Same thing it is doing for me, I even ask for help in the ViP area but got told off for asking for it,, I guess if you don't run a /afk Xp mac you don't get any help.
Code: Select all
|---------------
| shrooms.mac
| harvests the kaladim fungi
| original macro was by psychotik
| Heavily modified by BrainDeath Last Update: 10-18-04
| Modified again by Exmarine Last update 04-26-06
#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 AFK unti Mushrooms return brb
/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 GetNextTargetB
/if ( ${BlueCount} > 8) /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[Fungus]}) {
/varcalc RedCount ${RedCount}+1
}
/if (${Cursor.Name.Find[Mushroom]}) {
/varcalc BlueCount ${BlueCount}+1
}
/autoinv
/call WaitForDrop
/delay 1s
/delay ${Math.Rand[10]}
/doevents
/return
Sub GetNextTargetR
/declare RedDistance local
/echo ${RedCount}
/squelch /itemtarget *Red
/if (${Target.Distance}) {
/varset RedDistance ${Target.Distance}
} else {
/varset RedDistance 999
}
/if (${RedCount}>8) /return NOTFOUND
/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 (${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 Code: Select all
| --------------------------------------------------------------------------
| autoShroom.mac
| harvests the kaladim fungi
| original macro was by psychotik
| Updates by BrainDeath, Exmarine
| --------------------------------------------------------------------------
#turbo
#chat tell
#event Full "#*#There was no place to put that#*#"
Sub Main
/echo Welcome to autoShroom
/declare DummyTime string outer
/declare DummyMsg string outer
/declare ShroomCount int outer
/varset DummyTime 5m
/varset DummyMsg AFK
/cleanup
/notify actionsmainpage AMP_WalkButton leftmouseup
/afk off
/delay 1s
/sit off
/delay 1s
:HarvestLoop
/call CheckForPCs
/for ShroomCount 1 to 9
/squelch /itemtarget *Blue
/if (${Ground.Distance}<150) {
/call MoveToTarget
/call GetIt
/doevents
}
/squelch /itemtarget *Red
/if (${Ground.Distance}<150) {
/call MoveToTarget
/call GetIt
/doevents
}
/call CheckForPCs
/next ShroomCount
/notify actionsmainpage AMP_RunButton leftmouseup
/delay 1s
/target clear
/face loc 661,-107
/keypress CENTERVIEW
/delay 2s
/afk ${DummyMsg}
/echo Next Harvest 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]}
/doevents
/afk off
/delay 2s
/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
/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
/delay 5s (${Cursor.ID})
/delay ${Math.Rand[10]}
/autoinv
/delay 5s (!${Cursor.ID})
/delay ${Math.Rand[10]}
/doevents
/return
Sub Event_Chat
/if (!${Me.AFK}) {
/reply AFK Message: ${DummyMsg}
/afk ${DummyMsg}
}
/echo Received a Tell...Ending. Camping soon
/beep
/timed 1000 /camp
/endmacro
/return
Sub Event_Full
/echo "Your inventory is full...Ending."
/camp
/endmacro
/return

Code: Select all
|---------------
| shrooms.mac
| harvests the kaladim fungi
| original macro was by psychotik
| Heavily modified by BrainDeath Last Update: 10-18-04
| Lame SoE tactics thwarted by somelamedruid
#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
:KeepMoving1
/face loc 635, -82
/delay 5
/keypress forward hold
/if (${Me.Y} > 640 || ${Me.X} < -100) /goto :KeepMoving1
/keypress forward
/call Harvest
/return
Sub DefineOuters
/declare DummyTime string outer
/declare DummyMsg string outer
/declare BlueCount int outer
/varset DummyTime 15m
/varset DummyMsg shrooms shrooms plz spawn soon... friggin brewing again!
/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}
:KeepMoving2
/face loc 635, -82
/delay 5
/keypress forward hold
/if (${Me.Y} > 650 || ${Me.X} < -100) /goto :KeepMoving2
/keypress forward
/echo Time for a break!
|This macro might not hit all mushrooms on a particular run
|Six minute delay hence has been nixed
:waitforshroom
/call CheckForPCs
/delay 10s
/call GetNextTarget
/if (${Macro.Return.Equal[NOTFOUND]}) /goto :waitforshroom
/echo Preparing to Harvest...
/delay ${Math.Rand[300]}
/call CheckForPCs
/doevents
/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) {
|/if (${SpawnCount[pc]} > 1) {
/echo PC nearby!
/call DummyMode
|This is what I do, but the above is from the original so do what you want
|/keypress instant_camp
|/endmacro
}
/return
Sub GetIt
/click left item
/call WaitForPickup
/delay 1s
/delay ${Math.Rand[10]}
/autoinv
/call WaitForDrop
/delay 1s
/delay ${Math.Rand[10]}
/doevents
/return
Sub GetNextTarget
/squelch /itemtarget
/if (${Ground.Distance}>115 || !${Ground.LineOfSight}) /return NOTFOUND
/return FOUND
noWizeOne wrote:somelamedruid i think you made a typo, incude common.inc should be common.ini right