Code:
-------------------------------------------------------------------------
-- Please leave this credit intact, this was made by Babbaa on |
-- mmowned.com , Feel free to share and modify it, but please give |
-- credit where credit is due. |
-- If you find any buggs, please Email "[email protected]" |
-------------------------------------------------------------------------
local npcid = 444444
function NPC_main_menu(pUnit, player)
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(3, "Welcome to SERVERNAME", 1, 0)
pUnit:GossipMenuAddItem(3, "Read the sections below.", 2, 0)
pUnit:GossipMenuAddItem(0, "Common Questions.", 3, 0)
pUnit:GossipMenuAddItem(0, "Rules", 4, 0)
pUnit:GossipMenuAddItem(0, "Website - Forum", 5, 0)
pUnit:GossipMenuAddItem(1, "Teleport Locations", 6, 0)
pUnit:GossipMenuAddItem(1, "Morph", 7, 0)
pUnit:GossipMenuAddItem(3, "De-Morph", 8, 0)
pUnit:GossipSendMenu(player)
end
function NPC_on_gossip_talk(pUnit, event, player)
NPC_main_menu(pUnit, player)
end
function NPC_on_gossip_select(pUnit, event, player, id, intid, code, pMisc)
if(intid == 3) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:SendChatMessage(12, 0, "This section contains Common Questions that is asked on this server.")
pUnit:GossipMenuAddItem(4, "Q: Question", 10, 0)
pUnit:GossipMenuAddItem(4, "A: Answer", 11, 0)
pUnit:GossipMenuAddItem(4, "-----------------", 12, 0)
pUnit:GossipMenuAddItem(4, "Q: Question", 13, 0)
pUnit:GossipMenuAddItem(4, "A: Answer", 14, 0)
pUnit:GossipMenuAddItem(4, "-----------------", 15, 0)
pUnit:GossipMenuAddItem(4, "Q: Question", 16, 0)
pUnit:GossipMenuAddItem(4, "A: Answer", 17, 0)
pUnit:GossipMenuAddItem(4, "-----------------", 18, 0)
pUnit:GossipMenuAddItem(4, "Q: Question", 19, 0)
pUnit:GossipMenuAddItem(4, "A: Answer", 20, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 4) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:SendChatMessage(12, 0, "Check the rules section closely.")
pUnit:GossipMenuAddItem(4, "YOUR RULES TEXT HERE", 21, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 5) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(4, "Please visit our Website to help us grow!", 22, 0)
pUnit:GossipMenuAddItem(4, "URL ADRESS", 23, 0)
pUnit:GossipMenuAddItem(4, "Visit our forums to chat with the community!", 24, 0)
pUnit:GossipMenuAddItem(4, "URL ADRESS", 25, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 6) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Name of Location Here", 200, 0)
pUnit:GossipMenuAddItem(1, "Name of Location Here", 201, 0)
pUnit:GossipMenuAddItem(1, "Name of Location Here", 202, 0)
pUnit:GossipMenuAddItem(1, "Name of Location Here", 203, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 7) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Broken", 50, 0)
pUnit:GossipMenuAddItem(1, "Tauren", 51, 0)
pUnit:GossipMenuAddItem(1, "Gnome", 52, 0)
pUnit:GossipMenuAddItem(1, "Undead", 53, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 50) then
player:SetModel(18027)
end
if(intid == 51) then
player:SetModel(2579)
end
if(intid == 52) then
player:SetModel(10215)
end
if(intid == 53) then
player:SetModel(11030)
end
if(intid == 8) then
pUnit:SendChatMessage(12, 0, "If you want to De-Morph, Please relogg.")
end
if(intid == 200) then
player:Teleport(MAPID, X, Y, Z)
end
if(intid == 201) then
player:Teleport(MAPID, X, Y, Z)
end
if(intid == 202) then
player:Teleport(MAPID, X, Y, Z)
end
if(intid == 203) then
player:Teleport(MAPID, X, Y, Z)
end
intid = 0
end
RegisterUnitGossipEvent(444444, 1, "NPC_on_gossip_talk")
RegisterUnitGossipEvent(444444, 2, "NPC_on_gossip_select")
SQL Code
Code:
INSERT INTO `creature_names` (`name`, `subname`, `info_str`, `type`, `family`, `rank`, `male_displayid`, `female_displayid`, `civilian`, `Leader`, `entry`) VALUES ('Malefic', 'Information NPC', '', '7', '0', '1', '2471', '0', '0', NULL, '444444');
INSERT INTO `creature_proto` (`minlevel`, `maxlevel`, `Faction`, `minhealth`, `maxhealth`, `mana`, `Scale`, `npcflags`, `attacktime`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `combat_reach`, `boss`, `equipmodel1`, `equipmodel2`, `equipmodel3`, `respawntime`, `auras`, `invisibility_type`, `death_state`, `entry`) VALUES ('70', '70', '1660', '100000', '100000', '100', '1', '1', '1500', '100000', '1000000', '0', '0', '0', '1', '0', '0', '0', '0', '36000', '0', '0', '0', '444444');
INFORMATION: There are different sections: Morph Section, Teleport Section, Rules Section, Website Section and FAQ Section.
To make this to WORK you NEED to edit what's in "RED".
Basically, I were just messing around, trying to learn more about "Gossip Menus". Since I thought this were quite good work from me, So I decided to release it.
MAPID ETC: To make the Teleport locations to work, You need to edit the "RED". And then add the correct numbers. If you DON'T know how to get the numbers , You'll simply type ".gps" in game and then write in the correct numbers.
That was it, I hope. Enjoy!
DOWNLOAD
Download - 2 in 1
Credits: Babbaa
~~~~