Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Musical Instrument Code Snippet

Musical Instrument Code Snippet

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Longbow   (102 posts)  Bio
Date Wed 22 Jun 2005 05:47 PM (UTC)
Message
Howdy folks, I was wondering if anyone knows where I could find a snippet for Smaug that allows you to compose songs and play them on instruments ingame? I liked the system T2T MUD used but they don't use a Diku-dirived base so I can't get it from them.

Thanks and Godbless,
Longbow
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Wed 22 Jun 2005 08:47 PM (UTC)
Message
What does it mean to compose songs and play them in-game?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Longbow   (102 posts)  Bio
Date Reply #2 on Thu 23 Jun 2005 04:15 PM (UTC)
Message
Well, you'd type the compose command and enter the words for the song, then you could play it on an instrument. It'd display the words of the song verse by verse with an occasional interlude so you knew where the verses ended and started.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Thu 23 Jun 2005 07:01 PM (UTC)
Message
When you say verse by verse, do you mean there'd be a pause in between? Could you provide an example of output?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #4 on Thu 23 Jun 2005 08:37 PM (UTC)
Message
Sounds to me like it may just be a mud prog on an object with a new trigger, and the mud prog utilizes mpsleep. This would not be to hard to construct, new object type, new prog trigger possibly, and parse through the buffer output replacing empty lines with "mpsleep x".

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Longbow   (102 posts)  Bio
Date Reply #5 on Thu 23 Jun 2005 09:40 PM (UTC)
Message
Yes, there'd be a pause in between so you don't get a massive text field. Greven, could you give me an example of what you're talking about please?

Longbow
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #6 on Fri 24 Jun 2005 12:50 AM (UTC)
Message
Take a look at the jukebox snippet for rom that around the traps, that pretty much does what you want, except that you dont play an instrument, you pay to play the song, very easy to modify to suit what your trying to do tho.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #7 on Fri 24 Jun 2005 01:19 AM (UTC)
Message
Perhaps not so easily modified, since the song is composed by the player, not hardcoded into the script. The prog would have to pick up the lines from the buffer the player entered.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #8 on Fri 24 Jun 2005 01:20 AM (UTC)
Message
MPSleep is a way to temporarily pause a mob program. Incredibley useful so you don't get masses of text. Anywho, this post is quite relevant:

http://gammon.com.au/forum/bbshowpost.php?bbsubject_id=2646

In there you'll find a bug fix and a link to a site that lists a version of mpsleep. Should be everything you need to get started :)

~Nick Cash
http://www.nick-cash.com
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #9 on Fri 24 Jun 2005 06:13 PM (UTC)
Message
Could go in and give each player a file similar to an area file, with a song list and add a small mprog to read the player's songfile, maybe?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #10 on Fri 24 Jun 2005 06:57 PM (UTC)
Message
At this point you're talking more trouble than it's worth. How would you do that with mudprogs?

You'd be better off making it a timer-based command, somewhat like the search command. Would probably be much easier that way, not to mention less hack-prone.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


35,775 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.