Page 2 of 5
auto sit
Posted: Thu Mar 03, 2005 11:29 am
by shadowman33
Just curious, but could this macro be modified so you could be sitting, foragre, then the macro will sit you back down automatically? Only reason I ask is because I like to use this macro while I am medding. I ride on a Drog so I do not use the macro full time except when I leave for the night and just sit in Guild Hall and let macro run all night to skill up. When I run out of mana, I like to get off the drog, start this macro, then sit down. Only problem is I have to keep sitting myself back down after I forage attempt. It's not a complaint because the macro works wonderfully. Was just wondering if someone could modify it for people like me so I will sit back down to med after foraging.
..
Posted: Tue Mar 15, 2005 7:29 pm
by idoit2
im sure im doing something wrong but i looked couldnt figure it out when i try to stay the mac it says you no longer have a target. the current macro has ended. if anyone could help me id appreciate it!
Posted: Wed Mar 23, 2005 2:39 pm
by The0Eldest
The correct fix for mdar's code is...
Code: Select all
/varset ItemsHave ${FindItemCount[=${Cursor.Name}]}
Instead of...
Code: Select all
/varset ItemsHave ${FindItem=${Cursor.Name}}
This error was because of a missprint in the Manual, the example doesn't show "Count" in the command.
Works great with that slight change.
Re: ..
Posted: Thu Mar 31, 2005 11:24 pm
by eqsomebody
idoit2 wrote:im sure im doing something wrong but i looked couldnt figure it out when i try to stay the mac it says you no longer have a target. the current macro has ended. if anyone could help me id appreciate it!
Running into the same problem. I'm using the original macro posted at the top of thread. The macro is not automatically foraging. When I hit my hotkey for forage and find something, it will auto inventory the item but will not automatically forage. Suggestions?
Posted: Thu Mar 31, 2005 11:33 pm
by eqsomebody
As an update to my post, I found that I did not have Forage assigned to an ability under my Actions window. Once I assigned Forage to one of the abilities, I was off to the races..
Thanks.
Posted: Wed Apr 20, 2005 2:52 pm
by Steggo
Modified quite a bit to be more useful for me, plan on making it an inc. once I get all the bugs out. Basically it'll run without hindering anything you do (unless you're anal about the precious seconds you lose while it pauses your combat). Any suggestions or comments welcome, still pretty new to all this.
Code: Select all
|04/20/05
|yafm.mac
|
|Yet Another Forage Macro
|
|Ini File: yafm.ini
|
| 0 = destroy
| x = keep at most x of this item
|
|New foraged items are added to the ini file automatically and are kept by default.
|04/20/05: You should return to sitting or fighting as applicable.
|04/24/05 Will stop the macro automatically if you camp
| -- was causing an issue spamming your MQ window at character select screen.
|04/25/05 Added a check to see if you are at the bank, casting a spell,
| or have your spellbook open so you won't get spammed.
#event Success "You have scrounged #*#"
#event Camp "It will take about #*#"
||||||||||||||||||||
| Main
||||||||||||||||||||
sub Main
/declare DefaultMaxSave int outer
/varset DefaultMaxSave ${Ini[yafm.ini,Default,MaxSave,${NotFound}]}
/if (${DefaultMaxSave}==${NotFound}) {
/ini "yafm.ini" "Default" "MaxSave" "100"
/varset DefaultMaxSave 100
}
| Verify that we have the ability to forage.
/if (${Me.Skill[Forage]}==0) {
/echo You cannot forage, silly person!
/goto :Exit
}
:Forage
| If we can forage then prepare to do so and return to previous state--
| sitting or attacking so far. Am I missing anything?
/if (${Me.AbilityReady[Forage]}) {
/if ( ${Window[BigBankWnd].Open}) {
/goto :Forage
}
/if ( ${Window[SpellBookWnd].Open}) {
/goto :Forage
}
/if ( ${Me.Casting.ID}) {
/goto :Forage
}
/if (${Me.State.NotEqual[STAND]}) {
/stand
/delay 1s
/doability forage
/sit
} else /if (${Me.Combat}) {
/attack off
/delay 1s
/doability forage
/attack on
} else {
/delay 1s
/doability forage
}
}
/doevents
/goto :Forage
:Exit
/return
||||||||||||||||||||
| Success
||||||||||||||||||||
sub Event_Success
| If we successfully foraged something then take care of it.
/if (${Cursor.ID}) {
/call HandleItem
}
/return
||||||||||||||||||||
| Camp
||||||||||||||||||||
sub Event_Camp
/echo "Camping, macro ended."
/endmacro
/return
||||||||||||||||||||
| HandleItem
||||||||||||||||||||
sub HandleItem
/declare ItemSetting int local
/declare NotFound int local
/declare ItemsHave int local
/varset NotFound -1
:LootIt
| Look up this item in yafm.ini
/varset ItemSetting ${Ini[yafm.ini,ForageList,${Cursor.Name},${NotFound}]}
/delay 5
| If the item isn't in the .ini file then add it.
/if (${ItemSetting}==${NotFound}) {
/ini "yafm.ini" "ForageList" "${Cursor.Name}" "${DefaultMaxSave}"
/varset ItemSetting ${DefaultMaxSave}
}
/varset ItemsHave ${FindItemCount[=${Cursor.Name}]}
| If we're keeping this item then stash it in our bags.
| Otherwise, just destroy it.
/if (${ItemSetting}>${ItemsHave}) {
/autoinventory
} else {
/destroy
}
/delay 5
/if (${Cursor.ID}) /goto :LootIt
/return
*Edit* 04/24/05 Will stop the macro automatically if you camp -- was causing an issue spamming your MQ window at character select screen.
*Edit* 04/25/05 Added a check to see if you are at the bank, casting a spell, or have your spellbook open so you won't get spammed.
Posted: Tue May 24, 2005 1:24 pm
by Cybmax
Hmm.. what am i doing wrong? I only get "Cannot call when a macro isn't running" when i start it.. do i have to put some options on it or??
Posted: Tue May 24, 2005 2:05 pm
by dedpoet
That's the error message you would get if you just typed "/call <something>" in game. Are you sure you pasted the macro properly and are starting it properly?
Posted: Wed May 25, 2005 7:23 am
by Cybmax
Copy paste from the one 2 messages up..
I type /macro yafm
i got yafm.ini in the same folder as yafm.mac
Posted: Wed May 25, 2005 9:28 am
by dedpoet
There is only one /call statement in that whole macro. Check the line number that the error gives you. What is on that line? Also, check your line wrap. Each line should start with a command or a comment. Depending on how you pasted the macro and what program you used to do it, there may be line wrap issues.
Posted: Sat Jun 18, 2005 4:29 pm
by creamsoda
I'm getting the "Cannot call when a macro isn't running" message alsowhen trying to start the macro. It's copied verbatim to whats posted above. No error message givin. Just the "Cannot call when a macro isn't running"
Posted: Sun Jun 19, 2005 12:50 am
by dedpoet
You're doing something wrong. I run this macro regularly with no problems at all. As I said above, there is only one /call statement in the entire macro. How are you saving the macro? How are you running the macro?
Posted: Sun Jun 19, 2005 4:19 pm
by creamsoda
Some thing somewhere is getting lost in the translation. I have the macro scripted from a copy format the same as whats listed above. Looking at the script I see nothing off hand that would cause the notation I listed previously. Note that when I run the script I get no mention of an error on line "so and so". I've even removed to call line from the script itself to see if that changes the line to an actual error but there was no change on my end.
Posted: Sun Jun 19, 2005 4:44 pm
by dedpoet
Can you run any other macro?
Posted: Mon Jun 20, 2005 3:19 pm
by ziptop21
Delete all of this
|** 04/20/05
|yafm.mac
|
|Yet Another Forage Macro
|
|Ini File: yafm.ini
|
| 0 = destroy
| x = keep at most x of this item
|
|New foraged items are added to the ini file automatically and are kept by default.
|04/20/05: You should return to sitting or fighting as applicable.
|04/24/05 Will stop the macro automatically if you camp
| -- was causing an issue spamming your MQ window at character select screen.
|04/25/05 Added a check to see if you are at the bank, casting a spell,
| or have your spellbook open so you won't get spammed.
and it should work