[Release] Buff NPC (my first LUA script) menu

User Tag List

Results 1 to 4 of 4
  1. #1
    TheNacho's Avatar Member
    Reputation
    12
    Join Date
    Apr 2008
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Buff NPC (my first LUA script)

    I felt like learning how to use LUA, so I am, and here is some of my first work. Just a regular buff NPC, really.

    Code:
    --Buff NPC scripted by TheNacho for MMOwned
    
    function buff_NPC(unit, event, player)
    unit:GossipCreateMenu(100, player, 0)
    unit:GossipMenuAddItem(0, "Armor + 10%", 1, 0)
    unit:GossipMenuAddItem(0, "Damage + 1 - 10%", 2, 0)
    unit:GossipMenuAddItem(0, "Resistances + 25", 3, 0)
    unit:GossipMenuAddItem(0, "Agility + 10%", 4, 0)
    unit:GossipMenuAddItem(0, "Intelligence + 10%", 5, 0)
    unit:GossipMenuAddItem(0, "Spirit + 10%", 6, 0)
    unit:GossipMenuAddItem(0, "Strength + 10%", 7, 0)
    unit:GossipMenuAddItem(0, "Stamina + 10%", 8, 0)
    unit:GossipSendMenu(player)
    end
    
    function buff_NPC_back(unit, event, player, id, intid, code)
    if(intid == 75) then
    unit:GossipCreateMenu(78, player, 0)
    unit:GossipMenuAddItem(0, "Armor + 10%", 1, 0)
    unit:GossipMenuAddItem(0, "Damage + 1 - 10%", 2, 0)
    unit:GossipMenuAddItem(0, "Resistances + 25", 3, 0)
    unit:GossipMenuAddItem(0, "Agility + 10%", 4, 0)
    unit:GossipMenuAddItem(0, "Intelligence + 10%", 5, 0)
    unit:GossipMenuAddItem(0, "Spirit + 10%", 6, 0)
    unit:GossipMenuAddItem(0, "Strength + 10%", 7, 0)
    unit:GossipMenuAddItem(0, "Stamina + 10%", 8, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 1) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23767, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23768, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 3) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23769, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 4) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23736, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 5) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23766, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 6) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23738, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 7) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23735, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 8) then
    unit:GossipCreateMenu(61, player, 0)
    unit:FullCastSpellOnTarget(23737, player)
    unit:GossipMenuAddItem(0, "[Back]", 75, 0)
    unit:GossipSendMenu(player)
    end
    end
    
    
    RegisterUnitGossipEvent(78006, 1, "buff_NPC")
    RegisterUnitGossipEvent(78006, 2, "buff_NPC_back")

    [Release] Buff NPC (my first LUA script)
  2. #2
    FireWolfz's Avatar Banned
    Reputation
    96
    Join Date
    Jan 2009
    Posts
    114
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice one +Rep

  3. #3
    TheNacho's Avatar Member
    Reputation
    12
    Join Date
    Apr 2008
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I think I'm gonna add more buffs to it.

  4. #4
    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)
    Nice bro. This is definitly one good one I will add some to mind as well if you would like to use the one I edit just ask.
    Immortal GamerZ Under Development!

Similar Threads

  1. [Lua Script] My first lua script, one phase won't work?
    By Rainyday in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 01-28-2011, 08:32 AM
  2. [Opion] on my first lua script
    By jordddm in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 03-22-2009, 01:55 PM
  3. [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
  4. [Release][Updaded Daily] Over 400 LUA Scripts
    By BrantX in forum WoW EMU General Releases
    Replies: 11
    Last Post: 08-11-2008, 06:44 PM
  5. [Release Lua] One of My First Lua Scripts
    By Juicyz in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 03-28-2008, 02:03 AM
All times are GMT -5. The time now is 09:39 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