File: level.py

package info (click to toggle)
crossfire-maps 1.75.0%2Bdfsg1-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 275,656 kB
  • sloc: python: 7,711; sql: 92; sh: 73; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- coding: utf-8 -*-
#level.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 'level'
# The syntax is ["level", "levelrequired"]
# To deliver a True verdict, the player must be at or above level levelrequired
## DIALOGCHECK
## MINARGS 1
## MAXARGS 1
## \d
## ENDDIALOGCHECK

targetlevel = int(args[0])
if len(args) == 1:
    if character.Level < targetlevel:
        verdict = False
else:
    verdict = False
    #TODO - add support for checking the level of individual skills