Johnathon's notebook (#1361)(an instance of generic note made by Johnathon)Go to location of this object, Johnathon. VERB SOURCE CODE: r*ead:
this:look_self();
player:tell("Notebook page : ", this.cur_page_no);
player:tell();
count = 1;
while (((count <= this.page_len) && (count < length(this.after))) && (this.after[count]
!= "[page]"))
player:tell(this.after[count]);
count = count + 1;
endwhile
player:tell();
player:tell("( now turn to another page.)");
.
turn_msg oturn_msg: return $string_utils:pronoun_sub(this.(verb)); . next:
count = 0;
while (((count < this.page_len) && length(this.after)) && (this.after[1] != "[page]"))
this.before = {@this.before, this.after[1]};
this.after = listdelete(this.after, 1);
count = count + 1;
endwhile
if (this.after[1] == "[page]")
this.before = {@this.before, this.after[1]};
this.after = listdelete(this.after, 1);
endif
this.cur_page_no = this.cur_page_no + 1;
player:tell(this:turn_msg());
player.location:announce(this:oturn_msg());
.
back:
count = 0;
bfl = length(this.before);
if (bfl && (this.before[bfl] == "[page]"))
this.after = {this.before[bfl], @this.after};
this.before = listdelete(this.before, bfl);
bfl = bfl - 1;
endif
while (((count < this.page_len) && length(this.before)) && (this.before[bfl] != "[page]"))
this.after = {this.before[bfl], @this.after};
this.before = listdelete(this.before, bfl);
count = count + 1;
bfl = bfl - 1;
endwhile
if (length(this.before))
this.cur_page_no = this.cur_page_no - 1;
else
this.cur_page_no = 1;
endif
player:tell(this:turn_msg());
player.location:announce(this:oturn_msg());
.
PROPERTY DATA:       cur_page       pages       page_len       cur_page_no       turn_msg       oturn_msg       before       after |