viewing paste Unknown #1696 | Plain text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
// Name Changer
//============================================================
 
prontera,157,182,3      script  Névváltoztató        954,{
 
 
// ============ NPC's NAME ====================
set .@npcname$,"[ ^002f77Névváltoztató^000000 ]";
 
// ============ DATA SCRIPT ===================
if(countitem (7539) >= 50) {
mes .@npcname$;
mes "Meg szeretnéd változtatni a neved? Ötven ^FF0000Poring Coin^000000 kell hozzá!";
next;
menu "Nosza!",-;
mes .@npcname$;
mes "^FF0000Be sure to leave your guild, party, and remove any friends you may have BEFORE you change your name!^000000";
mes "Please enter the name you wish:";
input @newname$;
set @aid, @newname$;
query_sql "SELECT `account_id` FROM `char` WHERE `name` = '"+escape_sql(@newname$)+"'", @aid;
if(!@aid) goto available;
next;
mes .@npcname$;
mes "The character name ^ff0000"+@newname$+"^000000 is already used.";
close;
end;
 
available:
next;
mes .@npcname$;
mes "Character name ^0000ff"+@newname$+"^000000 is available.";
next;
mes .@npcname$;
mes "Do you still want to continue?";
mes "";
mes "^ff0000- We will kick you first and automatically log you out.^000000";
mes "^ff0000- Then just login again and your character name will be automatically changed.^000000";
menu "No",-,"Yes",okcont;
 
dontcont:
close;
end;
 
okcont:
next;
mes .@npcname$;
mes "Your name ^ff0000"+strcharinfo(0)+"^000000 has changed into ^ff0000"+@newname$+"^000000.";
delitem 7539,50;
close2;
query_sql "UPDATE `char` SET name = '"+@newname$+"' WHERE char_id = " + getcharid(0) + ";";
 
atcommand strcharinfo(0)+ "@kick "+strcharinfo(0)+"";
end;
}
else {
mes .@npcname$;
mes "Ötven coin vagy nincs névváltás.";
close;
end;
}
}
Viewed 554 times, submitted by unknown.