Moderator: MacroQuest Developers




The fix is on the board and was easily found with the search function, BUT i have edited my first post for you, quite a while ago there was a problem with the code on theboard that changed alot of the macros ">" and "<" symbols to their Equivalents ">" and "<".Soul Hunter wrote:When I run trainspell.mac using the .inc you included in the first post it gives me
Unparsable in Calculation: 'g'
trainspell.mac@16(Main):/if (${ArcaneLevel}>235 /varset ArcaneLevel 235
the current macro has ended
Failed to parse /if condition '(270>235)'. no-numeric encountered
I'm not sure if this is just an older macro and needs the cap reset or what...thanks in advance for the assistance

It can be as simple as (Untested)Merlin wrote:how hard would be be to make a macro similiar to this what would keep casting a spell like yaulp every time it fades?
Code: Select all
|Yaulp.mac
#include spell_routines.inc
sub main
:main
/if (${Me.PctMana}<10) /echo "No Mana to cast Yaulp"
/if (!${Me.Buff[Yaulp].ID}) {
/call cast "Yaulp"
}
/delay 1s
/goto :main
/returnCode: Select all
#event SkillUp "You have become better at #1#! (#2#)"
#event ESC "You no longer have a target."
Sub Event_ESC
/echo Macro Ended by user.
/call Results
/return
|-- Sub Event_SkillUp
Sub Event_SkillUp(string Line, string SkillType, int SkillValue)
/if (${Spell[${Me.Gem[${GemNumber}]}].Skill.Equal[${SkillType}]}) {
/varcalc MainSkillUp ${MainSkillUp}+1
}
/if (${Spell[${Me.Gem[${GemNumber}]}].Skill.NotEqual[${SkillType}]}) {
/varcalc SecSkillUp ${SecSkillUp}+1
}
/if (${Spell[${Me.Gem[${GemNumber}]}].Skill.Equal[${SkillType}]}) {
/if (${Math.Calc[${Me.Level}*5+5]}==${SkillValue}) {
/call Results
}
}
/return
|-- Sub Results
Sub Results
/echo Results: ${Spell[${Me.Gem[${GemNumber}]}].Skill} (${Me.Skill[${Spell[${Me.Gem[${GemNumber}]}].Skill}]}) -- Total of ${MainSkillUp} skillups!
/echo Total other skillups (not ${Spell[${Me.Gem[${GemNumber}]}].Skill}) -- ${SecSkillUp}.
/endmacro
/return
Code: Select all
|**
trainspell.mac
Written by Fuergrissa V2.0
HandleItem routine "Borrowed" from bootyjuice, Thank You.
Ini File: trainspell.ini
0 = Destroy
1 = Keep
Any summoned items are added to the ini file automatically
first time around and are kept by default.
**|
#Define ArcaneMax 235
#include spellcast.inc
#event SkillUp "You have become better at #1#! (#2#)"
#event ESC "You no longer have a target."
Sub Main
/declare ArcaneLevel int outer
/declare SpellName string outer
/declare GemNumber int outer
/declare WhatSkill string outer
/declare Maxxed int outer
/varcalc ArcaneLevel ${Me.Level}*5+5
/echo Your Spell Cap is ${ArcaneLevel}
/if (${ArcaneLevel}>ArcaneMax) /varset ArcaneLevel ArcaneMax
/echo Your Current Spell Cap is ${ArcaneLevel}
/varset GemNumber 0
/varset Maxxed 0
/varset SpellName ""
/varset WhatSkill ""
:TrainingLoop
/if (${Me.PctMana}<10) /goto :SitDown
/if (${Cursor.ID}) /call SummonedItem
/goto :CastSpell
:SitDown
/echo Mana at ${Me.PctMana}% Medding till over 99%
:MedLoop
/if (${Me.State.Equal[STAND]}) /sit
/if (${Me.PctMana}>99) /goto :FullMana
/goto :MedLoop
/return
:FullMana
/echo Mana at ${Me.PctMana}% Starting to cast again...
/if (${Me.State.Equal[SIT]}) /stand
:CastSpell
/Varcalc GemNumber ${GemNumber}+1
/if (${GemNumber}>8) /varset GemNumber 1
/varset SpellName ${Me.Gem[${GemNumber}]}
/if (!${Me.Gem[${SpellName}]}) /goto :TrainingLoop
/goto :TestSkill
:StartCasting
/target myself
/echo Casting ${SpellName} from GemSlot ${GemNumber} of Type ${Spell[${SpellName}].Skill} (${Me.Skill[${Spell[${SpellName}].Skill}]})
/varset Maxxed 0
/call cast "${SpellName}"
/goto :TrainingLoop
/return
:TestSkill
/if (${Me.Skill[${Spell[${SpellName}].Skill}]}==${ArcaneLevel}) /goto :TooHigh
/goto :StartCasting
/return
:TooHigh
/varset WhatSkill ${Spell[${SpellName}].Skill}
/varcalc Maxxed ${Maxxed}+1
/echo You cannot Increase ${WhatSkill} anymore.
/if (${Maxxed}==8) /goto :Finished
/goto :TrainingLoop
/return
:Finished
/echo Ending
/call Results
Sub SummonedItem
/declare ItemSetting int local
/declare NotFound int local
/varset NotFound -1
| Look up this item in trainspell.ini
/varset ItemSetting ${Ini[trainspell.ini,ItemList,${Cursor.Name},${NotFound}]}
/delay 5
| If the item isn't in the .ini file then add it.
/if (${ItemSetting}==${NotFound}) {
/ini "trainspell.ini" "ItemList" "${Cursor.Name}" "1"
/varset ItemSetting 1
}
| If we're keeping this item then bag it.
| Otherwise, just destroy it.
/if (${ItemSetting}==1) {
:BagIt
/autoinventory
/delay 5
/if (${Cursor.ID}) /goto :BagIt
} else {
/destroy
}
/return
Sub Event_ESC
/echo Macro Ended by user.
/call Results
/return
|-- Sub Event_SkillUp
Sub Event_SkillUp(string Line, string SkillType, int SkillValue)
/if (${Spell[${Me.Gem[${GemNumber}]}].Skill.Equal[${SkillType}]}) {
/varcalc MainSkillUp ${MainSkillUp}+1
}
/if (${Spell[${Me.Gem[${GemNumber}]}].Skill.NotEqual[${SkillType}]}) {
/varcalc SecSkillUp ${SecSkillUp}+1
}
/if (${Spell[${Me.Gem[${GemNumber}]}].Skill.Equal[${SkillType}]}) {
/if (${Math.Calc[${Me.Level}*5+5]}==${SkillValue}) {
/call Results
}
}
/return
|-- Sub Results
Sub Results
/echo Results: ${Spell[${Me.Gem[${GemNumber}]}].Skill} (${Me.Skill[${Spell[${Me.Gem[${GemNumber}]}].Skill}]}) -- Total of ${MainSkillUp} skillups this session!
/echo Total other skillups (not ${Spell[${Me.Gem[${GemNumber}]}].Skill}) -- ${SecSkillUp}.
/endmacro
/return

change thisB_rizzleB wrote:ok i've done all the stuff and put the stuff in the directory and when i go /macro trainspell it feeds back trainspell.mac@47 (main): /call cast "${SpellName} the current macro has ended. im wandering if u can helpz me? btw im using spell_routine.inc
Code: Select all
#include spellcast.inc
Code: Select all
#include spell_routines..inc