TILEMASTER2004 DATA V1
SCRIPT: 100
0 AddKeyWords bye 2  job 4  buy 100  spell 10  spells 10  new 10  teach 10  advise 20  1 101  minor 101  2 102  lesser 102  3 103  moderate 103  4 104  greater 104  5 105  major 105  scroll 5  sell 200  learn 6  help 300
0 GOTO 4
1 DoConvInput "Sorry, I don't know that one"
2 Message "Goodbye"
0 BREAK
4 Message "If you are an arcane caster, I can teach you new spells or help you learn from spell scrolls.  Also, anyone can sell spell scrolls to me.  I'm also willing to offer some advise that applies to any type of spellcaster.  Which would you like?"
0 GOTO 1
5 Message "Sell or help?"
0 GOTO 1
6 Message "Spell or help with a scroll?"
0 GOTO 1
10 CMessage "While I don't know them all, I do know a lot of them, so I've divided them up into categories.  One thing about that I have to explain to all of my students is that the power of a spell is relative to the main version of the spell, but not necessarily to each other.  So a minor version of a really powerful spell may not be in the minor category, for example.  Now the other thing is that there is a cost involved because I've got to eat, not to mention I have my own expenses as a wizard, but I've tried to keep it low because we've got to look out for each other these days.  The more powerful a spell, the longer it takes to teach, so the costs increase proportionally." -NL "Anyway, here are the categories:" -NL
0 Pause
0 GOTO 100
20 Message "There's a lot more to casting spells than some casters realize.  I can tell you about how the power of some spells increase as a caster becomes more powerful, how long they last, how difficult they are for your target to avoid, the types of targets, resistance, and I can give you some advise about using them in combat."
0 AddKeyWords power 21  increase 21  long 22  last 22  difficult 23  avoid 23  combat 24  types 25  targets 25  resistance 26
0 GOTO 1
21 Message "Some spells become more powerful as some casters become more powerful.  This may include how long they last and how difficult they are for your target to avoid.  You'll have to experiment with each spell to figure out how long they last, but don't forget that may increase as you become more powerful.  And how much more powerful a spell becomes depends on what kind of caster you are.  I don't know too much about clerics, but from what I do know, I think that wizards probably increase faster.  That's probably since wizards don't have much time to train for outright combat, while clerics that are trained to enter battle spend a lot more time with that."
0 GOTO 1
22 Message "The best way to determine how long a spell lasts is to experiment with it because the gods have been known to change the exact amounts and so I may not have the latest information.  Oh, and don't forget that the amount increases for some spells as you become more powerful!  That's really important.  Also, some spells like Sleep don't last an exact amount of time, but instead your target can keep trying to break free of it.  That can be pretty useful if they aren't very good at doing so since that means there's a good chance that it could last a long time.  Anyway, one way to tell if your spell is still working is to keep a close eye on your target to see what it is doing.  And the most important time to make sure you do that is just before you act.  In general, if you stay calm, pay attention to your enemies, and think about what you are doing, you're far more likely to survive a battle."
0 GOTO 1
23 Message "Sometimes you and your enemy can avoid a spell or creature's power.  Stun is a good example of that.  That one depends on your willpower, although for some it depends on how quick you can get out of the way or even how tough you are.  There are also some spells that can't be avoided.  Blast is a good example of that.  Oh, another thing is that as a caster becomes more powerful, it becomes harder for their target to avoid some spells.  Going back to Stun again, it is one of those."
0 GOTO 1
24 Message "There's so much you can do with spells in combat, it would be impossible to tell you everything.  You'll have to experiment to find strategies that work well for you.  But I CAN give you a few tips.  First of all, don't forget to keep track of your remaining mana!  If you run out, you won't be able to cast any more spells until you can find a safe place to rest or you use a potion or something.  And speaking of that, if you can afford at least a few potions that restore mana, then buy them!  There's a place here in town that sells them, although they are a bit expensive so you may want to look around for a cheaper source.  Unfortunately, that's the only one I know of in Seaport.  Anyway, you never know when you'll end up in some really difficult battle where they can save your life.  Another thing is that some spells work well for one situation but not for another.  For example, the Entangle spell stops your enemies from moving closer to you and lasts a long time, so it works great to keep them at a distance for a while, but they can still fight so it won't do you much good when they are standing right next to you or can attack at range.  Oh, and spells like that are great when you have to retreat since it keeps them from circling around and cutting you off."
0 GOTO 1
25 Message "Each spell has a lot of factors to consider.  One of the major ones is the types of targets.  Some spells will affect the caster, some will affect one single target, some will affect an area around the caster, and some will affect an area on and around a target position.  And watch out for that last one.  It is a terrible mistake for a wizard to get caught in his own large fireball!  Then there's the matter of picking a target for some of those.  For some spells you have to pick a target right next to you, while for others, you can pick a target at range.  There's also the matter of the area hit by the multiple-target spells.  Those can be anywhere from right next to the target to a huge area.  It all depends on the spell.  You may want to test out each new spell you learn in an easy battle to make sure you understand how it works before you get into a really dangerous battle.  And make sure you choose a target far away from you for spells like a large fireball!"
0 GOTO 1
26 Message "Basically, don't try to cast a fireball on a fire-breathing dragon.  It won't work and you will have wasted precious time and mana.  But that's just one example; there are a lot of these.  You can't poison an undead creature.  You can't affect the mind of a mindless creature.  A lot of spells won't work on magical creatures.  And so on.  Most are pretty obvious if you think about them.  You can usually tell if they've resisted your spell because they will barely even blink, so to speak.  Oh, and the other thing is that sometimes a creature is totally immune, while other times it may just be that it has a chance to resist the spell.  So when it isn't so obvious that they should be able to resist a given spell and you don't have much of a choice as to which spell to use, it may be worth trying again.  One more thing I should clarify is that resistance isn't the same as avoiding the spell.  If a creature only has a chance to resist a spell and doesn't, it can still try to avoid it.  And ANY creature or person can try to avoid a spell even if it doesn't have any magic resistance whatsoever."
0 GOTO 1
80 CMessage $COUNT ": " -SPELLNAME $ARG " (" -SPCOST $ARG " SP)" -NL
81 GiveCSpellsEx -TAG !110 -RESULTFLAG -VERIFY $ARG
82 GiveCSpellsEx -GIVE $ARG
83 CMessage "He teaches you " -SPELLNAME $ARG -NL
90 Pay 25 1
91 Pay 50 1
92 Pay 100 1
93 Pay 200 1
94 Pay 400 1
100 Message "Menu:"
0 Message "1: Minor spells"
0 Message "2: Lesser spells"
0 Message "3: Moderate spells"
0 Message "4: Greater spells"
0 Message "5: Major spells"
0 GOTO 1
101 CMessage "Minor spells for " -PRICE 25 ":" -NL
0 RunTemplateCommands -SETCOMMAND 80 -ARGS 1 9 76 77 22 25 52 26 -PROMPT "Which? " -COMMAND 81 -COMMAND 90 -COMMAND 82 -COMMAND 83
0 GOTO 1
102 CMessage "Lesser spells for " -PRICE 50 ":" -NL
0 RunTemplateCommands -SETCOMMAND 80 -ARGS 1 8 35 33 75 3 37 38 39 23 24 30 14 -PROMPT "Which? " -COMMAND 81 -COMMAND 91 -COMMAND 82 -COMMAND 83
0 GOTO 1
103 CMessage "Moderate spells for " -PRICE 100 ":" -NL
0 RunTemplateCommands -SETCOMMAND 80 -ARGS 1 10 32 34 61 59 57 78 80 81 83 84 85 86 4 1 31 40 49 51 27 29 12 92 -PROMPT "Which? " -COMMAND 81 -COMMAND 92 -COMMAND 82 -COMMAND 83
0 GOTO 1
104 CMessage "Greater spells for " -PRICE 200 ":" -NL
0 RunTemplateCommands -SETCOMMAND 80 -ARGS 1 62 58 79 42 48 50 -PROMPT "Which? " -COMMAND 81 -COMMAND 93 -COMMAND 82 -COMMAND 83
0 GOTO 1
105 CMessage "Major spells for " -PRICE 400 ":" -NL
0 RunTemplateCommands -SETCOMMAND 80 -ARGS 1 60 41 43 -PROMPT "Which? " -COMMAND 81 -COMMAND 94 -COMMAND 82 -COMMAND 83
0 GOTO 1
110 CheckFlagSwitch SFLAG  2 112  3 114  4 115
111 Message "I cannot teach you this spell"
0 GOTO 1
112 Message "You cannot learn this spell"
0 GOTO 1
114 Message "You already know this spell"
0 GOTO 1
115 Message "This spell is beyond your current skills"
0 GOTO 1
200 Message "Menu:"
0 InventorySelect -ITAG 1  -FIELDS ID PRICE  -MENU "$ITEM for $PRICE" "Which? "  210 100  211 50  212 100  214 200  215 100  216 50  217 50  218 50  219 200  220 100  221 25  222 25  223 50  224 100  225 400  226 400  -SELL
0 Message "Sold!"
0 GOTO 1
300 Message "Ok, now the thing to remember about this is that while I can teach you a spell from me if you are powerful enough to learn it, it is MUCH harder to learn it yourself just by reading it from a scroll.  So I can help you learn from a scroll for a spell that I don't know, assuming I am powerful enough to learn it myself.  Oh, and if I already know the spell, there's really no point in showing me your scroll, so just ask me to teach it to you directly."
0 Pause
0 Message "Menu:"
0 InventorySelect -ITAG 1  -FIELDS ID PRICE SPELLID  -BUYPRICE  -MENU "$ITEM for $PRICE" "Which? "  212 100 15  214 200 28  219 200 44  220 100 45  223 50 46  224 100 47  225 400 53  226 400 63  -SETARGCOMMAND
0 RunTemplateCommands -GETARGCOMMAND -COMMAND 350 -COMMAND 351 -COMMAND 352 -COMMAND 353 -COMMAND 354
0 GOTO 1
350 CheckSPCost $ARG3 > 126 390 -MULT 3
351 GiveCSpellsEx -TAG !110 -RESULTFLAG -VERIFY $ARG3
352 Pay $ARG2 1
353 GiveCSpellsEx -GIVE $ARG3
354 CMessage "He teaches you " -SPELLNAME $ARG3 -NL
390 Message "That spell is beyond my skills"
0 BREAK
