//****************************************************************************** // YAYA ghost template // Communicate dictionary //****************************************************************************** //****************************************************************************** //Talk to someone //****************************************************************************** //This function is called from the current menu StartCommunicate { //The following function searches for a ghost standing next to you and calls the //TalkTo_??? function. If no one is there, it will talk randomly. //It's in yaya_tmpl_util. AYATEMPLATE.ExecuteTalkToTalk } //Talk to Emily TalkTo_Emily{ "\0\s[0]Oh、Emily。\1\s[10]Teddy looks fine too。" } //Talk to other people TalkToOther{ _escaped_name = SHIORI3FW.EscapeAllTags(res_reference0) "\0\s[0]Hello、%(_escaped_name)。\1\s[10]I hope you're doing well。" } TalkToNobody{ "\0\s[0]There's nobody here。\1\s[10]It's quiet。" } //****************************************************************************** //I was spoken to, so I replied //****************************************************************************** //------------------------------------------------------------------------------ //OnCommunicate event //------------------------------------------------------------------------------ OnCommunicate { if reference[0] == "user" || reference[0] == "User"{ //---- Message from user ReplyToUser } else{ //---- Message from ghost //The following function calls the ReplyTo_??? function. //It is in yaya_tmpl_util. AYATEMPLATE.ExecuteReplyToTalk(reference[0]) } } //------------------------------------------------------------------------------ //Talk from users //------------------------------------------------------------------------------ ReplyToUser { if "名前" _in_ reference[1] && "覚えて" _in_ reference[1]{ //---- Start entering username "\0\s[0]Okay、what's your name、%(username)?\e" teachusername = 1 } else{ //---- Other than when starting to enter username if teachusername == 1{ //---- Just before that was "remember my name" so remember my name if SHIORI3FW.EscapeAllTags(reference[1]) != reference[1] { "\0\s[0]I wish they'd stop using weird symbols。\e" } else { username = reference[1] "\0\s[0]%(username)、right。Got it。\e" } teachusername = 0 } else{ //---- Reply to various conversations other than remembering names TalkToUser } } } //------------------------------------------------------------------------------ //Reply to user (other than remembering name) //------------------------------------------------------------------------------ TalkToUser { if 'hello' _in_ reference[1]{ '\0\s[0]Hello。\e' } elseif "好き" _in_ reference[1] || "愛し" _in_ reference[1]{ "\0\s[0]ありがとうございます。\nわたしも%(username)のこと‥‥\w9、好きかも\w5‥\w5‥。\e" } elseif "ややめ" _in_ reference[1] && "好物" _in_ reference[1]{ "\0\s[0]わたしの好きなたべものはねー、レーズンがいーっぱい入ったバターパンなの。/ \w5\1\s[10]おれは%(food)がいーっぱい入った餃子だな。\e" } else{ '\0\s[0]What did you say?\e' } } //------------------------------------------------------------------------------ //A ghost speaks to me //------------------------------------------------------------------------------ //Emily spoke to me ReplyTo_Emily{ res_reference0=reference[0]//Talk to the other person further "\0\s[0]What is it、Emily。\1\s[10]You shouldn't just eat potatoes。\e" } ReplyTo_Hand{ if 'ほっく' _in_ reference[1] { res_reference0=reference[0]//さらに相手に話しかける '\0\s[0]ほっくなんて無いよ。\1\s[10]ジッパーはあるけどな。\e' }else{ '\1\s[10]うるさい手だな。\0\s[0]なんだろうねあれ。\e' } } //Someone else has spoken to you ReplyToOther{ if "Hello" _in_ reference[1] || "Good evening" _in_ reference[1]{ res_reference0=reference[0]//Continue speaking to the other person _escaped_name = SHIORI3FW.EscapeAllTags(res_reference0) _greeting = '' if 'Hello' _in_ reference[1] _greeting = 'Hello' else _greeting = 'Good evening' "\0\s[0]Hi、%(_escaped_name)。\1\s[10]Okay。%(_greeting)。\e" } else{ '\0\s[0]Yes?\e' } }