From 764c046bdfa178b008c1dc888d6b5e2e6d1df570 Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Sun, 30 May 2010 10:43:07 +0000 Subject: [PATCH] Add a 'questdone' precondition to vary dialogs. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13339 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/dialog/pre/questdone.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 python/dialog/pre/questdone.py diff --git a/python/dialog/pre/questdone.py b/python/dialog/pre/questdone.py new file mode 100644 index 000000000..ed45d11e4 --- /dev/null +++ b/python/dialog/pre/questdone.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +#questdone.py +# This is one of the files that can be called by an npc_dialog, +# The following code runs when a dialog has a pre rule of 'questdone' +# The syntax is ["questdone", "questname"] +# All arguments are required, questname must be a quest that is +# defined by one of the .quests files. +# To deliver a True verdict, the player must have completed at least once the quest. +## DIALOGCHECK +## MINARGS 1 +## MAXARGS 1 +## .* +## ENDDIALOGCHECK + + +questname = args[0] +verdict = character.QuestWasCompleted(questname)