this is what i managed to make so far, it does not work properly (whatever you put as action number it searches for look) and i can't get it to search for a further word in the string, but it almost fit's the purpose, i now only need to get the other words to be checked and then i am finished.
if anyone want's to try this out then it uses a text file with the code in, and i know i used the file extension for a screensaver but aaaahh well.
for some reason it won't let me use the code box below where i am typing this so i have to use the *[*code*]* tag.
do
input "enter object to find> ",object$
input "enter action number",actnum$
act=val(actnum$)
action(object$,1)
close file 1
loop
function action(object$,act)
open to read 1,"1.scr"
do
read string 1,line$
for done=1 to 50
command$=left$(line$,done)
if command$="<newob>"
length=len(line$)
a$=right$(line$,(length-done)-1)
if object$=a$ then goto found
endif
next done
loop
exitfunction
found:
rem
do
read string 1,line$
for done=1 to 50
command$=left$(line$,done)
if command$="<newob>"
print "data unavaliable"
exitfunction
endif
if command$=":look:"
if act=1
length=len(line$)
a$=right$(line$,(length-done)-1)
print "found look statement"+a$
exitfunction
endif
endif
if command$=":use:" and act=2
length=len(line$)
a$=right$(line$,(length-done)-1)
print "found use statment "+a$
exitfunction
endif
if command$=":useinventory:" and act=3
length=len(line$)
a$=right$(line$,(length-done)-1)
print "found use with inventory statement "+a$
exitfunction
endif
if command$=":pickup:" and act=4
length=len(line$)
a$=right$(line$,(length-done)-1)
print "found pickup statement "+a$
exitfunction
endif
if command$=":talk:" and act=5
length=len(line$)
a$=right$(line$,(length-done)-1)
print "found talk statement "+a$
exitfunction
endif
if command$="<endlevel>"
print "data unavaliable"
exitfunction
endif
rem only command here
next done
loop
rem
endfunction