SHOW:
|
|
- or go back to the newest paste.
| 1 | -- ### SETUP ### | |
| 2 | -- change these to whatever you want: | |
| 3 | ||
| 4 | SET @creature_id := "500000"; -- unique entry | |
| 5 | SET @creature_name := "Weapon Master"; -- NPC's name | |
| 6 | SET @creature_subname := "All Skills"; -- subname | |
| 7 | SET @creature_displayid := 16625; -- display ID of NPC | |
| 8 | SET @trainer_id := 200; -- should be unique to avoid conflicts | |
| 9 | SET @trainer_type := 0; -- trainer type | |
| 10 | -- 0 is class trainer, | |
| 11 | -- 1 is mount trainer, | |
| 12 | -- 2 is profession trainer | |
| 13 | -- 3 is pet trainer | |
| 14 | SET @trainer_requirement := 0; -- class required to access trainer | |
| 15 | -- use IDs from https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2129967/ChrClasses | |
| 16 | -- scroll down, they are under "content", the first column is what you use | |
| 17 | SET @trainer_greeting := 'Ready for some weapon training?'; -- NPC's gossip menu greeting | |
| 18 | -- This is the text in the actual spell training menu | |
| 19 | -- which appears at the very top of the window. | |
| 20 | -- here's how it look in-game: https://i.imgur.com/zRZilas.png | |
| 21 | ||
| 22 | -- ### CREATURE ### | |
| 23 | -- the goal of this section is to create an NPC as a base for the trainer | |
| 24 | ||
| 25 | -- delete any existing npc at entry | |
| 26 | DELETE FROM creature_template | |
| 27 | WHERE entry=@creature_id; | |
| 28 | ||
| 29 | -- create NPC | |
| 30 | INSERT INTO `creature_template` | |
| 31 | VALUES ( | |
| 32 | @creature_id, | |
| 33 | 0, 0, 0, 0, 0, | |
| 34 | @creature_displayid, | |
| 35 | 0, 0, 0, | |
| 36 | @creature_name, | |
| 37 | @creature_subname, | |
| 38 | - | NULL, 1017, 30, 30, 0, 1604, 81, 1, 1.14286, 1, 0, 0, 1500, 2000, 1, 1, 1, 768, 2048, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1.05, 1, 1, 1, 1, 0, 0, 1, 0, 0, 66, '', 12340 |
| 38 | + | NULL, 1017, 30, 30, 0, 12, 81, 1, 1.14286, 1, 0, 0, 1500, 2000, 1, 1, 1, 768, 2048, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1.05, 1, 1, 1, 1, 0, 0, 1, 0, 0, 66, '', 12340 |
| 39 | ); | |
| 40 | ||
| 41 | -- ### TRAINER ### | |
| 42 | -- this goal of this section is to create a new trainer ID which will be used to | |
| 43 | -- link the trained spells and the creature together. | |
| 44 | ||
| 45 | -- delete existing trainer id | |
| 46 | DELETE FROM `trainer` | |
| 47 | WHERE id = @trainer_id; | |
| 48 | -- create new trainer entry | |
| 49 | INSERT INTO `trainer` | |
| 50 | VALUES ( | |
| 51 | @trainer_id, | |
| 52 | @trainer_type, | |
| 53 | @trainer_requirement, | |
| 54 | @trainer_greeting, | |
| 55 | 0 | |
| 56 | ); | |
| 57 | ||
| 58 | -- link creature to it's trainer ID | |
| 59 | DELETE FROM `creature_default_trainer` | |
| 60 | WHERE creatureid = @creature_id; | |
| 61 | INSERT INTO `creature_default_trainer` | |
| 62 | VALUES (@creature_id, @trainer_id); | |
| 63 | ||
| 64 | -- ### TRAINER SPELLS ### | |
| 65 | -- the goal of this section is to add spells to the previously created trainer ID | |
| 66 | -- thus essentially linking them to the creature, coming full circle. | |
| 67 | ||
| 68 | -- delete existing trainer spell entries | |
| 69 | DELETE FROM `trainer_spell` | |
| 70 | WHERE TrainerId = @trainer_id; | |
| 71 | ||
| 72 | -- these are the trainer's spell entries | |
| 73 | -- the 2nd column is the SPELL ID of the spell you want the trainer to teach | |
| 74 | -- feel free to copy + paste rows and change this however you like | |
| 75 | -- for example you could add plate armor proficiency, dual wielding, titan's grip, etc | |
| 76 | INSERT INTO `trainer_spell` VALUES | |
| 77 | (@trainer_id, 196, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 78 | (@trainer_id, 197, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 79 | (@trainer_id, 198, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 80 | (@trainer_id, 199, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 81 | (@trainer_id, 200, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 82 | (@trainer_id, 201, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 83 | (@trainer_id, 202, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 84 | (@trainer_id, 227, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 85 | (@trainer_id, 264, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 86 | (@trainer_id, 266, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 87 | (@trainer_id, 1180, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 88 | (@trainer_id, 2567, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 89 | (@trainer_id, 5011, 0, 0, 0, 0, 0, 0, 0, 0), | |
| 90 | (@trainer_id, 15590, 0, 0, 0, 0, 0, 0, 0, 0); |