repeatcast.mac - A simple spell trainer

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Clawed
a ghoul
a ghoul
Posts: 105
Joined: Mon Jan 20, 2003 6:17 am

repeatcast.mac - A simple spell trainer

Post by Clawed » Mon Jan 20, 2003 6:26 am

Here is a shorter, simple spell repeater macro. All it does is cast the specified spell repeatedly until you run out of mana, then it sits and ends the macro. Run the macro with no parameters for help with usage, or read the comments at the beginning (which are the same). Note that this macro requires spellcast.mac, which is included with MacroQuest. As with all macros, don't run this AFK. There is no GM detection included in this one.

Fully tested and works well.

Code: Select all

| repeatcast.mac
|
| Casts a spell on the target in an endless loop until mana runs out, then
| sits and exits. This is used to achieve skill ups in your spell skills.
|
| Usage:
|   repeatcast.mac "Spell Name"
|
| This macro requires that the named spell be already memorized, due to
| current limitations of /click and the new UI.


#include spellcast.mac


Sub Main

  | If no command line, print out a help message
  /if n $strlen("$p0")==0 { 
    /echo repeatcast.mac
    /echo
    /echo Casts a spell on the target in an endless loop until mana runs out, then
    /echo sits and exits. This is used to achieve skill ups in your spell skills.
    /echo
    /echo Usage:
    /echo   repeatcast.mac "Spell Name"
    /echo
    /echo This macro requires that the named spell be already memorized, due to
    /echo current limitations of /click and the new UI.    
    /return 
  }

  | Check if you can cast the spell
  /if n $spell("$p0",level)>$char(level) {
    /echo You cannot cast $p0.
    /return
  }

  /stand
  /echo Repeatedly casting $p0 until mana runs out... use /endmacro to stop earlier.

  :SpellLoop
    /call Cast "$p0"
    /if n $return!=CAST_SUCCESS /goto :Done
    /delay 1
    /goto :SpellLoop

:Done
  /if n $return==CAST_UNKNOWNSPELL {
    /echo You do not have $p0 memorized.
    /goto :Exit
  }
  /if n $return==CAST_OUTOFMANA {
    /echo You have run out of mana. Goodbye!
    /goto :Exit
  }
  /echo There was an error attempting to cast $p0. Please try again.

:Exit
  /sit

/return
Last edited by Clawed on Mon Jan 20, 2003 10:20 pm, edited 2 times in total.
Clawed

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Better rename

Post by SingleServing » Mon Jan 20, 2003 6:49 am

Better rename your title based on the forum rules before the penguin gets j00
[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]

Clawed
a ghoul
a ghoul
Posts: 105
Joined: Mon Jan 20, 2003 6:17 am

Post by Clawed » Mon Jan 20, 2003 7:34 am

My apologies, it is very late at night. :P
Clawed

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Jan 20, 2003 1:12 pm

Salutations,
penguin = Lock
lizard = rename with a note

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

About GM code

Post by SingleServing » Mon Jan 20, 2003 9:01 pm

Some people add it (gm code) and try to go to some remote place that no one goes. Such a good way to single yourself out, gee wonder what this 1 guy is doing in Warsilk woods for 15 hours hmmm... I spell train in bazaar or Nexus where no one will care about 1 measly person in the huge crowd and it is not uncommon for people to be in these zones for 15 hours strait. Just a tip for you guys
[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]

Catt
a lesser mummy
a lesser mummy
Posts: 76
Joined: Mon Sep 16, 2002 2:49 am

Post by Catt » Tue Jan 21, 2003 3:12 am

You may also wish to take a peek at:

http://macroquest2.com/phpBB2/viewtopic.php?t=1608

JoeBloe
orc pawn
orc pawn
Posts: 13
Joined: Thu Dec 26, 2002 3:54 pm

Post by JoeBloe » Wed Jan 22, 2003 3:15 pm

I disagree SingleServing.

I parked at the zone line between The Field of Bone and Emerald Jungle. I stayed in an illusion and the script stopped casting if someone is near. It logged off if spoken to or a GM was in the zone. I ran this script for 32 hours straight at one point. Evocation with an enchanter is really tough to max out.

The only time my guy was ever talked to was twice by beggars. I rarely ever had anyone come within range and they just ran on by when they did. I set up beeps when players were near and spent at least 12 hours of my time watching the script whenever it started beeping. Player behavior was always the same. They walked on by.

I also tried scripting in the bazaar. The behavior of players was that I could not go more than one hour without being talked to or pestered in some way. Even in an illusion and not casting when anyone was near sitting off in a corner out past the arena.

If someone sees you casting in the bazaar that someone may be inclined to talk to you. And then report you when you obviously weren't responding.

