This is what I did - I am a hack coder so prolly a better way to do
this...
Magical Training
Benefit: You can cast three 0-level arcane spells per day as either
a sorcerer or wizard (your choice, so long as you have a score of at
least 10 in the ability that controls the spellcasting for that
class). You must make this decision when you first take the feat.
Thereafter, you have an arcane spell failure chance if you wear
armor and are treated as a sorcerer or wizard of your arcane
spellcaster level (minimum 1st) for the purpose of determining
level-based variables of the spells you cast.
GET:
CalcQty
MTTot = 0
cr.SetVariable "MagTrainingVar", ""
X = func.Choose ("Is your Magical Training as a Sorcerer or a
Wizard?", "Sorcerer", 1, "Wizard", "Magical Training Type")
If X = 1 then Y = 2
If X = 2 then Y = 3
do
MagTrainChoice
MTTot = MTTot + 1
loop until MTTot = Y
REMOVE:
Cr.RemoveVariable "MagicalTrainingQty"
cr.RemoveVariable "MagTrainingVar"
USE:
qty = func.CVInt(Cr.GetVariable("MagicalTrainingQty"))
If qty = 0 Then
func.AddToCombatLog Cr.Name & " has no more uses of Magical
Training available!"
Else
'Customize what the Use code does here.
remainingQty = qty - 1
Cr.SetVariable "MagicalTrainingQty", remainingQty
func.AddToCombatLog Cr.Name & " uses \b1 Magical Training\b0, " &
remainingQty & " uses remain today."
End If
REST:
CalcQty
If Hours = 0 Then func.AddToCombatLog Cr.Name & " has his number of
uses of Magical Training reset to " & Cr.GetVariable
("MagicalTrainingQty")
OTHER:
sub MagTrainChoice()
X = func.Choose ("Select your spell", "Acid Splash", 1, "Acrane
Mark", 2, "Dancing Lights", 3, "Daze", 4, "Disrupt Undead", 5,
"Flare", 6, "Ghost Sound", 7, "Mage Hand", 8, "Message", 9,
"Open/Close", 10, "Prestidigitation", 11, "Ray of Frost", 12, "Touch
of Fatigue", 13, "Magical Training")
if X = 1 then Chosen = "Acid Splash"
if X = 2 then Chosen = "Arcane Mark"
if X = 3 then Chosen = "Dancing Lights"
if X = 4 then Chosen = "Daze"
if X = 5 then Chosen = "Disrupt Undead"
if X = 6 then Chosen = "Flare"
if X = 7 then Chosen = "Ghost Sound"
if X = 8 then Chosen = "Mage Hand"
if X = 9 then<> Chosen = "Message"
if X = 10 then Chosen = "Open/Close"
if X = 11 then Chosen = "Prestidigitation"
if X = 12 then Chosen = "Ray of Frost"
if X = 13 then Ch osen = "Touch of Fatigue"
if X <> "" then
MTList = cr.GetVariable("MagTrainingVar")
if instr(MTList, Chosen) > 0 then
func.AddToCombatLog cr.Name & " already has " & Chosen & ")! Choose
another spell."
else
MTList = cr.GetVariable("MagTrai ningVar")
MTList = MTList & ";" & Chosen
call cr.SetVariable("MagTrainingVar", MTList)
end if
end if
End Sub
Sub CalcQty()
'You can customize the # of uses per day here (from class levels
etc.)
qty = 3
Cr.SetVariable "MagicalTrainingQty", qty
End Sub
SPECIAL:
X = cr.GetVariable("MagTrainingVar")
X = replace(X , ";", ",", 2)
X = replace(X , ";", "")
mystring = X
myarray = split(mystring, ",")
Count = 0
for each Y in myarray
Count = Count + 1
if count = 2 then
A = myarray(0)
B = myarray(1)
num1 = func.GetSpellNum("" & A & "", False)
if num1 > 0 then
call cr.LearnSpell (int(num1), "Sor")
end if
num2 = func.GetSpellNum("" & B & "", False)
if num1 > 0 then
call cr.LearnSpell (int(num2), "Sor")
end if
end if
if count = 3 then
A = myarray(0)
B = myarray(1)
C = myarray(2)
num1 = func.GetSpellNum("" & A & "", False)
if num1 > 0 then
call cr.LearnSpell (int(num1), "Wiz")
end if
num2 = func.GetSpellNum("" & B & "", False)
if num1 > 0 then
call cr.LearnSpell (int(num2), "Wiz")
end if
num3 = func.GetSpellNum("" & C & "", False)
if num1 > 0 then
call cr.LearnSpell (int(num3), "Wiz")
end if
end if
next
HTH,
~Zym
---
"I can already see your name disintegrating from my lips...."