sdim awordm ,255, 2000
dim rat
inp = str(inp)
inp = ""
input inp,600,20,100
button "話す",*wordcheak: stop
*wordcheak
rat = 0
spdate = inp
spendl = strmid(spdate,-1,2)
if spendl = " " : else : spdate = spdate + " "
*wordcheakloop
spin = instr(spdate,0," ")
aword = strmid(spdate,0,spin)
awordm = strlen(aword)
lword = strlen(spdate)
lword = lword - awordm - 1
spdate = strmid(spdate,-1,lword)
await 1
if aword = "" {
}else{
mes aword
awordm(rat) = aword
rat += 1
goto *wordcheakloop
}
mes awordm(0)
mes awordm(1)
mes awordm(2)
mes awordm(3)
*meanunderstand
////////////////////////////////////////////////////////////////////////
//START START START START START START START START START START START/////
////////////////////////////////////////////////////////////////////////
if awordm(0) = "Who" : goto *_who
if awordm(0) = "I" : goto *_i
if awordm(0) = "You" : goto *_you
goto *nopus
////////////////////////////////////////////////////////////////////////
//1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1/
////////////////////////////////////////////////////////////////////////
*_Who
if awordm(1) = "am" : goto *_who_am
if awordm(1) = "are" : goto *_who_are
goto *nopus
*_i
if awordm(1) = "am" : goto *_i_am
goto *nopus
*_you
if awordm(1) = "are" : goto *_you_are
goto *nopus
////////////////////////////////////////////////////////////////////////
//2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2/
////////////////////////////////////////////////////////////////////////
*_who_am
if awordm(2) = "I" : goto *_who_am_i
goto *nopus
*_who_are
if awordm(2) = "you" : goto *_who_are_you
goto *nopus
*_you_are
oneget=2
username = ""
*loop_you_are
myname = awordm(oneget)
if awordm(oneget + 1) = "."{
bsave "\\memory\\parson\\i.txt",username
stop
}
else{
oneget += 1
goto *loop_you_are
}
goto *nopus
*_i_am
oneget=2
username = ""
*loop_i_am
username = awordm(oneget)
if awordm(oneget + 1) = "."{
bsave "\\memory\\parson\\you.txt",username
stop
}
else{
oneget += 1
goto *loop_i_am
}
////////////////////////////////////////////////////////////////////////
//3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3/
////////////////////////////////////////////////////////////////////////
*_who_are_you
if awordm(3) = "?" : goto *_who_are_you_helpmark
goto *nopus
*_who_am_i
if awordm(3) = "?" : goto *_who_are_i_helpmark
goto *nopus
////////////////////////////////////////////////////////////////////////
//4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4/
////////////////////////////////////////////////////////////////////////
*_who_are_you_helpmark
exist "\\memory\\parson\\i.txt"
if (strsize = -1)|(strsize = 0){
mes "I don't know."
stop
}
bload "\\memory\\parson\\i.txt",ra
mes "I am " + ra + "."
*_who_are_i_helpmark
exist "\\memory\\parson\\you.txt"
if (strsize = -1)|(strsize = 0){
mes "I don't know."
stop
}
bload "\\memory\\parson\\you.txt",ra
mes "You are " + ra + "."
*nopus
mes "Sorry."
mes "I can't understand you."
stop
自分ではこんなん作れるがこれはセコイ
0→1を教えてくれ
1→100は何とかする