Possible "Exit.Parent" Error

Hi all! I had a question about returning a player to the parent.exit. For example, the player will attempt to move into another room but are warned going in could be fatal. So they get a choice about whether or not to continue. If the player chooses to go back, this error happens.

Error running script: Error compiling expression 'exit.parent': Unknown object or variable 'exit'

I'm assuming this is because the player is prompted with a menu first but if that's the case, why is this an issue since the player is still arriving from the previous room?

I think a simple workaround is just having the player go back to the room before ala MoveObject (player, Room Blah Blah) manually, but I thought parent.exit was supposed to do that. I wanted to report it just in case it was an error.

Here is the code I use, maybe it's outdated.

PLAYER MOVES.
NEXT ROOM. BEFORE ENTERING ROOM
MENU CHOICE TO TURN BACK.
MoveObject (player, exit.parent)

Whatcha guys think?

Anonynn.


If the player never leaves through the exit, then they are still in the same room...
No move player is needed.
Attach the "do you really want to go through here" code on the exit itself,
just check the Run a script box.


I've actually run into a very strange problem based on that.

I have a script on a door lock, have it checked to run a script instead of moving the player but Quest keep skipping over it completely and I have no idea why.

Anonynn.


You may have overlooked something...
Could you post that bit of code?


Sure...it's really long though. At the beginning of the NPC conversation, I set a variable...

goblinesque man.warning=False

and then certain responses in the conversation will turn that variable to TRUE. At the end of the conversation, the Player is free to look around the immediate area which unlocks two doors.

UnlockExit (Orb Lock)
UnlockExit (Cell Lock)

And then on the locks (before the Player enters the surrounding rooms) I have these very long scripts with a few variables. Upon entering the new rooms, the Player is presented with a menu of choices.

It just keeps skipping over the Lock scripts for some reason.

Anonynn.


So yeah, it seems like the next room choices are preventing the script from firing.

I'm not sure how to work around that. I even put the script in the room after the player enters.

Anonynn.


Which script is generating the error?
Are you sure that the variable exit exists?

Did you assign a value to the exit variable in the same script; or is it a parameter to a function?

I notice you mentioned there is a menu choice there. Is this using ShowMenu or similar?
Remember that variables only last until the end of the script that created them. If you want them to be available next turn when the player has chosen a menu option, you would need to save their values in an attribute.

It's hard to give a helpful answer without seeing the code in question.


I can show you the code. It's just super long. But yeah, all the variables exist and the code is properly unlocking the exit like it's supposed to. But on the lock I have this script....

