aurelia Posted October 2, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 23 Reputation: 0 Joined: 06/08/12 Last Seen: December 25, 2013 Share Posted October 2, 2013 (edited) hello i want to request npc name changer and date of birth changer the npc who can change our nickname & date of birth thanks before ^^ Edited October 2, 2013 by aurelia Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted October 2, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted October 2, 2013 (edited) Ok give me a bit, i must create a condition if you are a guild master. I figure that you cannot change the name in your the Guild Listing, I think its because its client sided or something is preventing that, i tried changing the names in guild_member in query but everytime I char select and refresh the sql it returns back to original name. The best way is to prevent any player from changing name when they are in guild. Now here is the script. Just modify the dialogues. -Added if Char Name already exists restrictions. -Added if Char is already in a guild restrictions. (Use transfer Guild Leader first before changing name if character is a Guild Leader.) prontera,158,182,0 script Sample 100,{ mes "Blahblah"; menu "Change Name",one,"Change Birth",two; one: query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+strcharinfo(0)+"'",.@current$; set @GID,getcharid(2); if(!@GID==0){ mes "Please leave your guild first before you change name."; close; } mes "Input name..."; input .@name$; if(getstrlen(.@name$)<4| getstrlen(.@name$)>23){ mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters."; close; } if(.@name$ == strcharinfo(0)) { mes "You cannot enter same name."; close; } query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+.@name$+"'",.@existing$; if(.@name$ == .@existing$){ mes "Name already exists."; close; } mes "New name: "+.@name$+""; query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; sleep2 1000; mes "Name successfully changed, please relog to see changes."; close; two: query_sql "SELECT `birthdate` FROM `ragnarok`.`login` WHERE `account_id` = '"+getcharid(3)+"'",.@birthdate$; mes "Birth Date: "+.@birthdate$+""; mes "Input Year of Birth."; input .@year; if(.@year==0){ mes "You entered wrong number of month."; close; } mes "Input Month of Birth."; input .@month; if(.@month==0||.@month>12){ mes "You entered wrong number of month."; close; } mes "Input Day of Birth."; input .@day; if(.@day==0||.@day>31){ mes "You entered wrong number of day."; close; } mes "New B-D: "+.@year+"-"+.@month+"-"+.@day+""; query_sql "UPDATE `login` SET `birthdate` = '"+escape_sql(.@year)+"-"+escape_sql(.@month)+"-"+escape_sql(.@day)+"' WHERE `account_id` = '"+getcharid(3)+"'"; sleep2 1000; mes "Birth Date successfully changed!"; close; } Edited October 2, 2013 by Lil Troll 1 Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted October 2, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted October 2, 2013 (edited) prontera,158,182,0 script Sample 100,{ mes "Blahblah"; menu "Change Name",one,"Change Birth",two; one: query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+strcharinfo(0)+"'",.@current$; mes "Input name..."; input .@name$; if(getstrlen(.@name$)<4| getstrlen(.@name$)>23){ mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters."; } if(.@name$ == strcharinfo(0)) { mes "You cannot enter same name."; close; } mes "New name: "+.@name$+""; query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; query_sql "UPDATE `guild_member` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; sleep2 1000; mes "Name successfully changed, please relog to see changes."; close; two: query_sql "SELECT `birthdate` FROM `ragnarok`.`login` WHERE `account_id` = '"+getcharid(3)+"'",.@birthdate$; mes "Birth Date: "+.@birthdate$+""; mes "Input Year of Birth."; input .@year; if(.@year==0){ mes "You entered wrong number of month."; close; } mes "Input Month of Birth."; input .@month; if(.@month==0||.@month>12){ mes "You entered wrong number of month."; close; } mes "Input Day of Birth."; input .@day; if(.@day==0||.@day>31){ mes "You entered wrong number of day."; close; } mes "New B-D: "+.@year+"-"+.@month+"-"+.@day+""; query_sql "UPDATE `login` SET `birthdate` = '"+escape_sql(.@year)+"-"+escape_sql(.@month)+"-"+escape_sql(.@day)+"' WHERE `account_id` = '"+getcharid(3)+"'"; sleep2 1000; mes "Birth Date successfully changed!"; close; } Here you go. You just need a lil modification. Edited October 2, 2013 by Lil Troll 1 Quote Link to comment Share on other sites More sharing options...
aurelia Posted October 2, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 23 Reputation: 0 Joined: 06/08/12 Last Seen: December 25, 2013 Author Share Posted October 2, 2013 (edited) your script very helpful but i confused if player have a guild i've tested your script and it's work but........ this is my script payon,164,232,1 script [Changer] Kenshin 523,{ mes "Hello"; menu "Change Name",one,"Change Birth",two; one: query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+strcharinfo(0)+"'",.@current$; query_sql "SELECT `name` FROM `ragnarok`.`guild` WHERE `master` = '"+strcharinfo(0)+"'",.@current$; mes "Input name..."; input .@name$; if(getstrlen(.@name$)<4| getstrlen(.@name$)>23){ mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters."; } if(.@name$ == strcharinfo(0)) { mes "You cannot enter same name."; close; } mes "New name: "+.@name$+""; query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; query_sql "UPDATE `guild` SET `master` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; sleep2 1000; mes "Name successfully changed, please relog to see changes."; close; two: query_sql "SELECT `birthdate` FROM `ragnarok`.`login` WHERE `account_id` = '"+getcharid(3)+"'",.@birthdate$; mes "Birth Date: "+.@birthdate$+""; mes "Input Year of Birth. (Hanya memakai 2 digit terakhir untuk mendelete char)"; input .@year; if(.@year==0){ mes "You entered wrong number of month."; close; } mes "Input Month of Birth."; input .@month; if(.@month==0||.@month>12){ mes "You entered wrong number of month."; close; } mes "Input Day of Birth."; input .@day; if(.@day==0||.@day>31){ mes "You entered wrong number of day."; close; } mes "New B-D: "+.@year+"-"+.@month+"-"+.@day+""; query_sql "UPDATE `login` SET `birthdate` = '"+escape_sql(.@year)+"-"+escape_sql(.@month)+"-"+escape_sql(.@day)+"' WHERE `account_id` = '"+getcharid(3)+"'"; sleep2 1000; mes "Tanggal lahir sukses diganti"; mes "Untuk menghapus karakter formatnya : yymmdd"; mes "Misal 1945-08-17"; mes "Maka saat mendelete karakter cukup ketik"; mes "450817"; mes "Terima kasih."; close; } Edited October 2, 2013 by aurelia Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted October 2, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted October 2, 2013 (edited) Do you mean it does`nt change name in guild? First revert your name back to original then, Find this line: query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; And below add this. query_sql "UPDATE `guild_member` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; Edited October 2, 2013 by Lil Troll Quote Link to comment Share on other sites More sharing options...
aurelia Posted October 2, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 23 Reputation: 0 Joined: 06/08/12 Last Seen: December 25, 2013 Author Share Posted October 2, 2013 yes, the name in guild didn't change if I shut down the server then the name still changed but the character out from guild Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted October 2, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted October 2, 2013 yes, the name in guild didn't change if I shut down the server then the name still changed but the character out from guild Follow my instruction above post. Then tell me it that works. Quote Link to comment Share on other sites More sharing options...
aurelia Posted October 2, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 23 Reputation: 0 Joined: 06/08/12 Last Seen: December 25, 2013 Author Share Posted October 2, 2013 payon,164,232,1 script [Changer] Kenshin 523,{ mes "Hello"; menu "Change Name",one,"Change Birth",two; one: query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+strcharinfo(0)+"'",.@current$; mes "Input name..."; input .@name$; if(getstrlen(.@name$)<4| getstrlen(.@name$)>23){ mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters."; } if(.@name$ == strcharinfo(0)) { mes "You cannot enter same name."; close; } mes "New name: "+.@name$+""; query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; query_sql "UPDATE `guild_member` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; query_sql "UPDATE `guild` SET `master` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; sleep2 1000; mes "Name successfully changed, please relog to see changes."; close; two: query_sql "SELECT `birthdate` FROM `ragnarok`.`login` WHERE `account_id` = '"+getcharid(3)+"'",.@birthdate$; mes "Birth Date: "+.@birthdate$+""; mes "Input Year of Birth. (Hanya memakai 2 digit terakhir untuk mendelete char)"; input .@year; if(.@year==0){ mes "You entered wrong number of month."; close; } mes "Input Month of Birth."; input .@month; if(.@month==0||.@month>12){ mes "You entered wrong number of month."; close; } mes "Input Day of Birth."; input .@day; if(.@day==0||.@day>31){ mes "You entered wrong number of day."; close; } mes "New B-D: "+.@year+"-"+.@month+"-"+.@day+""; query_sql "UPDATE `login` SET `birthdate` = '"+escape_sql(.@year)+"-"+escape_sql(.@month)+"-"+escape_sql(.@day)+"' WHERE `account_id` = '"+getcharid(3)+"'"; sleep2 1000; mes "Tanggal lahir sukses diganti"; mes "Untuk menghapus karakter formatnya : yymmdd"; mes "Misal 1945-08-17"; mes "Maka saat mendelete karakter cukup ketik"; mes "450817"; mes "Terima kasih."; close; } still didn't work Quote Link to comment Share on other sites More sharing options...
Question
aurelia
hello i want to request npc name changer and date of birth changer
the npc who can change our nickname & date of birth
thanks before ^^
Edited by aureliaLink to comment
Share on other sites
7 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.