2009.09.25: Edited to reflect the entity command changes.
_____________________________________________________________
Interacting with objects in the game for quests and other things is a big part of Everquest II. I'm going to explain how to do this in EQ2Emu. There are a number of steps.
1) Create the entity command.
2) Setup the spawn.
3) Add functionality.
1. Create the Entity Command
First thing's first, we're going to need an entity command. This is what shows up when you right-click the spawn. This is very simple to do. Just go to your 'entity_commands' table and insert a new command.
2. Setup the Spawn
Now we need to prepare the spawn to be interacted with. You will need to go to the spawn's 'spawn' table and make sure 'targetable' = 1 and 'show_command_icon' = 1. This will make the spawn glow when you move your mouse over it and make the little hand icon appear. Make sure the spawn's 'attackable' is set to 0. If it is not, you won't be able to interact with the spawn. Now we need to give the spawn the entity command you created. You will need to put the entity command's ID into either 'command_primary' or 'command_secondary'. Putting the command in 'command_primary' will allow you to execute that command by left-clicking the spawn (shortcut).
3. Add Functionality
If you want something to happen when you click the spawn then you'll need to create a spawn script for the spawn. Whenever a spawn is casted on, the spawn's 'casted_on(NPC, Spawn, SpellName)' function is called. See here [ viewtopic.php?f=30&t=633 ] if you do not know how to use the function. This will allow you to do ANYTHING in LUA that we support when a spawn's command is clicked (like updating quest steps, etc).
_____________________________________________________________
This is how the spawn needs to be set up. You can you always change these settings on the go in a script using SpawnSet. If you want a spawn to become intractable only for a certain player when they are on a specific quest and step, check out what the SetRequiredQuest LUA function is. You put it in the spawn's spawn script with the proper parameters, and the rest is taken care of.