Meister Posted April 3, 2013 Group: Members Topic Count: 280 Topics Per Day: 0.06 Content Count: 841 Reputation: 17 Joined: 04/16/12 Last Seen: March 4, 2024 Share 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 Link to comment Share on other sites More sharing options...
Yonko Posted April 4, 2013 Group: Members Topic Count: 166 Topics Per Day: 0.03 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Share 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 Link to comment Share on other sites More sharing options...
orange Posted April 4, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 175 Reputation: 7 Joined: 09/13/12 Last Seen: May 14, 2021 Share 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 Link to comment Share on other sites More sharing options...
Patskie Posted April 24, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 36 minutes ago Share 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 Link to comment Share on other sites More sharing options...
Meister Posted April 27, 2013 Group: Members Topic Count: 280 Topics Per Day: 0.06 Content Count: 841 Reputation: 17 Joined: 04/16/12 Last Seen: March 4, 2024 Author Share 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 Link to comment Share on other sites More sharing options...
Patskie Posted April 27, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 36 minutes ago Share 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 Link to comment Share on other sites More sharing options...
Meister Posted April 27, 2013 Group: Members Topic Count: 280 Topics Per Day: 0.06 Content Count: 841 Reputation: 17 Joined: 04/16/12 Last Seen: March 4, 2024 Author Share 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 Link to comment Share on other sites More sharing options...
Patskie Posted April 27, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 36 minutes ago Share 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 Link to comment Share on other sites More sharing options...
Question
Meister
Requesting a script that would allow player to change their name as long as they have the item 7623 (Coupon)
Thanks!
Link 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.