ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/test/python.py
(Generate patch)

Comparing deliantra/maps/test/python.py (file contents):
Revision 1.1.1.1 by root, Sun Feb 5 00:02:02 2006 UTC vs.
Revision 1.1.1.2 by elmex, Wed Feb 22 18:08:06 2006 UTC

21 whoami.Say('%d archetypes'%len(archs)) 21 whoami.Say('%d archetypes'%len(archs))
22 which = random.randint(0,len(archs)) 22 which = random.randint(0,len(archs))
23 arch = archs[which] 23 arch = archs[which]
24 whoami.Say('random = %s'%arch.Name) 24 whoami.Say('random = %s'%arch.Name)
25 25
26 arch = Crossfire.WhoIsActivator().Archetype() 26 arch = Crossfire.WhoIsActivator().Archetype
27 whoami.Say('your archetype is %s'%arch.Name) 27 whoami.Say('your archetype is %s'%arch.Name)
28 28
29def do_maps(): 29def do_maps():
30 maps = Crossfire.GetMaps() 30 maps = Crossfire.GetMaps()
31 whoami.Say('%d maps loaded'%len(maps)) 31 whoami.Say('%d maps loaded'%len(maps))
96 x = 0 96 x = 0
97 whoami.Say(' new x') 97 whoami.Say(' new x')
98 98
99 dict['s'] = x 99 dict['s'] = x
100 100
101
102def do_resist():
103 whoami.Say('Resistance test')
104 who = Crossfire.WhoIsActivator()
105 for r in range(25):
106 whoami.Say(' %d -> %d'%(r,who.GetResist(r)))
107
108def do_basics():
109 whoami.Say('Basic test')
110 who = Crossfire.WhoIsActivator()
111 whoami.Say('type = %d'%who.Type)
112
101whoami.Say( 'plugin test' ) 113whoami.Say( 'plugin test' )
102 114
103topic = Crossfire.WhatIsMessage().split() 115topic = Crossfire.WhatIsMessage().split()
104#whoami.Say('topic = %s'%topic) 116#whoami.Say('topic = %s'%topic)
105#whoami.Say('topic[0] = %s'%topic[0]) 117#whoami.Say('topic[0] = %s'%topic[0])
115 do_marker() 127 do_marker()
116elif topic[0] == 'ref': 128elif topic[0] == 'ref':
117 do_activator() 129 do_activator()
118elif topic[0] == 'memory': 130elif topic[0] == 'memory':
119 do_memory() 131 do_memory()
132elif topic[0] == 'resist':
133 do_resist()
134elif topic[0] == 'basics':
135 do_basics()
120else: 136else:
121 do_help() 137 do_help()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines