since my client is bugging with the character deletion, I've just written a script to do it.
Could you please check if it is not exploitable/ doing something wrong?
It seems to work fine for me though, but would be glad to have someone checking it before releasing it.
lhz_in03,255,257,3 script Chardel 93,{
set .@accid, getcharid(3);
mes .npcname$;
mes "Hello ^6495ED"+strcharinfo(0)+"^000000.";
mes "Would you like to delete a character?";
if (select("No:Yes") == 1){
next;
mes .npcname$;
mes "Alright, see you then.";
close;
}
next;
mes .npcname$;
mes "Please enter the Character's name.";
mes "Note that you can only delete characters on your own account.";
input(.@charname$);
query_sql "SELECT account_id FROM `char` WHERE name = '"+.@charname$+"'",.@accid2;
if (.@accid != .@accid2){
next;
mes .npcname$;
mes "^ff0000I could not find this character on your account!^000000";
close;
}
if (strcharinfo(0) == .@charname$){
next;
mes .npcname$;
mes "^ff0000Please log in with a different character to delete this one.^000000";
close;
}
next;
mes .npcname$;
mes "Do you really want to delete this character?";
if (select("No:Yes") == 1){
next;
mes .npcname$;
mes "Alright, see you then.";
close;
}
next;
mes .npcname$;
mes "Okay, I have deleted this character from your account.";
query_sql "DELETE FROM `char` WHERE `name`='"+.@charname$+"'";
close;
end;
OnInit:
set .npcname$, "[^6495EDCharacter Deletion^000000]";
end;
}
Question
Yuka
Hi,
since my client is bugging with the character deletion, I've just written a script to do it.
Could you please check if it is not exploitable/ doing something wrong?
It seems to work fine for me though, but would be glad to have someone checking it before releasing it.
Thanks!
Edited by YukaLink to comment
Share on other sites
3 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.