SkillNPC [LUA] menu

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 15 of 48
  1. #1
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SkillNPC [LUA]

    Well here it is. Been working on it for ages. It loads in the console. But i get the error like i do with all GossipScripts. So id like some Feedback.

    THANKS TO SOUNDDEAD FOR HELPING WITH THE ERROR!

    Code:
    --[[ SkillNPC.lua
    
    This script was written and is protected
    by the GPL v2. This script was released
    by Performer/Performa of the Blua Scripting
    Project. Please give proper accredidations
    when re-releasing or sharing this script
    with others in the emulation community.
    
    Credits to Nebels for the C++ Version.
    Thanks to Soundead for fixing an error.
    
    ~~End of License Agreement
    -- Performa, August 25th, 2008. ]]
    
    function Skill_Menu (pUnit, event, player, pMisc)
        pUnit:GossipCreateMenu(100, player, 0, 0)
        if player:GetPlayerClass() == 1  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Warriors Learn?", 50, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 2  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Paladins Learn?", 51, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 3  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Hunters Learn?", 52, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 4  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Rogues Learn?", 53, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 5  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Priests Learn?", 54, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 7  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Shamans Learn?", 55, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 8  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Mages Learn?", 56, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 9  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Warlocks Learn?", 57, 0)
        pUnit:GossipSendMenu(player)
        elseif player:GetPlayerClass() == 11  then
        pUnit:GossipMenuAddItem(0, "What Spells Can Druids Learn?", 58, 0)
        pUnit:GossipSendMenu(player)
        end
    end
    
    function Skill_OnSelect (pUnit, event, player, id, intid, code, pMisc)
        if(intid == 50) then
        pUnit:GossipCreateMenu(99, player, 0, 0)
        pUnit:GossipMenuAddItem(5, "Taunt", 3, 0)
        pUnit:GossipMenuAddItem(5, "Intercept", 4, 0)
        pUnit:GossipMenuAddItem(5, "Mortal Strike", 5, 0)
        pUnit:GossipMenuAddItem(5, "Defensive Stance", 6, 0)
        pUnit:GossipMenuAddItem(5, "Berserker Stance", 7, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 51) then
        pUnit:GossipCreateMenu(98, player, 0)
        pUnit:GossipMenuAddItem(5, "Redemption", 8, 0)
        pUnit:GossipMenuAddItem(5, "Summon Warhorse", 9, 0)
        pUnit:GossipMenuAddItem(5, "Summon Charger", 10, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 52) then
        pUnit:GossipCreateMenu(97, player, 0)
        pUnit:GossipMenuAddItem(5, "Pet Spells", 11, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 53) then
        pUnit:GossipCreateMenu(96, player, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 54) then
        pUnit:GossipCreateMenu(95, player, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 55) then
        pUnit:GossipCreateMenu(94, player, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 56) then
        pUnit:GossipCreateMenu(93, player, 0)
        pUnit:GossipMenuAddItem(5, "Ice Block", 22, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 57) then
        pUnit:GossipCreateMenu(92, player, 0)
        pUnit:GossipMenuAddItem(5, "Pet Spells", 12, 0)
        pUnit:GossipMenuAddItem(5, "Summon Felsteed", 13, 0)
        pUnit:GossipMenuAddItem(5, "Summon Dreadsteed", 14, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 58) then
        pUnit:GossipCreateMenu(91, player, 0)
        pUnit:GossipMenuAddItem(5, "Growl", 15, 0)
        pUnit:GossipMenuAddItem(5, "Maul", 16, 0)
        pUnit:GossipMenuAddItem(5, "Bear Form", 17, 0)
        pUnit:GossipMenuAddItem(5, "Dire Bear Form", 18, 0)
        pUnit:GossipMenuAddItem(5, "Aquatic Form", 19, 0)
        pUnit:GossipMenuAddItem(5, "Normal Flight Form", 20, 0)
        pUnit:GossipMenuAddItem(5, "Epic Flight Form", 21, 0)
        pUnit:GossipMenuAddItem(0, "[Back]", 0, 0)
        pUnit:GossipSendMenu(player)
    end
        if(intid == 2) then
        pUnit:ResetTalent()
    end
        if(intid == 3) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(355)
    end
        if(intid == 4) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(25275)
    end
        if(intid == 5) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(30330)
    end
        if(intid == 6) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(71)
    end
        if(intid == 7) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(2458)
    end
        if(intid == 8) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(20773)
    end
        if(intid == 9) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(13819)
    end
        if(intid == 10) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(34767)
    end
        if(intid == 11) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(1515)
        plr:LearnSpell(883)
        plr:LearnSpell(5149)
        plr:LearnSpell(982)
        plr:LearnSpell(6991)
    end
        if(intid == 12) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(688)
        plr:LearnSpell(697)
        plr:LearnSpell(712)
        plr:LearnSpell(691)
    end
        if(intid == 13) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(5784)
    end
        if(intid == 14) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(23161)
    end
        if(intid == 15) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(6795)
    end
        if(intid == 16) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(26996)
    end
        if(intid == 17) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(5487)
    end
        if(intid == 18) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(9634)
    end
        if(intid == 19) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(1066)
    end
        if(intid == 20) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(33943)
    end
        if(intid == 21) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(40120)
    end
        if(intid == 22) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(45438)
    end
        if(intid == 99) then
        
    end
        intid = 0
    end
    
    RegisterUnitGossipEvent(500021, 1, "Skill_Menu")
    RegisterUnitGossipEvent(500021, 2, "Skill_OnSelect")


    Reset talents does not work atm. Because i do not know of a function to do it.
    Last edited by Performer; 09-17-2008 at 01:02 PM.


    SkillNPC [LUA]
  2. #2
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump.. No one interested at all? Or are all just leeching?


  3. #3
    OMGPWN's Avatar Active Member
    Reputation
    36
    Join Date
    Oct 2006
    Posts
    431
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,I have no idea what that is... thats why no responce from he till now =P
    Good luck with that ^^

  4. #4
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its a skill NPC... teaches missing spells. Save all the GM tickets


  5. #5
    logicd22's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    46
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still get an error, I dont know if I am doing this right. I put it in my scripts folder as a .lua file and edit the

    RegisterUnitGossipEvent(ENTRYID, 1, "Skill_Menu")
    RegisterUnitGossipEvent(ENTRYID, 2, "Skill_OnSelect")

    ENTRYID to the npc that I am using but when I click on the NPC nothing happens. Should there be something else I should edit or what?

  6. #6
    Bolleno's Avatar Member
    Reputation
    2
    Join Date
    Jun 2007
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i will try this

  7. #7
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dont say +rep if you cant give it.


  8. #8
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good work +rep.

    And I will give it.

  9. #9
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks sounddead

    And 400th post! Woo :P


  10. #10
    *Scripted*'s Avatar Banned
    Reputation
    41
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very Nice +Rep to you.

  11. #11
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump.. No one interested at all? Or are all just leeching?
    I leech. =D. jk gj +rep
    Cheese Cake?

  12. #12
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Guys

    Feedback Appreciated


  13. #13
    bras's Avatar Member
    Reputation
    2
    Join Date
    Jun 2008
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do I get this into my Navicat DB?

  14. #14
    nickeg's Avatar Member
    Reputation
    15
    Join Date
    Jan 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I LOVE YOU ... this is just what i have been looking for +rep m8 ....

  15. #15
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by bras View Post
    How do I get this into my Navicat DB?

    You dont put it in your DB. You put it in the scripts folder.


Page 1 of 4 1234 LastLast

Similar Threads

  1. [Guide] Lua Scripting Guide is here [Updating]
    By Illidan1 in forum WoW EMU Guides & Tutorials
    Replies: 93
    Last Post: 11-04-2008, 06:56 PM
  2. New LUA Scripts
    By 777devil777 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 11-26-2007, 05:58 PM
  3. Lua Ascent Script Documentation
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 11-26-2007, 12:42 PM
  4. LUA Refrences
    By 777devil777 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 11-22-2007, 08:09 PM
All times are GMT -5. The time now is 04:12 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