35 lines
737 B
Python
35 lines
737 B
Python
import Crossfire
|
|
activator=Crossfire.WhoIsActivator()
|
|
mymap=activator.Map
|
|
|
|
whoami=Crossfire.WhoAmI()
|
|
def GetForce(Target):
|
|
while Target!=None:
|
|
if Target.Name=="BigChest":
|
|
return Target
|
|
else:
|
|
Target=Target.Below
|
|
|
|
if whoami.Name=="Big Chest":
|
|
myPath=mymap.Path
|
|
Target=activator.CheckInventory("BigChest")
|
|
if Target !=None:
|
|
Target.Quantity=0
|
|
|
|
|
|
Card=activator.CreateObject("event_apply")
|
|
Card.Name="BigChest"
|
|
|
|
Card.Title=myPath
|
|
else:
|
|
Target=activator.Inventory
|
|
Target=GetForce(Target)
|
|
if Target==None:
|
|
whoami.Say("I'm sorry, I can't send you home. It seems my attachment to the material plane has shifted.")
|
|
else:
|
|
Path=Target.Title
|
|
Map=Crossfire.ReadyMap(Path)
|
|
Target.Remove()
|
|
|
|
activator.Teleport(Map, 1,9)
|