NPC LUA Request menu

Shout-Out

User Tag List

Results 1 to 10 of 10
  1. #1
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    NPC LUA Request

    I need a LUA Script for a NPC with the NPC ID; 17922
    Casting the Summoning Spell; 628

    Or

    The NPC: 17922
    Casts SPELL: 35996 on it's, as a buff on itself, at random moments so the buff is always on the npc.

    What i'm trying to do is have an Orc Warlock have the "Summoning Visual Effect" on itself so it looks like it's actually summoning somthing.

    If anyone can do this thanks,
    i'll +4 rep
    Last edited by Pedregon; 03-15-2010 at 07:55 PM.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



    NPC LUA Request
  2. #2
    Pretzal's Avatar Member
    Reputation
    8
    Join Date
    Aug 2008
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, but on what event do you want the npc to cast the summon?
    On combat, on death, on health %, on a timer, on gossip, on spawn, what?

  3. #3
    shadowslayer133's Avatar Active Member
    Reputation
    61
    Join Date
    May 2008
    Posts
    313
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here you go

    Code:
    function Fighter_OnSpawn(pUnit, Event)
     Fighter = pUnit
    end
    
    function Fighter_On_Gossip(pUnit, event, player)
     pUnit:GossipCreateMenu(117, player, 0)
     pUnit:GossipMenuAddItem(9, "I wish to fight against you!", 318, 0)
     pUnit:GossipMenuAddItem(0, "I was looking for something else...", 434, 0)
     pUnit:GossipSendMenu(player)
    end
    
    
    function Fighter_Gossip_Submenus(pUnit, event, player, id, intid, code)
     if(intid == 318) then
     pUnit:SetNPCFlags(2)
     pUnit:RegisterEvent("Argent_Recruit_Start", 1, 1)
     local name = player:GetName()
     pUnit:SendChatMessage(12, 0, "Well, "..name..". Try to defeat me!")
     player:GossipComplete()
    end
    
    if(intid == 434) then
     player:GossipComplete()
    end
    
    end
    
    
    function Argent_Recruit_Start(pUnit, Event)
     pUnit:RegisterEvent("Fighter_Countdown1", 1000, 1)
     pUnit:RegisterEvent("Fighter_Countdown2", 2000, 1)
     pUnit:RegisterEvent("Fighter_Countdown3", 3000, 1)
     pUnit:RegisterEvent("Fighter_Flags", 4000, 1)
    end
    
    function Fighter_Countdown1(pUnit, Event, player)
     local player = pUnit:GetClosestPlayer()
     player:SendBroadcastMessage("Duel starts in 3...")
    end
    
    function Fighter_Countdown2(pUnit, Event, player)
     local player = pUnit:GetClosestPlayer()
     player:SendBroadcastMessage("Duel starts in 2...")
    end
    
    function Fighter_Countdown3(pUnit, Event, player)
     local player = pUnit:GetClosestPlayer()
     player:SendBroadcastMessage("Duel starts in 1...")
    end
    
    function Fighter_Flags(pUnit, Event)
     pUnit:SetNPCFlags(2)
     pUnit:SetFaction(14)
    end
    
    
    function Fighter_OnCombat(pUnit, Event)
     pUnit:RemoveEvents()
     pUnit:RegisterEvent("Fighter_Spell1", 1000, 1)
     pUnit:RegisterEvent("Fighter_End", 100, 0)
     pUnit:RegisterEvent("Fighter_Check", 100, 0)
    end
    
    function Fighter_Spell1(pUnit, Event)
     pUnit:CastSpell(628)
    end
    
    
    
    function Fighter_OnLeave(pUnit, Event)
     pUnit:RemoveEvents()
     pUnit:SetCombatCapable(0)
     pUnit:SetFaction(35)
     pUnit:SetNPCFlags(1)
     pUnit:SetHealthPct(100)
     pUnit:RemoveAllAuras()
     pUnit:ReturnToSpawnPoint()
    end
    
    
    --[[ If Player has under 20% life ]]--
    
    
    function Fighter_Check(pUnit, Event)
    local player = pUnit:GetClosestPlayer()
    if player:GetHealthPct() < 20 then
     pUnit:RemoveEvents()
     pUnit:SetFaction(35)
     pUnit:SetCombatCapable(1)
     pUnit:SetNPCFlags(1)
     pUnit:RegisterEvent("Fighter_OnWin", 500, 1)
    end
    end
    
    function Fighter_OnWin(pUnit, Event)
     pUnit:CastSpell(8203)
     pUnit:RegisterEvent("Fighter_InvisibleRemoveWin", 500, 1)
    end
    
    function Fighter_InvisibleRemoveWin(pUnit, Event)
     pUnit:RemoveAura(8203)
     pUnit:RegisterEvent("Fighter_TalkWin", 500, 1)
    end
    
    function Fighter_TalkWin(pUnit, Event, player)
     pUnit:SendChatMessage(12, 0, "You lost. Return if you are strong enough.")
     pUnit:Emote(1, 2000)
     pUnit:RegisterEvent("Fighter_Return", 1500, 1)
    end
    
    
    --[[ If Argent Recruit has under 20% life ]]--
    
    
    function Fighter_End(pUnit, Event)
    local player = pUnit:GetClosestPlayer()
    if pUnit:GetHealthPct() < 20 then
        pUnit:RemoveEvents()
        pUnit:SetFaction(35)
        pUnit:SetNPCFlags(2)
        pUnit:SetCombatCapable(1)
        pUnit:RegisterEvent("Fighter_Invisible", 100, 1)
    end
    end
    
    function Fighter_Invisible(pUnit, Event)
     pUnit:CastSpell(8203)
     pUnit:RegisterEvent("Fighter_InvisibleRemove", 500, 1)
    end
    
    function Fighter_InvisibleRemove(pUnit, Event)
     pUnit:RemoveAura(8203)
     pUnit:RegisterEvent("Fighter_Talk", 500, 1)
    end
    
    function Fighter_Talk(pUnit, Event, player)
     pUnit:SendChatMessage(12, 0, "Gnaah! I give up. You win...")
     pUnit:Emote(398, 3000)
     pUnit:RegisterEvent("Fighter_Return", 4000, 1)
    end
    
    function Fighter_Return(pUnit, Event)
     pUnit:SetCombatCapable(0)
     pUnit:SetNPCFlags(1)
     pUnit:WipeTargetList()
     pUnit:RemoveAllAuras()
     pUnit:ReturnToSpawnPoint()
     pUnit:Despawn(3000, 5000)
    end
    
    
    RegisterUnitEvent(17922, 1, "Fighter_OnCombat")
    RegisterUnitEvent(17922, 2, "Fighter_OnLeave")
    RegisterUnitEvent(17922, 18, "Fighter_OnSpawn")
    RegisterUnitGossipEvent(17922, 1, "Fighter_On_Gossip")
    RegisterUnitGossipEvent(17922, 2, "Fighter_Gossip_Submenus")

    Done by piersd
    Gamer tag - Midnight133

  4. #4
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol on spawn I guess? I just want the NPC to cast the summong spell for a long period of time.

    @Showslayer, that's not what I was looking for, but + rep anyways for help :]
    Last edited by Pedregon; 03-15-2010 at 05:18 PM.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  5. #5
    shadowslayer133's Avatar Active Member
    Reputation
    61
    Join Date
    May 2008
    Posts
    313
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    haha sorry I just thought dueling would be appropriate.

    Done by piersd
    Gamer tag - Midnight133

  6. #6
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol :]

    How about this; the NPC: 17922
    Casts SPELL: 35996 on it's, as a buff on itself, at random moments so the buff is always on the npc.
    Last edited by Pedregon; 03-15-2010 at 07:48 PM.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  7. #7
    Meiya Stormsinger's Avatar Contributor

    Reputation
    163
    Join Date
    Mar 2009
    Posts
    196
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    SummonVisual = 35996
    
    function SummonDude_OnSpawn(Unit, event)
        Unit:RegisterEvent("FirstBuff",1000,1)
        Unit:RegisterEvent("Buff_Self",60000,0)
    end
    
    function FirstBuff(Unit, event)
        Unit:CastSpell(SummonVisual)
    end
    
    function Buff_Self(Unit, event)
        Unit:CastSpell(SummonVisual)
    end
    
    RegisterUnitEvent(17922,18,"SummonDude_OnSpawn")
    You'll have to make the npc yourself

  8. #8
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I love you + 4 rep

    I'm making a PvP Repack, i'll add credits for this script. :]

    I've been working on it for about a month.
    Last edited by Pedregon; 03-18-2010 at 09:43 PM.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  9. #9
    Meiya Stormsinger's Avatar Contributor

    Reputation
    163
    Join Date
    Mar 2009
    Posts
    196
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha thanks

  10. #10
    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)
    for further effect, you can put an on combat function and have it spawn the creature you are talking about it summoning. to its just casting while its alive, then when you fight it its minion attacks you as well.

Similar Threads

  1. [Request] NPC Lua event!
    By ilikepiehehe in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 03-12-2013, 12:33 PM
  2. [Release]Instant 70 Npc Lua
    By Noobcraft in forum WoW EMU General Releases
    Replies: 27
    Last Post: 09-08-2008, 11:28 PM
  3. Teleporter NPC LUA
    By Performer in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 08-21-2008, 08:04 AM
  4. [Release] Info NPC -- LUA
    By Babbaa in forum WoW EMU General Releases
    Replies: 6
    Last Post: 08-17-2008, 02:29 PM
  5. Will this teleporter npc lua script work?
    By Bapes in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 05-22-2008, 11:50 AM
All times are GMT -5. The time now is 05:39 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search