#-----------------------------------------------------------------------------
# uؘavCxgpȈՃXNvg
#  (Kawari Easy Event Programmed Script)
#@@R~jP[Vg
#
#  Phase 3.99 (2002/2/28)
#
# O  FuؘavPhase 7.3.1 yяʌ݊łgpB
#         uBvMATERIA period 465 yяʌ݊\tggpB
#
# gF̎t@CƁÁuDict-KEEPS.txtvuDict-KEEPSs.txtv
# @@@@uDict-KEEPS_URL.txtvuGhost-KEEPS.txtvuGhost-KEEPSc.txtv
# @@@@ukawari.inivɓo^BuGhost-KEEPSp.txtṽXNvgKv
# @@@@ďւB
#
# ҁF܁ ( akira-k@blue.interq.or.jp )
# @@@@@@@@@@@ @( http://www.interq.or.jp/blue/akira-k/keeps/ )
#
# l  FpubNhCƂĎRɉρAĔzzB
# @@@@ρAĔzz̍ہA҂ɘA̕KvȂB
#
# Secial Thanks F
#  Main Application uBv: Քni & LH
#  @@@@@@@@@@@@@@@@@@@@@ ( http://futaba.mikage.to/ )
#  Main Application urrov: DOIchan!
#  @@@@@@@@@@@@@@@@@( http://doichan.netbank.co.jp/ssp/ )
#  SHIORI Module uؘav : Meister
#  @@@@@@@@@@@@@@@@@@( http://meister-d-i.hoops.ne.jp/ )
#  uؘav (Phase 7.3.1) : Ɓ[
#  @@@@@@@@@@@@@@@@@@@( http://users.goo.ne.jp/shobu/ )
#  Script EditeruԂĂv : pipe().vqf
#  @@@@@ ( http://www.geocities.co.jp/SiliconValley-Cupertino/4430/ )
#  Script EditeruKEEPS-Editerv : Mizki_F
#  @@@@@@@@@@@@@@@@ ( http://www02.so-net.ne.jp/~mff_hp/ )
#  AppricationuUDSensorvF
#  @@@@@@@@@@@@ ( http://www2.airnet.ne.jp/~sirataki/nanika/ )
#  Shellu``Zweiv(for private test) F s򐬖
#@@@@@@@@@@@@@@@@@@@( http://www.din.or.jp/~sentence/ )
#
#  Debug Support : ݂ЂƂA߂AqR~AA-01AyouAbossA
#                   ͂݁AtovetaAMizki_F AteataAGAЂŁA
#                  ߂ĂƁA]F A݂Ⴀ AKaz@KpA
#                  ^ixgqR & N
#  Programming Idea & Support : nakajisoAuAUMeisterAskyAA
#                               T & AN
#                                                         (sEh̗)
#-----------------------------------------------------------------------------
#Phase 3.70  3.90 ̕ύX_
#NeBJ[hɑΉB(R~jP[V𖳌)
##-----------------------------------------------------------------------------
#Phase 3.70  3.90 ̕ύX_
#|NeBJ[h폜B
##-----------------------------------------------------------------------------
##Cxg[`
#-----------------------------------------------------------------------------
##R~jP[VE

system.OnResponse : ${Communication1}${Communication2}${Communication3}${Communication4}${Communication5}${Communication6}$(set system.Response0 "Test")

Communication1 : $(set OtherGhost ${system.Sender} ; set temp $(expr index ${system.Sender} " @") ; if ${temp} $(set param1 $(expr substr ${system.Sender} 1 $(expr ${temp} - 1 )))  $(set param1 ${system.Sender}) )

Communication2 : ${CallGetWords}$(if ${FlagMode} $(set temp ${FlagMode}".") $(clear temp) ; if $(entry ${temp}"Comm."${answer}) $(set CommSender ${temp}"Comm."${answer}) $(set CommSender ${temp}"Comm.user") )

Communication3 : $(split temp ${system.Surface} "," ; set Sakura.Surface ${temp.1} ; set Kero.Surface ${temp.2})

Communication4 : $(split temp ${system.Sentence} $(chr 1) ; set param1 ${temp.1})${CallGetWords}$(set param2 ${answer} ; set maxwords 0 ; set talking "*" ; foreach param1 ${CommSender} ${CommunicationA}${CommunicationB})

CommunicationA : $(split temp ${param1} "," ; set temp1 0 ; set flagloop 0 ; set flagwords 0)

CommunicationB : $(until ${flagloop} ${CommunicationC} ; if $([ ${flagwords} -gt ${maxwords} ]) $(set talking $(entry "temp."${temp.size}) ; set maxwords ${flagwords}) )

CommunicationC : $(inc temp1 ; if $([ ${temp.size} -eq ${temp1} ]) $(set flagloop 1) $(if $(expr find ${param2} $(entry "temp."${temp1})) $(inc flagwords) $(set flagloop 1 ; set flagwords 0) ))

Communication5 : $(if $(expr $([ ${system.Age} -gt ${Comm.Limit} ]) | $(expr index ${talking} "*")) $(set system.communicate "stop") $(set system.communicate ${system.Sender}))

Communication6 : $(if ${maxwords} $(eval ${talking}) $(eval "$(eval ${"${CommSender}".Unknown})"))

#-------------------------------------
##R~jP[VEĂт

Select.Comm : \0\c${CallModeSet}$(if ${system.OtherGhost} $(set system.communicate ${system.OtherGhost} ; set param1 ${system.OtherGhost})${CallGetWords}$(if $(entry ${temp}"Comm."${answer}".Call") $(entry ${temp}"Comm."${answer}".Call") $(entry ${temp}"Comm.Etc.Call")) $(set system.communicate "stop" ; entry ${temp}"Comm.NoExist.Call"))

#-------------------------------------
##R~jP[VEg[NgĂт

sentenceC : $(if $([ $(rand 5) -eq 0 ]) $(set system.communicate ${system.OtherGhost})  $(set system.communicate "stop") ; expr $(entry ${FlagMode}".sentence") | ${sentence}")

CallModeSet : $(if ${FlagMode} $(set temp ${FlagMode}".") $(clear temp))

#-----------------------------------------------------------------------------
##S[Xgʒm

system.OnNotifyOther : $(set ${FlagOtherGhost} "1" ; if ${system.OtherGhostEx} ${CallGetFace} $(clear OtherGhost))

CallGetFace : $(split temp ${system.OtherGhostEx} $(chr 1) ; set OtherGhost ${temp.1} ; set Sakura.Surface ${temp.2} ; set Kero.Surface ${temp.3})

#-----------------------------------------------------------------------------
