Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
jroper73
Novice


Joined: 03 Aug 2006
Posts: 30

PostPosted: 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
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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.
_________________
http://www.Aardwolf.com
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: 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 :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net