I've been digging through the scripting release forums and I found the Family Gang thing made by Myzter. From my understanding, he hasn't been around for a while so I'll ask the general public for assistance.
Can someone tell me if this is wrong? Since everytime I input a "Family name" it always says, "This name is in use, blah blah"
l_Reinput:
if (prompt("Write a name", "Give it to " + .@FNOther$) == 1) {
input .@FN$;
set .@SL, getstrlen(.@FN$);
if (.@SL < 3 || .@SL > 50) {
mes "[^0000ffFamily Gangs^000000]";
mes "The family name must be between 4 and 50 characters long.";
mes " ";
mes " > ^0000ff" + .@FN$ + "^000000";
next;
goto l_Reinput;
}
// Verifica que el nombre no esté siendo utilizado por otra familia
if (query_sql("select family_id from family where replace(family_name,' ','') = replace(trim('" + escape_sql(.@FN$) + "'),' ', '')", .@uno)) {
mes "[^0000ffFamily Gangs^000000]";
mes "This name is in use, please choose another.";
mes " ";
mes " > ^0000ff" + .@FN$ + "^000000";
next;
goto l_Reinput;
}
set .@FamilyName$, .@FN$;
mes "[^0000ffFamily Gangs^000000]";
mes "Very good, close this window to continue.";
close2;
} else {
mes "[^0000ffFamily Gangs^000000]";
mes "Okay, close this window to continue.";
close2;
message .@FNOther$, "¡" + .@FNTurn$ + " wants me to name the family!";
}
The whole script is 1500 lines so I just posted the relevant section of it.
Basically I am stuck at this part:
// Verifica que el nombre no esté siendo utilizado por otra familia
if (query_sql("select family_id from family where replace(family_name,' ','') = replace(trim('" + escape_sql(.@FN$) + "'),' ', '')", .@uno)) {
mes "[^0000ffFamily Gangs^000000]";
mes "This name is in use, please choose another.";
mes " ";
mes " > ^0000ff" + .@FN$ + "^000000";
next;
goto l_Reinput;
}
SQL tables have already been created as well. And there is no error in the map-server.
Thanks in advance!
Edit:
On a side note, anyone know why all my attacks "miss" when I'm attacking a mob while I'm disguised as a mob? (I don't think it's worth to make a new topic for a simple question.)