Alchemy Poison & Item Crafting Engine

version 1 by Philip Black

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Running a Special Script Instead of Combining
    You can expand this to create a special Adventure Game style object puzzles where using something on something else causes an event. You can see this in action in the 'We Come In Peace' mini game. Here is another example, just to show you how to use this script in a way that doesn't end the game:
        Ship is a room. Red Key Card is a kind of thing. Electronic Scanner Slot is a kind of thing. There is a Red Key Card and a Electronic Scanner Slot in Ship.
        Metal Door is a door. It is locked. North of Metal Door is Test.
        Before Combining Objects:
            if the noun is a Red Key Card:
                If the second noun is a Electronic Scanner Slot:
                    Say "[line break]The machine swallows the card, and the door opens!";
                    Move a random Red Key Card to Hyperspace Chest;
                    Now the Metal Door is unlocked;
                    reject the player's command; [This line is important or the main Combining Objects script will still run, and give an error]
            if the second noun is a Electronic Scanner Slot:
                If the noun is a Red Key Card:
                    Say "[line break]The machine swallows the card, and the door opens!";
                    Move a random Red Key Card to Hyperspace Chest;
                    Now the Metal Door is unlocked;
                    reject the player's command;
                    
        Test me with "Use card on slot".