Brahms Posted November 14, 2018 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 149 Reputation: 3 Joined: 07/29/16 Last Seen: August 6, 2019 Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted November 22, 2018 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 8 hours ago Share Posted November 22, 2018 try this https://pastebin.com/RCqBbTc1 1 Quote Link to comment Share on other sites More sharing options...
0 Normynator Posted November 14, 2018 Group: Developer Topic Count: 7 Topics Per Day: 0.00 Content Count: 292 Reputation: 199 Joined: 05/03/13 Last Seen: May 26, 2023 Share Posted November 14, 2018 Players can already join and leave channels, what would make the npc different? Quote Link to comment Share on other sites More sharing options...
0 Brahms Posted November 14, 2018 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 149 Reputation: 3 Joined: 07/29/16 Last Seen: August 6, 2019 Author Share 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 Link to comment Share on other sites More sharing options...
0 Brahms Posted November 22, 2018 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 149 Reputation: 3 Joined: 07/29/16 Last Seen: August 6, 2019 Author Share Posted November 22, 2018 2 hours ago, Emistry said: try this https://pastebin.com/RCqBbTc1 Thank You so much emistry.. Quote Link to comment Share on other sites More sharing options...
0 TioHugo Posted January 7, 2019 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 4 Reputation: 13 Joined: 11/17/12 Last Seen: November 2, 2023 Share 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 Link to comment Share on other sites More sharing options...
0 n0tttt Posted January 8, 2019 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Friday at 02:39 AM Share 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 Link to comment Share on other sites More sharing options...
0 Hayato Posted October 20, 2020 Group: Members Topic Count: 14 Topics Per Day: 0.01 Content Count: 66 Reputation: 10 Joined: 11/15/17 Last Seen: November 12, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Lemongrass Posted October 20, 2020 Group: Developer Topic Count: 28 Topics Per Day: 0.01 Content Count: 547 Reputation: 270 Joined: 11/08/11 Last Seen: June 10, 2024 Share Posted October 20, 2020 There is no getarrayZize - it is called getarraySize 1 Quote Link to comment Share on other sites More sharing options...
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 BrahmsLink to comment
Share on other sites
8 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.