Jump to content

Anatomy of a Gathering Quest?


katethegreat19

Recommended Posts

I'm extremely new to scripting but want to make a gathering quest. (find & collect specific items, and a prize will be awarded if you have found them all)

I wanted to study the scripting of an existing mod or quest that does exactly this, but couldn't find one. If anyone could lay out a basic anatomy of a gathering-quest script, I would be very grateful - or perhaps point me in the direction of a mod that awards a prize for the collection of a number of items? (so that I could study the script)

 

Many thanks for any help offered here!

Link to comment
Share on other sites

The quest doesn't have a prize per se, but the initial quest with Companion Vilja is a gathering quest for ingredients (and you won't find many more gifted scripters than CDCooley and Emma). At the very least you'll have a great companion.
Link to comment
Share on other sites

How I'd do it is to have two separate types of item - a "token" item and a real one. They are identical except that the token one has a script.

 

Let's say your quest name is MyQuest, and your items are called MyItemToken and MyItemReal. On MyItemToken, you could have a script like this:

 

BEGIN ONADD PLAYER

set MyQuest.ItemsFound to MyQuest.ItemsFound + 1
Player.RemoveItem MyItemToken 1
Player.AddItem MyItemReal 1

if ( MyQuest.ItemsFound >= 10 )		; How many of these items are needed to trigger the quest update.
SetStage MyQuest 50		; ...or whatever the quest stage is.
endif

END

 

Remember to declare the ItemsFound variable in your quest script!

 

Basically, when the token is picked up, it adds 1 to the total items found, adds a "real" item to the player's inventory and then vanishes so that it can't be picked up repeatedly.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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