From ce7c993612bc7df0a9be2d4919218bfcb93d6098 Mon Sep 17 00:00:00 2001 From: rbiv Date: Sun, 7 Sep 2025 01:07:24 +0000 Subject: [PATCH] examples: Add orb of seeing --- programming_examples.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/programming_examples.md b/programming_examples.md index 185204c..f7cc572 100644 --- a/programming_examples.md +++ b/programming_examples.md @@ -1,4 +1,4 @@ -George, who can be awakened +George, who can be awakened. ``` @create $thing named "George" @@ -10,7 +10,7 @@ George, who can be awakened @program george:awaken if ((time() - this.awakened_time) > this.time_awake) player:tell("W H A M M U ! You awaken George!"); - player.location:announce("W H A M M U ! " + player.name + " awakens George!"); + player.location:announce("W H A M M U ! "+player.name+" awakens George!"); this.awakened_time = time(); else player:tell("George is already awake."); @@ -25,3 +25,19 @@ else endif . ``` + +The Orb of Seeing, which demonstrates how to get information about the players +that interact with objects. + +``` +@create $thing named "Orb of Seeing" +@verb orb:description tnt + +@program orb:description +return { + "The "+this.name+" sees many things!", + "Viewer name: "+player.name, + "Item owner: "+this.owner.name +}; +. +```