Aveline™ 555 Posted March 15, 2014 Share Posted March 15, 2014 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hello guys i will want to share something with your. Actually this quest public but i'll rewrite this quest i think it was a little perfect. Quest : --[[ * fileName : musicPlayerSystem.quest * date : 15.03.2014 * author : HaveBeen™ * description : - ]]-- quest musicPlayer begin state start begin function load() local data = {} data.MapNames = { -- MapIndex MapName [1] = "Shinsoo Kingdom", [21] = "Chunjo Kingdom", [41] = "Jinno Kingdom", } data.MapIndexs = {1,21,41} data.Notice = "%s enjoy the music begins. Music name : %s" data.Notice2 = "For all the kingdoms of music. Music name : %s" data.Options = {"Add music for one map","Add music for all map","Close"} return data end function is_admin() local gmList = {"HaveBeen"} if(table.getn(gmList) >= 1) then if(gmList[1] == pc.name) then return true else return false end else for i = 1,table.getn(gmList),1 do if(gmList[i] == pc.name) then return true else return false end end end end when letter with pc.is_gm() and musicPlayer.is_admin() begin send_letter("Music Player") end when button or info begin say_title("Music Player:") say("") --- say("What do you want?") local data = musicPlayer.load() local s = select_table(data.Options) if(s >= table.getn(data.Options)) then return end say_title(string.format("%s : ",data.Options[s])) say("") --- if(s >= 1) then say("Select a map.") say("") local q = {} for i = 1,table.getn(data.MapIndexs),1 do table.insert(q,data.MapNames[data.MapIndexs[i]]) table.insert(q,"Close") end local t = select_table(q) if(t >= table.getn(q)) then return end say_title(string.format("%s enjoy the music",q[t])) say("") --- say("Please write music name..") say("") local music = input() if(music == "" or tostring(music) == nil) then return end say_title(string.format("%s enjoy the music",q[t])) say("") --- say("Music is starting.. ") say("Thanks! ") add_bgm_info(data.MapIndexs[t],music,0.5) notice_all(string.format(data.Notice,q[t],music)) elseif(s >= 2) then say("Please write music name..") say("") local music = input() if(music == "" or tostring(music) == nil) then return end say_title(string.format("%s enjoy the music",q[t])) say("") --- say("Music is starting.. ") say("Thanks! ") i = 0 repeat i = i + 1 add_bgm_info(data.MapIndexs[i],music,0.5) until i == table.getn(data.MapIndexs) notice_all(string.format(data.Notice2,music)) end end end end I hope you're like it. Regards. 2 1 1 5 Plain logic saves lives. Link to comment Share on other sites More sharing options...
Bituse 62 Posted February 20, 2015 Share Posted February 20, 2015 (edited) https://metin2.download/picture/LgvD7Xl2ey3ME3BaFdd2kuy593kCO15N/.png Solution ? Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Reboot 772 Posted February 20, 2015 Share Posted February 20, 2015 (edited) https://metin2.download/picture/LgvD7Xl2ey3ME3BaFdd2kuy593kCO15N/.png Solution ? Add in quest_functions add_bgm_info Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
Bituse 62 Posted February 20, 2015 Share Posted February 20, 2015 Ok that worked Buuut when i reload q ch1 ch99 There is no new quest.... Link to comment Share on other sites More sharing options...
Former Staff Shisui 493 Posted April 13, 2015 Former Staff Share Posted April 13, 2015 Don't work. When I click on letter nothing appears. Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted April 13, 2015 Management Share Posted April 13, 2015 The music need to be in the client right? Link to comment Share on other sites More sharing options...
Thorer 19 Posted April 15, 2015 Share Posted April 15, 2015 The music need to be in the client right? Of course. Link to comment Share on other sites More sharing options...
Recommended Posts