Crossfire Server, Trunk
navar-midane_pickup.py
Go to the documentation of this file.
1 import Crossfire
2 import random
3 
4 obj = Crossfire.WhoAmI()
5 
6 Crossfire.SetReturnValue(1)
7 
8 messages = ["Midane says: %p, you thief! Leave this %i where it is!",
9  "Midane says: Tell me, %p, what do you plan to do with this %i?",
10  "Midane says: I'm sure you don't need any %i, do you, %p?"
11  ]
12 
13 msg = messages[random.randint(0, len(messages)-1)]
14 msg = msg.replace('%i', obj.Name)
15 msg = msg.replace('%p', Crossfire.WhoIsActivator().Name)
16 
17 obj.Map.Print(msg, Crossfire.MessageFlag.NDI_NAVY + Crossfire.MessageFlag.NDI_UNIQUE)