if (goblinesque man.warning=True) {
  if (player.intelligence>=7) {
    firsttime {
      msg ("<br/><font color=\"dedede\">Remembering Rold's warning about the lingering magic that could be triggered from the tall messy piles scattered around the laboratory, you carefully move around each of them and stick to the paths he's made through the disorder until you reach your desired destination. Luckily, you didn't trigger any spells or traps!</font color>")
      MoveObject (player, GH Experimentation Cells)
    }
    otherwise {
      MoveObject (player, GH Experimentation Cells)
    }
  }
  else {
    firsttime {
      if (player.resist>=1) {
        msg ("<br/>{random:Having completely forgotten Rold's warning, you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you suddenly notice something small shimmering underneath several unevenly stacked anthologies. You probably shouldn't but curiosity gets the best of you so you decide to check it out and see what's there. You lower yourself down, carefully lift some papers out of the way and then slide a scepter off to the side. As you reach the anthologies, you go to move two of them at once but the upper book slides back, falls and lands on the rest of the anthologies underneath. This sends the small mountain of books tumbling forward into you which knocks you down onto your backside. Seconds later, a bright flash completely envelops you which forces you to shield your eyes:Having completely forgotten Rold's warning, you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you carelessly step on the edge of a scroll which was lying over and partially covering a rounded mixing bowl. As it shifts and slides on the ground underneath you, it slams into another area of the messy pile and causes an avalanche of ornamental staffs, scepters and wands to crash down to the floor. You quickly move back away from them avoiding being struck by the onslaught but as one of the scepters hits the ground in front of you, the crown of it, pointing in your direction flashes. Suddenly, a bright glimmer completely envelops you which forces you to shield your eyes:Having completely forgotten Rold's warning, you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you get somewhat distracted by all the fancy relics and antiquities and wind up walking between piles that hardly have any space between them and no visible paths through. Darn it! Once you realize this is a dead end, you try to correct your blunder by turning around but all at once, you accidentally bump into an unsteady mountain of books with an endless pile of rolled up scrolls stacked along the top. As you glance up at them in shock, they begin to fall all over you; luckily, they are mostly paper and leather so they don't end up hurting you at all. Whew. However, just as the last of them bonks you upon the head, it activates a latent spell causing a bright flash to completely envelop you, forcing you to shield your eyes}. <br/><br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but for the most part you feel completely fine. You wonder if the flash was supposed to do something but you also consider the fact that perhaps the energy wasn't strong enough to affect you, or sitting dormant for so long had greatly affected it's strength. Either way, you color yourself extremely lucky. You triggered the trap in spite of the warning you received which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. This could have turned out a lot worse! Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. <br/><br/><font color=\"dedede\">You've lost -1 Resist!</font color>")
        player.resist = player.resist -1
        MoveObject (player, GH Experimentation Cells)
        UpdateAllAttributes
      }
      else {
        msg ("<br/>{random:Having completely forgotten Rold's warning, you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you suddenly notice something small shimmering underneath several unevenly stacked anthologies. You probably shouldn't but curiosity gets the best of you so you decide to check it out and see what's there. You lower yourself down, carefully lift some papers out of the way and then slide a scepter off to the side. As you reach the anthologies, you go to move two of them at once but the upper book slides back, falls and lands on the rest of the anthologies underneath. This sends the small mountain of books tumbling forward into you which knocks you down onto your backside. Seconds later, a bright flash completely envelops you which forces you to shield your eyes:Having completely forgotten Rold's warning, you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you carelessly step on the edge of a scroll which was lying over and partially covering a rounded mixing bowl. As it shifts and slides on the ground underneath you, it slams into another area of the messy pile and causes an avalanche of ornamental staffs, scepters and wands to crash down to the floor. You quickly move back away from them avoiding being struck by the onslaught but as one of the scepters hits the ground in front of you, the crown of it, pointing in your direction flashes. Suddenly, a bright glimmer completely envelops you which forces you to shield your eyes:Having completely forgotten Rold's warning, you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you get somewhat distracted by all the fancy relics and antiquities and wind up walking between piles that hardly have any space between them and no visible paths through. Darn it! Once you realize this is a dead end, you try to correct your blunder by turning around but all at once, you accidentally bump into an unsteady mountain of books with an endless pile of rolled up scrolls stacked along the top. As you glance up at them in shock, they begin to fall all over you; luckily, they are mostly paper and leather so they don't end up hurting you at all. Whew. However, just as the last of them bonks you upon the head, it activates a latent spell causing a bright flash to completely envelop you, forcing you to shield your eyes}. ")
        if (RandomChance(33)) {
          if (RandomChance(50)) {
            msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your scalp which is dramatically tingling like you covered it in barrel of tea tree oil. When you reach up to feel if anything is wrong with your head, you realize that {if player.hairlength_as_int=0:you're no longer completely bald. Your hair has grown several inches in a matter of seconds}{if player.hairlength_as_int>=1:your hair has grown several inches in a matter of seconds}! Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. <br/><br/><font color=\"dedede\">Your hair has grown several inches!</font color>")
            if (RandomChance(50)) {
              Increase ("hairlength")
            }
          }
          else {
            msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your scalp which is dramatically tingling like you covered it in barrel of tea tree oil. When you reach up to feel if anything is wrong with your head, you realize that {if player.hairlength_as_int=0: well...nothing has really changed. You feel like if you had hair something would have happened but since you're bald...}{if player.hairlength_as_int=1: all of your hair has disappeared or...fallen out!? You glance down and see a pile of it scattered on the ground}{if player.hairlength_as_int>=2: you've lost several inches of hair which you find scattered on the ground around you}! Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. <br/><br/><font color=\"dedede\">You've lost several inches of hair!</font color>")
            if (RandomChance(50)) {
              Decrease ("hairlength")
            }
          }
        }
        else if (RandomChance(25)) {
          msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your scalp which is dramatically tingling like you covered it in a barrel of tea tree oil. When you reach up to if anything is wrong with your head, you realize that {if player.hairlength_as_int=0: something has changed underneath your scalp. You think it might have something to do with your hair but there's no way to tell right now. Maybe once it grows out a little you'll see what kind of damage the flash caused}{if player.hairlength_as_int>=1: you're hair has completely changed to a rather unnatural color}! Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths.  ")
          if (RandomChance(33)) {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now bright orange colored!</font color>")
            SetTo ("haircolor", "orange")
          }
          else if (RandomChance(25)) {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now blue colored!</font color>")
            SetTo ("haircolor", "blue")
          }
          else if (RandomChance(20)) {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now ombre colored!</font color>")
            SetTo ("haircolor", "ombre")
          }
          else if (RandomChance(16)) {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now a brilliant neon color!</font color>")
            SetTo ("haircolor", "neon")
          }
          else if (RandomChance(14)) {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now a blinding pastel color!</font color>")
            SetTo ("haircolor", "pastel")
          }
          else if (RandomChance(12)) {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now punk pink colored!</font color>")
            SetTo ("haircolor", "pink")
          }
          else if (RandomChance(11)) {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now rainbow colored!</font color>")
            SetTo ("haircolor", "rainbow")
          }
          else {
            msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now a stunning silver color!</font color>")
            SetTo ("haircolor", "silver")
          }
        }
        else if (RandomChance(20)) {
          msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your eyes which are still mostly blinded from the dazzling flash that occurred in front of your face. As you idly rub them waiting for the after-image of light to fade, you notice that they are slightly tingling, almost itchy which the rubbing helps to soothe. Maybe they got burned by the light? If so, it's hard to say what the damage could be right now but as far as you know your long-term sight hasn't been ruined or affected. About a minute or two later, when the after-image finally fades, Rold happens by you carrying a few {random:scrolls:books:artifacts} and say's something rather peculiar that catches you completely off-gaurd, <font color=\"039923\">\"Exotic. I haven't seen eye color like that for a long time. I approve.\"</font color> and then he casually heads off to continue doing whatever he is doing at the moment. Bizarre though, why would he say that? You do your best to carefully look for a mirror lying around the laboratory and when you finally find one, you peer into it and gasp in shock! Your eye color has completely changed. Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
          if (RandomChance(33)) {
            msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a beautiful gold.</font color> ")
            SetTo ("eyecolor", "gold")
          }
          else if (RandomChance(25)) {
            msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a vicious black.</font color> ")
            SetTo ("eyecolor", "black")
          }
          else if (RandomChance(16)) {
            msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a vibrant pink.</font color> ")
            SetTo ("eyecolor", "pink")
          }
          else if (RandomChance(14)) {
            msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a alien white.</font color> ")
            SetTo ("eyecolor", "white")
          }
          else {
            msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a brillant purple.</font color> ")
            SetTo ("eyecolor", "purple")
          }
        }
        else {
          if (RandomChance(33)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your {if player.gavebirth=True:dark}{if player.gavebirth=False:light pink} nipples and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that both of your nipples are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.nipplepiercing = True
          }
          else if (RandomChance(25)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races down toward your genitals and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your genitals are pierced now and bleeding a little! Ow! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.genitalpiercing = True
          }
          else if (RandomChance(20)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward the {if player.ears=human: lobes of your ears}{if player.ears=elven: lobes of your long, pointed ears}{if player.ears=dwarven: lobes of your ears}{if player.ears=dragon-descended: lobes of your slightly-pointed ears}{if player.ears=halfling: lobes of your ears}{if player.ears=orc-descended: lobes of your slightly-pointed ears}{if player.ears=gnome: lobes of your ears}{if player.ears=dark elf: lobes of your long, pointed ears}{if player.ears=goblin: lobes of your slightly-pointed ears}{if player.ears=high-demon: lobes of your very long and angled pointed ears}{if player.ears=alaraune: lobes of your ears}{if player.ears=demon: bottom half of your ear holes}{if player.ears=cow-taur: lower half of your floppy cow ears}{if player.ears=dryad: lobes of your slightly-pointed ears}{if player.ears=goo: lobes of your gel-like ears}{if player.ears=naga: bottom webbing of your long, pointed and vaguely fin-like ears}{if player.ears=centaur: lower half of your tall furry ears}{if player.ears=neko: lower half of your tall furry ears}{if player.ears=wolf-taur: lower half of your tall furry ears}{if player.ears=dragon: bottom half of your ear holes}{if player.ears=orc: lobes of your slightly-pointed ears}{if player.ears=doll: lobes of your glass-like ears}{if player.ears=bee-taur: lobes of your ears}{if player.ears=drider: lobes of your long, pointed ears} and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your ears are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.earlobepiercing = True
          }
          else if (RandomChance(16)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward the {if player.ears=human: rounded helix of your ears}{if player.ears=elven: long, pointed helix of your ears}{if player.ears=dwarven: rounded helix of your ears}{if player.ears=dragon-descended: slightly-pointed helix of your ears}{if player.ears=halfling: rounded helix of your ears}{if player.ears=orc-descended: slightly-pointed helix of your ears}{if player.ears=gnome: rounded helix of your ears}{if player.ears=dark elf: long, pointed helix of your ears}{if player.ears=goblin: slightly-pointed helix of your ears}{if player.ears=high-demon: very long and angled pointed helixes}{if player.ears=alaraune: rounded helix of your ears}{if player.ears=demon: upper half of your ear holes}{if player.ears=cow-taur: upper tips of your floppy cow ears}{if player.ears=dryad: lslightly-pointed helix of your ears}{if player.ears=goo: rounded helix of your gel-like ears}{if player.ears=naga: upper webbed tips of your long, pointed and vaguely fin-like ears}{if player.ears=centaur: upper tips of your tall furry ears}{if player.ears=neko: upper tips of your tall furry ears}{if player.ears=wolf-taur: upper tips of your tall furry ears}{if player.ears=dragon: upper half of your ear holes}{if player.ears=orc: slightly-pointed helix of your ears}{if player.ears=doll: rounded helix of your glass-like ears}{if player.ears=bee-taur: rounded helix of your ears}{if player.ears=drider: long, pointed helixes of your ears} and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your upper ears are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.upperearspiercing = True
          }
          else if (RandomChance(14)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your nose and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your nose is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.nosepiercing = True
          }
          else if (RandomChance(12)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up into your mouth and toward {if player.mouth=human: the center of your tongue}{if player.mouth=elven: the center of your tongue}{if player.mouth=dwarven: the center of your tongue}{if player.mouth=dragon-descended: the center of your rough tongue}{if player.mouth=halfling: the center of your tongue}{if player.mouth=orc-descended: the center of your tongue}{if player.mouth=gnome: the center of your tongue}{if player.mouth=dark elf: the center of your tongue}{if player.mouth=goblin: the center of your extra slimy tongue}{if player.mouth=high-demon: the center of your extra-long and pointed tongue}{if player.mouth=alaraune: the center of your tongue}{if player.mouth=demon: the center of your long, spiny tongue}{if player.mouth=cow-taur: the center of your flat and slimy tongue}{if player.mouth=dryad: the center of your tongue}{if player.mouth=goo: the center of your soft gel-like tongue}{if player.mouth=naga: the center of your foot-long, forked tongue}{if player.mouth=centaur: the center of your thick tongue}{if player.mouth=neko: the center of your rough tongue}{if player.mouth=wolf-taur: the center of your flat and slimy tongue}{if player.mouth=dragon: the center of your long and pointed tongue}{if player.mouth=orc: the center of your tongue}{if player.mouth=doll: the center of your clear, glass-like tongue}{if player.mouth=bee-taur: the center of your black tongue}{if player.mouth=drider: the center of your tongue} and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and stick out your tongue to see the wound, you discover that it's now pierced now and bleeding a little, you can taste it! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.tonguepiercing = True
          }
          else if (RandomChance(11)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your eyebrow and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your eyebrow is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.eyebrowpiercing = True
          }
          else if (RandomChance(10)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your lip and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your lip is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.lippiercing = True
          }
          else if (RandomChance(9)) {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward the outer edges around your mouth and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that the areas around your mouth are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.secondarymouthpiercing = True
          }
          else {
            msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races down toward your navel and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your navel is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? You triggered the trap even though you were warned which forces you to conclude that perhaps you need to pay better attention when somebody informs you about something dangerous. Who knows what other forces are lying in wait. From here on out you decide to stick to the paths. ")
            player.navelpiercing = True
          }
        }
        MoveObject (player, GH Experimentation Cells)
      }
    }
    otherwise {
      firsttime {
        msg ("<br/><font color=\"dedede\">Now that you remember the warning about the lingering magic lying dormant in some of the tall messy piles, you take extra care to avoid them, although, you feel like it's only a matter of time before you forget again. If only you could have remembered the first time!</font color>")
        MoveObject (player, GH Experimentation Cells)
      }
      otherwise {
        MoveObject (player, GH Experimentation Cells)
      }
    }
  }
}
else {
  firsttime {
    if (player.resist>=1) {
      msg ("<br/>{random:As you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you suddenly notice something small shimmering underneath several unevenly stacked anthologies. You probably shouldn't but curiosity gets the best of you so you decide to check it out and see what's there. You lower yourself down, carefully lift some papers out of the way and then slide a scepter off to the side. As you reach the anthologies, you go to move two of them at once but the upper book slides back, falls and lands on the rest of the anthologies underneath. This sends the small mountain of books tumbling forward into you which knocks you down onto your backside. Seconds later, a bright flash completely envelops you which forces you to shield your eyes:As you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you carelessly step on the edge of a scroll which was lying over and partially covering a rounded mixing bowl. As it shifts and slides on the ground underneath you, it slams into another area of the messy pile and causes an avalanche of ornamental staffs, scepters and wands to crash down to the floor. You quickly move back away from them avoiding being struck by the onslaught but as one of the scepters hits the ground in front of you, the crown of it, pointing in your direction flashes. Suddenly, a bright glimmer completely envelops you which forces you to shield your eyes:As you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you get somewhat distracted by all the fancy relics and antiquities and wind up walking between piles that hardly have any space between them and no visible paths through. Darn it! Once you realize this is a dead end, you try to correct your blunder by turning around but all at once, you accidentally bump into an unsteady mountain of books with an endless pile of rolled up scrolls stacked along the top. As you glance up at them in shock, they begin to fall all over you; luckily, they are mostly paper and leather so they don't end up hurting you at all. Whew. However, just as the last of them bonks you upon the head, it activates a latent spell causing a bright flash to completely envelop you, forcing you to shield your eyes}. <br/><br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but for the most part you feel completely fine. You wonder if the flash was supposed to do something but you also consider the fact that perhaps the energy wasn't strong enough to affect you, or sitting dormant for so long had greatly affected it's strength. Either way, you color yourself lucky and shrug off the experience---although not entirely. You figure you need to be more careful while moving around through here, especially sticking to the paths and watching your step. There could be more spells waiting to be unleashed. <br/><br/><font color=\"dedede\">You've lost -1 Resist!</font color>")
      player.resist = player.resist -1
      MoveObject (player, GH Experimentation Cells)
      UpdateAllAttributes
    }
    else {
      msg ("<br/>{random:As you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you suddenly notice something small shimmering underneath several unevenly stacked anthologies. You probably shouldn't but curiosity gets the best of you so you decide to check it out and see what's there. You lower yourself down, carefully lift some papers out of the way and then slide a scepter off to the side. As you reach the anthologies, you go to move two of them at once but the upper book slides back, falls and lands on the rest of the anthologies underneath. This sends the small mountain of books tumbling forward into you which knocks you down onto your backside. Seconds later, a bright flash completely envelops you which forces you to shield your eyes:As you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you carelessly step on the edge of a scroll which was lying over and partially covering a rounded mixing bowl. As it shifts and slides on the ground underneath you, it slams into another area of the messy pile and causes an avalanche of ornamental staffs, scepters and wands to crash down to the floor. You quickly move back away from them avoiding being struck by the onslaught but as one of the scepters hits the ground in front of you, the crown of it, pointing in your direction flashes. Suddenly, a bright glimmer completely envelops you which forces you to shield your eyes:As you {random:quickly:hastily:hurriedly:swiftly} move through the thin paths designated around the disorganized piles of books, scrolls and magical artifacts, you get somewhat distracted by all the fancy relics and antiquities and wind up walking between piles that hardly have any space between them and no visible paths through. Darn it! Once you realize this is a dead end, you try to correct your blunder by turning around but all at once, you accidentally bump into an unsteady mountain of books with an endless pile of rolled up scrolls stacked along the top. As you glance up at them in shock, they begin to fall all over you; luckily, they are mostly paper and leather so they don't end up hurting you at all. Whew. However, just as the last of them bonks you upon the head, it activates a latent spell causing a bright flash to completely envelop you, forcing you to shield your eyes}.")
      if (RandomChance(33)) {
        if (RandomChance(50)) {
          msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your scalp which is dramatically tingling like you covered it in barrel of tea tree oil. When you reach up to feel if anything is wrong with your head, you realize that {if player.hairlength_as_int=0:you're no longer completely bald. Your hair has grown several inches in a matter of seconds}{if player.hairlength_as_int>=1:your hair has grown several inches in a matter of seconds}! Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. <br/><br/><font color=\"dedede\">Your hair has grown several inches!</font color>")
          if (RandomChance(50)) {
            Increase ("hairlength")
          }
        }
        else {
          msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your scalp which is dramatically tingling like you covered it in barrel of tea tree oil. When you reach up to feel if anything is wrong with your head, you realize that {if player.hairlength_as_int=0: well...nothing has really changed. You feel like if you had hair something would have happened but since you're bald...}{if player.hairlength_as_int=1: all of your hair has disappeared or...fallen out!? You glance down and see a pile of it scattered on the ground}{if player.hairlength_as_int>=2: you've lost several inches of hair which you find scattered on the ground around you}! Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. <br/><br/><font color=\"dedede\">You've lost several inches of hair!</font color>")
          if (RandomChance(50)) {
            Decrease ("hairlength")
          }
        }
      }
      else if (RandomChance(25)) {
        msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your scalp which is dramatically tingling like you covered it in a barrel of tea tree oil. When you reach up to if anything is wrong with your head, you realize that {if player.hairlength_as_int=0: something has changed underneath your scalp. You think it might have something to do with your hair but there's no way to tell right now. Maybe once it grows out a little you'll see what kind of damage the flash caused}{if player.hairlength_as_int>=1: you're hair has completely changed to a rather unnatural color}! Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
        if (RandomChance(33)) {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now bright orange colored!</font color>")
          SetTo ("haircolor", "orange")
        }
        else if (RandomChance(25)) {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now blue colored!</font color>")
          SetTo ("haircolor", "blue")
        }
        else if (RandomChance(20)) {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now ombre colored!</font color>")
          SetTo ("haircolor", "ombre")
        }
        else if (RandomChance(16)) {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now a brilliant neon color!</font color>")
          SetTo ("haircolor", "neon")
        }
        else if (RandomChance(14)) {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now a blinding pastel color!</font color>")
          SetTo ("haircolor", "pastel")
        }
        else if (RandomChance(12)) {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now punk pink colored!</font color>")
          SetTo ("haircolor", "pink")
        }
        else if (RandomChance(11)) {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now rainbow colored!</font color>")
          SetTo ("haircolor", "rainbow")
        }
        else {
          msg ("<br/><font color=\"dedede\">You're hair color has changed. It is now a stunning silver color!</font color>")
          SetTo ("haircolor", "silver")
        }
      }
      else if (RandomChance(20)) {
        msg ("<br/>When the luminous gleam fades however, you feel a latent energy running along every inch of your form but specifically, it seems focused around your eyes which are still mostly blinded from the dazzling flash that occurred in front of your face. As you idly rub them waiting for the after-image of light to fade, you notice that they are slightly tingling, almost itchy which the rubbing helps to soothe. Maybe they got burned by the light? If so, it's hard to say what the damage could be right now but as far as you know your long-term sight hasn't been ruined or affected. About a minute or two later, when the after-image finally fades, Rold happens by you carrying a few {random:scrolls:books:artifacts} and say's something rather peculiar that catches you completely off-gaurd, <font color=\"039923\">\"Exotic. I haven't seen eye color like that for a long time. I approve.\"</font color> and then he casually heads off to continue doing whatever he is doing at the moment. Bizarre though, why would he say that? You do your best to carefully look for a mirror lying around the laboratory and when you finally find one, you peer into it and gasp in shock! Your eye color has completely changed. Did the magic you were bathed in somehow cause this to happen? In spite of the change, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred. From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
        if (RandomChance(33)) {
          msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a beautiful gold.</font color> ")
          SetTo ("eyecolor", "gold")
        }
        else if (RandomChance(25)) {
          msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a vicious black.</font color> ")
          SetTo ("eyecolor", "black")
        }
        else if (RandomChance(16)) {
          msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a vibrant pink.</font color> ")
          SetTo ("eyecolor", "pink")
        }
        else if (RandomChance(14)) {
          msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a alien white.</font color> ")
          SetTo ("eyecolor", "white")
        }
        else {
          msg ("<br/><font color=\"dedede\">The iris' of your eyes have been completely transformed into a different color! They are now a brillant purple.</font color> ")
          SetTo ("eyecolor", "purple")
        }
      }
      else {
        if (RandomChance(33)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your {if player.gavebirth=True:dark}{if player.gavebirth=False:light pink} nipples and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that both of your nipples are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.nipplepiercing = True
        }
        else if (RandomChance(25)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races down toward your genitals and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your genitals are pierced now and bleeding a little! Ow! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.genitalpiercing = True
        }
        else if (RandomChance(20)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward the {if player.ears=human: lobes of your ears}{if player.ears=elven: lobes of your long, pointed ears}{if player.ears=dwarven: lobes of your ears}{if player.ears=dragon-descended: lobes of your slightly-pointed ears}{if player.ears=halfling: lobes of your ears}{if player.ears=orc-descended: lobes of your slightly-pointed ears}{if player.ears=gnome: lobes of your ears}{if player.ears=dark elf: lobes of your long, pointed ears}{if player.ears=goblin: lobes of your slightly-pointed ears}{if player.ears=high-demon: lobes of your very long and angled pointed ears}{if player.ears=alaraune: lobes of your ears}{if player.ears=demon: bottom half of your ear holes}{if player.ears=cow-taur: lower half of your floppy cow ears}{if player.ears=dryad: lobes of your slightly-pointed ears}{if player.ears=goo: lobes of your gel-like ears}{if player.ears=naga: bottom webbing of your long, pointed and vaguely fin-like ears}{if player.ears=centaur: lower half of your tall furry ears}{if player.ears=neko: lower half of your tall furry ears}{if player.ears=wolf-taur: lower half of your tall furry ears}{if player.ears=dragon: bottom half of your ear holes}{if player.ears=orc: lobes of your slightly-pointed ears}{if player.ears=doll: lobes of your glass-like ears}{if player.ears=bee-taur: lobes of your ears}{if player.ears=drider: lobes of your long, pointed ears} and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your ears are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.earlobepiercing = True
        }
        else if (RandomChance(16)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward the {if player.ears=human: rounded helix of your ears}{if player.ears=elven: long, pointed helix of your ears}{if player.ears=dwarven: rounded helix of your ears}{if player.ears=dragon-descended: slightly-pointed helix of your ears}{if player.ears=halfling: rounded helix of your ears}{if player.ears=orc-descended: slightly-pointed helix of your ears}{if player.ears=gnome: rounded helix of your ears}{if player.ears=dark elf: long, pointed helix of your ears}{if player.ears=goblin: slightly-pointed helix of your ears}{if player.ears=high-demon: very long and angled pointed helixes}{if player.ears=alaraune: rounded helix of your ears}{if player.ears=demon: upper half of your ear holes}{if player.ears=cow-taur: upper tips of your floppy cow ears}{if player.ears=dryad: lslightly-pointed helix of your ears}{if player.ears=goo: rounded helix of your gel-like ears}{if player.ears=naga: upper webbed tips of your long, pointed and vaguely fin-like ears}{if player.ears=centaur: upper tips of your tall furry ears}{if player.ears=neko: upper tips of your tall furry ears}{if player.ears=wolf-taur: upper tips of your tall furry ears}{if player.ears=dragon: upper half of your ear holes}{if player.ears=orc: slightly-pointed helix of your ears}{if player.ears=doll: rounded helix of your glass-like ears}{if player.ears=bee-taur: rounded helix of your ears}{if player.ears=drider: long, pointed helixes of your ears} and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your upper ears are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.upperearspiercing = True
        }
        else if (RandomChance(14)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your nose and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your nose is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.nosepiercing = True
        }
        else if (RandomChance(12)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up into your mouth and toward {if player.mouth=human: the center of your tongue}{if player.mouth=elven: the center of your tongue}{if player.mouth=dwarven: the center of your tongue}{if player.mouth=dragon-descended: the center of your rough tongue}{if player.mouth=halfling: the center of your tongue}{if player.mouth=orc-descended: the center of your tongue}{if player.mouth=gnome: the center of your tongue}{if player.mouth=dark elf: the center of your tongue}{if player.mouth=goblin: the center of your extra slimy tongue}{if player.mouth=high-demon: the center of your extra-long and pointed tongue}{if player.mouth=alaraune: the center of your tongue}{if player.mouth=demon: the center of your long, spiny tongue}{if player.mouth=cow-taur: the center of your flat and slimy tongue}{if player.mouth=dryad: the center of your tongue}{if player.mouth=goo: the center of your soft gel-like tongue}{if player.mouth=naga: the center of your foot-long, forked tongue}{if player.mouth=centaur: the center of your thick tongue}{if player.mouth=neko: the center of your rough tongue}{if player.mouth=wolf-taur: the center of your flat and slimy tongue}{if player.mouth=dragon: the center of your long and pointed tongue}{if player.mouth=orc: the center of your tongue}{if player.mouth=doll: the center of your clear, glass-like tongue}{if player.mouth=bee-taur: the center of your black tongue}{if player.mouth=drider: the center of your tongue} and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and stick out your tongue to see the wound, you discover that it's now pierced now and bleeding a little, you can taste it! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.tonguepiercing = True
        }
        else if (RandomChance(11)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your eyebrow and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your eyebrow is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.eyebrowpiercing = True
        }
        else if (RandomChance(10)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward your lip and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your lip is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.lippiercing = True
        }
        else if (RandomChance(9)) {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races up toward the outer edges around your mouth and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that the areas around your mouth are pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.secondarymouthpiercing = True
        }
        else {
          msg ("<br/>When the luminous gleam fades however, you feel the remnants of its latent energy running along every inch of your body which feels like a cold breeze stinging your skin. And then all at once, the chilling sensation races down toward your navel and then you feel an extremely painful but brief stabbing sensation there as if the area was punctured by a very thin needle. When you wince from the aching pain and reach up to comfort the wound, you discover that your navel is pierced now and bleeding a little! Did the magic you were bathed in somehow cause this to happen? In spite of your new piercing whether you are fond of it or not, you realize that with this kind of power lingering around you should consider yourself extremely lucky that nothing worse occurred---what if that had been one of your organs or something? From here, you figure that you need to be more careful while moving around the laboratory, especially sticking to the paths and watching your step. ")
          player.navelpiercing = True
        }
      }
      MoveObject (player, GH Experimentation Cells)
    }
  }
  otherwise {
    firsttime {
      msg ("<br/><font color=\"dedede\">Now that you know about the lingering magic lying dormant in some of the tall messy piles you're careful to avoid most of them. Although, you feel like it would have been nice if Rold had warned you about them before sending you off to explore in his laboratory.</font color>")
      MoveObject (player, GH Experimentation Cells)
    }
    otherwise {
      MoveObject (player, GH Experimentation Cells)
    }
  }
}

and then the room the player is trying to enter has this...

if (GH Experimentation Cells.alreadydone=False) {
  ClearScreen
  msg ("<br/>After picking a direction and moving across the northern half of the laboratory{if goblinesque man.warning=False: (and accidentally triggering a trap on the way much to your dismay,)} you find yourself standing in front of a pair of old rickety wooden doors which are mostly shrouded in pulsing shadows since the nearest mounted torches are only faintly reaching the outer edge of either hinge. The single-piece Florence handles and thumb levers appear metallic and are securely bolted to the door as well. They are also slightly rusted in appearance but are in otherwise great condition. After momentarily studying the immediate area around the doors, you finally reach for the handles and press the levers down with your thumb. <b>Click!</b> They loudly creak as you open them.  <br/><br/>Suddenly, Rold calls out to you in a cold calculated warning which makes you pause and listen, <font color=\"039923\">\"If you are faint of heart, I wouldn't go inside of those particular doors{if player.gender=female:, my dear}. They lead to my experimentation cells. It's mostly a place for me to test out theories, spells and retrieve blood samples if I require them. However, if memory serves, some vicious, mutated creatures may still be alive in there; each possibly ravenous with hunger or possibly pent-up in more ways than one. In short, they haven't responded well to captivity. I advise you to be weary. Do not to get close to their cages. As the old proverb says, curiosity killed the cat.\"</font color> and once he finishes speaking, you watch as he glances down and goes back to work. ")
  wait {
    ClearScreen
    msg ("<br/>Hm. How do you feel about what you were told?<br/><br/><font color=\"dedede\">1. All I heard was pent-up...{if player.horny=True:let me at them!}<br/>2. Is he serious? Just what was going on in there?{if player.corruption>=50: And why wasn't I invited sooner?}<br/>3. I'll heed his advice. There's no way I'm going in there.<br/>4. The hell? Sounds like something out of a nightmare{if player.corruption>=50:, my kind of nightmare}... <br/>5. I'm not sure what to think{if player.corruption>=50:, something in pain though? I gotta see this}.</font color>")
    menulist = Split("Pent-Up;Is He Serious?;Heed Advice;Nightmare;Not Sure", ";")
    ShowMenu ("", menulist, false) {
      if (result = "Pent-Up") {
        ClearScreen
        player.sexy = player.sexy + 1
        msg ("<br/>Once you've had time to process Rold's warning, you react the only natural way you know how, \"" + LanguageAlgorithm("You had me at pent up.") + "\" Although this likely isn't loud enough for him to hear, especially since he's on the other side of the cavern.")
        msg ("<br/>Then again, goblins...even demi-goblins do have those slightly pointed ears so maybe they can hear from further away than normal humanoids{if player.ears=goblin:. Then again, these ears haven't noticibly improved your hearing so the whole idea is probably bogus}. With a shrug, you carefully proceed into the experimentation cells room. <br/><br/>After entering inside, your eyes are immediately directed to the far edges of the large, stone room. It's roughly about 55ft/16.7m wide by 20ft/6.0m long and is lined with a series of seven metallic square cells that look to be about 7ft/2.1m each in size. Beyond them, on the opposite side of the room from the doorway is an open chamber that contains a rough wooden table stained with copious amounts of old blood and other various fluids that you're unable to identify. The sides of the table are also lined with several rows of frayed leather straps that are meant to hold down large organisms. You're also picking up the slightest of stenches---something rotten pervading the room but you only get whiffs of it every now and then. As for the cells...until you move closer it'll be difficult to tell what's lurking inside even with all the torch light illuminating the room. <br/><br/>To the <b>south</b> you can see a pair of double doors which are your exit.")
        GH Experimentation Cells.alreadydone = True
      }
      else if (result = "Is He Serious?") {
        ClearScreen
        player.serious = player.serious + 1
        msg ("<br/>Once you've had time to process Rold's warning, you react the only natural way you know how, \"" + LanguageAlgorithm("Is he serious? Just what is going on in there?") + "\" and then you wonder what kind of person, goblin or not, does experiments on living creatures, \"" + LanguageAlgorithm("I've got a bad feeling about this.") + "\" Although all of this isn't loud enough for him to hear, especially since he's on the other side of the cavern.")
        msg ("<br/>Then again, goblins...even demi-goblins do have those slightly pointed ears so maybe they can hear from further away than normal humanoids{if player.ears=goblin:. Then again, these ears haven't noticibly improved your hearing so the whole idea is probably bogus}. With a shrug, you carefully proceed into the experimentation cells room. <br/><br/>After entering inside, your eyes are immediately directed to the far edges of the large, stone room. It's roughly about 55ft/16.7m wide by 20ft/6.0m long and is lined with a series of seven metallic square cells that look to be about 7ft/2.1m each in size. Beyond them, on the opposite side of the room from the doorway is an open chamber that contains a rough wooden table stained with copious amounts of old blood and other various fluids that you're unable to identify. The sides of the table are also lined with several rows of frayed leather straps that are meant to hold down large organisms. You're also picking up the slightest of stenches---something rotten pervading the room but you only get whiffs of it every now and then. As for the cells...until you move closer it'll be difficult to tell what's lurking inside even with all the torch light illuminating the room. <br/><br/>To the <b>south</b> you can see a pair of double doors which are your exit.")
        GH Experimentation Cells.alreadydone = True
      }
      else if (result = "Heed Advice") {
        MoveObject (player, GH Rolds Cavern Laboratory)
        ClearScreen
        player.sympathy = player.sympathy + 1
        LockExit (Cell Lock)
        msg ("<br/>Once you've had time to process Rold's warning, you react the only natural way you know how, \"" + LanguageAlgorithm("I'll heed his advice. There's no way I'm going in there after hearing something like that. It doesn't sound pleasant at all.") + "\" Although this likely isn't loud enough for him to hear, especially since he's on the other side of the cavern.")
        msg ("<br/>Then again, goblins...even demi-goblins do have those slightly pointed ears so maybe they can hear from further away than normal humanoids{if player.ears=goblin:. Then again, these ears haven't noticibly improved your hearing so the whole idea is probably bogus}. Either way, you've made up your mind about this whole thing and quickly close the doors with a loud creak. From there, Rold glances up at you momentarily to see what you're doing and when he sees that you haven't gone inside, he subtly nods and goes back to what he was doing. Now what? Should you try exploring another room?")
        GH Experimentation Cells.alreadydone = True
      }
      else if (result = "Nightmare") {
        ClearScreen
        player.sarcasm = player.sarcasm + 1
        msg ("<br/>Once you've had time to process Rold's warning, you react the only natural way you know how, \"" + LanguageAlgorithm("The hell? Sounds like something out of a nightmare or something. What the fuck is in there? And what kind of crazy person does experiments on living creatures?") + "\" Although all of this isn't likely loud enough for him to hear, especially since he's on the other side of the cavern.")
        msg ("<br/>Then again, goblins...even demi-goblins do have those slightly pointed ears so maybe they can hear from further away than normal humanoids{if player.ears=goblin:. Then again, these ears haven't noticibly improved your hearing so the whole idea is probably bogus}. With a shrug, you very, very carefully proceed into the experimentation cells room. <br/><br/>After entering inside, your eyes are immediately directed to the far edges of the large, stone room. It's roughly about 55ft/16.7m wide by 20ft/6.0m long and is lined with a series of seven metallic square cells that look to be about 7ft/2.1m each in size. Beyond them, on the opposite side of the room from the doorway is an open chamber that contains a rough wooden table stained with copious amounts of old blood and other various fluids that you're unable to identify. The sides of the table are also lined with several rows of frayed leather straps that are meant to hold down large organisms. You're also picking up the slightest of stenches---something rotten pervading the room but you only get whiffs of it every now and then. As for the cells...until you move closer it'll be difficult to tell what's lurking inside even with all the torch light illuminating the room. <br/><br/>To the <b>south</b> you can see a pair of double doors which are your exit.")
        GH Experimentation Cells.alreadydone = True
      }
      else if (result = "Not Sure") {
        ClearScreen
        msg ("<br/>Once you've had time to process Rold's warning, you react the only natural way you know how, \"" + LanguageAlgorithm("I'm not sure what to think about this...Doesn't seem like a good idea to go inside at all. What if one of the creatures he mentioned broke free from it's cage...") + "\" Although this likely isn't loud enough for him to hear, especially since he's on the other side of the cavern.")
        msg ("<br/>Then again, goblins...even demi-goblins do have those slightly pointed ears so maybe they can hear from further away than normal humanoids{if player.ears=goblin:. Then again, these ears haven't noticibly improved your hearing so the whole idea is probably bogus}. The question still remains though, should you go inside and risk your life or well-being to whatever is lurking in there? Or should you play it safe and stick to the not-dangerous places of the laboratory?<br/><br/>Go Inside? Or Turn Back?")
        menulist = Split("Enter the Experimentation Cells;Turn Back...", ";")
        ShowMenu ("", menulist, false) {
          if (result = "Enter the Experimentation Cells") {
            ClearScreen
            msg ("You throw caution to the wind and enter through the double doors that you've opened.<br/><br/>After entering inside, your eyes are immediately directed to the far edges of the large, stone room. It's roughly about 55ft/16.7m wide by 20ft/6.0m long and is lined with a series of seven metallic square cells that look to be about 7ft/2.1m each in size. Beyond them, on the opposite side of the room from the doorway is an open chamber that contains a rough wooden table stained with copious amounts of old blood and other various fluids that you're unable to identify. The sides of the table are also lined with several rows of frayed leather straps that are meant to hold down large organisms. You're also picking up the slightest of stenches---something rotten pervading the room but you only get whiffs of it every now and then. As for the cells...until you move closer it'll be difficult to tell what's lurking inside even with plenty of torch light illuminating the room. <br/><br/>To the <b>south</b> you can see a pair of double doors which are your exit.")
            GH Experimentation Cells.alreadydone = True
          }
          else if (result = "Turn Back...") {
            MoveObject (player, exit.parent)
            ClearScreen
            msg ("<br/>You decide to play things on the safe side this time around. Whatever is lurking around in there likely isn't friendly toward strangers and from your point of view it isn't worth the risk of finding out. Either way, you've already made up your mind about this whole thing and quickly close the doors with a loud creak. From there, Rold glances up at you momentarily to see what you're doing and when he sees that you haven't gone inside, he subtly nods and goes back to what he was doing. Now what? Should you try exploring another room?")
            GH Experimentation Cells.alreadydone = True
          }
        }
      }
    }
  }
}

But like I said. The Lock script works perfectly when the menu doesn't follow it. But I don't know how to work around that cause I need the menu to follow it.

Anonynn.


Well...
It's long alright!!!


The gist is...

Player Moves North.
UNLOCKED DOOR Script 
Player Enters Room
Menu Script. 

But the menu is causing the Unlocked Door script to be skipped.


all the variables exist

When do you give the variable exit a value?
It isn't anywhere in that code.

You appear to be using a variable without first giving it a value.


Are you talking about the...

goblinesque man.warning=True/False?

That gets set in the conversation before-hand.

Anonynn.


No, in your first post/question the error shows:

Error running script: Error compiling expression 'exit.parent': Unknown object or variable 'exit'

That's what mrangel refers to, I think.
Is it an attribute set on the exit at start of game?

A name is optional for an exit (if you do not give the exit a room, Quest will when the game starts). However, if you want to change any attribute of the exit during play (say to unlock it), you will need a name to refer to it by.


Oh, no. I removed that error and replaced it with a manual move for the player.

MoveObject (player, blah blah room)

Even before that the exit was unlocking perfectly fine and the player could enter the room. The problem is it's skipping the text on the Lock itself and moving the player straight into the next room where the menu is. When I remove the menu, it does not skip the Lock text.

Anonynn.


I see a lot of 'ClearScreens' in your script, especially the room the player enters. Could that be clearing the Lock/unlock Exit messages?

I'm a low level coder so I'm throwing out guesses here.


K.V.

I believe mrangel is referring to this bit:

        ShowMenu ("", menulist, false) {
          if (result = "Enter the Experimentation Cells") {
            ClearScreen
            msg ("You throw caution to the wind and enter through the double doors that you've opened.<br/><br/>After entering inside, your eyes are immediately directed to the far edges of the large, stone room. It's roughly about 55ft/16.7m wide by 20ft/6.0m long and is lined with a series of seven metallic square cells that look to be about 7ft/2.1m each in size. Beyond them, on the opposite side of the room from the doorway is an open chamber that contains a rough wooden table stained with copious amounts of old blood and other various fluids that you're unable to identify. The sides of the table are also lined with several rows of frayed leather straps that are meant to hold down large organisms. You're also picking up the slightest of stenches---something rotten pervading the room but you only get whiffs of it every now and then. As for the cells...until you move closer it'll be difficult to tell what's lurking inside even with plenty of torch light illuminating the room. <br/><br/>To the <b>south</b> you can see a pair of double doors which are your exit.")
            GH Experimentation Cells.alreadydone = True
          }
          else if (result = "Turn Back...") {
            MoveObject (player, exit.parent)
            ClearScreen
            msg ("<br/>You decide to play things on the safe side this time around. Whatever is lurking around in there likely isn't friendly toward strangers and from your point of view it isn't worth the risk of finding out. Either way, you've already made up your mind about this whole thing and quickly close the doors with a loud creak. From there, Rold glances up at you momentarily to see what you're doing and when he sees that you haven't gone inside, he subtly nods and goes back to what he was doing. Now what? Should you try exploring another room?")
            GH Experimentation Cells.alreadydone = True
          }
        }

Everything in that ShowMenu script is inside one block (like a code box). The block of code cannot see any variables which exist outside of itself. So, even if exit was declared elsewhere in this script, it still isn't declared inside of this ShowMenu script. Therefore, the exit variable does not exist as far as Quest is concerned. Hence the error:

Error running script: Error compiling expression 'exit.parent': Unknown object or variable 'exit'


If this entire script is set up on the exit which moves the player object to this room, you could set up a temporary attribute on the game object to pass to the ShowMenu script, like:

        // Set up a temporary "this" (which will point to the exit)
        game.temp_this = this
        ShowMenu ("", menulist, false) {
          // Declare the "exit" variable using the attribute we added before this ShowMenu block
          exit = game.temp_this
          if (result = "Enter the Experimentation Cells") {
            ClearScreen
            msg ("You throw caution to the wind and enter through the double doors that you've opened.<br/><br/>After entering inside, your eyes are immediately directed to the far edges of the large, stone room. It's roughly about 55ft/16.7m wide by 20ft/6.0m long and is lined with a series of seven metallic square cells that look to be about 7ft/2.1m each in size. Beyond them, on the opposite side of the room from the doorway is an open chamber that contains a rough wooden table stained with copious amounts of old blood and other various fluids that you're unable to identify. The sides of the table are also lined with several rows of frayed leather straps that are meant to hold down large organisms. You're also picking up the slightest of stenches---something rotten pervading the room but you only get whiffs of it every now and then. As for the cells...until you move closer it'll be difficult to tell what's lurking inside even with plenty of torch light illuminating the room. <br/><br/>To the <b>south</b> you can see a pair of double doors which are your exit.")
            GH Experimentation Cells.alreadydone = True
          }
          else if (result = "Turn Back...") {
            MoveObject (player, exit.parent)
            ClearScreen
            msg ("<br/>You decide to play things on the safe side this time around. Whatever is lurking around in there likely isn't friendly toward strangers and from your point of view it isn't worth the risk of finding out. Either way, you've already made up your mind about this whole thing and quickly close the doors with a loud creak. From there, Rold glances up at you momentarily to see what you're doing and when he sees that you haven't gone inside, he subtly nods and goes back to what he was doing. Now what? Should you try exploring another room?")
            GH Experimentation Cells.alreadydone = True
          }
        }

KV :D Great to see you back in here!

And yup. You were right about the ClearScreen. I had one just before the player entered the room so it was erasing the messages. I feel like a complete dope now ;.;

I super appreciate everyone weighing on this and thank you for helping me discover the error of my ways.

Anonynn


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums