Razakel Posted July 22, 2010 Share Posted July 22, 2010 I'm making a quest mod and for the most part I want it to update when certain items are picked up. Thus far I've been using: scn (itemname)Script Begin OnAdd Player SetStage (questname) 10 end It works, but it occured to me that it's far too simple and somewhere down the track it's going to be a problem. Am I right? Will this do or do I need to add more lines? (I should mention that it's impossible to get the items out of quest order). Link to comment Share on other sites More sharing options...
GODSBANE123456 Posted July 22, 2010 Share Posted July 22, 2010 well, there is always the solution of this scn (itemname)Script short (nextiteminsequence)Begin onAdd player(Tab)If get.(Previousiteminsequnce) == 1(Tab)(Tab)setstage (questname) 10(Tab)(Tab)set.(nextiteminsequence) to 1(Tab)EndifEND Note: for all of the items to work together, then you should have all of the scripts for the quest in one qwuest if you get what i mean, if you don't then you just need to have multiple blocks inside of your script, and have the one script linked to the quest so that it should look like this: scn pickedupitemsquestscript short (iteminsequence1)Short (iteminsequence2)short (iteminsequence3) Begin onAdd player(Tab) setstage (questname) 10(Tab)set.(iteminsequence1) to 1END Begin onAdd player(Tab)If get.(iteminsequence1) == 1(Tab)(Tab)setstage (questname) 11(Tab)(Tab)set.(iteminsequence2) to 1(Tab)EndifEND Begin onAdd player(Tab)If get.(iteminsequence2) == 1(Tab)(Tab)setstage (questname) 12(Tab)(Tab)set.(iteminsequence3) to 1(Tab)EndifEND Note2: this will not prevent the item from being picked up, but the quest will not advance unless the items preceeding it are already picked up as well Link to comment Share on other sites More sharing options...
Razakel Posted July 22, 2010 Author Share Posted July 22, 2010 Would this work equally as well? Making this mod is pretty much my first experience with scripting so I'm just taking what I can from other quests and trying to make it fit in with mine scn 1aDarkLairContractScript Begin OnAdd Player If (GetStage 1aDarkLairQuest <20) SetStage 1aDarkLairQuest 20 endif end Link to comment Share on other sites More sharing options...
GODSBANE123456 Posted July 23, 2010 Share Posted July 23, 2010 I have found that i come across many problems with the getstage, but you are welcome to try, the new edited one that i have just done in the above post should work, and you can just input your own names and refid's into it, but another thing that i just realized might be a problem with your script... when you have not yet started the quest, it is at 0, so when you accidently pick the item up, then it will automatically put you at 20, therefore bypassing all the rest of the quest before it, mine does not allow for that, because it will not advance the quest without you haveing all of the previous items to it. Link to comment Share on other sites More sharing options...
GODSBANE123456 Posted July 23, 2010 Share Posted July 23, 2010 hehe, silly me, but i forgot to put in the endif, ill fix that right now in my first post on this thread Link to comment Share on other sites More sharing options...
ijarofjami Posted July 23, 2010 Share Posted July 23, 2010 Check this link: http://www.thenexusforums.com/index.php?/topic/220115-updating-the-quest-journal-when-you-acquire-an-item-or-kill-a-person/ Link to comment Share on other sites More sharing options...
GODSBANE123456 Posted July 23, 2010 Share Posted July 23, 2010 lol i already got it for him, my first post worked like a charm or so he told me http://www.thenexusforums.com/public/style_emoticons/dark/biggrin.gif (not in those exact words) Link to comment Share on other sites More sharing options...
ijarofjami Posted July 23, 2010 Share Posted July 23, 2010 Yeah, I was looking at your script though, and it looks like a lot of excess code that doesn't to be entered. I've never had a problem with GetStage, so I tend to use it a lot. Here's an example of what my script would look like: ScriptName itempickup short DoOnce begin gamemode if DoOnce == 0 && player.GetItemCount (Item1) == 1 && player.GetItemCount (Item2) == 1 && GetStage (QuestName) == 10SetStage (QuestName) 20Set DoOnce to 1endif End This script allows you fit multiple items (or just one if you want to) into one block there saving time and resources on your system. However, if the other code worked for you, than stick with it. This is just another alternative if you want to try it. This script also allows you to get the items in any order you want. Link to comment Share on other sites More sharing options...
Recommended Posts