Difference between revisions of "Page Design Test 1"
| Line 47: | Line 47: | ||
|FontColor=000000}} | |FontColor=000000}} | ||
|} | |} | ||
| − | This function has a check to see if the player has the quest or not. If they don't then the NPC will offer the player the quest. If they do then the NPC will continue on with the conversation. Theses checks can be done using the if/elsif statements. You can see here we are using our variable ASolidifiedFront. We | + | This function has a check to see if the player has the quest or not. If they don't then the NPC will offer the player the quest. If they do then the NPC will continue on with the conversation. Theses checks can be done using the if/elsif statements. |
| + | |||
| + | ''OfferQuest(NPC, Spawn, ASolidifiedFront)'' | ||
| + | |||
| + | This line is the actual code that tells the server | ||
| + | |||
| + | |||
| + | You can see here we are using our variable ASolidifiedFront. We use the function OfferQuest to tell the server that | ||
Revision as of 11:41, 26 September 2015
ContentDesigner:SpawnScripts - Calling Quests
Return to: ContentDesigner:SpawnScripts | Tutorials | Portal | Forum | Project Manager | Bug Tracker
A content designer's task involve spawning signs, objects, widgets, ground spawns, and NPCs in that order. This is achieved by using a combination of the web database editor, commonly known as DB Editor, and the client itself. Below is information to help turn a unpopulated zone into one filled with everything from harvest nodes to monsters.
The very first thing that has to be done is to assign the quest ID to a local variable. This will be inserted just below the comments section. For this guide I am using Verex N'Za spawnscript so everyone can refer to that script if needed.
Comments Section with quest variable --[[ |
A breakdown of the new line local ASolidifiedFront = 120.
Starting off we use the word local to let the script know that this variable is to be used in this script only, and no where else.
Next I gave the variable the name ASolidifiedFront. This can be anything you want, but to make the script easier to understand later it is our requirement to name the variable after the quest. As you can see here it is easy to tell that the quest here is A Solidified Front.
The variable ASolidifiedFront has to be assigned to the quest ID. This way when the function sees the variabl ASolidifiedFront in the code it will know what quest to look for. Here it is set to 120 and is the quest ID of A Solidified Front.
To get the quest ID you can log on to the web database editor and find it under the quest section. If you are working on a local, or private, server you will need to look in your database.
We need to add a new function to our script. Choose a name for this function that will resemble what you want to accomplish like QuestOffer.
Setting up a quest function is similar to wedding a chat function. For a refresher on addind chat function refer to creating conversations page at the bottom.
Quest Function function QuestOffer(NPC, Spawn) |
This function has a check to see if the player has the quest or not. If they don't then the NPC will offer the player the quest. If they do then the NPC will continue on with the conversation. Theses checks can be done using the if/elsif statements.
OfferQuest(NPC, Spawn, ASolidifiedFront)
This line is the actual code that tells the server
You can see here we are using our variable ASolidifiedFront. We use the function OfferQuest to tell the server that