PDA

View Full Version : Player Tools (faction, name, race, customize)



Wise
13-01-13, 04:09 AM
This script is for TrinityCore (C++)

Hello i've created this simple gossip npc which let's you change your name, faction, race or customize your character for an easily customizeable price. This is my second script.


Tested to work 100%


To change the price go to the top of the script and edit the prices highlighted:



enum Costs { // Customize this part for your liking TokenID = 49927, TokenAmountNameChange = 5, TokenAmountRaceChange = 10, TokenAmountFactionChange = 15, TokenAmountCustomize = 7 };


Customize the sayings at this part:


player->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "Change my name for 5 tokens", GOSSIP_SENDER_MAIN, 1); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "Change my race for 10 tokens", GOSSIP_SENDER_MAIN, 2); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "Change my faction for 15 tokens", GOSSIP_SENDER_MAIN, 3); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "Let me customize my character for 7 tokens", GOSSIP_SENDER_MAIN, 4);


To add it to a npc use this query


UPDATE `creature_template` SET ScriptName='multi_changer' WHERE `entry`=YOURENTRYIDHERE;



With Items Click here for the code (http://pastebin.com/uUgzs4Yq)


With gold Click here for the code (http://pastebin.com/3RYvK4A7)



Credits : Mathix