Stendhal Quest Coding - Part 2: Difference between revisions

Content deleted Content added
imported>Kymara
imported>Kribbel
m replace old link
 
(52 intermediate revisions by 6 users not shown)
Line 1:
{{Navigation for Stendhal Top|Contributing}}
{{Navigation for Stendhal Contributors}}
 
Line 76:
As you can see, we now have to use "add()" instead of "addReply()" and that method has a lot more parameters.
 
We have predefined a number of states in the class [httphttps://ariannegithub.cvs.sf.net/viewvccom/arianne/stendhal/blob/master/src/games/stendhal/server/entity/npc/ConversationStates.java?view=markup ConverstationStatesConversationStates] that you can and should use.
 
===Graphical representation===
There is one last thing that makes your life easier: If you are using Linux, have the graphviz package installed and you are an admin in game, you can select "'''View Transitions"''' in the right click menu of NPCs. This will generate an image of the current transition graph very similar to the images above.
 
== Conditions And Actions ==
Line 91 ⟶ 92:
new LevelLessThanCondition(6),
ConversationStates.IDLE,
"Oh sorry, youryou have way too little experience.",
null);
</source>
Line 175 ⟶ 176:
== Third Part of this Tutorial ==
 
Congratulations if you made it this far. You are now able to process basic conditions and actions. And you can handle both short and long term memory. The third and last part of this tutorial will explain how you accept the quest item and reward the player. It describeddescribes some advanced techniques, too. Please make sure the steps on this page work before you continue to [[Stendhal Quest Coding - Part 3|the third part of this tutorial]].
 
[[Category:Stendhal]]