The_Answer
New member
- Joined
- Dec 7, 2005
- RedCents
- 0¢
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