Macro requests from before the user variable changes that broke all macros
Moderator: MacroQuest Developers
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Thu Dec 26, 2002 3:56 pm
I'm looking for a script that'll just cast a spell over and over on myself to work up my skill. Ideally I'd like it to meditate when needed.
Also, I'd like to leave my AFK flag up and have the script pause whenever anyone was near.
-
SingleServing
- a hill giant

- Posts: 195
- Joined: Tue Dec 17, 2002 11:00 pm
Post
by SingleServing » Thu Dec 26, 2002 4:28 pm
hmm, off the top of my head, try....it might work =)
Might want to train evocation some other way however
replace target self with /target id $char(pet) if your practicing damaging spells and can summon a pet
Code: Select all
| Filename : TrainSpell.mac
#include spellcast.mac
#include spellbook.mac
| in game type /macro TrainSpell.mac "Spell Name"
Sub Main
/call ForgetSpellByNumber 1
/call MemorizeSpell "$p0" 1
/afk practicing spell skills =) | I personally think using afk is bad idea
:Loop
/press Esc
/target pc radius 200
/if $target(name)!=NULL {
/pause 60
/goto :Loop
}
/target myself
/call cast "$p0"
/if n $char(mana,pct)<10 {
/sit off
/sit on
/delay 5m
}
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]
-
boldor
- a ghoul

- Posts: 94
- Joined: Tue Sep 10, 2002 11:46 am
Post
by boldor » Thu Dec 26, 2002 6:51 pm
If you are trying to raise a cartain skill, you may want to try looking at one of the cleric trainers in the Depot. You can easily replace one of their spells for one of yours and practice all caster areas,
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Thu Dec 26, 2002 10:52 pm
Thanks!
I'll try it out tonight. If I add anything I'll post it back up.
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Fri Dec 27, 2002 10:07 am
As promised. Late night.... My first time using MQ and my first script so feedback is appreciated.
Might want to uncomment the clarity stuff if you're an enchanter.
Script is entirely paranoid. Won't cast if anyone's around and logs out if talked to or a GM is in zone.
Meds at 10% mana stops medding at 90%
Code: Select all
| Filename : TrainSpell.mac
#include spellcast.mac
#include spellbook.mac
|#event LostClarity "The cool breeze fades."
#chat tell
#chat say
| in game type /macro TrainSpell.mac "Spell Name" ["skill name" "target skill value"]
Sub Main
|/call ForgetSpellByNumber 1
|/call MemorizeSpell "$p0" 1
/target myself
|/call cast "clarity"
:Loop
/if $gm==TRUE /call StopPlaying
/press Esc
/target pc radius 200
/if $target(name)!=NULL {
/delay 6s
/goto :Loop
}
/target myself
/call cast "$p0"
/delay 5 |was recasting too fast
/if n $char(mana,pct)<10 {
/sit off
/sit on
:ManaLoop
/if n $char(mana,pct)>90 /goto :Loop
/delay 6s
/goto :ManaLoop
}
|Did we make it to our skill level?
/if "$p0"!="" {
/echo "$p0" "$p1":"$p2"
/varset v1 $char(skill,$p1)
/if n $v1>=$p2 /echo Skill level achieved.
|no nested {} so repeat
/if n $v1>=$p2 /call StopPlaying
}
/goto :Loop
/return
Sub Event_LostClarity
/call cast "clarity"
/sit on
/return
Sub Event_Chat
|massively paranoid leave if anyone talks to us
/cleanup
/sit off
/sit on
/delay 20
/camp
/unload
/return
Sub StopPlaying
/cleanup
/sit off
/sit on
/delay 20
/camp
/unload
/return
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Fri Dec 27, 2002 10:10 am
Forgot to mention I commented out everything that needed a mouse click. That way I don't have to use the old AI.
Side effect is you need to mem your spell(s) before starting the script.
-
L124RD
- Site Admin

- Posts: 1343
- Joined: Fri Jun 14, 2002 12:15 am
- Location: Cyberspace
-
Contact:
Post
by L124RD » Fri Dec 27, 2002 1:06 pm
Salutations,
so that you would not have to untarget yourself and target yourself again you could do (at the top under sub main)
then instead of your /if $target()!=NULL use:
-
L124RD
- Site Admin

- Posts: 1343
- Joined: Fri Jun 14, 2002 12:15 am
- Location: Cyberspace
-
Contact:
Post
by L124RD » Fri Dec 27, 2002 2:13 pm
Salutations,
oooh! ooh! I know why! alert needs a spawn name... *sigh*
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Fri Dec 27, 2002 2:32 pm
Yeah I tried /alert add 1 radius 200, /alert add 1 radius 200 *, etc.
Couldn't get it to work.
I would like to get rid of the esc though that way I could leave the skills dialog up.
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Fri Dec 27, 2002 3:42 pm
Fixed code for L124RD. This version no longers presses ESC to clear the target.
Also fixed a bug. I didn't have a call to /dovents so chat events weren't happening.
Code: Select all
| Filename : TrainSpell.mac
#include spellcast.mac
#include spellbook.mac
|#event LostClarity "The cool breeze fades."
#chat tell
#chat say
| in game type /macro TrainSpell "Spell Name" ["skill name" "target skill value"]
Sub Main
|/call ForgetSpellByNumber 1
|/call MemorizeSpell "$p0" 1
|Find out and remember who we are for targetting
/target myself
/varset v3 $char(name)
|/call cast "clarity"
:Loop
/doevents
/if $gm==TRUE {
/call StopPlaying
}
/target myself
/target pc radius 200
/if $target(name)!=$v3 {
/delay 6s
/echo "$target(name)" "$v3"
/goto :Loop
}
/target myself
/call cast "$p0"
/delay 5 |was recasting too fast
/if n $char(mana,pct)<10 {
/sit off
/sit on
:ManaLoop
/if n $char(mana,pct)>90 /goto :Loop
/delay 6s
/goto :ManaLoop
}
|Did we make it to our skill level?
/if "$p0"!="" {
| /echo "$p0" "$p1":"$p2"
/varset v1 $char(skill,$p1)
/if n $v1>=$p2 /echo Skill level achieved.
|no nested {} so repeat
/if n $v1>=$p2 /call StopPlaying
}
/goto :Loop
/return
Sub Event_LostClarity
/call cast "clarity"
/sit on
/return
Sub Event_Chat
|massively paranoid leave if anyone talks to us
/cleanup
/sit off
/sit on
/delay 20
/camp
/endmacro
| /unload
/return
Sub StopPlaying
/cleanup
/sit off
/sit on
/delay 20
/camp
/endmacro
| /unload
/return
-
SingleServing
- a hill giant

- Posts: 195
- Joined: Tue Dec 17, 2002 11:00 pm
Post
by SingleServing » Sat Dec 28, 2002 10:58 pm
L124RD wrote:Salutations,
oooh! ooh! I know why! alert needs a spawn name... *sigh*
Damn and I was ready to turn the flame thrower on
JK heh
Any who... add a do events into your med loop so if you loose clarity while your medding you'll refresh it
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Sat Dec 28, 2002 11:26 pm
I intentionally removed the doevents from the manaloop. I had one in there at one point. I don't want him standing up and casting if he hasn't checked to see if anyone is around first.
-
JoeBloe
- orc pawn

- Posts: 13
- Joined: Thu Dec 26, 2002 3:54 pm
Post
by JoeBloe » Sun Dec 29, 2002 12:45 pm