Jump to content
  • 0

Channel Controller


Question

Posted (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 by Brahms

8 answers to this question

Recommended Posts

  • 0
Posted
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..

1.JPG

 

Bump! Can anyone help me with this? 

  • 0
Posted

How could I embed it into the code so I can put the @listenbg command also, to disable Battleground messages? Just like this pic:

1.JPG

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.

  • 0
Posted

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;

}

 

  • Upvote 1
  • 0
Posted
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.

grafik.png.e80162d250104a2658aa52ae087fe067.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...