File: navar-midane_attack.py

package info (click to toggle)
crossfire-maps 1.75.0%2Bdfsg1-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 275,656 kB
  • sloc: python: 7,711; sql: 92; sh: 73; makefile: 7
file content (30 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Crossfire

def do_repel():
	who.Say("%s, you're too violent, get out of here IMMEDIATELY!"%pl.Name)

	ex = who.Map.ObjectAt(exit_x, exit_y)
	while ex:
		if ex.Type == Crossfire.Type.EXIT:
			map = Crossfire.ReadyMap(ex.Slaying)
			if map:
				pl.Teleport(map, ex.HP, ex.SP)
				pl.Write('You feel a powerful force repel you!', Crossfire.MessageFlag.NDI_UNIQUE + Crossfire.MessageFlag.NDI_ORANGE)
				return
		ex = ex.Above


Crossfire.SetReturnValue(1)

who = Crossfire.WhoAmI()
who.HP = who.MaxHP

exit_x = 5
exit_y = 1

pl = Crossfire.WhoIsActivator()
while pl.Owner != None:
	pl = pl.Owner

if pl.Map == who.Map:
	do_repel()