I'm implementing a guild maker on my server........
i would like to know how to check if the one i've input already exist in the database?
prontera,150,150,1 script Guild Creator 50,{
mes "[Guild Creator]";
mes "Hi. Want a guild?";
switch(select("No!:Yes!")) {
case 1:
next;
mes "[Guild Creator]";
mes "Very well.";
close;
case 2:
if(getcharid(2) == 1) { // Check for belonging to a guild
next;
mes "[Guild Creator]";
mes "You are already in a guild!";
mes "Please leave your current guild before trying to create a new one.";
close;
}
goto L_guildname;
L_guildname:
next;
mes "[Guild Creator]";
mes "What would you like the name to be?";
input [email protected]$;
next;
mes "[Guild Creator]";
mes "Is this right?";
mes "''"[email protected]$+"''";
switch(select("No, I'd like to retry.:Perfect!")) {
case 1:
mes "[Guild Creator]";
mes "Sorry!";
goto L_guildname;
case 2:
atcommand "@guild "[email protected]$;
mes "[Guild Creator]";
mes "Enjoy!";
close;
}
}
}
I'm implementing a guild maker on my server........
i would like to know how to check if the one i've input already exist in the database?
prontera,150,150,1 script Guild Creator 50,{ mes "[Guild Creator]"; mes "Hi. Want a guild?"; switch(select("No!:Yes!")) { case 1: next; mes "[Guild Creator]"; mes "Very well."; close; case 2: if(getcharid(2) == 1) { // Check for belonging to a guild next; mes "[Guild Creator]"; mes "You are already in a guild!"; mes "Please leave your current guild before trying to create a new one."; close; } goto L_guildname; L_guildname: next; mes "[Guild Creator]"; mes "What would you like the name to be?"; input [email protected]$; next; mes "[Guild Creator]"; mes "Is this right?"; mes "''"[email protected]$+"''"; switch(select("No, I'd like to retry.:Perfect!")) { case 1: mes "[Guild Creator]"; mes "Sorry!"; goto L_guildname; case 2: atcommand "@guild "[email protected]$; mes "[Guild Creator]"; mes "Enjoy!"; close; } } }Edited by caspaLink to comment
Share on other sites