Debian Codegraph @

python/guilds/bigchest.py

raw
1 import Crossfire
2 activator=Crossfire.WhoIsActivator()
3 mymap=activator.Map
4
5 whoami=Crossfire.WhoAmI()
6 def GetForce(Target):
7 while Target!=None:
8 if Target.Name=="BigChest":
9 return Target
10 else:
11 Target=Target.Below
12
13 if whoami.Name=="Big Chest":
14 myPath=mymap.Path
15 Target=activator.CheckInventory("BigChest")
16 if Target !=None:
17 Target.Quantity=0
18
19
20 Card=activator.CreateObject("event_apply")
21 Card.Name="BigChest"
22
23 Card.Title=myPath
24 else:
25 Target=activator.Inventory
26 Target=GetForce(Target)
27 if Target==None:
28 whoami.Say("I'm sorry, I can't send you home. It seems my attachment to the material plane has shifted.")
29 else:
30 Path=Target.Title
31 Map=Crossfire.ReadyMap(Path)
32 Target.Remove()
33
34 activator.Teleport(Map, 1,9)