Crossfire Server, Trunk
token.py
Go to the documentation of this file.
1
# -*- coding: utf-8 -*-
2
#token.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 be kept with the player's data, and survive the reset
11
# of the map containing the NPC.
12
18
19
verdict =
False
20
status = self.getStatus(args[0])
21
for
value
in
args[1:]:
22
if
(status == value)
or
(value ==
"*"
):
23
verdict =
True
24
break
25
else
:
26
pass
crossfire-crossfire-maps
python
dialog
pre
token.py
Generated by
1.8.17