Jump to content

Need Help With Quest Scripting and Aliases?


TheAdoringFan1

Recommended Posts

  On 9/1/2014 at 9:29 PM, Darren83 said:

You dont even need a ref alias to remove a item.. just make a property that points to the item as a book like so

 

Book property journal1 auto

 

then run

 

game.getplayer().removeitem(journal1, 1)

 

 

Removing a item will remove it lol, even if it is a quest specific alias it will just delete it from their inventory and your other script should put a new one in the other guy. I know it's not 'optimal' and/or moving the 'same' reference but it accomplishes the same thing

That will probably work to remove it, but then it still doesn't add it to the npc's inventory.

Link to comment
Share on other sites

  On 9/1/2014 at 10:14 PM, lofgren said:

It sounds like we have an incomplete picture of what is going on. To be clear you are trying to take a vanilla item in a vanilla NPC's inventory, which you did not add, and put it in an alias. Is that correct?

 

The main question here is how is the journal getting into the NPC's inventory.

To start with, it was a vanilla book that can be found in a vanilla dungeon on a table. The player must grab the journal to advacne the quest, and upon completion of the quest it should be transfered from the player's inventory to the mod-created npc questgiver's inventory (Cassius). After that didn't seem to work, I duplicated the vanilla journal, gave it the same scripts, and then removed the vanilla journal from the dungeon and added the new one to the inventory of the enemy the journal belongs to. I then changed the quest alias accordingly so it now refers to the new mod-created journal.

Link to comment
Share on other sites

OK. Going back to the first incarnation (vanilla book on a table), you want to set up your alias as Specific Reference and then click the button to select forced reference and point the alias at the book on the table. That should make the original version of your script work correctly.

Link to comment
Share on other sites

  On 9/2/2014 at 12:18 AM, lofgren said:

OK. Going back to the first incarnation (vanilla book on a table), you want to set up your alias as Specific Reference and then click the button to select forced reference and point the alias at the book on the table. That should make the original version of your script work correctly.

Nope, didn't work. I did everything like you said, but when I complete the quest I get my reward, but the journal isn't removed from the players inventory and no journal is added to the npc's inventory.

Link to comment
Share on other sites

OK, just checking because aliases are set when the quest starts, so if the quest had already started then it wouldn't pick up the change to the alias.

 

OK, first, instead of using the additem command, let's try using the remove item command. So something like:

Game.GetPlayer().RemoveItem(Alias_Journal.GetReference(), 1, false, Alias_ModCassius.GetReference())

Next up I would add a script to the alias that gives a notification whenever it is picked up or dropped. That way we can see if the alias is still empty or the problem is with the command.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...