Crossfire Server, Trunk
navar-midane_attack.py
Go to the documentation of this file.
1 import Crossfire
2 
3 def do_repel():
4  who.Say("%s, you're too violent, get out of here IMMEDIATELY!"%pl.Name)
5 
6  ex = who.Map.ObjectAt(exit_x, exit_y)
7  while ex:
8  if ex.Type == Crossfire.Type.EXIT:
9  map = Crossfire.ReadyMap(ex.Slaying)
10  if map:
11  pl.Teleport(map, ex.HP, ex.SP)
12  pl.Write('You feel a powerful force repel you!', Crossfire.MessageFlag.NDI_UNIQUE + Crossfire.MessageFlag.NDI_ORANGE)
13  return
14  ex = ex.Above
15 
16 
17 Crossfire.SetReturnValue(1)
18 
19 who = Crossfire.WhoAmI()
20 who.HP = who.MaxHP
21 
22 exit_x = 5
23 exit_y = 1
24 
25 pl = Crossfire.WhoIsActivator()
26 while pl.Owner != None:
27  pl = pl.Owner
28 
29 if pl.Map == who.Map:
30  do_repel()
navar-midane_attack.do_repel
def do_repel()
Definition: navar-midane_attack.py:3