ID:272745
 
obj/Book
DADA1
name = "The Dark Forces: A Guide To Self-Protection"
icon = 'Books.dmi'
icon_state = "DADA"
oicon='Books.dmi'
oiconstate="DADA"
verb
Read_Book()
switch(input("Which Chapter?","The Dark Forces: A Guide To Self-Protection")in list("1. Getting Started","2. How To Duel","3. The Use of Flippendo","4. Flying Sparks","5. The Dark Arts","6. The Tickling Charm","7. Cutting Incarcerous"))
if("1. Getting Started")
winshow(usr, "window1", 1)
usr<<output("Chapter 1, Getting Started","output1")
usr<<output({"The Dark Forces: A Guide To Self-Protection is written for the use of young witches and wizards to train themselves against the Dark Arts, as well as explaning what the dark arts are for those who are confused. What one needs to defend themselves is a working wand and the will to fight.<p><p>
The spells that you will learn through the use of this book are: The Flippendo Curse, The Sparks Charm (Surculus Mico)
The Tickling Charm (Rictusempra) and The Cutting Charm (Incidere Funis)."}
,"output2")
if("2. How To Duel")
winshow(usr, "window1", 1)
usr<<output("Chapter 2, How To Duel","output1")
usr<<output({"Dueling is quite simple, a way to have fun, and a good way to practice self-defense.There are even a few Dark Wizards who are nice enough to engage you in a proper duel before they fight you. One example of these wizards is He-Who-Must-Not-Be-Named.<p><p>
To duel, simply face your opponent in
the middle of the mat. You must both bow to the other. The proctor will then start to count. Turn around,
and each time he counts up, take a step. After a while, normally once both opponents reach the end of the duel mat,
he or she will say go. You both must then turn around and either cast a spell, or flee. Leaving the mat counts towards
disqualification. The first wizard disarmed, in most practice duels, are the losers, while their opponent wins."}
,"output2")
if("3. The Use of Flippendo")
winshow(usr, "window1", 1)
usr<<output("Chapter 3, The Use of Flippendo","output1")
usr<<output({"Flippendo is the weakest curse in your arsenal, but it is still useful. It isn't difficult to cast,and can push your opponents and objects away from you to all you to escape, and sometimes move into new areas.Flippendo, despite its lack of strength, is the common wizards most used curse, as it is helpful in more than just battle.<p><p>
To perform Flippendo, focus a strong force of energy and project it forwards. Unlike most curses which require a nice flick sort of
a movement, Flippendo is more of a jab. When practicing, you must "Thrust Wand" and clearly say "Flippendo" to use the spell.
It is not difficult to learn, and you won't need an adults supervision. Just remember to use the spell with care."}
,"output2")
if("4. Flying Sparks")
winshow(usr, "window1", 1)
usr<<output("Chapter 4, Flying Sparks","output1")
usr<<output({"The sparks charm, the aurors bread and butter. This charm is very useful to aurors and common wizards alike. This charm signals all wizards who can see the sparks about what's going on in that area. If the sparks sent up are red,someone is in danger and a dark wizard is there. Once sent up, all available aurors must apparate there. If the sparks are green, the area is now secure.<p><p>
The wand movement is very different to most spells. Raise your wand up, and do a 360° spin, firming your
hand at the point where you finish the spin, then shout out the incantation "Surculus Mico". While doing so, focus deeply on the color
you wish the sparks to be. It is asked to use this spell around your professor when trying to learn it."}
,"output2")
if("5. The Dark Arts")
winshow(usr, "window1", 1)
usr<<output("Chapter 5, The Dark Arts","output1")
usr<<output({"The Dark Arts are the most deadly of all the curses which can be used. Because of what they can do, they are banned from the wizarding world's use. Any wizard caught using dark magic can almost say hello to a trip to Azkaban. The dark arts are some of the strongest spells, but their's always a way around them.<p><p>
Some of the most common ways to stop the dark arts are to predict your opponents moves with the use of Leglimens, other ways are
through shielding charms, counter-curses, and sometimes even counter- and anti-hexes. Some spells are very strong and have been asked to be made
a dark art due to the strength and side-effects of them. There have been times in the past where aurors have been allowed the use of dark magic."}
,"output2")
if("6. The Tickling Charm")
winshow(usr, "window1", 1)
usr<<output("Chapter 6, The Tickling Charm","output1")
usr<<output({"The Tickling Charm is a nice little spell that will force your opponent into an outburst of giggles and laughs. The charm is weak and will stop over time. It can also be countered with the use of the Finite Incantatem counter-curse.<p><p>
To use this spell, move your wand in a horizontal-like slash, before bringing it to a stop when it points at your opponent. Then
clearly say the incantation, "Rictusempra". This charm works a lot like a hex, which is something you may like to keep in mind when using it.
Please use this charm while in the company of your professor, as it has been know to go horribly wrong."}
,"output2")
if("7. Cutting Incarcerous")
winshow(usr, "window1", 1)
usr<<output("Chapter 7, Cutting Incarcerous","output1")
usr<<output({"The Cutting Charm is the first counter-productive spell you will have learnt. At least, I hope so! The Cutting Charm is used against the Incarcerous Charm, or Binding Charm, which summons amounts of rope to tie somebody up.<p><p>
To use this charm, focus. Imagine at the tip of your wand is a nice, sharp, long blade. Hold your wand up high. Then bring it down. As the invisible blade descends upon the ropes, you must shout the incantation, "Incidere Funis"!"}
,"output2")
else
return
Pick_Up()
set src in oview(1)
usr << "You have picked up a book."
src.loc = usr
return
Drop()
usr << "You have dropped a book."
src.loc = usr.loc
return


Here's the program I have for a book. You will notice that I pull out a new window with output boxes to place words in. I was thinking of using winclone(), so that I may be able to have the output boxes cleared before the text was put into it. I didn't succeed. So, I tried using Browser windows. Dream Seeker will only handle one browser window at a time, for some reason or another. I am now not sure on what to do to get those output boxes cleared, so can someone please help me?
usr<<output(null,"output_ID")


That will clear an output if you change "output_ID" to the ID of your output control.

When you want to show a window you don't necessarily need to put a 1 for the third argument:
winshow(usr,"window_ID")


That will also work.
In response to Aries
Ah, I see. Thank you for your help.