I have the following problem with this NPC: it correctly enters any chat channel but the problem I have is that it does not let out of the chat channel.
Problem: @channel leave #main
sec_pri,19,49,5 script Configuration Channels 4_EP16_MEYER,{
set .NombreNPC$, "[ ^3209FFConfiguración de Canales^000000 ]";
cutin "16mye_nor",2;
INICIO:
mes .NombreNPC$;
mes "Hello, "+strcharinfo(0);
mes "In which channels would you like to participate?";
next;
menu "#main ["+( (canal_principal)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_principal,
"#commerce ["+( (canal_soporte)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_soporte,
"#party ["+( (canal_ventas)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_ventas,
"#english ["+( (canal_mapa)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_mapa,
"#spanish ["+( (canal_aliados)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_aliados,
"#french ["+( (canal_french)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_french,
"#tagalog ["+( (canal_tagalog)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_tagalog,
"#german ["+( (canal_german)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_german,
"- Cancel",L_quit;
// ********
// #main
c_principal:
next;
mes .NombreNPC$;
mes "State: "+( (canal_principal) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_principal) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_principal == 0) {
mes "#main is now ^00BB22On^000000.";
mes "You must send a private message","to #main to chat on the channel";
set canal_principal,1;
atcommand "@join #main";//para encender
} else if(canal_principal == 1) {
mes "#main is now ^FF2200Off^000000.";
set canal_principal,0;
atcommand "@channel leave #main";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
// #commerce
c_soporte:
next;
mes .NombreNPC$;
mes "State: "+( (canal_soporte) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_soporte) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_soporte == 0) {
mes "#commerce is now ^00BB22On^000000.";
mes "You must send a private message","to #commerce to chat on the channel";
set canal_soporte,1;
atcommand "@join #commerce";//para encender
} else if(canal_soporte == 1) {
mes "#commerce is now ^FF2200Off^000000.";
set canal_soporte,0;
atcommand "@channel leave #commerce";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
// #party
c_ventas:
next;
mes .NombreNPC$;
mes "State: "+( (canal_ventas) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_ventas) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_ventas == 0) {
mes "#party is now ^00BB22On^000000.";
mes "You must send a private message","to #party to chat on the channel";
set canal_ventas,1;
atcommand "@join #party";//para encender
} else if(canal_ventas == 1) {
mes "#party is now ^FF2200Off^000000.";
set canal_ventas,0;
atcommand "@channel leave #party";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
// #english
c_mapa:
next;
mes .NombreNPC$;
mes "State: "+( (canal_mapa) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_mapa) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_mapa == 0) {
mes "#english is now ^00BB22On^000000.";
mes "You must send a private message","to #english to chat on the channel";
set canal_mapa,1;
atcommand "@join #english";//para encender
} else if(canal_mapa == 1) {
mes "#english is now ^FF2200Off^000000.";
set canal_mapa,0;
atcommand "@channel leave #english";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
// #spanish
c_aliados:
next;
mes .NombreNPC$;
mes "State: "+( (canal_aliados) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_aliados) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_aliados == 0) {
mes "#spanish is now ^00BB22On^000000.";
mes "You must send a private message","to #spanish to chat on the channel";
set canal_aliados,1;
atcommand "@join #spanish";//para encender
} else if(canal_aliados == 1) {
mes "#spanish is now ^FF2200Off^000000.";
set canal_aliados,0;
atcommand "@channel leave #spanish";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
// #french
c_french:
next;
mes .NombreNPC$;
mes "State: "+( (canal_french) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_french) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_french == 0) {
mes "#french is now ^00BB22On^000000.";
mes "You must send a private message","to #french to chat on the channel";
set canal_french,1;
atcommand "@join #french";//para encender
} else if(canal_french == 1) {
mes "#french is now ^FF2200Off^000000.";
set canal_french,0;
atcommand "@channel leave #french";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
// #tagalog
c_tagalog:
next;
mes .NombreNPC$;
mes "State: "+( (canal_tagalog) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_tagalog) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_tagalog == 0) {
mes "#tagalog is now ^00BB22On^000000.";
mes "You must send a private message","to #tagalog to chat on the channel";
set canal_tagalog,1;
atcommand "@join #tagalog";//para encender
} else if(canal_tagalog == 1) {
mes "#tagalog is now ^FF2200Off^000000.";
set canal_tagalog,0;
atcommand "@channel leave #tagalog";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
// #german
c_german:
next;
mes .NombreNPC$;
mes "State: "+( (canal_german) ? "^00BB22On^000000" : "^FF2200Off^000000");
menu "- I want "+((!canal_german) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit;
next;
mes .NombreNPC$;
if(canal_german == 0) {
mes "#german is now ^00BB22On^000000.";
mes "You must send a private message","to #german to chat on the channel";
set canal_german,1;
atcommand "@join #german";//para encender
} else if(canal_german == 1) {
mes "#german is now ^FF2200Off^000000.";
set canal_german,0;
atcommand "@channel leave #german";//para apagar
}
next;
goto INICIO;// Return to the main menu, in case you want to use the service more.
// ********
//SALIR
L_quit:
next;
mes .NombreNPC$;
mes "¡Nos vemos!";
mes "Regresa cuando quieras.";
cutin "",255;
close;
//OnPCLoginEvent:
// ************************************
// CANALES ACTIVADOS AUTOMATICAMENTE
//
//if(canal_principal == 1) {
// atcommand "@channel join #main";
//}
//if(canal_soporte == 1) {
// atcommand "@channel join #commerce";
//}
//if(canal_ventas == 1) {
// atcommand "@channel join #party";
//}
//if(canal_mapa == 1) {
// atcommand "@channel join #english";
//}
//if(canal_aliados == 1) {
// atcommand "@channel join #spanish";
//}
//***************************
end;
}
My configuration Channels.conf
// Channel System Configuration File
channel_config: {
/* Colors available */
colors: {
Default: "0xffffff" /* Custom channels will use the first in the list unless a color is selected through @channel. */
Red: "0xff0000"
Blue: "0x83cfe9"
Orange: "0xe57c00"
Cyan: "0x00b89d"
Yellow: "0xffff90"
Green: "0x28bf00"
White: "0xFFFFFF"
Purple: "0xD67FFF"
LightGreen: "0xB6FF00"
Normal: "0x00ff00"
/* Add as many colors as you'd like. */
}
/**
* Private channel config
* - Always CHAN_TYPE_PUBLIC
* - Always displayed in chat log as "#channel_name: <name>: <chat>"
* - ID of private channels start at 1000
**/
private_channel: {
allow: true // (bool) Allow player to create their own channel?
color: "Default" // (string) Default color, see colors
delay: 1000 // (int) Chat delay for each member
max_member: 1000 // (int) Max members
self_notif: true // (bool) Show message when player enters or leaves the channel
join_notif: false // (bool) Show message when player joined the channel
leave_notif: false // (bool) Show message when player leaves the channel
/* Moderation feature for channel owner, allowed to: */
ban: true // (bool) Ban players
kick: true // (bool) Kick players
color_override: false // (bool) Allow players to change the private channel color to their own
change_delay: false // (bool) Allow players to change the private channel delay to their own
}
/**
* Default server channels
**/
channels: (
/**
* Structure
{
name: "#channel" // (string) Channel name
password: "" // (string) Channel password
alias: "[Channel]" // (string) Message from this that channel will be displayed instead the channel name
color: "Default" // (string) Channel color
type: "CHAN_TYPE_PUBLIC" // (string) Channel type: CHAN_TYPE_PUBLIC, CHAN_TYPE_ALLY, CHAN_TYPE_MAP
autojoin: false // (bool) Players will auto join channel
delay: 1000 // (int) Chat delay for each player
leave: true // (bool) Player is allowed to leave the channel
chat: true // (bool) Player is allowed to chat on this channel
color_override: false // (bool) Allow players to change the private channel color to their own
self_notif: true // (bool) Show message when player enters or leaves the channel
join_notif: false // (bool) Show message when player joined the channel
leave_notif: false // (bool) Show message when player leaves the channel
groupid: (0,..,99) // (list,int) Only players with valid group IDs are allowed to join. Group with 'channel_admin' can always enter the channel.
/// All values above are default settings
}, // Use comma if followed by other channel
**/
{
name: "#main"
alias: "[Main]"
color: "White"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
leave: true
},
{
name: "#commerce"
alias: "[Commerce]"
color: "LightGreen"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
},
{
name: "#party"
alias: "[Party]"
color: "Purple"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
},
{
name: "#english"
alias: "[English]"
color: "Orange"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
},
{
name: "#spanish"
alias: "[Spanish]"
color: "Blue"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
},
{
name: "#french"
alias: "[French]"
color: "Green"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
},
{
name: "#tagalog"
alias: "[Tagalog]"
color: "Yellow"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
},
{
name: "#german"
alias: "[German]"
color: "Cyan"
type: "CHAN_TYPE_PUBLIC"
delay: 10000
autojoin: true
}
)
/**
* Channel config for guild alliance
* For the structure, see the 'channels' above
**/
/**ally: {
name: "#ally"
alias: "[Ally]"
color: "Green"
type: "CHAN_TYPE_ALLY" // DO NOT CHANGE THIS VALUE
delay: 1000
autojoin: true
leave: true
chat: true
}
**/
/**
* Channel config for map channel
* For the structure, see the 'channels' above
**/
map: {
name: "#map"
alias: "[Map]"
color: "Yellow"
type: "CHAN_TYPE_MAP" // DO NOT CHANGE THIS VALUE
delay: 1000
autojoin: true
leave: true
chat: true
}
}
Question
Aver
Hi rAthena!
I have the following problem with this NPC: it correctly enters any chat channel but the problem I have is that it does not let out of the chat channel.
Problem: @channel leave #main
sec_pri,19,49,5 script Configuration Channels 4_EP16_MEYER,{ set .NombreNPC$, "[ ^3209FFConfiguración de Canales^000000 ]"; cutin "16mye_nor",2; INICIO: mes .NombreNPC$; mes "Hello, "+strcharinfo(0); mes "In which channels would you like to participate?"; next; menu "#main ["+( (canal_principal)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_principal, "#commerce ["+( (canal_soporte)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_soporte, "#party ["+( (canal_ventas)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_ventas, "#english ["+( (canal_mapa)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_mapa, "#spanish ["+( (canal_aliados)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_aliados, "#french ["+( (canal_french)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_french, "#tagalog ["+( (canal_tagalog)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_tagalog, "#german ["+( (canal_german)? "^00BB22On^000000" : "^FF2200Off^000000")+"]",c_german, "- Cancel",L_quit; // ******** // #main c_principal: next; mes .NombreNPC$; mes "State: "+( (canal_principal) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_principal) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_principal == 0) { mes "#main is now ^00BB22On^000000."; mes "You must send a private message","to #main to chat on the channel"; set canal_principal,1; atcommand "@join #main";//para encender } else if(canal_principal == 1) { mes "#main is now ^FF2200Off^000000."; set canal_principal,0; atcommand "@channel leave #main";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** // #commerce c_soporte: next; mes .NombreNPC$; mes "State: "+( (canal_soporte) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_soporte) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_soporte == 0) { mes "#commerce is now ^00BB22On^000000."; mes "You must send a private message","to #commerce to chat on the channel"; set canal_soporte,1; atcommand "@join #commerce";//para encender } else if(canal_soporte == 1) { mes "#commerce is now ^FF2200Off^000000."; set canal_soporte,0; atcommand "@channel leave #commerce";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** // #party c_ventas: next; mes .NombreNPC$; mes "State: "+( (canal_ventas) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_ventas) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_ventas == 0) { mes "#party is now ^00BB22On^000000."; mes "You must send a private message","to #party to chat on the channel"; set canal_ventas,1; atcommand "@join #party";//para encender } else if(canal_ventas == 1) { mes "#party is now ^FF2200Off^000000."; set canal_ventas,0; atcommand "@channel leave #party";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** // #english c_mapa: next; mes .NombreNPC$; mes "State: "+( (canal_mapa) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_mapa) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_mapa == 0) { mes "#english is now ^00BB22On^000000."; mes "You must send a private message","to #english to chat on the channel"; set canal_mapa,1; atcommand "@join #english";//para encender } else if(canal_mapa == 1) { mes "#english is now ^FF2200Off^000000."; set canal_mapa,0; atcommand "@channel leave #english";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** // #spanish c_aliados: next; mes .NombreNPC$; mes "State: "+( (canal_aliados) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_aliados) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_aliados == 0) { mes "#spanish is now ^00BB22On^000000."; mes "You must send a private message","to #spanish to chat on the channel"; set canal_aliados,1; atcommand "@join #spanish";//para encender } else if(canal_aliados == 1) { mes "#spanish is now ^FF2200Off^000000."; set canal_aliados,0; atcommand "@channel leave #spanish";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** // #french c_french: next; mes .NombreNPC$; mes "State: "+( (canal_french) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_french) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_french == 0) { mes "#french is now ^00BB22On^000000."; mes "You must send a private message","to #french to chat on the channel"; set canal_french,1; atcommand "@join #french";//para encender } else if(canal_french == 1) { mes "#french is now ^FF2200Off^000000."; set canal_french,0; atcommand "@channel leave #french";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** // #tagalog c_tagalog: next; mes .NombreNPC$; mes "State: "+( (canal_tagalog) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_tagalog) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_tagalog == 0) { mes "#tagalog is now ^00BB22On^000000."; mes "You must send a private message","to #tagalog to chat on the channel"; set canal_tagalog,1; atcommand "@join #tagalog";//para encender } else if(canal_tagalog == 1) { mes "#tagalog is now ^FF2200Off^000000."; set canal_tagalog,0; atcommand "@channel leave #tagalog";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** // #german c_german: next; mes .NombreNPC$; mes "State: "+( (canal_german) ? "^00BB22On^000000" : "^FF2200Off^000000"); menu "- I want "+((!canal_german) ? "^00BB22activate^000000" : "^FF2200deactivate^000000")+" this.",-,"- Nothing.",L_quit; next; mes .NombreNPC$; if(canal_german == 0) { mes "#german is now ^00BB22On^000000."; mes "You must send a private message","to #german to chat on the channel"; set canal_german,1; atcommand "@join #german";//para encender } else if(canal_german == 1) { mes "#german is now ^FF2200Off^000000."; set canal_german,0; atcommand "@channel leave #german";//para apagar } next; goto INICIO;// Return to the main menu, in case you want to use the service more. // ******** //SALIR L_quit: next; mes .NombreNPC$; mes "¡Nos vemos!"; mes "Regresa cuando quieras."; cutin "",255; close; //OnPCLoginEvent: // ************************************ // CANALES ACTIVADOS AUTOMATICAMENTE // //if(canal_principal == 1) { // atcommand "@channel join #main"; //} //if(canal_soporte == 1) { // atcommand "@channel join #commerce"; //} //if(canal_ventas == 1) { // atcommand "@channel join #party"; //} //if(canal_mapa == 1) { // atcommand "@channel join #english"; //} //if(canal_aliados == 1) { // atcommand "@channel join #spanish"; //} //*************************** end; }
My configuration Channels.conf
Link to comment
Share on other sites
0 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.