| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# marktime.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 post rule of 'marktime' |
| 5 |
# The syntax is ["marktime", "nameofmarker"] |
| 6 |
# this can then be checked by an age condition that looks for the age |
| 7 |
# of "nameofmarker" |
| 8 |
|
| 9 |
## DIALOGCHECK |
| 10 |
## MINARGS 1 |
| 11 |
## MAXARGS 1 |
| 12 |
## .* |
| 13 |
## ENDDIALOGCHECK |
| 14 |
|
| 15 |
markername = args[0] |
| 16 |
timestamp = map(str, (Crossfire.GetTime())[:5]) |
| 17 |
self.setStatus(markername, "-".join(timestamp)) |