2 This script is part of the Witherspoon quest, that starts in /scorn/mansion/witherspoon_manor_attic.
3 Check the README file in the same directory as this file for more details.
5 Script for the shop owner of the weapon shop in Scorn.
7 Will handle the 'give' event to examine the dagger, and various events.
9 This script should be called for the 'TIMER', 'TIME' and 'custom' events.
14 whoami = Crossfire.WhoAmI()
15 whoisother = Crossfire.WhoIsOther()
16 command = Crossfire.WhatIsMessage()
17 event = Crossfire.WhatIsEvent()
18 pl = Crossfire.WhoIsActivator()
21 color = Crossfire.MessageFlag.NDI_BROWN
24 '''Player gives an item to the owner.'''
25 if whoisother.ReadKey(
'special_item') !=
'ghost_dagger':
26 whoami.Say(
'Nice %s.'%whoisother.Name)
29 whoami.Say(
'Oh, this looks like a really interesting dagger.')
30 pl.Message(
'The owner takes the %s and starts examining it carefully.'%whoisother.Name, color)
31 whoami.CreateTimer(8, 1)
32 whoami.WriteKey(
'examining_item',
'1', 1)
33 whoami.WriteKey(
'examining_for', pl.Name, 1)
38 '''Owner finished examining the item.'''
39 whoami.WriteKey(
'examining_item',
'0', 1)
42 pl = Crossfire.FindPlayer(whoami.ReadKey(
'examining_for'))
45 whoami.Say(
'Tss, people just aren\'t patient...')
48 whoami.Say(
'This dagger is pretty old, and is covered with runes. Unfortunately I can\'t describe what they mean, but they sure look like religious ones. Maybe you could go ask a priest?')
50 if pl.QuestGetState(
"scorn/Witherspoon-ghost") <= 20:
51 pl.QuestSetState(
"scorn/Witherspoon-ghost", 30)
54 if whoami.ReadKey(
'examining_item') ==
'1':
55 pl.Message(
'The owner is busy.', color)
58 elif event.Subtype == Crossfire.EventType.TIMER:
60 elif event.Subtype == Crossfire.EventType.TIME:
61 if whoami.ReadKey(
'examining_item') ==
'1':
63 Crossfire.SetReturnValue(1)