|
jroper73 Novice
Joined: 03 Aug 2006 Posts: 30
|
Posted: Sat Feb 24, 2007 12:13 pm
#scroll backwards is backwards |
#scroll gossip 5 1
would display the last 5 lines of gossip, but it displays it backwards, starting with the newest and going to the oldest.
Any way to get it to display the last 5 lines of gossip, but showing in the correct order, oldest to newest?
Asbestos
ncmud.org 9000 |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Mon Feb 26, 2007 9:38 pm |
Dunno how to do it, but I'd say do an #additem and use %pop (or %push? I think that's it) and #echo to display it the way you want...
Sorry, not sure if that would work. But best I can come up with. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Feb 27, 2007 10:42 pm |
There's no way outside of #SCROLL to query the scrollback buffer, Vitae. You'd have to manage your own version to do any of what you suggested, which means that outside of a plugin it's likely to be slow and resource-intensive (since you'd have to hold everything either in memory via Zscript or to a file on your hard-drive).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Feb 27, 2007 11:04 pm |
Why couldn't you use an alias-trigger combo?
#alias scrollback {#var scrollcap "";#var scrolling %2;#t+ ScrollCapture;#scroll %1 %2}
#trig "ScrollCapture" {^(*)$} {#var scrollcap %push(%1,@scrollcap);#add scrolling -1;#if (!@scrolling) {#forall @scrollcap {#say %i};#t- ScrollCapture}}
or something. |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Wed Feb 28, 2007 5:37 pm |
That should do it though I'd be more inclined to put the #t- before the #forall.
|
|
_________________ Taz :) |
|
|
|
|
|