Lua Help? Can't Write it? Start Here! menu

User Tag List

Results 1 to 7 of 7
  1. #1
    benzkool's Avatar Member
    Reputation
    23
    Join Date
    Nov 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua Help? Can't Write it? Start Here!

    Hey this may sound like more of a guide yet, its still a release.
    Basically this is an empty lua for a Npc (Teleports, Items, and Spells).
    Please note - You can only have 1 lua effecting Npc at a time.

    When you copy and paste whats bellow into notepad the arrows can be deleted there just to show you whats what.

    Code:
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(3544, player, 0) <-----------------------------First menu allways 3544 and the rest 3543
    unit:GossipMenuAddItem(2, "Tele Example", 1, 0)
    unit:GossipMenuAddItem(2, "Spell Example", 2, 0)
    unit:GossipMenuAddItem(2, "Item Example", 3, 0)
    unit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    
    if(intid == 999) then  <------------------------------------------------------------
    unit:GossipCreateMenu(3543, player, 0)                                              |
    unit:GossipMenuAddItem(2, "Tele Example", 1, 0)                              |
    unit:GossipMenuAddItem(2, "Spell Example", 2, 0)                             |
    unit:GossipMenuAddItem(2, "Item Example", 3, 0)                              |
    unit:GossipSendMenu(player)                                                              |----Back button 
    end                                                                                                     |
                                                                                                               |
    if(intid == 1) then                                                                                 |
    unit:GossipCreateMenu(3543, player, 0)                                                |
    unit:GossipMenuAddItem(2, "Tele Example Submenu", 4, 0)                 |
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)   <----------------------------
    unit:GossipSendMenu(player)                                                    
    end                                                                                      
       
    if(intid == 2) then                                                                                 
    unit:GossipCreateMenu(3543, player, 0)                                                
    unit:GossipMenuAddItem(2, "Spell Example Submenu", 5, 0)                 
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)   
    unit:GossipSendMenu(player)                                                    
    end  
    
    if(intid == 3) then                                                                                 
    unit:GossipCreateMenu(3543, player, 0)                                                
    unit:GossipMenuAddItem(2, "Item Example Submenu", 6, 0)                 
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)   
    unit:GossipSendMenu(player)                                                    
    end  
                                                                                                 
    if(intid == 4) then                                                                      
        player:Teleport(1, 4849, -1775, 1163)
    end
    
    if(intid ==5) then                 
    unit:FullCastSpellOnTarget(33081, player)
    end                                       ^ -------------------------Spell ID
    
    if(intid == 6) then
    player:AddItem(33079,1) <-------------------------------Entry ID (Leave the ",1" Alone)
    unit:GossipComplete(player)
    end
    end ---- 2 Ends
    
    RegisterUnitGossipEvent(Here, 1, "On_Gossip")
    RegisterUnitGossipEvent(Here, 2, "Gossip_Submenus")
                                              ^---------------------------------------NPC'S Entry ID (Where Here is)

    Lua Help? Can't Write it? Start Here!
  2. #2
    bsod-staff14's Avatar Member
    Reputation
    35
    Join Date
    Nov 2008
    Posts
    443
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great job +Rep when I can!
    Immortal GamerZ Under Development!

  3. #3
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice this would have been nice when I was trying to learn! haha oh well very nice release! +Rep!

  4. #4
    benzkool's Avatar Member
    Reputation
    23
    Join Date
    Nov 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ty both

  5. #5
    ShaLo's Avatar Member
    Reputation
    38
    Join Date
    Aug 2008
    Posts
    83
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AddOn Studio for World of Warcraft - Home great program for beginners

  6. #6
    benzkool's Avatar Member
    Reputation
    23
    Join Date
    Nov 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ShaLo View Post
    AddOn Studio for World of Warcraft - Home great program for beginners
    I hope you get banned..

  7. #7
    rofldestroyer's Avatar Member
    Reputation
    31
    Join Date
    Sep 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by benzkool View Post
    I hope you get banned..
    yep and great job +Rep this is will help a lot of ppl.... including me.... lol

Similar Threads

  1. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  2. LUA Help (reading from/writing to files)
    By tagala in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-05-2009, 06:48 PM
  3. Can't Write Lua? Here's a Program to do it for You!
    By benzkool in forum WoW EMU General Releases
    Replies: 14
    Last Post: 12-13-2008, 08:36 PM
  4. [HELP] Can only have 1 of each Lua Type Custom
    By Lilltimmy in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-24-2008, 07:43 AM
  5. realy need some major help, can you help me
    By Bludypeople in forum World of Warcraft General
    Replies: 14
    Last Post: 07-15-2006, 10:54 AM
All times are GMT -5. The time now is 08:22 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