| 1 |
import Crossfire |
| 2 |
import os |
| 3 |
|
| 4 |
whoami = Crossfire.WhoAmI() |
| 5 |
whoisother = Crossfire.WhoIsOther() |
| 6 |
parms = Crossfire.WhatIsMessage() |
| 7 |
|
| 8 |
if parms=="give": |
| 9 |
Crossfire.Log(Crossfire.LogDebug, "Object given: %s" %(whoisother.Name)) |
| 10 |
key = whoisother.ReadKey("mad_mage_marker") |
| 11 |
Crossfire.Log(Crossfire.LogDebug, "Object key : %s" %(key)) |
| 12 |
if key: |
| 13 |
mypath = os.path.join(Crossfire.DataDirectory(), Crossfire.MapDirectory(), 'python/maps/scorn/towers/mad_mage',key) |
| 14 |
Crossfire.Log(Crossfire.LogDebug, "Object path : %s" %(mypath)) |
| 15 |
file = open(mypath, "r") |
| 16 |
for line in file: |
| 17 |
whoami.Say(line) |
| 18 |
file.close() |
| 19 |
if (key == 'brewery_letter'): |
| 20 |
whoisother.Name = "Milking machine blueprints" |
| 21 |
whoisother.WriteKey("mad_mage_marker", "milking_blueprints") |
| 22 |
else: |
| 23 |
whoami.Say("Yes?") |