[Release] Info NPC -- LUA menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Info NPC -- LUA

    Hi y'all, Here's my second release with LUA stuff.

    As I've done before, I'll post the code, SQL Code and will give some information about this release.



    LUA Code

    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


    ~~~~




    Last edited by Babbaa; 08-16-2008 at 10:02 AM.

    [Release] Info NPC -- LUA
  2. #2
    treeko11's Avatar Member
    Reputation
    11
    Join Date
    Jan 2008
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work +rep!

    EDIT: Lol, given too much rep =(

  3. #3
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man.

  4. #4
    FinnZor's Avatar Member
    Reputation
    50
    Join Date
    May 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looks nice i´ll try it out later +rep x1

    Oh sorry man i couldnt i´ll later
    Last edited by 2dgreengiant; 08-17-2008 at 01:40 PM. Reason: double post, merged

  5. #5
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Finn. : )

  6. #6
    Xcynic's Avatar Contributor
    Reputation
    252
    Join Date
    Jul 2007
    Posts
    359
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work, Will use this.
    + Rep

  7. #7
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Xcyn <3

Similar Threads

  1. [Release] Warp NPC Lua !! ( First Lua Release by Me )
    By Hyldran0 in forum WoW EMU General Releases
    Replies: 17
    Last Post: 01-22-2009, 09:32 AM
  2. [Release]Buffer npc lua
    By Noobcraft in forum WoW EMU General Releases
    Replies: 8
    Last Post: 10-04-2008, 07:20 AM
  3. [Release] Teleporter NPC (LUA++)
    By Vaudville in forum WoW EMU General Releases
    Replies: 9
    Last Post: 09-23-2008, 09:55 AM
  4. [Release]Instant 70 Npc Lua
    By Noobcraft in forum WoW EMU General Releases
    Replies: 27
    Last Post: 09-08-2008, 11:28 PM
  5. [Release/Info] Custom LUA Bosses!
    By Gastricpenguin in forum World of Warcraft Emulator Servers
    Replies: 38
    Last Post: 02-08-2008, 12:14 PM
All times are GMT -5. The time now is 06:34 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search