diff --git a/test/python.py b/test/python.py index 1783b9891..b8bdb9673 100644 --- a/test/python.py +++ b/test/python.py @@ -33,6 +33,8 @@ def do_help(): whoami.Say(' - directory') whoami.Say(' - event') whoami.Say(' - light') + whoami.Say(' - attacktype') + whoami.Say(' - players') def do_arch(): archs = Crossfire.GetArchetypes() @@ -320,6 +322,19 @@ def do_light(): whoami.Map.ChangeLight(chg) whoami.Say('new light: %d'%whoami.Map.Light) +def do_attacktype(): + att = [ Crossfire.AttackType.FIRE, Crossfire.AttackType.COLD, Crossfire.AttackType.ELECTRICITY ] + whoami.Say('Your attacktype are:') + for at in att: + if ( at & Crossfire.WhoIsActivator().AttackType == at): + whoami.Say(Crossfire.AttackTypeName[ at ]) + +def do_players(): + players = Crossfire.GetPlayers() + whoami.Say('Players logged in:') + for pl in players: + whoami.Say(' - %s'%pl.Name) + topic = Crossfire.WhatIsMessage().split() #whoami.Say('topic = %s'%topic) #whoami.Say('topic[0] = %s'%topic[0]) @@ -377,5 +392,9 @@ elif topic[0] == 'event': do_event() elif topic[0] == 'light': do_light() +elif topic[0] == 'attacktype': + do_attacktype() +elif topic[0] == 'players': + do_players() else: do_help()