JamusPsi
06-11-2009, 01:45 AM
This is a dump of the $here variable available to all sage scripts. You'll see that the entire room is parsed into structures which your script can access. If you're worried about the efficiency of this, don't be- psinet has been doing this invisibly for a year or two (in expectation of this scripting engine).
First example: the dais in illisti, with assorted things on the ground. Important things to note; each person present has their name parsed out from their title, and from any additional info- the script can see that Felychia is sitting, and that Valir is a great lord. Best guesses are made for objects on the ground, to determine article, adjectives, and noun. It is even able to detect things like "with some stuff on it", which is seen below as ".extra"
>ll
[Ta'Illistim, Hanging Gardens]
Although the floating platform is suspended well above the ground below, it overflows with abundant plant life. The edges of the dais are brimming with delicate white queen's lace, dark lavender, fragrant rosemary and a variety of other colorful flora. Thick grass underfoot provides an enticingly peaceful resting spot. A thin silk canopy is rolled back to permit an unobstructed view of the starry night sky. You also see a wafer of candied seeds, a shiny earring, a medicinal donations bin, a glaesine arch, a richly finished wooden bench with some stuff on it and a large faenor-chased barrel.
Also here: Lady Felychia who is sitting, Great Lord Valir
Obvious paths: out
>@$dumper.dump($here, "$here")
$here = Sage.Shared.Data.Room[7]
$here.livingitems = list[0]
$here.nonlivingitems = list[6]
$here.nonlivingitems[0] = wafer of candied seeds
$here.nonlivingitems[0].short = wafer of candied seeds
$here.nonlivingitems[0].text = a wafer of candied seeds
$here.nonlivingitems[0].article = a
$here.nonlivingitems[0].noun = seeds
$here.nonlivingitems[0].adjectives = wafer of candied
$here.nonlivingitems[0].extra =
$here.nonlivingitems[0].living = False
$here.nonlivingitems[1] = shiny earring
$here.nonlivingitems[1].short = shiny earring
$here.nonlivingitems[1].text = a shiny earring
$here.nonlivingitems[1].article = a
$here.nonlivingitems[1].noun = earring
$here.nonlivingitems[1].adjectives = shiny
$here.nonlivingitems[1].extra =
$here.nonlivingitems[1].living = False
$here.nonlivingitems[2] = medicinal donations bin
$here.nonlivingitems[2].short = medicinal donations bin
$here.nonlivingitems[2].text = a medicinal donations bin
$here.nonlivingitems[2].article = a
$here.nonlivingitems[2].noun = bin
$here.nonlivingitems[2].adjectives = medicinal donations
$here.nonlivingitems[2].extra =
$here.nonlivingitems[2].living = False
$here.nonlivingitems[3] = glaesine arch
$here.nonlivingitems[3].short = glaesine arch
$here.nonlivingitems[3].text = a glaesine arch
$here.nonlivingitems[3].article = a
$here.nonlivingitems[3].noun = arch
$here.nonlivingitems[3].adjectives = glaesine
$here.nonlivingitems[3].extra =
$here.nonlivingitems[3].living = False
$here.nonlivingitems[4] = richly finished wooden bench
$here.nonlivingitems[4].short = richly finished wooden bench
$here.nonlivingitems[4].text = a richly finished wooden bench with some stuff on it
$here.nonlivingitems[4].article = a
$here.nonlivingitems[4].noun = bench
$here.nonlivingitems[4].adjectives = richly finished wooden
$here.nonlivingitems[4].extra = with some stuff on it
$here.nonlivingitems[4].living = False
$here.nonlivingitems[5] = large faenor-chased barrel
$here.nonlivingitems[5].short = large faenor-chased barrel
$here.nonlivingitems[5].text = a large faenor-chased barrel
$here.nonlivingitems[5].article = a
$here.nonlivingitems[5].noun = barrel
$here.nonlivingitems[5].adjectives = large faenor-chased
$here.nonlivingitems[5].extra =
$here.nonlivingitems[5].living = False
$here.title = [Ta'Illistim, Hanging Gardens]
$here.description = Although the floating platform is suspended well above the ground below, it overflows with abundant plant life. The edges of the dais are brimming with delicate white queen's lace, dark lavender, fragrant rosemary and a variety of other colorful flora. Thick grass underfoot provides an enticingly peaceful resting spot. A thin silk canopy is rolled back to permit an unobstructed view of the starry night sky.
$here.people = list[2]
$here.people[0] = Felychia
$here.people[0].title = Lady
$here.people[0].originaltitle = Lady
$here.people[0].pretext =
$here.people[0].posttext = who is sitting
$here.people[0].name = Felychia
$here.people[0].exist = (undef)
$here.people[0].psinettitle = (undef)
$here.people[0].psinetposttitle = (undef)
$here.people[0].stunned = False
$here.people[0].dead = False
$here.people[0].bound = False
$here.people[0].webbed = False
$here.people[0].afk = False
$here.people[0].position = Sitting
$here.people[1] = Valir
$here.people[1].title = Great Lord
$here.people[1].originaltitle = Great Lord
$here.people[1].pretext =
$here.people[1].posttext =
$here.people[1].name = Valir
$here.people[1].exist = (undef)
$here.people[1].psinettitle = (undef)
$here.people[1].psinetposttitle = (undef)
$here.people[1].stunned = False
$here.people[1].dead = False
$here.people[1].bound = False
$here.people[1].webbed = False
$here.people[1].afk = False
$here.people[1].position = Standing
$here.items = list[6]
$here.items[0] = wafer of candied seeds
$here.items[0].short = wafer of candied seeds
$here.items[0].text = a wafer of candied seeds
$here.items[0].article = a
$here.items[0].noun = seeds
$here.items[0].adjectives = wafer of candied
$here.items[0].extra =
$here.items[0].living = False
$here.items[1] = shiny earring
$here.items[1].short = shiny earring
$here.items[1].text = a shiny earring
$here.items[1].article = a
$here.items[1].noun = earring
$here.items[1].adjectives = shiny
$here.items[1].extra =
$here.items[1].living = False
$here.items[2] = medicinal donations bin
$here.items[2].short = medicinal donations bin
$here.items[2].text = a medicinal donations bin
$here.items[2].article = a
$here.items[2].noun = bin
$here.items[2].adjectives = medicinal donations
$here.items[2].extra =
$here.items[2].living = False
$here.items[3] = glaesine arch
$here.items[3].short = glaesine arch
$here.items[3].text = a glaesine arch
$here.items[3].article = a
$here.items[3].noun = arch
$here.items[3].adjectives = glaesine
$here.items[3].extra =
$here.items[3].living = False
$here.items[4] = richly finished wooden bench
$here.items[4].short = richly finished wooden bench
$here.items[4].text = a richly finished wooden bench with some stuff on it
$here.items[4].article = a
$here.items[4].noun = bench
$here.items[4].adjectives = richly finished wooden
$here.items[4].extra = with some stuff on it
$here.items[4].living = False
$here.items[5] = large faenor-chased barrel
$here.items[5].short = large faenor-chased barrel
$here.items[5].text = a large faenor-chased barrel
$here.items[5].article = a
$here.items[5].noun = barrel
$here.items[5].adjectives = large faenor-chased
$here.items[5].extra =
$here.items[5].living = False
$here.exits = list[1]
$here.exits[0] = Out
Script ended. (Ended)
First example: the dais in illisti, with assorted things on the ground. Important things to note; each person present has their name parsed out from their title, and from any additional info- the script can see that Felychia is sitting, and that Valir is a great lord. Best guesses are made for objects on the ground, to determine article, adjectives, and noun. It is even able to detect things like "with some stuff on it", which is seen below as ".extra"
>ll
[Ta'Illistim, Hanging Gardens]
Although the floating platform is suspended well above the ground below, it overflows with abundant plant life. The edges of the dais are brimming with delicate white queen's lace, dark lavender, fragrant rosemary and a variety of other colorful flora. Thick grass underfoot provides an enticingly peaceful resting spot. A thin silk canopy is rolled back to permit an unobstructed view of the starry night sky. You also see a wafer of candied seeds, a shiny earring, a medicinal donations bin, a glaesine arch, a richly finished wooden bench with some stuff on it and a large faenor-chased barrel.
Also here: Lady Felychia who is sitting, Great Lord Valir
Obvious paths: out
>@$dumper.dump($here, "$here")
$here = Sage.Shared.Data.Room[7]
$here.livingitems = list[0]
$here.nonlivingitems = list[6]
$here.nonlivingitems[0] = wafer of candied seeds
$here.nonlivingitems[0].short = wafer of candied seeds
$here.nonlivingitems[0].text = a wafer of candied seeds
$here.nonlivingitems[0].article = a
$here.nonlivingitems[0].noun = seeds
$here.nonlivingitems[0].adjectives = wafer of candied
$here.nonlivingitems[0].extra =
$here.nonlivingitems[0].living = False
$here.nonlivingitems[1] = shiny earring
$here.nonlivingitems[1].short = shiny earring
$here.nonlivingitems[1].text = a shiny earring
$here.nonlivingitems[1].article = a
$here.nonlivingitems[1].noun = earring
$here.nonlivingitems[1].adjectives = shiny
$here.nonlivingitems[1].extra =
$here.nonlivingitems[1].living = False
$here.nonlivingitems[2] = medicinal donations bin
$here.nonlivingitems[2].short = medicinal donations bin
$here.nonlivingitems[2].text = a medicinal donations bin
$here.nonlivingitems[2].article = a
$here.nonlivingitems[2].noun = bin
$here.nonlivingitems[2].adjectives = medicinal donations
$here.nonlivingitems[2].extra =
$here.nonlivingitems[2].living = False
$here.nonlivingitems[3] = glaesine arch
$here.nonlivingitems[3].short = glaesine arch
$here.nonlivingitems[3].text = a glaesine arch
$here.nonlivingitems[3].article = a
$here.nonlivingitems[3].noun = arch
$here.nonlivingitems[3].adjectives = glaesine
$here.nonlivingitems[3].extra =
$here.nonlivingitems[3].living = False
$here.nonlivingitems[4] = richly finished wooden bench
$here.nonlivingitems[4].short = richly finished wooden bench
$here.nonlivingitems[4].text = a richly finished wooden bench with some stuff on it
$here.nonlivingitems[4].article = a
$here.nonlivingitems[4].noun = bench
$here.nonlivingitems[4].adjectives = richly finished wooden
$here.nonlivingitems[4].extra = with some stuff on it
$here.nonlivingitems[4].living = False
$here.nonlivingitems[5] = large faenor-chased barrel
$here.nonlivingitems[5].short = large faenor-chased barrel
$here.nonlivingitems[5].text = a large faenor-chased barrel
$here.nonlivingitems[5].article = a
$here.nonlivingitems[5].noun = barrel
$here.nonlivingitems[5].adjectives = large faenor-chased
$here.nonlivingitems[5].extra =
$here.nonlivingitems[5].living = False
$here.title = [Ta'Illistim, Hanging Gardens]
$here.description = Although the floating platform is suspended well above the ground below, it overflows with abundant plant life. The edges of the dais are brimming with delicate white queen's lace, dark lavender, fragrant rosemary and a variety of other colorful flora. Thick grass underfoot provides an enticingly peaceful resting spot. A thin silk canopy is rolled back to permit an unobstructed view of the starry night sky.
$here.people = list[2]
$here.people[0] = Felychia
$here.people[0].title = Lady
$here.people[0].originaltitle = Lady
$here.people[0].pretext =
$here.people[0].posttext = who is sitting
$here.people[0].name = Felychia
$here.people[0].exist = (undef)
$here.people[0].psinettitle = (undef)
$here.people[0].psinetposttitle = (undef)
$here.people[0].stunned = False
$here.people[0].dead = False
$here.people[0].bound = False
$here.people[0].webbed = False
$here.people[0].afk = False
$here.people[0].position = Sitting
$here.people[1] = Valir
$here.people[1].title = Great Lord
$here.people[1].originaltitle = Great Lord
$here.people[1].pretext =
$here.people[1].posttext =
$here.people[1].name = Valir
$here.people[1].exist = (undef)
$here.people[1].psinettitle = (undef)
$here.people[1].psinetposttitle = (undef)
$here.people[1].stunned = False
$here.people[1].dead = False
$here.people[1].bound = False
$here.people[1].webbed = False
$here.people[1].afk = False
$here.people[1].position = Standing
$here.items = list[6]
$here.items[0] = wafer of candied seeds
$here.items[0].short = wafer of candied seeds
$here.items[0].text = a wafer of candied seeds
$here.items[0].article = a
$here.items[0].noun = seeds
$here.items[0].adjectives = wafer of candied
$here.items[0].extra =
$here.items[0].living = False
$here.items[1] = shiny earring
$here.items[1].short = shiny earring
$here.items[1].text = a shiny earring
$here.items[1].article = a
$here.items[1].noun = earring
$here.items[1].adjectives = shiny
$here.items[1].extra =
$here.items[1].living = False
$here.items[2] = medicinal donations bin
$here.items[2].short = medicinal donations bin
$here.items[2].text = a medicinal donations bin
$here.items[2].article = a
$here.items[2].noun = bin
$here.items[2].adjectives = medicinal donations
$here.items[2].extra =
$here.items[2].living = False
$here.items[3] = glaesine arch
$here.items[3].short = glaesine arch
$here.items[3].text = a glaesine arch
$here.items[3].article = a
$here.items[3].noun = arch
$here.items[3].adjectives = glaesine
$here.items[3].extra =
$here.items[3].living = False
$here.items[4] = richly finished wooden bench
$here.items[4].short = richly finished wooden bench
$here.items[4].text = a richly finished wooden bench with some stuff on it
$here.items[4].article = a
$here.items[4].noun = bench
$here.items[4].adjectives = richly finished wooden
$here.items[4].extra = with some stuff on it
$here.items[4].living = False
$here.items[5] = large faenor-chased barrel
$here.items[5].short = large faenor-chased barrel
$here.items[5].text = a large faenor-chased barrel
$here.items[5].article = a
$here.items[5].noun = barrel
$here.items[5].adjectives = large faenor-chased
$here.items[5].extra =
$here.items[5].living = False
$here.exits = list[1]
$here.exits[0] = Out
Script ended. (Ended)