My opinion is it is better to not be seen. The GMs do not have time to hunt you down. They rely on the reports of players.

Look for the AFK spell caster posted in the depot. That is the script I used. I used it for more than 100 hours and was only interrupted twice when I went to a "quiet" area.

-Joe

Clawed
a ghoul
a ghoul
Posts: 105
Joined: Mon Jan 20, 2003 6:17 am

Another idea for this script

Post by Clawed » Thu Jan 23, 2003 2:45 am

After writing this script, I have found it to be very useful with my shaman for casting Canni. All I have to do is press one button and my shaman loops Canni until I hit another button to stop it. Makes things a ton more convenient for me, and of course no one is going to be suspicious of anything. I don't need skill ups, just repetitive casting. :)
Clawed

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Tue Jan 28, 2003 9:58 pm

I was hoping that I could use this to get my Evo up by casting Ward Undead on my pet till it got up there but I cant seem to get it to work, It doesnt like that Ward Undead is a two word spell. I can get it to work on 1 word spells just not ones with two words, am I doin something wrong?

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Almost totally univeral answer...

Post by SingleServing » Wed Jan 29, 2003 3:29 am

driftinsupra wrote:I was hoping that I could use this to get my Evo up by casting Ward Undead on my pet till it got up there but I cant seem to get it to work, It doesnt like that Ward Undead is a two word spell. I can get it to work on 1 word spells just not ones with two words, am I doin something wrong?
If you are having problems with multiple words in a command put double quotes around it... "Ward Undead", "Big Floppy Donkey", /who all "Bunny Wabbit Guild"...

I think that should just about cover it in 99% of the time you ever have a similar problem in EQ or anywhere else on the computer.
[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]

darkfang
decaying skeleton
decaying skeleton
Posts: 3
Joined: Wed Feb 05, 2003 3:42 pm

Post by darkfang » Wed Feb 05, 2003 3:46 pm

OK, this is my macro for spell casting does exactly what you want and works pretty well for me. About 30 points of evoke an hour with ward undead and pet.

Code: Select all

| evoke macro |

#turbo

Sub Main

/press CTRL
/press shift
/press alt
/stand

/varset v31 "Ward Undead"
/varset v32 $char(gem,"Ward Undead")
/varset v33 $int($spell("Ward Undead",casttime)*10+$spell("Ward Undead",recoverytime)*10+6)
/varset v41 "Cavorting Bones"
/varset v42 $char(gem,"Cavorting Bones")

/if n $v32==0 {
/echo Please memorize the spell $v31.
/endmacro
}

/if n $v42==0 {
/echo Please memorize the spell $v41.
/endmacro
}

/cast $v42
/delay 8s

/target pet

:Loop

| just check if the skill has maxed yet |

/if n $char(skill,"Evocation")>234 /goto :Done

/if n $char(gem,"Ward Undead")==-2 {
/delay 5
/goto :Loop
}

/if n $char(mana,cur)<30 /goto :Meditate

/cast $v32
/delay $v33

/goto :Loop

| For when we run out of mana |

:Meditate
/sit

:Medloop

/delay 20s
/if n $char(mana,pct)<100 /goto :Medloop

/stand
/goto :Loop

:Done
/echo WOOT WOOT
/endmacro
/return
Of course, this can be easily modified for other classes by changing the spell cast, the part where it checks currrent mana, and the whole thing about casting a pet.

Also note I'm not sure if #turbo is used right here, this is one of my first macros. Anyway you can leave this going for hours and it is very efficient about skillups.

Lord Yei
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 27, 2003 9:48 am
Contact:

one small mod

Post by Lord Yei » Sat Feb 08, 2003 3:02 am

I would put some kind of /sit /camp at the end there...otherwise looks good
Lord Yei -- Mage and Scholor
I think there is a world market for maybe five computers.
- [i]Thomas Watson, chairman of IBM, 1943.[/i]

Space-Boy
a hill giant
a hill giant
Posts: 242
Joined: Wed Dec 04, 2002 12:53 pm
Contact:

Post by Space-Boy » Fri Apr 04, 2003 2:16 pm

Darkfang, your macro crashes me to desktop heh
You have gotten better at Carpal Tunnel! (247)

papiraul
a lesser mummy
a lesser mummy
Posts: 76
Joined: Fri Sep 27, 2002 8:46 am

Post by papiraul » Mon Apr 07, 2003 2:08 am

Well macroquest hasn't got all the right offsets yet..

Looak at your .ini

clsMainSpellRefresh=0
clsMainSpellMemId=0
clsMainSpellMemBar=0
clsMainSpellMemGem=0

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Mon Apr 07, 2003 8:42 am

So help us out and find the offsets =)