[Release] Healing / Buffing NPC (LUA++) menu

User Tag List

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

    [Release] Healing / Buffing NPC (LUA++)

    Hey everyone. Just thought I'd give a little script for all you server admins out there who don't feel like using a quest to have an NPC Heal players.

    This NPC requires LUA++ to be installed and enabled on your server.

    The NPC has combat checks for each of the functions, you can remove them if you want it to buff your players in combat and/or heal them.

    (You can get it over here)

    Code:
    local npcid = 600011
    
    function HealNPC_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0, "Heal My Wounds!", 1, 0)
    pUnit:GossipMenuAddItem(0, "A little bit of buffage", 2, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function HealNPC_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if (intid == 1) then
    if (player:IsInCombat() == true) then
    player:SendAreaTriggerMessage("You are in combat!")
    pUnit:SendChatMessage(12, 0, "I cannot heal you while you are in combat. That's cheating!")
    else
    player:SetHealthPct(100)
    end
    end
    if (intid == 2) then
    if (player:IsInCombat() == true) then
    player:SendAreaTriggerMessage("You are in combat!")
    pUnit:SendChatMessage(12, 0, "I can't buff you in combat.")
    else
    pUnit:GossipCreateMenu(99, player, 0)
    pUnit:GossipMenuAddItem(3, "Agility", 3, 0)
    pUnit:GossipMenuAddItem(3, "Intellect", 4, 0)
    pUnit:GossipMenuAddItem(3, "Protection", 5, 0)
    pUnit:GossipMenuAddItem(3, "Spirit", 6, 0)
    pUnit:GossipMenuAddItem(3, "Stamina", 7, 0)
    pUnit:GossipMenuAddItem(3, "Strength", 8, 0)
    pUnit:GossipSendMenu(player)
    end
    end
    if (intid == 3) then
    pUnit:FullCastSpellOnTarget(33077, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 4) then
    pUnit:FullCastSpellOnTarget(33078, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 5) then
    pUnit:FullCastSpellOnTarget(33079, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 6) then
    pUnit:FullCastSpellOnTarget(33080, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 7) then
    pUnit:FullCastSpellOnTarget(33081, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 8) then
    pUnit:FullCastSpellOnTarget(33082, player)
    pUnit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(npcid, 1, "HealNPC_OnGossipTalk")
    RegisterUnitGossipEvent(npcid, 2, "HealNPC_OnGossipSelect")
    Remember to change the NPCID to the NPC you want to use, and set its flags to 3!! Otherwise this won't work. :P
    Last edited by Vaudville; 09-21-2008 at 07:50 AM.

    [Release] Healing / Buffing NPC (LUA++)

Similar Threads

  1. [Release] Code Box Npc (Lua)
    By stoneharry in forum WoW EMU General Releases
    Replies: 29
    Last Post: 06-10-2009, 04:59 PM
  2. [Release] Fun Teleporter npc [Lua++]
    By stoneharry in forum WoW EMU General Releases
    Replies: 24
    Last Post: 02-23-2009, 06:48 PM
  3. [Release]Buffer npc lua
    By Noobcraft in forum WoW EMU General Releases
    Replies: 8
    Last Post: 10-04-2008, 07:20 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 NPC -- LUA
    By Babbaa in forum WoW EMU General Releases
    Replies: 6
    Last Post: 08-17-2008, 02:29 PM
All times are GMT -5. The time now is 11:13 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