"You wonder what you can talk to " + GetDisplayName(object) + " about..."
"You wonder what you can look up with " + GetDisplayName(object) + "."
"Talk to " + GetDisplayName(object) + " about..."
"Consult " + GetDisplayName(object) + " about..."
CapFirst(object.gender) + " is not switched on."
//list add(topics, everyone_help)
return (false)
consult
consult
"You can't consult " + object.article + "."
// List of topics
lst = NewObjectList ()
// option to get topics from [charname]_topics, rather than the character itself
topics = GetObject(char.name + "_topics")
if (topics = null) {
topics = char
}
foreach (obj, GetDirectChildren(topics)) {
_AddTopic (lst, obj)
}
// now grab topics for the room
foreach (obj, GetDirectChildren(game.pov.parent)) {
if (StartsWith(obj.name, char.name)) {
_AddTopic (lst, obj)
}
}
AddExtraTopics(char, lst)
return (lst)
foreach (s, Split(str, "|")) {
do(GetObject(s), "show")
}
l2 = NewStringList()
foreach(o, objectlist) {
list add (l2, GetString(o, attname))
}
return(l2)
do(o, "show")
do(o, "hide")
s = StringListItem(l, 0)
list remove (l, s)
return (s)
")) {
if (not StartsWith(s2, "#") and LengthOf(s2) > 1) {
list add (l2, s2)
}
}
list add (l, Join(l2, "
"))
}
Shift (l)
return (l)
]]>
0
0
false
false
false
false
// First check if we can even talk to this character
if (PlayerCannotTalkTo(this)) {
// do nothing
}
else if (HasString(game.pov, "gagstring")) {
P (game.pov.gagstring)
}
else if (HasString(this, "gagstring")) {
P (this.gagstring)
}
else {
Converse(this, DynamicTemplate("TalkAbout", this))
}
topics = GetObject(this.name + "_topics")
foreach (obj, GetDirectChildren(topics)) {
if (DoesInherit (obj, "topic") and GetBoolean (obj, "display")) {
obj.display = false
}
}
" + s + ""
]]>
1) {
P(s2)
}
}
]]>
Consult
Consult
// You want to re-write this so you can, for example, test the thing is turned on
if (HasBoolean(this, "switchedon")) {
if (not this.switchedon) {
P(DynamicTemplate("ConsultableSwitchedOff", this))
}
else {
Converse(this, DynamicTemplate("ConsultAbout", this))
}
}
else {
Converse(this, DynamicTemplate("ConsultAbout", this))
}
0
false
false
false
false
false
1
true
if (not this.hidden) this.display = true
this.display = false
this.hidden = true
// hide this topic
if (this.hideafter) {
do (this, "hide")
}
if (this.count = 0) {
// show other topics
foreach (t, this.nowshow) {
if (not t = "") {
to = GetObject (t)
if (to = null) error ("Failed to find conversation topic \"" + t + "\" for " + this.name)
to.display = true
}
}
// hide other topics
foreach (t, this.nowhide) {
if (not t = "") {
to = GetObject (t)
if (to = null) error ("Failed to find conversation topic \"" + t + "\" for " + this.name)
do(to, "hide")
}
}
}
// print the text, if there is any
if (not LengthOf(this.exchange) = 0) P(this.exchange)
// run the script if there is one
if (HasScript(this, "talk")) do (this, "talk")
this.count = this.count + 1
if (ListCount(GetTopics(game.conversationalist)) = 0 and HasScript(game.conversationalist, "nomoretopics")) {
do(game.conversationalist, "nomoretopics")
}
true
_ObjectEditor
Conversation
editor_room; defaultplayer
dropdowntypes
Type
*=None; talkingchar=Character; consultable=Consultable; topic=Conversation Topic; startingtopic=Starting Conversation Topic
150
Keep conversations active
checkbox
activeconversations
200
talkingchar
Force player to converse
checkbox
forcedconversations
200
talkingchar
The greeting
richtext
exchange
topicuser
Run this greeting script
script
greet
topicuser
Automatically hide after showing
checkbox
hideafter
200
topic
Terminates an active conversation
checkbox
terminal
200
topic
Topic expires?
checkbox
expires
200
topic
label
You need a turnscript that calls IncConvTime to make this work.
DoesInherit(this, "topic") and this.expires
Hide after this many turns
number
countdown
200
DoesInherit(this, "topic") and this.expires
Follow-on topics. Show these after showing for the first time (must be the name, not the alias)
list
nowshow
200
topic
Exclusive topics. Hide these after showing for the first time (must be the name, not the alias)
list
nowhide
200
topic
The conversation
richtext
exchange
topic
Run this script
script
talk
topic
label
Instructions for use
https://github.com/ThePix/quest/wiki/Conversations:-Library
_ObjectEditor
Reactions
game.showreactions
talkingchar
game.showreactions
Reaction script (run after every turn in same room as player)
richtext
reactions
talkingchar
game.showreactions