Edit: I didn't see your response until after I finished mine, but I'll still keep it here in case you decide you can find a use out of it.
Are you looking for this to happen as part of a conversation, or when you "use" it?
This script will assume the latter and allow you to turn it off:
void main()
{
if (GetLocalInt(GetFirstPC(), "JukeboxOn") ==0) // Run the first couple of functions if the jukebox is not flagged as on
{
MusicBackgroundChangeDay(GetArea(OBJECT_SELF), TRACK_CITYNIGHT); // You could use any of the tracks under "Constants"
SetLocalInt(GetFirstPC(), "JukeboxOn", 1); // Flag jukebox as being on
}
else
{
MusicBackgroundChangeDay(GetArea(OBJECT_SELF), TRACK_DESERT_DAY); // Just an example track - set this to whatever it was
SetLocalInt(GetFirstPC(), "JukeboxOn", 0); // Flag jukebox as being off
}
}
If you wanted it as part of a conversation with more sophisticated options, then reply and state what you wanted PCs to be able to do and I'll see if I can point you in the right direction.
Modifié par C Writer, 18 août 2010 - 12:12 .