I spent 20 minutes redoing the Gump to look a bit nicer so I hope some of you find it useful, it's nothing extraordinary.
Code: Select all
use uo;
use os;
include ":gumps:gumps";
program piano(who)
var gump := GFCreateGump(50, 50);
GFPage(gump, 0);
GFResizePic(gump, 0, 0, 9250, 230, 451);
GFResizePic(gump, 12, 12, 3000, 206, 430);
GFHTMLArea(gump, 70, 12, 148, 20, "<basefont color=#4863A0>Select a Song:");
GFAddButton(gump, 15, 42, 4005, 4007, GF_CLOSE_BTN, 1001);
GFHTMLArea(gump, 52, 42, 154, 20, "<basefont color=#4863A0>Life's Journey");
GFAddButton(gump, 15, 67, 4005, 4007, GF_CLOSE_BTN, 1002);
GFHTMLArea(gump, 52, 67, 154, 20, "<basefont color=#4863A0>Song of Britain");
GFAddButton(gump, 15, 92, 4005, 4007, GF_CLOSE_BTN, 1003);
GFHTMLArea(gump, 52, 92, 154, 20, "<basefont color=#4863A0>Song of Buc's Den");
GFAddButton(gump, 15, 117, 4005, 4007, GF_CLOSE_BTN, 1004);
GFHTMLArea(gump, 52, 117, 154, 20, "<basefont color=#4863A0>Song of Cove");
GFAddButton(gump, 15, 142, 4005, 4007, GF_CLOSE_BTN, 1005);
GFHTMLArea(gump, 52, 142, 154, 20, "<basefont color=#4863A0>Song of Jhelom");
GFAddButton(gump, 15, 167, 4005, 4007, GF_CLOSE_BTN, 1006);
GFHTMLArea(gump, 52, 167, 154, 20, "<basefont color=#4863A0>Song of Magincia");
GFAddButton(gump, 15, 192, 4005, 4007, GF_CLOSE_BTN, 1007);
GFHTMLArea(gump, 52, 192, 154, 20, "<basefont color=#4863A0>Song of Minoc");
GFAddButton(gump, 15, 217, 4005, 4007, GF_CLOSE_BTN, 1008);
GFHTMLArea(gump, 52, 217, 154, 20, "<basefont color=#4863A0>Song of Moonglow");
GFAddButton(gump, 15, 242, 4005, 4007, GF_CLOSE_BTN, 1009);
GFHTMLArea(gump, 52, 242, 154, 20, "<basefont color=#4863A0>Song of Nu'Jelm");
GFAddButton(gump, 15, 267, 4005, 4007, GF_CLOSE_BTN, 1010);
GFHTMLArea(gump, 52, 267, 154, 20, "<basefont color=#4863A0>Song of Ocllo");
GFAddButton(gump, 15, 292, 4005, 4007, GF_CLOSE_BTN, 1011);
GFHTMLArea(gump, 52, 292, 154, 20, "<basefont color=#4863A0>Song of Serpent's Hold");
GFAddButton(gump, 15, 317, 4005, 4007, GF_CLOSE_BTN, 1012);
GFHTMLArea(gump, 52, 317, 154, 20, "<basefont color=#4863A0>Song of Skara Brae");
GFAddButton(gump, 15, 342, 4005, 4007, GF_CLOSE_BTN, 1013);
GFHTMLArea(gump, 52, 342, 154, 20, "<basefont color=#4863A0>Song of Trinsic");
GFAddButton(gump, 15, 367, 4005, 4007, GF_CLOSE_BTN, 1014);
GFHTMLArea(gump, 52, 367, 154, 20, "<basefont color=#4863A0>Song of Vesper");
GFAddButton(gump, 15, 392, 4005, 4007, GF_CLOSE_BTN, 1015);
GFHTMLArea(gump, 52, 392, 154, 20, "<basefont color=#4863A0>Song of Wind");
GFAddButton(gump, 15, 417, 4005, 4007, GF_CLOSE_BTN, 1016);
GFHTMLArea(gump, 52, 417, 154, 20, "<basefont color=#4863A0>Song of Yew");
var selection := GFSendGump(who, gump);
selection := selection[0];
if (selection == 1001)
SendSysMessage(who, "You begin to play a harmonious tune.", 0x3, 0x65);
PlayMusic ( who, 8);//Stones 2
endif
if (selection == 1002)
SendSysMessage(who, "You begin to play a majestic tune from Britain.", 0x3, 0x65);
PlayMusic ( who, 9);//Britain
endif
if (selection == 1003)
SendSysMessage(who, "You begin to play a vigorous tune from Buccaneer's Den.", 0x3, 0x65);
PlayMusic ( who, 11);//Buccaneer's Den
endif
if (selection == 1004)
SendSysMessage(who, "You begin to play a relaxing tune from Cove.", 0x3, 0x65);
PlayMusic ( who, 47);//Cove
endif
if (selection == 1005)
SendSysMessage(who, "You begin to play an energetic tune from Jhelom.", 0x3, 0x65);
PlayMusic ( who, 12);//Jhelom
endif
if (selection == 1006)
SendSysMessage(who, "You begin to play a marvelous tune from Magincia.", 0x3, 0x65);
PlayMusic ( who, 15);//Magincia
endif
if (selection == 1007)
SendSysMessage(who, "You begin to play a peaceful tune from Minoc.", 0x3, 0x65);
PlayMusic ( who, 16);//Minoc
endif
if (selection == 1008)
SendSysMessage(who, "You begin to play a pacifistic tune from Moonglow.", 0x3, 0x65);
PlayMusic ( who, 48);//Moonglow
endif
if (selection == 1009)
SendSysMessage(who, "You begin to play a haunting tune from Nu'Jelm.", 0x3, 0x65);
PlayMusic ( who, 45);//Nu'Jelm
endif
if (selection == 1010)
SendSysMessage(who, "You begin to play an elegant tune from Ocllo.", 0x3, 0x65);
PlayMusic ( who, 17);//Ocllo
endif
if (selection == 1011)
SendSysMessage(who, "You begin to play an intense tune from Serpent's Hold.", 0x3, 0x65);
PlayMusic ( who, 19);//Serpent's Hold
endif
if (selection == 1012)
SendSysMessage(who, "You begin to play an exquisite tune from Skara Brae.", 0x3, 0x65);
PlayMusic ( who, 20);//Skara Brae
endif
if (selection == 1013)
SendSysMessage(who, "You begin to play a grand tune from Trinsic.", 0x3, 0x65);
PlayMusic ( who, 21);//Trinsic
endif
if (selection == 1014)
SendSysMessage(who, "You begin to play a soothing tune of Vesper.", 0x3, 0x65);
PlayMusic ( who, 22);//Vesper
endif
if (selection == 1015)
SendSysMessage(who, "You begin to play a mystical tune from Wind.", 0x3, 0x65);
PlayMusic ( who, 23);//Wind
endif
if (selection == 1016)
SendSysMessage(who, "You begin to play a ghostly tune from Yew.", 0x3, 0x65);
PlayMusic ( who, 24);//Yew
endif
endprogram