Im Trying to make an LUA Professions Trainer For ARCEMU That Teaches you the profession without maxing out the skill.
I Cant Talk To Him.
First Time Coding LUA as Well
CREDITS go to Darkmagishin , LordJedi and GastricPenguin for original codes in c++
and averyone else who has done LUA
(Havent Been able to compileit so i thought id try lua)
Hope Someone Can Get Him To Work
function On_Gossip(unit, event, player)
unit:GossipCreateMenu(50, player, 0)
unit:GossipMenuAddItem(7, "welcome to the professions npc, click on each to learn that profession.", 5);
unit:GossipMenuAddItem(8, "enchanting", 96);
unit:GossipMenuAddItem(8, "tailoring", 95);
unit:GossipMenuAddItem(8, "engineering", 94);
unit:GossipMenuAddItem(8, "jewelcrafting", 93);
unit:GossipMenuAddItem(8, "alchemy", 92);
unit:GossipMenuAddItem(8, "black smith", 91);
unit:GossipMenuAddItem(8, "herbalism", 90);
unit:GossipMenuAddItem(8, "leather working", 89);
unit:GossipMenuAddItem(8, "mining", 8;
unit:GossipMenuAddItem(8, "skinning", 87);
unit:GossipMenuAddItem(8, "cooking", 86);
unit:GossipMenuAddItem(8, "first aid", 85);
unit:GossipMenuAddItem(8, "fishing", 84);
unit:GossipMenuAddItem(5, "set my profession skills to 450", 50);
unit:GossipSendMenu(player)
end
if (intid == 96) then
plrlearnskill(28030,player)
player:GossipComplete()
player:SendChatMessage("enchanting learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 95) then
plrlearnskill(3912,player)
player:GossipComplete()
player:SendChatMessage("tailoring learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 94) then
plrlearnskill(30351,player)
player:GossipComplete()
player:SendChatMessage("Engineering learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 93) then
plrlearnskill(28901,player)
player:GossipComplete()
player:SendChatMessage("Jewelcrafting learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 92) then
plrlearnskill(28597,player)
player:GossipComplete()
player:SendChatMessage("Alchemy learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 91) then
plrlearnskill(29845,player)
player:GossipComplete()
player:SendChatMessage("Blacksmithing learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 90) then
plrlearnskill(28696,player)
player:GossipComplete()
player:SendChatMessage("Herbalism learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 89) then
plrlearnskill(32550,player)
player:GossipComplete()
player:SendChatMessage("Leatherworking learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 8then
plrlearnskill(29355,player)
player:GossipComplete()
player:SendChatMessage("Mining learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 87) then
plrlearnskill(32679,player)
player:GossipComplete()
player:SendChatMessage("Skinning learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 86) then
plrlearnskill(33360,player)
player:GossipComplete()
player:SendChatMessage("Cooking learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 85) then
plrlearnskill(33894,player)
player:GossipComplete()
player:SendChatMessage("First Aid learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 84) then
plrlearnskill(33098,player)
player:GossipComplete()
player:SendChatMessage("Fishing learned")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
if (intid == 50) then
playerAdvanceSkillLine(333, 450);
playerAdvanceSkillLine(197, 450);
playerAdvanceSkillLine(202, 450);
playerAdvanceSkillLine(755, 450);
playerAdvanceSkillLine(171, 450);
playerAdvanceSkillLine(164, 450);
playerAdvanceSkillLine(182, 450);
playerAdvanceSkillLine(165, 450);
playerAdvanceSkillLine(186, 450);
playerAdvanceSkillLine(393, 450);
playerAdvanceSkillLine(185, 450);
playerAdvanceSkillLine(129, 450);
playerAdvanceSkillLine(356, 450);
player:GossipComplete()
player:SendChatMessage("All Skills At Max")
unit:GossipMenuAddItem(0, "[Back]", 5, 0)
end
RegisterUnitEvent(110101, 1, "On_Gossip")
RegisterUnitEvent(110101, 2, "Gossip_Submenus")
Here is the SQL
INSERT INTO creature_names
(`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
VALUES
(111700, 'learn PROFFESIONS off me', 'crazyWOW', '0', 0, 0, 0, 3, 0, 0, 11179, 0, 0, 0, 1, 1, 0, 0);
INSERT INTO creature_proto
(`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `mountdisplayid`, `equipmodel1`, `equipinfo1`, `equipslot1`, `equipmodel2`, `equipinfo2`, `equipslot2`, `equipmodel3`, `equipinfo3`, `equipslot3`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`)
VALUES
(111700, 73, 73, 35, 1000000, 1000000, 1000000, 3, 1, 150, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360000, 6807, 5, 5, 5, 5, 5, 5, 1, 0, '0', 0, 50000000, 0, 0, 2.5, 8, 14, 0, 0, 0, 0, 0, 0);
Ive Tried different NPCFlags but cant get it to work
Thanks Heaps
Link To Darkmagishins original C++ http://www.mmowned.com/forums/emulat...lls-375-a.html