From 65daabb52a1cf15b2ec69c3e6c02f52237c144ee Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Mon, 10 May 2010 17:51:31 +0000 Subject: [PATCH] Adjust quest to new dialog system. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13164 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/maps/witherspoon_manor/ghost.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/python/maps/witherspoon_manor/ghost.py b/python/maps/witherspoon_manor/ghost.py index 3b9d02ba1..caa0f3c5a 100644 --- a/python/maps/witherspoon_manor/ghost.py +++ b/python/maps/witherspoon_manor/ghost.py @@ -53,7 +53,7 @@ def found_body(player, rule): if body: #all fine! body.Remove() - start_disappearing(ghost, player) + start_disappear(ghost, player) return 1 #oh oh, bad, ghost is getting angry! @@ -119,17 +119,23 @@ def do_dialog(): prer = [["token","witherspoon_ghost","wait"]] postr = [["settoken","witherspoon_ghost", "*"]] rmsg = ["Please, go find my body.\n\nIt should be near the lake west of Scorn...", "Did you find my body yet? No?\n\nThen please, go search for it, west of Scorn there is a lake..."] - speech.addRule(DialogRule(["*"], prer, rmsg, postr, check_body),3) + rule = DialogRule(["*"], prer, rmsg, postr) + rule.setPreFunction(check_body) + speech.addRule(rule,3) prer = [["token","witherspoon_ghost","wait"]] postr = [["settoken","witherspoon_ghost", "0"]] rmsg = ["Thanks, you found my body!"] - speech.addRule(DialogRule(["*"], prer, rmsg, postr, found_body),4) + rule = DialogRule(["*"], prer, rmsg, postr) + rule.setPreFunction(found_body) + speech.addRule(rule,4) prer = [["token","witherspoon_ghost","*"]] postr = [["settoken","witherspoon_ghost", "*"]] rmsg = ["Please help me....", "Heeeeeeeelp...", "Pleaseeeee..."] - speech.addRule(DialogRule(["*"], prer, rmsg, postr, can_talk),5) + rule = DialogRule(["*"], prer, rmsg, postr) + rule.setPreFunction(can_talk) + speech.addRule(rule,5) speech.speak(Crossfire.WhatIsMessage())