Quick single spell skill conversion >_<

For questions regarding conversion of scripts from the old, parm style to the new MQ2Data format. Conversion questions only!

Moderator: MacroQuest Developers

Sensay
orc pawn
orc pawn
Posts: 26
Joined: Thu Dec 11, 2003 12:06 am
Location: VA
Contact:

Quick single spell skill conversion >_<

Post by Sensay » Sat May 22, 2004 10:52 am

Hehe can anyone fix this for me? Would be much appreciated, is from a cpl months ago but now I need it again and am lost ><


Just meh simple spell skill getter-upper

Code: Select all

sub Main 
  :loop 
    /cast "<Spell name>" 
    /delay 10s 

    /if n $char(mana,pct)<=30 /call MedUp 

    /delay $calc(5+$rand(10)) 

   /goto :loop 
   /return 

Sub MedUp 
    /sit 
  :WaitMed 
    /delay 6s 
    /if n $char(mana,pct)<=99 /goto :WaitMed 
    /stand 
    /return  


Thanks ^_^

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Sat May 22, 2004 11:02 am

You're not even going to TRY?! No, go to hell. Download the one that is posted in Depot and be happy.

Sensay
orc pawn
orc pawn
Posts: 26
Joined: Thu Dec 11, 2003 12:06 am
Location: VA
Contact:

Post by Sensay » Sat May 22, 2004 11:09 am

I did and I messed it up =P


tried looking at the ones that do like all skills consecutivly(sp?) and grabbign code and im getting all kinds fo errors ><


another edit: Scratch this post =) Got a good one workin.

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

Post by Drumstix42 » Sat May 22, 2004 12:34 pm

Untested:

Code: Select all

|- spelltrain.mac
|- by Drumstix42
|- 5-22-2004
|----------------------------------------------------
|- Useage:
|- /macro spelltrain <"SpellNameHere">
|- Example:
|- /macro spelltrain "Spirit of Wolf"
|- Requires SpellCast.inc
|- /endmac to stop :P

#include SPELLCAST.inc

/declare iManaMedPct int outer
/declare iManaFullPct int outer
/declare iGemNum int outer

|-- CHANGE TO PERSONAL LIKING ---

/varset iManaMedPct 20    |% mana to start medding at
/varset iManaFullPct 98   |% mana to start casting again
/varset iGemNum 1         |Gem number to mem spell to to train (1-8)

|-- DONE CHANGING STUFF ---

Sub Main
   /if (!${Defined[Param0]}) {
      /echo You must define a spell!
      /echo Useage: /macro spelltrain <"SpellNameHere">
      /endmacro
   } else {
      /echo Training Spell: ${Param0}
      /call Training
   }
/return

Sub Training
   /if (!${Me.Standing}) /stand
   /if (!${Target.ID}) /target myself
   :MainLoop
    /if (${Me.PctMana}>${iManaMedPct}) {
       /call cast ${Param0} gem${iGemNum}
       /goto :MainLoop
    } else {
       /echo Low on Mana - Medding until ${iManaFullPct}% mana
       /call Medding
    }
/return

Sub Medding
    :MedLoop
     /if (${Me.PctMana}<${iManaFullPct}) {
        /echo Medding...
        /if (${Me.Standing}) /sit
        /delay 7s
        /goto :MedLoop
     } else {
        /echo Done medding.
        /call Training
     }
/return

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Wed Jun 02, 2004 1:59 pm

[quote]"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."[/quote]