Advertisement
Cast-Bound

Profession Trainer

Nov 3rd, 2011
871
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.43 KB | None | 0 0
  1. local npcid = 55555 -- "55555" is your Entry ID, you can change it at any time!
  2.  
  3. function Vendor_OnGossip(pUnit,event,player)
  4.     pUnit:GossipCreateMenu(100, player, 0)
  5.     pUnit:GossipMenuAddItem(3,"Professions", 100, 0)
  6.     pUnit:GossipMenuAddItem(2,"All Done",999,0)
  7.     pUnit:GossipSendMenu(player)
  8. end
  9.  
  10. function Vendor_OnSelect(pUnit,event,player,id,intid,code)
  11.  
  12.     if(intid == 100) then
  13.         pUnit:GossipCreateMenu(50, player, 0)
  14.         pUnit:GossipMenuAddItem(0, "Alchemy", 400, 0)
  15.         pUnit:GossipMenuAddItem(0, "Blacksmithing", 401, 0)
  16.         pUnit:GossipMenuAddItem(0, "Enchanting", 402, 0)
  17.         pUnit:GossipMenuAddItem(0, "Engineering", 403, 0)
  18.         pUnit:GossipMenuAddItem(0, "Herbalism", 404, 0)
  19.         pUnit:GossipMenuAddItem(0, "Inscription", 405, 0)
  20.         pUnit:GossipMenuAddItem(0, "Jewelcrafting", 406, 0)
  21.         pUnit:GossipMenuAddItem(0, "Leatherworking", 407, 0)
  22.         pUnit:GossipMenuAddItem(0, "Mining", 408, 0)
  23.         pUnit:GossipMenuAddItem(0, "Skinning", 409, 0)
  24.         pUnit:GossipMenuAddItem(0, "Cooking", 410, 0)
  25.         pUnit:GossipMenuAddItem(0, "First Aid", 411, 0)
  26.         pUnit:GossipMenuAddItem(0, "Fishing", 412, 0)
  27.         pUnit:GossipMenuAddItem(0, "Tailoring", 413, 0)
  28.         pUnit:GossipMenuAddItem(5, "Set my profession skills to 450", 450,0)
  29.         pUnit:GossipMenuAddItem(2,"All Done",999,0)
  30.         pUnit:GossipSendMenu(player)
  31.     end
  32.  
  33.     --Alchemy
  34.     if(intid == 400) then
  35.         pUnit:GossipCreateMenu(3543, player, 0)
  36.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Alchemy", 415, 0)
  37.         pUnit:GossipMenuAddItem(3, "Grand Master Alchemy", 416, 0)
  38.         pUnit:GossipSendMenu(player)
  39.     end
  40.     --BlackSmithing
  41.     if(intid == 401) then
  42.         pUnit:GossipCreateMenu(3543, player, 0)
  43.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Blacksmithing", 417, 0)
  44.         pUnit:GossipMenuAddItem(3, "Grand Master Blacksmithing", 418, 0)
  45.         pUnit:GossipSendMenu(player)
  46.     end
  47.     --Enchanting
  48.     if(intid == 402) then
  49.         pUnit:GossipCreateMenu(3543, player, 0)
  50.         pUnit:GossipMenuAddItem(3, "UnlearnGrand Master Enchanting", 419, 0)
  51.         pUnit:GossipMenuAddItem(3, "Grand Master Enchanting", 420, 0)
  52.         pUnit:GossipSendMenu(player)
  53.     end
  54.     --Engineering
  55.     if(intid == 403) then
  56.         pUnit:GossipCreateMenu(3543, player, 0)
  57.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Engineering", 421, 0)
  58.         pUnit:GossipMenuAddItem(3, "Grand Master Engineering", 422, 0)
  59.         pUnit:GossipSendMenu(player)
  60.     end
  61.     --Herbalism
  62.     if(intid == 404) then
  63.         pUnit:GossipCreateMenu(3543, player, 0)
  64.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Herbalism", 423, 0)
  65.         pUnit:GossipMenuAddItem(3, "Grand Master Herbalism", 424, 0)
  66.         pUnit:GossipSendMenu(player)
  67.     end
  68.     --Inscription
  69.     if(intid == 405) then
  70.         pUnit:GossipCreateMenu(3543, player, 0)
  71.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Inscription", 425, 0)
  72.         pUnit:GossipMenuAddItem(3, "Grand Master Inscription", 426, 0)
  73.         pUnit:GossipSendMenu(player)
  74.     end
  75.     --Jewelcrafting
  76.     if(intid == 406) then
  77.         pUnit:GossipCreateMenu(3543, player, 0)
  78.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Jewelcrafting", 427, 0)
  79.         pUnit:GossipMenuAddItem(3, "Grand Master Jewelcrafting", 428, 0)
  80.         pUnit:GossipSendMenu(player)
  81.     end
  82.     --Leatherworking
  83.     if(intid == 407) then
  84.         pUnit:GossipCreateMenu(3543, player, 0)
  85.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Leatherworking", 429, 0)
  86.         pUnit:GossipMenuAddItem(3, "Grand Master Leatherworking", 430, 0)
  87.         pUnit:GossipSendMenu(player)
  88.     end
  89.     --Mining
  90.     if(intid == 408) then
  91.         pUnit:GossipCreateMenu(3543, player, 0)
  92.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Mining", 431, 0)
  93.         pUnit:GossipMenuAddItem(3, "Grand Master Mining", 432, 0)
  94.         pUnit:GossipSendMenu(player)
  95.     end
  96.     --Skinning
  97.     if(intid == 409) then
  98.         pUnit:GossipCreateMenu(3543, player, 0)
  99.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Skinning", 433, 0)
  100.         pUnit:GossipMenuAddItem(3, "Grand Master Skinning", 434, 0)
  101.         pUnit:GossipSendMenu(player)
  102.     end
  103.     --Cooking
  104.     if(intid == 410) then
  105.         pUnit:GossipCreateMenu(3543, player, 0)
  106.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Cooking", 435, 0)
  107.         pUnit:GossipMenuAddItem(3, "Grand Master Cooking", 436, 0)
  108.         pUnit:GossipSendMenu(player)
  109.     end
  110.     --First Aid
  111.     if(intid == 411) then
  112.         pUnit:GossipCreateMenu(3543, player, 0)
  113.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master First Aid", 437, 0)
  114.         pUnit:GossipMenuAddItem(3, "Grand Master First Aid", 438, 0)
  115.         pUnit:GossipSendMenu(player)
  116.     end
  117.     --Fishing
  118.     if(intid == 412) then
  119.         pUnit:GossipCreateMenu(3543, player, 0)
  120.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Fishing", 439, 0)
  121.         pUnit:GossipMenuAddItem(3, "Grand Master Fishing", 440, 0)
  122.         pUnit:GossipSendMenu(player)
  123.     end
  124.     --Tailor
  125.     if(intid == 413) then
  126.         pUnit:GossipCreateMenu(3543, player, 0)
  127.         pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Tailor", 441, 0)
  128.         pUnit:GossipMenuAddItem(3, "Grand Master Tailor", 442, 0)
  129.         pUnit:GossipSendMenu(player)
  130.     end
  131.     --This is the unlearn/learn procces
  132.  
  133.     if(intid == 415) then
  134.         pUnit:GossipCreateMenu(3544, player, 0)
  135.         player:UnlearnSpell(51303)
  136.         player:GossipComplete()
  137.     end
  138.  
  139.     if(intid == 416) then
  140.         pUnit:GossipCreateMenu(3544, player, 0)
  141.         pUnit:FullCastSpellOnTarget(51303, player)
  142.         player:GossipComplete()
  143.     end
  144.    
  145.     if(intid == 417) then
  146.         pUnit:GossipCreateMenu(3544, player, 0)
  147.         player:UnlearnSpell(51298)
  148.         player:GossipComplete()
  149.     end
  150.  
  151.     if(intid == 418) then
  152.         pUnit:GossipCreateMenu(3544, player, 0)
  153.         pUnit:FullCastSpellOnTarget(51298, player)
  154.         player:GossipComplete()
  155.     end
  156.  
  157.     if(intid == 419) then
  158.         pUnit:GossipCreateMenu(3544, player, 0)
  159.         player:UnlearnSpell(51312)
  160.         player:GossipComplete()
  161.     end
  162.  
  163.     if(intid == 420) then
  164.         pUnit:GossipCreateMenu(3544, player, 0)
  165.         pUnit:FullCastSpellOnTarget(51312, player)
  166.         player:GossipComplete()
  167.     end
  168.  
  169.     if(intid == 421) then
  170.         pUnit:GossipCreateMenu(3544, player, 0)
  171.         player:UnlearnSpell(51305)
  172.         player:GossipComplete()
  173.     end
  174.  
  175.     if(intid == 422) then
  176.         pUnit:GossipCreateMenu(3544, player, 0)
  177.         pUnit:FullCastSpellOnTarget(51305, player)
  178.         player:GossipComplete()
  179.     end
  180.  
  181.     if(intid == 423) then
  182.         pUnit:GossipCreateMenu(3544, player, 0)
  183.         player:UnlearnSpell(50301)
  184.         player:GossipComplete()
  185.     end
  186.  
  187.     if(intid == 424) then
  188.         pUnit:GossipCreateMenu(3544, player, 0)
  189.         pUnit:FullCastSpellOnTarget(50301, player)
  190.         player:GossipComplete()
  191.     end
  192.  
  193.     if(intid == 425) then
  194.         pUnit:GossipCreateMenu(3544, player, 0)
  195.         player:UnlearnSpell(45380)
  196.         player:GossipComplete()
  197.     end
  198.  
  199.     if(intid == 426) then
  200.         pUnit:GossipCreateMenu(3544, player, 0)
  201.         pUnit:FullCastSpellOnTarget(45380, player)
  202.         player:GossipComplete()
  203.     end
  204.  
  205.     if(intid == 427) then
  206.         pUnit:GossipCreateMenu(3544, player, 0)
  207.         player:UnlearnSpell(51310)
  208.         player:GossipComplete()
  209.     end
  210.  
  211.     if(intid == 428) then
  212.         pUnit:GossipCreateMenu(3544, player, 0)
  213.         pUnit:FullCastSpellOnTarget(51310, player)
  214.         player:GossipComplete()
  215.     end
  216.  
  217.     if(intid == 429) then
  218.         pUnit:GossipCreateMenu(3544, player, 0)
  219.         player:UnlearnSpell(51301)
  220.         player:GossipComplete()
  221.     end
  222.  
  223.     if(intid == 430) then
  224.         pUnit:GossipCreateMenu(3544, player, 0)
  225.         pUnit:FullCastSpellOnTarget(51301, player)
  226.         player:GossipComplete()
  227.     end
  228.  
  229.     if(intid == 431) then
  230.         pUnit:GossipCreateMenu(3544, player, 0)
  231.         player:UnlearnSpell(50309)
  232.         player:GossipComplete()
  233.     end
  234.  
  235.     if(intid == 432) then
  236.         pUnit:GossipCreateMenu(3544, player, 0)
  237.         pUnit:FullCastSpellOnTarget(50309, player)
  238.         player:GossipComplete()
  239.     end
  240.  
  241.     if(intid == 433) then
  242.         pUnit:GossipCreateMenu(3544, player, 0)
  243.         player:UnlearnSpell(50307)
  244.         player:GossipComplete()
  245.     end
  246.  
  247.     if(intid == 434) then
  248.         pUnit:GossipCreateMenu(3544, player, 0)
  249.         pUnit:FullCastSpellOnTarget(50307, player)
  250.         player:GossipComplete()
  251.     end
  252.  
  253.     if(intid == 435) then
  254.         pUnit:GossipCreateMenu(3544, player, 0)
  255.         player:UnlearnSpell(51295)
  256.         player:GossipComplete()
  257.     end
  258.  
  259.     if(intid == 436) then
  260.         pUnit:GossipCreateMenu(3544, player, 0)
  261.         pUnit:FullCastSpellOnTarget(51295, player)
  262.         player:GossipComplete()
  263.     end
  264.  
  265.     if(intid == 437) then
  266.         pUnit:GossipCreateMenu(3544, player, 0)
  267.         player:UnlearnSpell(50299)
  268.         player:GossipComplete()
  269.     end
  270.  
  271.     if(intid == 438) then
  272.         pUnit:GossipCreateMenu(3544, player, 0)
  273.         pUnit:FullCastSpellOnTarget(50299, player)
  274.         player:GossipComplete()
  275.     end
  276.  
  277.     if(intid == 439) then
  278.         pUnit:GossipCreateMenu(3544, player, 0)
  279.         player:UnlearnSpell(51293)
  280.         player:GossipComplete()
  281.     end
  282.  
  283.     if(intid == 440) then
  284.         pUnit:GossipCreateMenu(3544, player, 0)
  285.         pUnit:FullCastSpellOnTarget(51293, player)
  286.         player:GossipComplete()
  287.     end
  288.  
  289.     if(intid == 441) then
  290.         pUnit:GossipCreateMenu(3544, player, 0)
  291.         player:UnlearnSpell(51308)
  292.         player:GossipComplete()
  293.     end
  294.  
  295.     if(intid == 442) then
  296.         pUnit:GossipCreateMenu(3544, player, 0)
  297.         pUnit:FullCastSpellOnTarget(51308, player)
  298.         player:GossipComplete()
  299.     end
  300.  
  301.     if (intid == 450) then
  302.         pUnit:GossipCreateMenu(3545, player, 0)
  303.         player:AdvanceSkill(333, 450)
  304.         player:AdvanceSkill(197, 450)
  305.         player:AdvanceSkill(202, 450)
  306.         player:AdvanceSkill(755, 450)
  307.         player:AdvanceSkill(171, 450)
  308.         player:AdvanceSkill(164, 450)
  309.         player:AdvanceSkill(182, 450)
  310.         player:AdvanceSkill(165, 450)
  311.         player:AdvanceSkill(186, 450)
  312.         player:AdvanceSkill(393, 450)
  313.         player:AdvanceSkill(185, 450)
  314.         player:AdvanceSkill(129, 450)
  315.         player:AdvanceSkill(356, 450)
  316.         player:AdvanceSkill(773, 450)
  317.         pUnit:SendChatMessage(12,0,"Your Skills Are Set To 450")
  318.         player:GossipComplete()
  319.     end
  320.  
  321.     if (intid == 999) then
  322.         player:GossipComplete()
  323.     end
  324. end
  325.  
  326. RegisterUnitGossipEvent(npcid, 1, "Vendor_OnGossip")
  327. RegisterUnitGossipEvent(npcid, 2, "Vendor_OnSelect")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement