Crossfire Server, Trunk
death-counter.py
Go to the documentation of this file.
1 import Crossfire
2 
3 private_dict = Crossfire.GetPrivateDictionary()
4 value = Crossfire.ScriptParameters()
5 current_map = Crossfire.WhoAmI().Map
6 
7 if value == 'reset':
8  private_dict['death'] = 0
9 else:
10  private_dict['death'] += 1
11 
12  # End of wave 1
13  if private_dict['death'] == 120:
14  current_map.TriggerConnected(999, 1)
15 
16  # End of wave 2
17  elif private_dict['death'] == 240:
18  current_map.TriggerConnected(1000, 1)
19  private_dict['death'] = 0
20 
21 # Crossfire.Log(Crossfire.LogError, f"{private_dict['death']}")