Jump to content
  • 0

Ticket of Identification (Name Change Service)


Question

7 answers to this question

Recommended Posts

Posted

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

  • Upvote 2
Posted

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)+"'";

attachicon.gifsample.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..

Posted

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)+"'";

attachicon.gifsample.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. /no1

  • Upvote 1
Posted

 

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)+"'";

attachicon.gifsample.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. /no1

 

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..

Posted

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;
    }
  • Upvote 3

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...