Brahms Posted November 14, 2018 Posted November 14, 2018 (edited) Hi rathena. As the title said, i want to request a channel system controller npc where players can turn on/off channels. Thank you so much. Have a bless day everyone. Thanks. Edited November 14, 2018 by Brahms Quote
0 Emistry Posted November 22, 2018 Posted November 22, 2018 try this https://pastebin.com/RCqBbTc1 1 Quote
0 Normynator Posted November 14, 2018 Posted November 14, 2018 Players can already join and leave channels, what would make the npc different? Quote
0 Brahms Posted November 14, 2018 Author Posted November 14, 2018 On 11/14/2018 at 4:44 PM, Normynator said: Players can already join and leave channels, what would make the npc different? Its because everytime a player logs in, they automatically joined a channel. I just want it to be like these same in the image below where they can manage fully each channel players wanted to see announcing in there screens.. Bump! Can anyone help me with this? Quote
0 Brahms Posted November 22, 2018 Author Posted November 22, 2018 2 hours ago, Emistry said: try this https://pastebin.com/RCqBbTc1 Thank You so much emistry.. Quote
0 TioHugo Posted January 7, 2019 Posted January 7, 2019 How could I embed it into the code so I can put the @listenbg command also, to disable Battleground messages? Just like this pic: Remembering that by default the BG announcements are always shown, that is, by default BG messages are [On]. To disable the messages, you have to give the @listenbg command. Quote
0 n0tttt Posted January 8, 2019 Posted January 8, 2019 I have a script which I haven't released because... more than 1 year without test server. I hope it works, though. Tell me how it goes. It also has commands. - script Login_Config -1,{ OnInit: // Names of channels to show. setarray .channel_name$[0],"Global","Support","Trading"; // Channels names to join. setarray .channel$[0],"global","support","trade"; // Commands. setarray .command$[0],"autoloot","noask","noks","showdelay","showexp","showzeny"; bindatcmd "channels", "Login_Config::OnChannels"; bindatcmd "loginconf","Login_Config::OnConfig"; end; OnChannels: .@n$ = "^3227cd[Channel Manager]^000000"; mes .@n$; mes "Here you can change which channels you'll join when you log in."; mes "Remember the configuration is shared between all your characters."; .@size = getarraysize(.channel$); next; do { .@menu$ = ""; for(.@i = 0;.@i < .@size;.@i++) { if(#config & (1 << .@i)) .@menu$+= "^539c36["+.channel_name$[.@i]+"]^000000:"; else .@menu$+= "^b6101b["+.channel_name$[.@i]+"]^000000:"; } .@s = select("Finish.",.@menu$) - 1; if(.@s) #config^= (1 << (.@s - 1)); } while(.@s); close; OnConfig: .@n$ = "^3227cd[Login Manager]^000000"; mes .@n$; mes "Here you can change your login config."; mes "Remember the configuration is shared between all your characters."; .@size = getarraysize(.command$); .@offset = getarrayzize(.channel$) - 1; next; do { .@menu$ = ""; for(.@i = 0;.@i < .@size;.@i++) { if(#config & (1 << (.@i + .@offset + 1))) .@menu$+= "^539c36@"+.command$[.@i]+" "+((.command$[.@i] == "autoloot")? "("+((#rate_at)? #rate_at : 100)+"%)" : "")+".^000000:"; else .@menu$+= "^b6101b@"+.command$[.@i]+".^000000:"; } .@s = select("Finish.",.@menu$) - 1; if(.command$[.@s - 1] == "autoloot" && !(#config & (1 << (.@s + .@offset)))) { input .@n; if(.@n && .@n < 100) #rate_at = .@n; else if(!.@n) continue; } else if(.command$[.@s - 1] == "autoloot") { #rate_at = 0; } if(.@s) #config^= (1 << (.@s + .@offset)); } while(.@s); close; OnPCLoginEvent: if(#config) { .@size1 = getarraysize(.channel$); .@size2 = getarraysize(.command$) + .@size1; for(;.@i < .@size2;.@i++) { if(#config & (1 << .@i)) { if(.@i < .@size1) atcommand "@join #"+.channel$[.@i]; else atcommand "@"+.command$[.@i - .@size1]+" "+((.command$[.@i - .@size1] == "autoloot" && #rate_at)? #rate_at+"" : ""); } } } end; } 1 Quote
0 Hayato Posted October 20, 2020 Posted October 20, 2020 On 1/8/2019 at 1:05 AM, n0tttt said: I have a script which I haven't released because... more than 1 year without test server. I hope it works, though. Tell me how it goes. It also has commands. - script Login_Config -1,{ OnInit: // Names of channels to show. setarray .channel_name$[0],"Global","Support","Trading"; // Channels names to join. setarray .channel$[0],"global","support","trade"; // Commands. setarray .command$[0],"autoloot","noask","noks","showdelay","showexp","showzeny"; bindatcmd "channels", "Login_Config::OnChannels"; bindatcmd "loginconf","Login_Config::OnConfig"; end; OnChannels: .@n$ = "^3227cd[Channel Manager]^000000"; mes .@n$; mes "Here you can change which channels you'll join when you log in."; mes "Remember the configuration is shared between all your characters."; .@size = getarraysize(.channel$); next; do { .@menu$ = ""; for(.@i = 0;.@i < .@size;.@i++) { if(#config & (1 << .@i)) .@menu$+= "^539c36["+.channel_name$[.@i]+"]^000000:"; else .@menu$+= "^b6101b["+.channel_name$[.@i]+"]^000000:"; } .@s = select("Finish.",.@menu$) - 1; if(.@s) #config^= (1 << (.@s - 1)); } while(.@s); close; OnConfig: .@n$ = "^3227cd[Login Manager]^000000"; mes .@n$; mes "Here you can change your login config."; mes "Remember the configuration is shared between all your characters."; .@size = getarraysize(.command$); .@offset = getarrayzize(.channel$) - 1; next; do { .@menu$ = ""; for(.@i = 0;.@i < .@size;.@i++) { if(#config & (1 << (.@i + .@offset + 1))) .@menu$+= "^539c36@"+.command$[.@i]+" "+((.command$[.@i] == "autoloot")? "("+((#rate_at)? #rate_at : 100)+"%)" : "")+".^000000:"; else .@menu$+= "^b6101b@"+.command$[.@i]+".^000000:"; } .@s = select("Finish.",.@menu$) - 1; if(.command$[.@s - 1] == "autoloot" && !(#config & (1 << (.@s + .@offset)))) { input .@n; if(.@n && .@n < 100) #rate_at = .@n; else if(!.@n) continue; } else if(.command$[.@s - 1] == "autoloot") { #rate_at = 0; } if(.@s) #config^= (1 << (.@s + .@offset)); } while(.@s); close; OnPCLoginEvent: if(#config) { .@size1 = getarraysize(.channel$); .@size2 = getarraysize(.command$) + .@size1; for(;.@i < .@size2;.@i++) { if(#config & (1 << .@i)) { if(.@i < .@size1) atcommand "@join #"+.channel$[.@i]; else atcommand "@"+.command$[.@i - .@size1]+" "+((.command$[.@i - .@size1] == "autoloot" && #rate_at)? #rate_at+"" : ""); } } } end; } your version gives errors. Quote
0 Lemongrass Posted October 20, 2020 Posted October 20, 2020 There is no getarrayZize - it is called getarraySize 1 Quote
Question
Brahms
Hi rathena. As the title said, i want to request a channel system controller npc where players can turn on/off channels. Thank you so much. Have a bless day everyone.
Thanks.
Edited by Brahms8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.