How to make an NPC do something on Right Click! menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Dibes's Avatar Active Member
    Reputation
    18
    Join Date
    May 2008
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make an NPC do something on Right Click!

    NPC ON USE GUIDE!!!

    I was looking around forever and couldnt find it so i just decided to figure it out so im going to share how to make an NPC trigger an event on click. This guide is a little more advanced than beginner Lua so it may be confusing to some so feel free to msn me at [email protected]

    This actually is a VERY simple script but can get complicated dfepending on the uses

    K lets get started!!!!

    To start you want to make your NPC a gossip NPC, i know weird but you want to

    You want to start with a gossip function such as
    function bike_use(pUnit, event, player)
    now you put your commands under it

    function npc_use(pUnit, event, player)
    pUnit:SendChatMessage(12, 0, "LOLZ")
    end
    now that you have that you need to register it and this is what makes it on right click or on use

    function npc_use(pUnit, event, player)
    pUnit:SendChatMessage(12, 0, "LOLZ")
    end

    RegisterUnitGossipEvent(NPC ID, 7, "npc_use")
    -- 7 is on gossip talk
    The registering says the NPC will start the event on gossip talk so once you right click it i would change its flags to 2 and it will seem very realistic!!

    that is it and please feel free to comment and please if this isnt corect please tell me and i will correct it thanks

    BYE!!!!
    Last edited by Dibes; 07-11-2009 at 01:45 PM.

    How to make an NPC do something on Right Click!
  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)
    heh nice

  3. #3
    P1raten's Avatar Banned
    Reputation
    500
    Join Date
    Mar 2008
    Posts
    1,323
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Under-rated! +rep x2!

  4. #4
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    People should get awards for common sense
    </sarcasm>

  5. #5
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So what would it look like to make it switch factions on click? o.o would be epic to use.

Similar Threads

  1. How to make custom npc's In the easy way!
    By Synthio in forum WoW EMU Guides & Tutorials
    Replies: 15
    Last Post: 05-23-2008, 08:36 AM
  2. Make a npc drop something.
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 05-05-2008, 01:24 PM
  3. Make a npc drop something.
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-05-2008, 01:17 PM
  4. [Question] how to make custom NPCS?
    By sonnyd666 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 03-30-2008, 10:21 AM
  5. {PICS}How to make a NPC Have Armor or a Weapon
    By Dragonscale in forum WoW EMU Guides & Tutorials
    Replies: 20
    Last Post: 12-29-2007, 05:34 AM
All times are GMT -5. The time now is 01:38 PM. 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