[Lua Guide] Morpher NPC menu

User Tag List

Results 1 to 3 of 3
  1. #1
    DarkFever's Avatar Contributor
    Reputation
    84
    Join Date
    Aug 2007
    Posts
    167
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua Guide] Morpher NPC

    This guide I will be teaching you how to make a morpher NPC. This guide will be using lua for it so get comfortable .
    ---------------------------------------------------

    White = Does not need editing
    Red = What needs editing.
    Yellow = Information

    First ill start with the main parts which is optional to edit although ill mark in red what is optional this part only!!
    [[

    local npcid =
    This NEEDS to be changed!

    function
    NPCMorpher_OnTalk(pUnit, event, player)
    NPCMorpherMenu(pUnit, player)
    end

    ]] Ok the next parts will be labeled and red is ruled!

    function NPCMorpherMenu(pUnit, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(4, "Morph 1", 1, 0)
    pUnit:GossipMenuAddItem(4, "Morph 2", 2, 0)
    pUnit:GossipSendMenu(player)
    end

    Ok 3544 is the menu id this must change if another menu is added.
    ex: 3544, 3543, 3542, 3541.......
    Ok 4 is the Icon Here is a picture of all available icons. IDs are icon number!

    Ok Morph 1, 2 is the menu name. Change to what ever you want!

    1, 2 is the submenu id it must increase on each menu!

    function NPCMorpher_OnSelect(pUnit, event, player, id, intid, code, pMisc)

    Function Name Your choice to edit.

    if(intid == 1) then
    player:SetModel(Display ID)
    end

    if(intid == 2) then
    player:SetModel(Display ID)
    end

    Ok 1, 2 is the submenu id as explained above.
    And Display ID is self explanatory.

    end

    RegisterUnitGossipEvent(npcid, 1, "NPCMorpher_OnTalk")
    RegisterUnitGossipEvent(npcid, 2, "NPCMorpher_OnSelect")


    This should look familar you should know what todo.!

    This is all Put together!


    local npcid = This NEEDS to be changed!

    function
    NPCMorpher_OnTalk(pUnit, event, player)
    NPCMorpherMenu(pUnit, player)
    end


    function NPCMorpherMenu(pUnit, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(4, "Morph 1", 1, 0)
    pUnit:GossipMenuAddItem(4, "Morph 2", 2, 0)
    pUnit:GossipSendMenu(player)
    end

    function NPCMorpher_OnSelect(pUnit, event, player, id, intid, code, pMisc)

    if(intid == 1) then
    player:SetModel(Display ID)
    end

    if(intid == 2) then
    player:SetModel(Display ID)
    end

    end

    RegisterUnitGossipEvent(npcid, 1, "NPCMorpher_OnTalk")
    RegisterUnitGossipEvent(npcid, 2, "NPCMorpher_OnSelect")


    I'm sorry for not using CODE tags during the guide but they dont like me very much :P
    If you are to lazy to do it send me an email at [email protected] with what you want it to have and ill write it for you


    [Lua Guide] Morpher NPC
  2. #2
    makis5's Avatar Member
    Reputation
    2
    Join Date
    Sep 2008
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice thanks a lot rep

  3. #3
    hiperhiv's Avatar Private
    Reputation
    1
    Join Date
    Jul 2009
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice Thanx Alot !!!

Similar Threads

  1. [Lua Guide] Level NPC
    By DarkFever in forum WoW EMU Guides & Tutorials
    Replies: 4
    Last Post: 09-10-2009, 03:30 PM
  2. [Lua Guide] Teleport NPC
    By DarkFever in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 09-04-2009, 11:42 AM
  3. GM Guide! ( .worldport / NPCs / Gobjects )
    By argiris7 in forum World of Warcraft Guides
    Replies: 7
    Last Post: 02-25-2008, 07:31 AM
  4. LUA guide for ppl who want to learn lua not just copy
    By runiker in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 02-20-2008, 01:54 AM
  5. [Guide] Teleporter NPC
    By Aldaus in forum WoW EMU Guides & Tutorials
    Replies: 19
    Last Post: 12-25-2007, 02:10 AM
All times are GMT -5. The time now is 06:08 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