SkillupMagic.mac -- Raises magic skills

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Carpe Diem
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Apr 25, 2004 1:37 am

Post by Carpe Diem » Mon Apr 26, 2004 12:40 pm

I also really really really miss this macro, but I understand why it is broken. I am thankful that macroquest2 is being improved and that the development team is so proactive. I am a noob to MQ2 and, as most noobs, I would imagine skillup macros are the first ones we get our feet wet with. When this macro used to work, it would take several hours for the macro to max my spell skills. I already have carpal tunnel syndrome. If it were not for MQ2 and specifically the macro above, I might as well schedule the CTS surgery :) I am so thankful to the MQ2 team and to the author of this macro, and patiently await the day that this macro gets updated.

I understand there is a revision to the MQ2 manual being worked on, and I would imagine that many of the established macro authors are waiting for this document to be released so they can study the new system in detail. I would guess that shortly after this manual is released we will see many macros being updated.

newb-n-training
a lesser mummy
a lesser mummy
Posts: 39
Joined: Mon Apr 19, 2004 8:51 pm

Post by newb-n-training » Mon Apr 26, 2004 2:21 pm

Never used this macro and at work so it is UNTESTED.

I'm still learning so figured this would be a good one to play with and it might get someone started with the true conversion:

Code: Select all

| Call this macro after defining targetted skill levels and appropriate spells
|
| Will iterate through all skills and raise them to requested levels in order
| The macro will auto end if the character moves.
|
| IMPORTANT NOTE: If you're casting a summoning spell and an item with "Summoned:"
|                 exists on your cursor it will be DESTROYED.



#define MANA_SIT 30             |% mana to sit and regain mana
#define MANA_CAST 90            |% mana to stand and resume casting

sub Main

  /declare loc_x global         |x loc
  /declare loc_y global         |y loc

|=========================
|  record loc of character
|=========================
  /varset loc_x (${Me.X})
  /varset loc_y (${Me.Y})

  /call RaiseSkill "Abjuration" 120 "Taper Enchantment"
  /call RaiseSkill "Alteration" 120 "Shallow Breath"
  /call RaiseSkill "Conjuration" 120 "Mesmerize"
  /call RaiseSkill "Divination" 120 "True North"
  /call RaiseSkill "Evocation" 120 "Chaotic Feedback"
  /call RaiseSkill "Channeling" 120 "True North"
  /call RaiseSkill "Meditate" 120 "Alacrity"
  /call RaiseSkill "Specialize Alteration" 50 "Shallow Breath"
/return


|===================================================================================
sub RaiseSkill(skill,level,spell)

|=========================
| general notification
|=========================
  /echo - Raising @skill to @level with '@spell'
  /echo Macro will AUTO STOP if movement is detected.

