/***************************************************************************** ** Inviswand bug fix.. ** its quite simple in fact.. it only needed a few extra lines in putcom ** to let a room catch the put command and add a vis check to when the ** room closes. ** ** here's the fix: ** in objsys.c in the command putcom there are two special event calls ** to the two objects involved in a put. ** make it look like this and this fix should work: ** /* Check objects that take part in this action */ if (obj_fun(c) != NULL) { obj_fun(c)(E_ONPUT); if (param_s.ret != 1) return; } if (obj_fun(a) != NULL) /* No else, you never know where the code is placed */ { obj_fun(a)(E_ONPUT); if (param_s.ret != 1) return; } /* Finally check the room for the inviswand bug */ if (rom_fun(ploc(mynum)) != NULL) { rom_fun(ploc(mynum))(E_ONPUT); if (param_s.ret != 1) return; } ***************************************************************************/ #include "undef.h" #include "exits.h" #include "special.h" Zone = tower Author = "Unknown" Quest = InvisWand EndZone = tower Mobile = wraith Name = "The Wraith" Location = Wraith@tower Strength = 60 Armor = 0 Damage = 10 Aggression = 50 Speed = 0 PFlags = NoSummon MFlags = Cross, DrainScr Desc = "The chill shadowy form of a wraith swirls and dances around you." EndMobile = wraith Mobile = shazareth Name = "Shazareth" Location = Sorcerer@tower Strength = 99 Armor = 0 Damage = 10 Aggression = 100 Speed = 0 PFlags = NoSummon MFlags = CanFrost Desc = "Shazareth The Sorcerer stands here." EndMobile = shazareth Mobile = cat Name = "The Cat" Location = Sorcerer@tower Strength = 20 Armor = 0 Damage = 10 Aggression = 0 MFlags = Blind SFlags = Female Desc = "A black cat stares at you from the shadows, purring gently." EndMobile = cat Object = shelf Altname = "wall" Location = IN_ROOM:Black@tower OFlags = NoGet, PushToggle Linked = Panel State = 1 MaxState = 1 Desc0 = " A wooden shelf on the north wall looks as if it once held many ancient tomes. There is a passageway beneath the shelf." Desc1 = " A wooden shelf on the north wall looks as if it once held many ancient tomes." Examine = " The shelf seems to be on some kind of wooden sliders, maybe you could push it?" EndObject = shelf Object = panel Altname = "door" Location = IN_ROOM:Candle@tower OFlags = NoGet, PushToggle Linked = Shelf State = 1 MaxState = 1 Desc0 = "A small wooden panel is open in the southern wall." EndObject = panel Object = red_candle Name = "candle" Altname = "red" Location = IN_ROOM:Candle@tower OFlags = Extinguish, Lightable State = 1 MaxState = 1 BaseValue = 20 Size = 1 Weight = 1 Desc0 = "A red candle burns here, emitting a soft flickering flame." Desc1 = "There is a red candle here." EndObject = red_candle Object = blue_candle Name = "candle" Altname = "blue" Location = IN_ROOM:Candle@tower OFlags = Extinguish, Lightable State = 1 MaxState = 1 BaseValue = 20 Size = 1 Weight = 1 Desc0 = "A blue candle burns here, emitting a soft flickering flame." Desc1 = "There is a blue candle here." EndObject = blue_candle Object = green_candle Name = "candle" Altname = "green" Location = IN_ROOM:Candle@tower OFlags = Extinguish, Lightable State = 1 MaxState = 1 BaseValue = 20 Size = 1 Weight = 1 Desc0 = "A green candle burns here, emitting a soft flickering flame." Desc1 = "There is a green candle here." EndObject = green_candle Object = scroll Location = IN_ROOM:Scroll@tower BaseValue = 20 Size = 20 Weight = 1 Desc0 = "A tattered scroll lies at your feet." Examine = ^ The scroll reads: "Read the words in the true light and be amazed as you take flight" ^ Trap = all @ int foo,z; if (event == E_ONEXAMINE) { foo = carries_obj_type (param_s.plx, OBJ_WINDOW_BALL); if (foo < 0) foo = OBJ_WINDOW_BALL; if (((z = carries_obj_type (param_s.plx, OBJ_TOWER_RED_CANDLE)) > -1 && state (foo) == 1 && otstbit (z, OFL_LIT)) || ((z = carries_obj_type (param_s.plx, OBJ_TOWER_BLUE_CANDLE)) > -1 && state (foo) == 2 && otstbit (z, OFL_LIT)) || ((z = carries_obj_type (param_s.plx, OBJ_TOWER_GREEN_CANDLE)) > -1 && state (foo) == 3 && otstbit (z, OFL_LIT))) { bprintf ("Everything shimmers and then solidifies into a different " "view!\n"); destroy (param_s.ob); teletrap (LOC_TOWER_POTION); param_s.ret = -1; } } @ EndTrap EndObject = scroll Object = runes Altname = "writing" Location = IN_ROOM:Scroll@tower OFlags = NoGet MaxState = 1 Desc0 = "Some mysterious runes are etched on the wall." Examine = " The runes are worn and hard to read, but seem to allude to some kind of mystical ball which radiated a 'true color' of some sort." EndObject = runes Object = candlestick Location = IN_ROOM:Spell@tower OFlags = Weapon State = 2 MaxState = 2 Damage = 4 BaseValue = 100 Size = 20 Weight = 40 Desc0 = " A hefty gold candlestick lies here, a candle flickering brightly within it." Desc1 = "A hefty gold candlestick lies here, with a candle in it." Desc2 = "A hefty gold candlestick lies here." Examine = " The candlestick is very ornate, with fancy scrollwork and small figurines of dragons and knights locked in mortal combat." Trap = all @ catch_put { if (onum(param_s.misc) != OBJ_TOWER_RED_CANDLE && onum(param_s.misc) != OBJ_TOWER_BLUE_CANDLE && onum(param_s.misc) != OBJ_TOWER_GREEN_CANDLE) { bprintf("You can't do that.\n"); fail(-1); } if (state(THIS_OBJECT) != 2) { bprintf("There's already a candle in it!\n"); fail(-1); } bprintf("The candle fixes firmly into the candlestick.\n"); setpscore(THIS_PLAYER, pscore(THIS_PLAYER) + 50); destroy(param_s.misc); osetarmor(THIS_OBJECT, param_s.misc); osetbit(THIS_OBJECT, OFL_LIGHTABLE); osetbit(THIS_OBJECT, OFL_EXTINGUISH); if (otstbit(param_s.misc, OFL_LIT)) { osetbit(THIS_OBJECT, OFL_LIT); setobjstate(THIS_OBJECT, 0); fail(-1); } setobjstate(THIS_OBJECT, 1); oclrbit(THIS_OBJECT, OFL_LIT); fail(-1); } @ EndTrap EndObject = candlestick Object = cauldron Location = IN_ROOM:Potion@tower OFlags = NoGet MaxState = 1 Desc0 = "A large cauldron bubbles away before you." Examine = " It is the latest luxury model, with contoured edges,inlaid paneling, a timer, and even a simmer control! It is also dark black and big enough to cook a man in!" Trap = all @ catch_eat { bprintf("You feel funny and pass out....\n"); bprintf("You wake up elsewhere....\n"); teletrap(LOC_TOWER_MAGICAL); fail(-1); } @ EndTrap EndObject = cauldron Object = fire Altname = "ashes" Location = IN_ROOM:Potion@tower OFlags = NoGet, Lit, Lightable, Extinguish MaxState = 1 Desc0 = "A large fire blazes away in one corner." Desc1 = "The ashes of a fire smoulder in a corner." EndObject = fire Object = wand Location = IN_ROOM:Magical@tower OFlags = Weapon State = 0 MaxState = 0 Damage = 10 Armor = 0 BaseValue = 100 Size = 2 Weight = 2 Desc0 = "A short, slender wand lies here." Examine = "It seems to be discharged." Trap = all @ switch (event){ case E_ONEXAMINE: if (oarmor (param_s.ob) != 0) { bprintf ("It seems to be charged.\n"); param_s.ret = -1; } break; case E_ONMISC: if (param_s.misc == VERB_WAVE) if (oarmor (param_s.ob) > 0) { osetarmor (param_s.ob, oarmor (param_s.ob) - 1); players[param_s.plx].me_ivct = 60; setpvis (mynum, 10); bprintf ("You seem to &+Cs&+Wh&+Ci&+Wm&+Cm&+We&+Cr&* and blur.\n"); param_s.ret = -1; } break; default: break; } @ EndTrap EndObject = wand Object = ball Location = IN_ROOM:Treasure@tower OFlags = NoGet, Lit, Lightable, Extinguish MaxState = 3 Desc0 = "A ball of light floats in the centre of the room." Desc1 = "The centre of the room is filled with an expanding ball of light." Desc2 = "The room is filled with an expanding ball of light." Examine = " You attempt to examine the ball closer, but it's much too bright. Your eyes start watering and you get a headache." Trap = all @ catch_put { int i; if (onum(param_s.misc) == OBJ_TOWER_WAND && oarmor(param_s.misc) == 0) { if (alive(i = mobile(MOB_TOWER_SHAZARETH)) == -1 && pscore(i) == THIS_PLAYER) { set_quest(Q_INVISWAND,THIS_PLAYER); } bprintf("The wand seems to soak up energy.\n"); osetarmor(param_s.misc, 4); fail(-1); } bprintf("Nothing happens.\n"); fail(-1); } @ EndTrap EndObject = ball Object = coins Location = IN_ROOM:Treasure@tower BaseValue = 200 Size = 10 Weight = 10 Desc0 = "Some silver coins lie piled up in a heap on the floor." Examine = " The coins are very tarnished, but seem to be silver. They could be valuable." EndObject = coins Object = staff Altname = "runed" Location = IN_ROOM:Treasure@tower BaseValue = 400 Size = 10 Weight = 3 Desc0 = "A long runed staff lies here, etched with strange markings." Examine = " You attempt to decipher the runes. They seem to be some kind of a protective spell, maybe against other magical items." EndObject = staff Object = orb Location = IN_ROOM:Treasure@tower BaseValue = 50 Size = 2 Weight = 6 Desc0 = "A small gold orb has been left here." Examine = " The orb is golden, and probably dates from the times of the good king Pippin." EndObject = orb Object = ring Location = WORN_BY:Shazareth@tower OFlags = WearOnHands BaseValue = 100 Size = 1 Weight = 1 Desc0 = "A small gold ring has been dropped here." Examine = "It looks as if it will fit tightly on any sized finger." EndObject = ring Object = sceptre Altname = "scepter" Location = IN_ROOM:Ante@tower OFlags = Weapon Damage = 7 BaseValue = 100 Size = 1 Weight = 1 Desc0 = "A large silver sceptre has been placed here." Examine = " The sceptre tapers to a narrow end, scarcely two inches in diameter, which seems scratched and worn away. Otherwise, the silver finish is perfect." EndObject = sceptre Object = DoorNote Name = "note" Altname = "sign" Location = IN_ROOM:Sorcerer@tower OFlags = NoGet Desc0 = "A note has been pinned to the door." Examine = " &+WWarning to experienced adventurers!&* I would like to warn you that the quest has been changed here from what you are probably used to. I have decided to stick more to the original story and have made it &+rIMPOSSIBLE&* to use the put xxx in yyy trick. This is a bug which is on almost all muds! The real solution lies in this door here, examine it and dont get locked in! Signed, Marty" EndObject = DoorNote Object = Door_Treasure Name = "door" Location = IN_ROOM:Treasure@tower OFlags = NoGet, Openable, Lockable Linked = Door_Shazareth State = 1 MaxState = 2 Desc0 = "The door to the north is open." Desc1 = "The door to the north is closed." Desc2 = "The door to the north is locked." Examine = " The door is made of solid marble and perfectly fits the doorway. It is very smooth and appears to be unmarked in any way, except for a single, large red eye at its center, which appears to follow you around the room." Trap = all @ switch (event) { case E_ONOPEN: bprintf("You can't shift the door at all from this side.\n"); param_s.ret = -1; default: break; } @ EndTrap EndObject = Door_Treasure Object = Door_Shazareth Name = "door" Location = IN_ROOM:Sorcerer@tower OFlags = NoGet, Openable, Lockable Linked = Door_Treasure State = 1 MaxState = 2 Desc0 = "The door is open." Desc1 = "The door is closed." Desc2 = "The door is locked." Examine = " The door is made of solid marble and perfectly fits the doorway. It is very smooth and appears to be unmarked in any way, except for a single, large red eye at its center, which appears to follow you around the room." Trap = all @ switch (event) { case E_ONOPEN: if (state(ob1) >= 1) bprintf("It seems to be magically closed.\n"); else bprintf("It's already open.\n"); param_s.ret = -1; break; default: break; } @ EndTrap EndObject = Door_Shazareth Object = book Location = IN_ROOM:Black@tower OFlags = Getflips State = 1 MaxState = 1 BaseValue = 30 Desc0 = "There is a large mystical looking book here." Desc1 = "A large book rests on the shelf." Examine = " The book details the preparation of a potion of magical strength recovery. Ingredients: Bat's Wing Toad's Foot Lizard's Claw Four Pints of Blood Eagle's Egg Stir well and leave to simmer for at least 10 minutes." EndObject = book Object = hole Location = IN_ROOM:Sorcerer@tower OFlags = NoGet MaxState = 1 Desc0 = "There is a small hole carved into the south wall." Examine = "It's about 2 inches in diameter." Trap = all @ catch_put { char ar[128]; if (onum(param_s.misc) == OBJ_TOWER_SCEPTRE && state(OBJ_TOWER_DOOR_SHAZARETH) == 1) { setobjstate(OBJ_TOWER_DOOR_TREASURE, 0); strcpy(ar, "The door clicks open!\n"); sendf( oloc(OBJ_TOWER_DOOR_TREASURE), ar); sendf( oloc(OBJ_TOWER_DOOR_SHAZARETH), ar); fail(-1); } bprintf("Nothing happens.\n"); fail(-1); } @ EndTrap EndObject = hole Object = Door_Tower Name = "door" Location = IN_ROOM:base@tower OFlags = NoGet, Openable Linked = Door_Golem@Castle State = 1 MaxState = 1 Desc0 = "The door is open." Desc1 = "The door is closed." Examine = " You see a jet black marble door, etched with runes and strange symbols which you do not recognize. You see no locks of mortal means." EndObject = Door_Tower Object = fountain Location = IN_ROOM:Sorcerer@tower OFlags = Extinguish, Lit, NoGet Examine = " You see a fountain of fire, not the sort to jump into on New Year's Day, though it would seem very cosy to have in the living room." EndObject = fountain Object = potion Location = IN_ROOM:Treasure@tower BaseValue = 250 Size = 2 Weight = 2 Desc0 = "A potion of restore strength lies here." Examine = ^The potion has a small label saying "Restore Strength" on it.^ Trap = all @ catch_drink { setpstr(THIS_PLAYER, maxstrength(THIS_PLAYER)); bprintf("You feel much much stronger!\n"); setoloc(THIS_OBJECT, LOC_DEAD_EATEN, IN_ROOM); destroy(THIS_OBJECT); fail(-1); } @ EndTrap EndObject = potion Object = crown Location = IN_ROOM:Treasure@tower OFlags = WearOnHead, ExcludeWear BaseValue = 400 Size = 12 Weight = 10 Desc0 = "A beautiful gold crown lies here." Examine = " The crown seems suitable for a king, since it is lavishly decorated with sparkling gems and has a silken lining. Wouldn't you want to be one ?" EndObject = crown Object = chute_Top Name = "chute" Location = IN_ROOM:Ante@tower OFlags = NoGet Desc0 = "There is a chute in the wall, too small to climb down." Trap = all @ catch_put { if (onum(param_s.misc) == OBJ_CASTLE_RUNESWORD) { bprintf("You can't let go of it!\n"); fail(-1); } bprintf("It vanishes down the chute....\n"); sendf(oloc(OBJ_TOWER_CHUTE_BOT), "The %s comes out of the chute.\n", oname(param_s.misc)); setoloc(param_s.misc, oloc(OBJ_TOWER_CHUTE_BOT), IN_ROOM); fail(-1); } @ EndTrap EndObject = chute_Top Object = chute_Bot Name = "chute" Location = IN_ROOM:Magical@tower OFlags = NoGet Desc0 = "There is a chute in the wall, too small to climb up." Trap = all @ catch_put { bprintf("You can't do that, the chute leads up from here!\n"); fail(-1); } @ EndTrap EndObject = chute_Bot Location = "Base" North = ^Door_Tower@tower East = Black@tower Title = "&+WBase of the Tower&*" Desc = ^ You are now inside the black tower which stretches up out of the castle. The walls glisten with sorcery and from high above come the noises of high level spells and experimentation. A doorway leads east into another room, and a door lies north. ^ EndLocation = "Base" Location = "Black" North = ^Shelf@tower West = Base@tower Title = "&+WBlack Tower&*" Desc = ^ You are in a small dark room in one of the lower levels of the black tower. It appears to be a store room for spell ingredients which line the shelves on the northern wall. An archway leads west to the tower entrance. ^ EndLocation = "Black" Location = "Candle" South = ^Panel@tower West = Scroll@tower Title = "&+WCandle Room&*" Desc = ^ This room looks like a cross between a Queen video and Madam Toussaud's after an arson attack, as candles of all shapes, sizes and colors fill the room. A passageway leads west. ^ EndLocation = "Candle" Location = "Scroll" East = Candle@tower Title = "&+WScroll Room&*" Desc = ^ You are in a large, dry and well lit store room for scrolls, which would appear to be the Sorcerer's supply. ^ EndLocation = "Scroll" Location = "Potion" South = Spell@tower Title = "&+WPotion Store Room&*" Desc = ^ This would appear to be the potion preparation and store room for the Sorcerer, as around you lie shelves once lined with glass vials and bottles ready to be filled. A single doorway leads south. ^ EndLocation = "Potion" Location = "Spell" North = Potion@tower Title = "&+WSpell Room&*" Desc = ^ This room would appear to be one of the Sorcerer's many spell rooms as its scorched walls show the signs of many a fireball spell or a more dangerous variant of it. A single scorched doorway leads north. ^ EndLocation = "Spell" Location = "Magical" East = Wraith@tower Title = "&+WMagical Item Storeroom&*" Desc = ^ You are standing in a large storeroom which would be packed with magical artifacts in normal times but it seems that the Sorcerer is using their power for a large spell project that crackles from the top-most level of the tower. A doorway leads through to the east to the wraith room, and you tremble at the thought of the creature which may lie through it, a creature which has been known to slay even Enchanters in but a single blow... ^ EndLocation = "Magical" Location = "Wraith" North = Levitation@tower West = Magical@tower Title = "&+WWraith Room&*" Desc = ^ You find yourself in the room where the Sorcerer keeps his undead creatures, in particular his pet Wraith, until he needs them. Exits lead north and west. ^ EndLocation = "Wraith" Location = "Levitation" South = Wraith@tower Up = Ante@tower Title = "&+WLevitation Room&*" Desc = ^ You find yourself in a completely black room, even light seems afraid to go here. It is completely bare of adornment, and even the walls wouldn't stay if they had somewhere else to lean! There is a single exit in the ceiling high above, and another to the south. You seem to be floating! ^ EndLocation = "Levitation" Location = "Ante" East = Sorcerer@tower Down = Levitation@tower Title = "&+WSorcerer's Ante-room&*" Desc = ^ You are standing in the Sorcerer's ante-room, which sizzles with magical energy. Apart from the hole in the floor the only exit available is to the east. ^ EndLocation = "Ante" Location = "Sorcerer" East = Ledge@tower South = ^Door_Shazareth@tower West = Ante@tower Title = "&+WSorcerer's Room&*" Desc = ^ You are in a very large and exceedingly magical room, devoted to the pursuit of magic in all its form. Flames dance over the walls to light the scene, although they are merely for effect as a permanent fire fountain erupts from the center of the room. Gargoyles wink at you from the walls and objects move quietly in complex patterns, getting on with the jobs they have been given. There is a door to the south, and a doorway leads west. A splendid arched window looks east across the world. ^ EndLocation = "Sorcerer" Location = "Treasure" North = ^Door_Treasure@tower Trap = all @ switch (event) { case E_ONGET: case E_ONPUT: if (state(OBJ_TOWER_DOOR_TREASURE) == 0 && pvis(THIS_PLAYER) == 0 && MISC != OBJ_TOWER_BALL && oloc(MISC) == LOC_TOWER_TREASURE) { char *s; setobjstate(OBJ_TOWER_DOOR_TREASURE, 1); sendf(LOC_TOWER_TREASURE, s = "The door clicks shut...\n"); sendf(obj_loc(olinked(OBJ_TOWER_DOOR_TREASURE)), s); /*Other side of door*/ } break; default: break; } @ EndTrap Title = "&+WTreasure Chamber&*" Desc = ^ This is large treasure store and naturally everything in it belongs to the Sorcerer and might take a rather nasty attitude to being removed. ^ EndLocation = "Treasure" Location = "Ledge" West = Sorcerer@tower Title = "&+WThe Window Ledge&*" Desc = ^ You are perched on a precarious window ledge looking down the black tower into the courtyard below. The safety (?) of the Sorcerer's Room is back west. ^ EndLocation = "Ledge"