Hi, I was making a script for a Guild Master castle, so he can change the color of their guildmember's chat through the @faction command... But I have a problem with it, it works fine when the character has 1 name, but when their name has 2 or more words, it doesn't work... This is the script.
schg_cas03,289,193,3 script Colorful Rainbow 444,{
set .@GIDF,GetCastleData("schg_cas03",1);
if (.@GIDF == 0) {
mes "[Colorful Rainbow]";
mes "Tu no eres de esta guild.";
mes "Fuera de aqui antes de que llame a los guardias.";
close;
end;
}
if (GetGuildMaster(.@GIDF) != strcharinfo(0)) {
mes "[Colorful Rainbow]";
mes "No molestes, yo solo hablo con ^ff0000"+GetGuildMaster(.@GIDF)+"^000000.";
close;
end;
}
mes "[Colorful Rainbow]";
mes "Bienvenido, ^ff0000"+strcharinfo(0)+"^000000...";
mes "¿Que necesitas?";
next;
switch (select("Poner color a un miembro:Quitarle color a alguien:Nada")) {
case 1:
mes "[Colorful Rainbow]";
mes "¿A quien le quieres poner color?";
next;
mes "[Colorful Rainbow]";
mes "Recuerda que tiene que la persona debe estar ONLINE para poder ponerle el color";
next;
input .@nombre$;
if (!isloggedin(getcharid(3,.@nombre$),getcharid(0,.@nombre$))) {
mes "[Colorful Rainbow]";
mes .@nombre$ + " no esta conectado";
close;
end;
}
else if (getcharid(2,.@nombre$) != .@GIDF){
mes "[Colorful Rainbow]";
mes .@nombre$ + " no es de tu guild";
close;
end;
}
attachrid(getcharid(3,.@nombre$));
atcommand "*faction " + .@nombre$ + " " + 1;
mes "[Colorful Rainbow]";
mes "Listo, eso fue todo.";
close;
end;
case 2:
mes "[Colorful Rainbow]";
mes "¿A quien le quieres quitar color?";
next;
mes "[Colorful Rainbow]";
mes "Recuerda que tiene que la persona debe estar ONLINE para poder quitarle el color";
next;
input .@nombre$;
if (!isloggedin(getcharid(3,.@nombre$),getcharid(0,.@nombre$))) {
mes "[Colorful Rainbow]";
mes .@nombre$ + "no esta conectado";
end;
}
attachrid(getcharid(3,.@nombre$));
atcommand "@faction " + .@nombre$ + " " + 0;
mes "[Colorful Rainbow]";
mes "Listo, eso fue todo.";
close;
end;
case 3:
mes "[Colorful Rainbow]";
mes "Vuelve pronto";
close;
end;
}
}
When the character's name that the GL put has 2 or more words, it says "Faction not found, use @faction <faction ID>"... And its because when a character has 2 names I have to use "" ... But I have no idea how to put them in the script D:
Question
jcgt85
Hi, I was making a script for a Guild Master castle, so he can change the color of their guildmember's chat through the @faction command... But I have a problem with it, it works fine when the character has 1 name, but when their name has 2 or more words, it doesn't work... This is the script.
When the character's name that the GL put has 2 or more words, it says "Faction not found, use @faction <faction ID>"... And its because when a character has 2 names I have to use "" ... But I have no idea how to put them in the script D:
Need help u.u'
PS. Yeah, the * in my server is the #...
Edited by jcgt85Link to comment
Share on other sites
2 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.