Likes: 0
Results 1 to 9 of 9
Thread: [C++] Enchantment NPC
-
12-01-10, 10:08 PM #1
[C++] Enchantment NPC
Register to remove this adEnchant Gossip NPC!
This is my second C++ script, I've been learning for about a week now so the script probably isn't as efficient as it could be.
Updates:
~ Added 28 spellpower to gloves.
~ Any Enchant to any item with the code box should now work for everyone.
~ Message to players telling them what item they've enchanted with what enchant.
~ Small new feature with any enchant on any item:
- You can now type 'all' into the codebox instead of the equipment slot you want enchanted, and it will enchant all you currently equipped gear with the enchant you've picked.
This script allows players to talk to an NPC through a gossip menu, and choose an enchant to be applied to the appropriate piece of currently equipped gear.
If your server is blizzlike, you can disable the use of Profession Specific Enchants/Unreleased Leg Armors. And If your handy with C++, you could make it a donation feature.
Weapon Menus populated with enchants according to the players current weapons.
Proper Npc text for each gossip menu.
The day has finally arrived for all the custom servers. This Enchant NPC will apply enchants to custom gear!!!
Screenshots:
Any Enchant on Any Item[Enchant 2H Weapon - Massacre] on a necklace.
Unreleased Leg armor[100 ap, 36 crit][stam/agi equiv]
Profession Specific Enchants[Masters inscription of the axe]
Main Menu with all options allowed
Sub menu for boots
Heres the actual script: C++ pastebin - collaborative debugging tool. (Updated 12/27/09)
also this is the pastebin for the enchantId array. It has all the index numbers of each enchant if your interested in editing it. pastebin - collaborative debugging tool
npc_text SQL;
Code:INSERT INTO `npc_text` VALUES ('4040', '100', 'What Helmet Enchant would you like to have applied to your currently equipped Helm?', 'What Helmet Enchant would you like to have applied to your currently equipped Helm?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4041', '100', 'What Shoulder Enchant would you like to have applied to your currently equipped Shoulders?', 'What Shoulder Enchant would you like to have applied to your currently equipped Shoulders?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4042', '100', 'What Cloak Enchant would you like to have applied to your currently equipped Cloak?', 'What Cloak Enchant would you like to have applied to your currently equipped Cloak?', '0', '0', '0', '1', '0', '18', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4043', '100', 'What Chest Enchant would you like to have applied to your currently equipped Chest?', 'What Chest Enchant would you like to have applied to your currently equipped Chest?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4044', '100', 'What Bracer Enchant would you like to have applied to your currently equipped Bracers?', 'What Bracer Enchant would you like to have applied to your currently equipped Bracers?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4045', '100', 'What Glove Enchant would you like to have applied to your currently equipped Gloves?', 'What Glove Enchant would you like to have applied to your currently equipped Gloves?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4046', '100', 'What Leg Enchant would you like to have applied to your currently equipped Legguards?', 'What Leg Enchant would you like to have applied to your currently equipped Legguards?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4047', '100', 'What Boot Enchant would you like to have applied to your currently equipped Boots?', 'What Boot Enchant would you like to have applied to your currently equipped Boots?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4048', '100', 'What Shield Enchant would you like to have applied to your currently equipped Shield?', 'What Shield Enchant would you like to have applied to your currently equipped Shield?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4049', '100', 'What One Hand Weapon Enchant would you like to have applied to your currently equipped...?', 'What One Hand Weapon Enchant would you like to have applied to your currently equipped...?', '0', '0', '0', '1', '0', '1', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4050', '100', 'What One Handed Weapon Enchant would you like to have applied to your currently equipped Offhand?', 'What One Handed Weapon Enchant would you like to have applied to your currently equipped Offhand?', '0', '0', '0', '1', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4051', '100', 'What One Handed Weapon Enchant would you like to have applied to your currently equipped Main Hand?', 'What One Handed Weapon Enchant would you like to have applied to your currently equipped Main Hand?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4052', '100', 'What Two handed Weapon Enchant would you like to have applied to your currently equipped Two handed weapon?', 'What Two handed Weapon Enchant would you like to have applied to your currently equipped Two handed weapon?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4053', '100', 'What Two handed Enchant would you like to have applied to your currently equipped...?', 'What Two handed Enchant would you like to have applied to your currently equipped...?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4054', '100', 'What Two handed Weapon Enchant would you like to have applied to your currently equipped 2h Offhand?', 'What Two handed Weapon Enchant would you like to have applied to your currently equipped 2h Offhand?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4055', '100', 'What Two handed Weapon Enchant would you like to have applied to your currently equipped 2h Mainhand?', 'What Two handed Weapon Enchant would you like to have applied to your currently equipped 2h Mainhand?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4056', '100', 'Hello $n, I can enchant any item you have equipped on your person. Where would you like to start?', 'Hello $n, I can enchant any item you have equipped on your person. Where would you like to start?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4057', '100', 'What Ring Enchant would you like to have applied to your currently equipped first slot ring?', 'What Ring Enchant would you like to have applied to your currently equipped first slot ring?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4058', '100', 'What Fur Lining would you like to have applied to your currently equipped bracers?', 'What Fur Lining would you like to have applied to your currently equipped bracers?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4059', '100', 'What Cloak Embroidery would you like to have applied to your currently equipped Cloak?', 'What Cloak Embroidery would you like to have applied to your currently equipped Cloak?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4060', '100', 'What Shoulder Inscription would you like to have applied to your currently equipped Shoulders?', 'What Shoulder Inscription would you like to have applied to your currently equipped Shoulders?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4061', '100', 'What Engineering gadget would you like to have applied to your currently equipped item relative to the enchant?', 'What Engineering gadget would you like to have applied to your currently equipped item relative to the enchant?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4062', '100', 'What Leg Armor Enchant would you like to have applied to your currently equipped Legs?', 'What Leg Armor Enchant would you like to have applied to your currently equipped Legs?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4063', '100', 'What Ring Enchant would you like to have applied to your currently equipped 2nd slot ring?', 'What Ring Enchant would you like to have applied to your currently equipped 2nd slot ring?', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4064', '100', 'Hello $n, I\'ve been instructed to tell you specifically, about my more powerful enchants and apply any of those enchants to your gear if you wish to do so.', 'Hello $n, I\'ve been instructed to tell you specifically, about my more powerful enchants and apply any of those enchants to your gear if you wish to do so.', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `npc_text` VALUES ('4065', '100', '$n. Select an enchantment you would like applied to any peice of your gear. Then write in the item you want the enchant applied to. For example, if you click Enchant Weapon - Massacre, and you want it applied to your helm. When the box pops up write in \"Helm\".', '$n. Select an enchantment you would like applied to any peice of your gear. Then write in the item you want the enchant applied to. For example, if you click Enchant Weapon - Massacre, and you want it applied to your helm. When the box pops up write in \"Helm\".', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '1', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0');
Enjoy!, This script was tested on Arcemu r2954.
Here is an SQL for the NPC for arcemu.
Code:INSERT INTO `creature_names` VALUES ('48056', 'Supreme Enchantress Ulia', 'Master Inscriber & Enchanter', '', '0', '0', '0', '0', '0', '0', '0', '7', '0', '3', '0', null, '28176', '0', '0', '0', '1', '1', null, null); INSERT INTO `creature_proto` VALUES ('48056', '80', '80', '35', '1000000', '1000000', '1000000', '2', '1', '1000', '0', '1e+006', '1e+006', '0', '0', '0', '0', '360000', '10000', '0', '0', '0', '0', '0', '0', '1', '1', '', '1', '0', '0', '0', '2.5', '8', '14', '0', '0', '0', '0', '0', '0', '0', '0', '0');
Before anyone asks: I'm working on converting it to TC2, but I've been slacking a bit. Shouldn't be too much longer though.
› See More: [C++] Enchantment NPC
-
12-01-10, 10:14 PM #2
-
13-01-10, 04:14 AM #3
hmm,,this is interesting
I will test it,,
tree
-
06-02-10, 04:46 PM #4
Wow, awesome dude.
-
06-02-10, 06:40 PM #5
Credits: Vision100.
No touching please.
-
07-02-10, 12:41 PM #6
Nice script
-
20-04-10, 05:17 PM #7
tyvm,I will test itI will test .
-
22-04-10, 10:54 PM #8
Nice, I love it. It works for 3.3.3a ArcEmu Servers. z
Don't Forget to for useful releases!. It gives you good luck! Just Like Lucky charms!
-
02-05-10, 03:52 AM #9
Register to remove this adVery Nice