Meister Posted April 3, 2013 Posted April 3, 2013 Requesting a script that would allow player to change their name as long as they have the item 7623 (Coupon) Thanks! Quote
Yonko Posted April 4, 2013 Posted April 4, 2013 why dont you try to have NPC which gives name change with item requirement. refer to link http://www.eathena.ws/board/index.php?showtopic=216929 Quote
orange Posted April 4, 2013 Posted April 4, 2013 good idea if we use coupons, then we can add the coupon to donation list also, please sm 1 make this script and release it Quote
Patskie Posted April 24, 2013 Posted April 24, 2013 Configuration : OnInit: set .NPC$,"[ " +strnpcinfo(1)+ " ]"; set .ID,7179; set .AMOUNT,5; end; Edited : Find : if (countitem(.ID) < .AMOUNT) { mes .NPC$; mes "You do not comply with my requirements."; mes "My requirements : "; mes "- " +getitemname(.ID)+ " " +.AMOUNT+ "x"; close; } Add below : if (gettimetick(2) < #timer) { mes .NPC$; mes "You can only change your name once in a month " +strcharinfo(0); close; } Find : delitem .ID, .AMOUNT; Add below ( 2592000 seconds = 30 days ) : set #timer,gettimetick(2) + 2592000; I've updated the following files you can check it out sample.txt http://patsbook.net/downloads/renamer.txt 2 Quote
Meister Posted April 27, 2013 Author Posted April 27, 2013 Here you go. Try these and reply if there are glitches occured. Just change the configuration : OnInit: set .NPC$,"[ " +strnpcinfo(1)+ " ]"; set .ID,7179; set .AMOUNT,5; end; EDIT : Made some modifications regarding the sql query query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@new$)+"' WHERE `account_id` = '"+getcharid(3)+"'"; Replace with : query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@new$)+"' WHERE `char_id` = '"+getcharid(0)+"'"; sample.txt http://patsbook.net/downloads/renamer.txt Can you add a check? for example. You can only use change name every once in a month.. Quote
Patskie Posted April 27, 2013 Posted April 27, 2013 Here you go. Try these and reply if there are glitches occured. Just change the configuration : OnInit: set .NPC$,"[ " +strnpcinfo(1)+ " ]"; set .ID,7179; set .AMOUNT,5; end; EDIT : Made some modifications regarding the sql query query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@new$)+"' WHERE `account_id` = '"+getcharid(3)+"'"; Replace with : query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@new$)+"' WHERE `char_id` = '"+getcharid(0)+"'"; sample.txt http://patsbook.net/downloads/renamer.txt Can you add a check? for example. You can only use change name every once in a month.. This have been done for you. Check my previous post. I already updated them. 1 Quote
Meister Posted April 27, 2013 Author Posted April 27, 2013 Here you go. Try these and reply if there are glitches occured. Just change the configuration : OnInit: set .NPC$,"[ " +strnpcinfo(1)+ " ]"; set .ID,7179; set .AMOUNT,5; end; EDIT : Made some modifications regarding the sql query query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@new$)+"' WHERE `account_id` = '"+getcharid(3)+"'"; Replace with : query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@new$)+"' WHERE `char_id` = '"+getcharid(0)+"'"; sample.txt http://patsbook.net/downloads/renamer.txt Can you add a check? for example. You can only use change name every once in a month.. This have been done for you. Check my previous post. I already updated them. Can you add check name? For example if the name is already existing he/she can't change its name to it. Also disabled non-alphabetic characters.. Quote
Patskie Posted April 27, 2013 Posted April 27, 2013 Find : mes .NPC$; mes "Enter your desired new name"; next; input .@new$; Add below : if (query_sql("SELECT `name` FROM `char` WHERE `name` = '"+escape_sql(.@new$)+"'")) { mes .NPC$; mes "This name already exists"; close; } 3 Quote
Question
Meister
Requesting a script that would allow player to change their name as long as they have the item 7623 (Coupon)
Thanks!
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.