Crossfire Server, Trunk
bigchest.py
Go to the documentation of this file.
1 import Crossfire
2 activator=Crossfire.WhoIsActivator()
3 mymap=activator.Map
4 
5 whoami=Crossfire.WhoAmI()
6 
7 if whoami.Name=="Big Chest":
8 
9  # Remove all forces, in case player had more than one
10  check = activator.Inventory
11  while check:
12  below = check.Below
13  if check.Name == "BigChest":
14  check.Remove()
15  check = below
16 
17  Card=activator.CreateObject("event_apply")
18  Card.Name="BigChest"
19 
20  myPath=mymap.Path
21  Card.Title=myPath
22 else:
23  Target=activator.CheckInventory("BigChest")
24  if Target==None:
25  whoami.Say("I'm sorry, I can't send you home. It seems my attachment to the material plane has shifted.")
26  else:
27  Path=Target.Title
28  Map=Crossfire.ReadyMap(Path)
29  Target.Remove()
30 
31  activator.Teleport(Map, 1,9)