Script to check if a player knows (through the knowledge system) something or not.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13369 282e977c-c81d-0410-88c4-b93c2d0d6712
master
ryo_saeba 2010-06-06 15:06:48 +00:00
parent e71b3376ad
commit 88fc3f0db4
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
#knowledgeknown.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 'knowledgeknown'
# The syntax is ["knowledgeknown", "knowledge"]
# To deliver a True verdict, the player must have the knowledge represented
# by "knowledge" (specific format depending on the format).
#
## DIALOGCHECK
## MINARGS 1
## MAXARGS 1
## .*
## \*
## ENDDIALOGCHECK
knowledge = args[0]
if not character.KnowledgeKnown(knowledge):
verdict = False