Crossfire Server, Trunk
npctoken.py
Go to the documentation of this file.
1
# -*- coding: utf-8 -*-
2
#npctoken.py
3
# This is one of the files that can be called by an npc_dialog,
4
# The following code runs when a dialog has a pre rule of 'token'
5
# The syntax is
6
# ["token", "tokenname", "possiblevalue1", "possiblevalue2", etc]
7
# To deliver a True verdict, the token tokenname must be set to one of the
8
# 'possiblevalue' arguments. This will normally have been done
9
# with a previous use of settoken
10
# The token is kept in the NPC's data, and will be lost if the
11
# map containing the NPC resets.
12
18
19
verdict =
False
20
status = self.getNPCStatus(args[0])
21
for
value
in
args[1:]:
22
if
(status == value)
or
(value ==
"*"
):
23
verdict =
True
24
break
25
else
:
26
pass
27
crossfire-crossfire-maps
python
dialog
pre
npctoken.py
Generated by
1.8.17