Use the 'talked_to' key to make NPCs stop when talked to.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13326 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
ec706b815f
commit
c3a992c3ef
|
@ -44,6 +44,7 @@ import Crossfire
|
|||
import os
|
||||
from CFDialog import DialogRule, Dialog, IncludeRule
|
||||
import cjson
|
||||
import random
|
||||
|
||||
location = "defaultdialognamespace"
|
||||
|
||||
|
@ -111,4 +112,6 @@ for jsonRule in dialogs:
|
|||
index = index + 1
|
||||
|
||||
if speech.speak(Crossfire.WhatIsMessage()) == 0:
|
||||
# block the NPC for some time
|
||||
Crossfire.WhoAmI().WriteKey('talked_to', random.randint(3, 8), 1);
|
||||
Crossfire.SetReturnValue(1)
|
||||
|
|
Loading…
Reference in New Issue