| 1 |
# -*- coding: utf-8 -*- |
| 2 |
#level.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 'level' |
| 5 |
# The syntax is ["level", "levelrequired"] |
| 6 |
# To deliver a True verdict, the player must be at or above level levelrequired |
| 7 |
## DIALOGCHECK |
| 8 |
## MINARGS 1 |
| 9 |
## MAXARGS 1 |
| 10 |
## \d |
| 11 |
## ENDDIALOGCHECK |
| 12 |
|
| 13 |
targetlevel = int(args[0]) |
| 14 |
if len(args) == 1: |
| 15 |
if character.Level < targetlevel: |
| 16 |
verdict = False |
| 17 |
else: |
| 18 |
verdict = False |
| 19 |
#TODO - add support for checking the level of individual skills |