Jump to content
  • 0

rename npc


Rage Guy

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

i want a working rename npc

only with 4 mithril coins [ 674 ]

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

prontera,150,150,0    script    Sample    100,{
    mes .NPC$;
    mes "Hello there, " + strcharinfo(0)+ ". I can change your name! Would you like it?";
    mes "The change name service will cost " +.AMOUNT+ "x " +getitemname(.ID)+ ".";
    next;
    if (select("Yes:No") - 1) close;
    mes .NPC$;
    mes "Let me first check if you comply with my requirements.";
    next;
    if (countitem(.ID) < .AMOUNT) {
        mes .NPC$;
        mes "You do not comply with my requirements.";
        mes "My requirements : ";
        mes "- " +getitemname(.ID)+ " " +.AMOUNT+ "x";
        close;
    }
    mes .NPC$;
    mes "This is interesting! You have my requirements. Let's start the transaction.";
    next;
    mes .NPC$;
    mes "Enter your desired new name";
    next;
    input .@new$;
    mes .NPC$;
    mes "So you want to do the following : ";
    mes "Current Name : " +strcharinfo(0);
    mes "New Name : " +.@new$;
    next;
    if (select("Yes:No") - 1) close;
    mes .NPC$;
    mes "Updating your name....";
    query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@new$)+"' WHERE `char_id` = '"+getcharid(0)+"'";
    next;
    mes .NPC$;
    delitem .ID, .AMOUNT;
    mes "This has been done for you. You must relog to see the effects. You want me to relog you?";
    next;
    if (select("Yes:No") - 1) {
        mes .NPC$;
        mes "Okay then bye!";
        close;
    }
    atcommand "@kick " +strcharinfo(0);
    end;

    OnInit:
        set .NPC$,"[ " +strnpcinfo(1)+ " ]";
        set .ID,674;
        set .AMOUNT,4;
        end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

he is not working

after wrting his new name

nothing happens the char only stay on his place cant move ==

Link to comment
Share on other sites

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.

×
×
  • Create New...