Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 6 of 6

Thread: Buff Npc

  1. #1
    Contributor
    Boxxy's Avatar
    Join Date
    Aug 2008
    Location
    Florida
    Posts
    351
    Post Thanks / Like
    Rep Power
    17
    Reputation
    136

    Buff Npc


    Register to remove this ad
    Made for my friends who wanted this to be in my next repack.

    You do not have to give credits,you may edit it anyway you like.

    The code

    Code:
     
    local npcid = 5000003
    function Buff_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(5, "Buff's.", 1, 0)
    pUnit:GossipMenuAddItem(9, "Remove Rez Sickness", 2, 0)
    pUnit:GossipMenuAddItem(4, "Heal", 90, 0)
    pUnit:GossipSendMenu(player)
    end
    function Buff_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if (intid == 1) then
    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
    if (intid == 2) then
    player:UnlearnSpell(15007)
    pUnit:GossipComplete(player)
    end
    if (intid == 3) then
    pUnit:CastSpellOnTarget(33077, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 4) then
    pUnit:CastSpellOnTarget(33078, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 5) then
    pUnit:CastSpellOnTarget(33079, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 6) then
    pUnit:CastSpellOnTarget(33080, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 7) then
    pUnit:CastSpellOnTarget(33081, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 8) then
    pUnit:CastSpellOnTarget(33082, player)
    pUnit:GossipComplete(player)
    end
    
    if (intid == 90) then  
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(4, "Health", 91, 0)
    pUnit:GossipSendMenu(player)
    end
    if (intid == 91) then
    pUnit:CastSpellOnTarget(25213,player)
    pUnit:GossipComplete()
    end
    end
    RegisterUnitGossipEvent(npcid, 1, "Buff_OnGossipTalk")
    RegisterUnitGossipEvent(npcid, 2, "Buff_OnGossipSelect")
    The Npc


    Code:
     
    INSERT INTO `creature_names` VALUES ('5000003', 'Buffer', 'Your servers name', '', '0', '7', '0', '0', '0', null, '16202', '16202', '0', '0', '1', '1', '1', null);
     
    INSERT INTO `creature_proto` VALUES ('5000003', '70', '70', '35', '10000000', '10000000', '10000000', '1', '1', '1800', '0', '1500', '2500', '1800', '500', '650', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '36000', '0', '0', '0', '0', '0', '0', '0', '1', '0', 'MEMO', '0', '0', '0', '0', '2.5', '8', '14', '0', '0', '0', '0', '0', '0');
    Pictures





    › See More: Buff Npc
    Last edited by Boxxy; 17-08-08 at 03:40 AM.
    your mother

  2. #2
    Contributor
    Boxxy's Avatar
    Join Date
    Aug 2008
    Location
    Florida
    Posts
    351
    Post Thanks / Like
    Rep Power
    17
    Reputation
    136
    Update

    Code:
     
    local npcid = 5000003
    function Buff_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(5, "Buff's.", 1, 0)
    pUnit:GossipMenuAddItem(9, "Remove Rez Sickness", 2, 0)
    pUnit:GossipMenuAddItem(4, "Heal", 90, 0)
    pUnit:GossipSendMenu(player)
    end
    function Buff_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if (intid == 1) then
    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
    if (intid == 2) then
    player:UnlearnSpell(15007)
    pUnit:GossipComplete(player)
    end
    if (intid == 3) then
    pUnit:CastSpellOnTarget(33077, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 4) then
    pUnit:CastSpellOnTarget(33078, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 5) then
    pUnit:CastSpellOnTarget(33079, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 6) then
    pUnit:CastSpellOnTarget(33080, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 7) then
    pUnit:CastSpellOnTarget(33081, player)
    pUnit:GossipComplete(player)
    end
    if (intid == 8) then
    pUnit:CastSpellOnTarget(33082, player)
    pUnit:GossipComplete(player)
    end
    
    if (intid == 90) then  
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(4, "Health", 91, 0)
    pUnit:GossipSendMenu(player)
    end
    if (intid == 91) then
    pUnit:CastSpellOnTarget(25213,player)
    pUnit:GossipComplete()
    end
    end
    RegisterUnitGossipEvent(npcid, 1, "Buff_OnGossipTalk")
    RegisterUnitGossipEvent(npcid, 2, "Buff_OnGossipSelect")
    your mother

  3. #3
    Banned

    Join Date
    Dec 2008
    Location
    Michigan
    Posts
    42
    Post Thanks / Like
    Rep Power
    0
    Reputation
    9
    Oh Wow, I like this.

  4. #4
    Scout

    Join Date
    Sep 2008
    Posts
    12
    Post Thanks / Like
    Rep Power
    16
    Reputation
    16
    Hey Noob.. I've tried this a few times.. Sorry not your Script but it pertains to a script such as yours so i thought id respond here..

    is it possible using LUa to make the NPC do a check for a certain item in persons inventory and remove it upon completing the function.. Ie you need a Runed copper rod to be buffed with Str.. After buffing str it removes 1 runed copper rod from players inventory?.. I know thats a stupid example but its just off the top of my head.. or perhaps maybe even simply gold?....

  5. #5
    Grunt
    Easymode's Avatar
    Join Date
    Dec 2008
    Posts
    43
    Post Thanks / Like
    Rep Power
    16
    Reputation
    12

    Exclamation Lol

    Hey, this is a very nice script, but i was wondering about something, when i try to execute the INSERT INTO `creature_proto` VALUES ('66698', '70', '70', '35', '10000000', '10000000', '10000000', '1', '1', '1800', '0', '1500', '2500', '1800', '500', '650', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '36000', '0', '0', '0', '0', '0', '0', '0', '1', '0', 'MEMO', '0', '0', '0', '0', '2.5', '8', '14', '0', '0', '0', '0', '0', '0');

    it says

    [Err] 1136 - Column count doesn't match value count at row 1
    [Err] INSERT INTO `creature_proto` VALUES ('66698', '70', '70', '35', '10000000', '10000000', '10000000', '1', '1', '1800', '0', '1500', '2500', '1800', '500', '650', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '36000', '0', '0', '0', '0', '0', '0', '0', '1', '0', 'MEMO', '0', '0', '0', '0', '2.5', '8', '14', '0', '0', '0', '0', '0', '0');
    [Msg] Finished - Unsuccessfully

    could someone give me some help?
    ~----------------------------------------------------------------------~

  6. #6
    Contributor
    runiker's Avatar
    Join Date
    Jul 2008
    Posts
    170
    Post Thanks / Like
    Rep Power
    17
    Reputation
    113

    Register to remove this ad
    Quote Originally Posted by Kreegoth View Post
    Hey Noob.. I've tried this a few times.. Sorry not your Script but it pertains to a script such as yours so i thought id respond here..

    is it possible using LUa to make the NPC do a check for a certain item in persons inventory and remove it upon completing the function.. Ie you need a Runed copper rod to be buffed with Str.. After buffing str it removes 1 runed copper rod from players inventory?.. I know thats a stupid example but its just off the top of my head.. or perhaps maybe even simply gold?....

    here is the code

    if pMisc:GetItemCount(998000) > 1 then
    pUnit:CastSpellOnTarget(33077, player)
    pMisc:RemoveItem(998000)
    end

    Last edited by runiker; 06-01-09 at 11:22 PM.



  7. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

 

 

Visitors found this page by searching for:

mangos buff npc

10000000 1

npc buff mangos

trinitycore buff npc

simple buff npc for mangos

buff npc mangos

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 08:59 PM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org