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
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sat Oct 02, 2004 7:37 pm   

Mapper's "Notes" tab
 
I am not very good with databases, and the mapper db is no exception. How would I make an alias to add a note to whatever room i'm in currently, and then an alias to show the notes for my current room?

EG:

addnote This smob allows channeling.

roomnotes

This smob allows channeling.
This smob needs pick.
etc.

Any help with this would be appreciated. Smile
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Sat Oct 02, 2004 10:30 pm   
 
Aarlot! You must give me yer name on WoTMUD NOW! Or you shall die a horribly painful death.
_________________
*Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 03, 2004 6:50 am   
 
Why bring databases into it? Use the roomnote function.
#AL addnote {#CALL %roomnote( , %additem( %roomnote(), "%-1"))}
#AL roomnotes {#FORALL %roomnote() {#SHOW %i}}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sun Oct 03, 2004 9:03 pm   
 
Hrmm... sorry Lightbulb, for some reason that does not seem to work... It acts like it did something, but when I hit roomnotes, nothing happens.

Loto - Very Happy "Aarlot" is one of my chars, but I don't play him much anymore Wink
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Mon Oct 04, 2004 9:07 pm   
 
What char do you play with most often?
_________________
*Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back!
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Mon Oct 04, 2004 11:04 pm   
 
That'll work if you're in mapping mode, but if you're in follow mode, it won't. Try adding this:

pMapLocked = %maplocked( )

to the beginning of each alias, and this:

#noop %maplocked( @pMapLocked)

to the end.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Oct 04, 2004 11:23 pm   
 
Ok I am not sure of the funcionality of %additem in roomnotes but here is LBs script rewriten to unlock/lock the map

#AL addnote {
#VAR maplocked %maplocked
#CALL %maplocked(0)
#CALL %roomnote( , %additem( %roomnote(), "%-1"))
#Call %maplocked(@maplocked)
}
#AL roomnotes {#FORALL %roomnote() {#SHOW %i}}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Oct 05, 2004 3:11 pm   
 
I admit I just tossed this out as an idea, with no testing at all. I also have no idea how well %additem will work in roomnotes, but a list is just a string with a particular format. I chose %additem because I thought a list-separator would be less likely to cause problems than a hard return, and it was obvious from Aarlot's example that he wants multiple lines in his notes.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Oct 05, 2004 7:23 pm   
 
Ok %additem is screwy in roomnotes so we need another way of doing it. you can Use %cr however I can't find a way to properly quote.
However this should work to get you started.

#CALL %roomnote( ,%if(!%null(%1), %roomnote<%cr>"%-1","")) //Adds a new line if there are paramaters otherwise clears the roomnote



#AL roomnotes {#SHOW %roomnote}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Oct 06, 2004 5:13 am   
 
I don't have any problems using %additem in roomnotes, except that I reversed the order of parameters in my example. As you can probably tell, I seldom use the %additem function.
#AL addnote {
#VAR maplocked %maplocked
#CALL %maplocked( 0)
#CALL %roomnote( , %additem( "%-1", %roomnote()))
#CALL %maplocked( @maplocked)
}
#AL roomnotes {#FORALL %roomnote() {#SHOW %i}}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Oct 06, 2004 12:14 pm   
 
Exscuse me whilst I beat myself with a Duh stick, I should have noticed that and I use %additem alot :P. I think Im gonna start drinking coffee before answering the forums.
_________________
Zmud Support Library
Zmud Knowledge Base
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