[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Musical Instrument Code Snippet
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Musical Instrument Code Snippet

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


Posted by Longbow   (102 posts)  [Biography] 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
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] top

Posted by Longbow   (102 posts)  [Biography] 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.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] 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
[Go to top] top

Posted by Longbow   (102 posts)  [Biography] 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
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] 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.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] 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
[Go to top] top

Posted by Dralnu   USA  (277 posts)  [Biography] 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?
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] 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.


11,951 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]