2 from CFDataFile
import CFDataFile, CFData
4 who = Crossfire.WhoAmI()
5 event = Crossfire.WhatIsEvent()
6 player = Crossfire.WhoIsActivator()
7 message = Crossfire.WhatIsMessage().lower()
11 'please tell me the name of the town we are in.',
12 'tell me the name of the tavern east of Scorn.'
15 answers = [
'scorn',
'goth']
21 data =
CFData(
'Scorn_HouseOfHealing', header)
22 if data.exist(player.Name):
23 return int(data.get_record(player.Name)[
'uses'])
28 data =
CFData(
'Scorn_HouseOfHealing', header)
29 record = {
'#' : player.Name,
'uses' : uses }
30 data.put_record(record)
33 who.Say(
'Welcome to the house of healing!\nThis is the place where injured and ill people get cured of their torments.')
38 if (uses < len(questions)):
39 if (message == answers[uses]):
40 who.Say(
'Correct! Be restored!')
41 result = player.RemoveDepletion(5)
45 who.Say(
'If you wish me to restore your stats, %s'%questions[uses])
50 if (event.Subtype == Crossfire.EventType.SAY):
54 Crossfire.SetReturnValue(1)