|=========================
| return if spell not in book
|=========================
| /if $char(book,"@spell")==NULL {
  /if (!${Book[@spell]} {
    /echo Spell '@spell' not in spellbook.
    /return
  }

  :loop
|=========================
| insert short semi-random delay
|=========================
| /delay $calc(5+$rand(5))
  /delay (${Rand[10]})s

|=========================
| exit if character movement detected
|=========================
| /if (@loc_x!=$char(x) || @loc_y!=$char(y)) {
  /if (${Me.X}!=@loc_x || ${Me.Y}!=@loc_y) {
    /echo Movement detected!  Ending macro.
    /endmacro
  }

|=========================
| if casting a summoning spell and a summoned item on cursor, destroy it
|=========================
| /if ("@spell"~~"Summon" && "$cursor(name)"~~"Summoned:") /destroy
  /if (@spell~~"Summon" && ${Cursor.Name}~~"Summoned:") /destroy

|=========================
| return if this skill at desired level
|=========================
| /if n $char(skill,"@skill")>=@level {
|   /echo @skill at $char(skill,"@skill")
  /if (${Skill[@skill]}>=@level {
    /echo @skill at ${Skill[@skill]}
    /return
  }

|=========================
| insure spell memorized
|=========================
| /if n $char(gem,"@spell")==0 {
  /if (!${Gem[@spell]})
    /memspell 8 "@spell"
    /delay 10s
  }

|=========================
| sit if not casting/medding and mana dropped to MANA_SIT value
|=========================
| /if (n $char(mana,pct)<MANA_SIT && $char(state)=="STAND" && $char(casting)=="FALSE") /sit
  /if (${Me.PctMana}<MANA_SIT && ${Me.State.Equal[STAND]} && !${Me.Casting.ID}) /sit

|=========================
| if medding and mana not yet up to MANA_CAST, continue to med
|=========================
| /if ($char(state)=="SIT" && n $char(mana,pct)<MANA_CAST) /goto :loop
  /if (${Me.State.Equal[SIT]} && ${Me.PctMana}<MANA_CAST) /goto :loop

|=========================
| cast if the spell has refreshed
|=========================
| /if n $char(gem,"@spell")>0 {
|   /if $char(state)=="SIT" /stand
|   /if n $target(id)!=$char(id) /target myself
  /if (${Gem[@spell]})>0 {
    /if (${Me.State.Equal[SIT]) /stand
    /if (${Target.CleanName.NotEqual[${Me.CleanName}]}) /target myself
    /cast "@spell"
  }

|=========================
| loop
|=========================
  /goto :loop
/return 
I've left the old code in for reference so whomever can go back and check against the way something is 'supposed' to work.

homburg
orc pawn
orc pawn
Posts: 20
Joined: Wed Apr 07, 2004 9:52 am

Post by homburg » Mon Apr 26, 2004 4:05 pm

Thanks! Thanks also for the method of conversion. Leaving the old style commands helps me understand how the new Data structure works.

I'll give it a go tonight and see how it works.

Mongol311
a lesser mummy
a lesser mummy
Posts: 45
Joined: Sat Apr 24, 2004 12:06 pm
Location: Connecticut, USA

Post by Mongol311 » Mon Apr 26, 2004 4:12 pm

Tried tinkering around with this today, could not get it to work. Kept getting error of "Ending Macro. Failed to parse /if command. Could not find command to execute"

and

"skillmagicup.mac@49 (RaiseSkill(skill,level,spell): /if(!${Book[@spell]}{skillmagicup.mac@25 (Main): /call RaiseSkill "Abjuration" 200"Okeil's Radiation"

Here is the code im using

| Call this macro after defining targetted skill levels and appropriate spells
|
| Will iterate through all skills and raise them to requested levels in order
| The macro will auto end if the character moves.
|
| IMPORTANT NOTE: If you're casting a summoning spell and an item with "Summoned:"
| exists on your cursor it will be DESTROYED.



#define MANA_SIT 30 |% mana to sit and regain mana
#define MANA_CAST 90 |% mana to stand and resume casting

sub Main

/declare loc_x global |x loc
/declare loc_y global |y loc

|=========================
| record loc of character
|=========================
/varset loc_x (${Me.X})
/varset loc_y (${Me.Y})

/call RaiseSkill "Abjuration" 200 "Okeil's Radiation"
/call RaiseSkill "Alteration" 200 "Root"
/call RaiseSkill "Conjuration" 200 "Halo of Light"
/call RaiseSkill "Divination" 200 "True North"
/call RaiseSkill "Evocation" 120 "Chaotic Feedback"
/call RaiseSkill "Channeling" 120 "True North"
/call RaiseSkill "Meditate" 120 "Alacrity"
/call RaiseSkill "Specialize Alteration" 50 "Shallow Breath"
/return


|===================================================================================
sub RaiseSkill(skill,level,spell)

|=========================
| general notification
|=========================
/echo - Raising @skill to @level with '@spell'
/echo Macro will AUTO STOP if movement is detected.

|=========================
| return if spell not in book
|=========================
| /if $char(book,"@spell")==NULL {
/if (!${Book[@spell]} {
/echo Spell '@spell' not in spellbook.
/return
}

:loop
|=========================
| insert short semi-random delay
|=========================
| /delay $calc(5+$rand(5))
/delay (${Rand[10]})s

|=========================
| exit if character movement detected
|=========================
| /if (@loc_x!=$char(x) || @loc_y!=$char(y)) {
/if (${Me.X}!=@loc_x || ${Me.Y}!=@loc_y) {
/echo Movement detected! Ending macro.
/endmacro
}

|=========================
| if casting a summoning spell and a summoned item on cursor, destroy it
|=========================
| /if ("@spell"~~"Summon" && "$cursor(name)"~~"Summoned:") /destroy
/if (@spell~~"Summon" && ${Cursor.Name}~~"Summoned:") /destroy

|=========================
| return if this skill at desired level
|=========================
| /if n $char(skill,"@skill")>=@level {
| /echo @skill at $char(skill,"@skill")
/if (${Skill[@skill]}>=@level {
/echo @skill at ${Skill[@skill]}
/return
}

|=========================
| insure spell memorized
|=========================
| /if n $char(gem,"@spell")==0 {
/if (!${Gem[@spell]})
/memspell 8 "@spell"
/delay 10s
}

|=========================
| sit if not casting/medding and mana dropped to MANA_SIT value
|=========================
| /if (n $char(mana,pct)<MANA_SIT && $char(state)=="STAND" && $char(casting)=="FALSE") /sit
/if (${Me.PctMana}<MANA_SIT && ${Me.State.Equal[STAND]} && !${Me.Casting.ID}) /sit

|=========================
| if medding and mana not yet up to MANA_CAST, continue to med
|=========================
| /if ($char(state)=="SIT" && n $char(mana,pct)<MANA_CAST) /goto :loop
/if (${Me.State.Equal[SIT]} && ${Me.PctMana}<MANA_CAST) /goto :loop

|=========================
| cast if the spell has refreshed
|=========================
| /if n $char(gem,"@spell")>0 {
| /if $char(state)=="SIT" /stand
| /if n $target(id)!=$char(id) /target myself
/if (${Gem[@spell]})>0 {
/if (${Me.State.Equal[SIT]) /stand
/if (${Target.CleanName.NotEqual[${Me.CleanName}]}) /target myself
/cast "@spell"
}

|=========================
| loop
|=========================
/goto :loop
/return





Any suggestions?
I live in an asbestos igloo, do your worst!
(Devs, please don't hate me, I donated!)

newb-n-training
a lesser mummy
a lesser mummy
Posts: 39
Joined: Mon Apr 19, 2004 8:51 pm

Post by newb-n-training » Mon Apr 26, 2004 5:04 pm

try changing

Code: Select all

| return if spell not in book
|=========================
| /if $char(book,"@spell")==NULL {
/if (!${Book[[color=cyan]"[/color]@spell[color=cyan]"[/color]]} { 

Mongol311
a lesser mummy
a lesser mummy
Posts: 45
Joined: Sat Apr 24, 2004 12:06 pm
Location: Connecticut, USA

Post by Mongol311 » Mon Apr 26, 2004 6:11 pm

Ok, this is what I have now.

| Call this macro after defining targetted skill levels and appropriate spells
|
| Will iterate through all skills and raise them to requested levels in order
| The macro will auto end if the character moves.
|
| IMPORTANT NOTE: If you're casting a summoning spell and an item with "Summoned:"
| exists on your cursor it will be DESTROYED.



#define MANA_SIT 30 |% mana to sit and regain mana
#define MANA_CAST 90 |% mana to stand and resume casting

sub Main

/declare loc_x global |x loc
/declare loc_y global |y loc

|=========================
| record loc of character
|=========================
/varset loc_x (${Me.X})
/varset loc_y (${Me.Y})

/call RaiseSkill "Abjuration" 200 "Okeil's Radiation"
/call RaiseSkill "Alteration" 200 "Root"
/call RaiseSkill "Conjuration" 200 "Halo of Light"
/call RaiseSkill "Divination" 200 "True North"
/call RaiseSkill "Evocation" 200 "Shock of Fire"
/call RaiseSkill "Channeling" 200 "True North"
/call RaiseSkill "Meditate" 200 "Familiar"
/call RaiseSkill "Specialize Alteration" 50 "Shallow Breath"
/return


|===================================================================================
sub RaiseSkill(skill,level,spell)

|=========================
| general notification
|=========================
/echo - Raising @skill to @level with '@spell'
/echo Macro will AUTO STOP if movement is detected.

| return if spell not in book
|=========================
| /if $char(book,"@spell")==NULL {
/if (!${Book["@spell"]} {
/echo Spell '@spell' not in spellbook.
/return
}

:loop
|=========================
| insert short semi-random delay
|=========================
| /delay $calc(5+$rand(5))
/delay (${Rand[10]})s

|=========================
| exit if character movement detected
|=========================
| /if (@loc_x!=$char(x) || @loc_y!=$char(y)) {
/if (${Me.X}!=@loc_x || ${Me.Y}!=@loc_y) {
/echo Movement detected! Ending macro.
/endmacro
}

|=========================
| if casting a summoning spell and a summoned item on cursor, destroy it
|=========================
| /if ("@spell"~~"Summon" && "$cursor(name)"~~"Summoned:") /destroy
/if (@spell~~"Summon" && ${Cursor.Name}~~"Summoned:") /destroy

|=========================
| return if this skill at desired level
|=========================
| /if n $char(skill,"@skill")>=@level {
| /echo @skill at $char(skill,"@skill")
/if (${Skill[@skill]}>=@level {
/echo @skill at ${Skill[@skill]}
/return
}

|=========================
| insure spell memorized
|=========================
| /if n $char(gem,"@spell")==0 {
/if (!${Gem[@spell]})
/memspell 8 "@spell"
/delay 10s
}

|=========================
| sit if not casting/medding and mana dropped to MANA_SIT value
|=========================
| /if (n $char(mana,pct)<MANA_SIT && $char(state)=="STAND" && $char(casting)=="FALSE") /sit
/if (${Me.PctMana}<MANA_SIT && ${Me.State.Equal[STAND]} && !${Me.Casting.ID}) /sit

|=========================
| if medding and mana not yet up to MANA_CAST, continue to med
|=========================
| /if ($char(state)=="SIT" && n $char(mana,pct)<MANA_CAST) /goto :loop
/if (${Me.State.Equal[SIT]} && ${Me.PctMana}<MANA_CAST) /goto :loop

|=========================
| cast if the spell has refreshed
|=========================
| /if n $char(gem,"@spell")>0 {
| /if $char(state)=="SIT" /stand
| /if n $target(id)!=$char(id) /target myself
/if (${Gem[@spell]})>0 {
/if (${Me.State.Equal[SIT]) /stand
/if (${Target.CleanName.NotEqual[${Me.CleanName}]}) /target myself
/cast "@spell"
}

|=========================
| loop
|=========================
/goto :loop
/return


Is this correct?
I live in an asbestos igloo, do your worst!
(Devs, please don't hate me, I donated!)

Still_a_newb
orc pawn
orc pawn
Posts: 27
Joined: Sun Apr 25, 2004 9:36 pm

Post by Still_a_newb » Mon Apr 26, 2004 6:37 pm

After seeing a post about wizard harvest every 10 minutes, can somone make a simple script to add into my macro that will cast Flameshield of Ro on the main assist I declare when beginning the macro and have it recast every 7 and 1/2 minutes?

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Fri May 07, 2004 6:50 pm

Wow another cool macro I'd like to see "rejuvinated" per say. I'm trying hard to learn the code so I could possibly update them. May take a week or two tho :roll:

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

Post by Zazoot » Fri Aug 06, 2004 6:57 pm

Drumstix42 wrote:Wow another cool macro I'd like to see "rejuvinated" per say. I'm trying hard to learn the code so I could possibly update them. May take a week or two tho :roll:
did you ever update it?

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sat Aug 07, 2004 12:09 am

No because there are macros just like this already released in the current depot.