Scripting LUA 101 menu

User Tag List

Page 5 of 9 FirstFirst 123456789 LastLast
Results 61 to 75 of 132
  1. #61
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man

    Scripting LUA 101
  2. #62
    Shredfire's Avatar Member
    Reputation
    4
    Join Date
    Apr 2008
    Posts
    13
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Idk If i did it right, i did it correctly )= Mind checking over it for me, i am trying to get the manager Of the L70ETC to play the music when people comeinto range

    Heres what i have for the script so far, And how do i do save this per say, as a Txt fial or something or do i use some specal program? Thanks i am a bit o a noob )=

    Ps: If you can you think you could make the script itself for me i would very much appreate it, thanks (and yes i know i am a N00B)

    MichaelSchweitzer_Playerinrange (pUnit, Event)
    pUnit:PlaySoundToSet11803
    end
    RegisterUnitEvent (10000, 10, "MichaelSchweitzer_Playerinrange")

  3. #63
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MichaelSchweitzer_Playerinrange (pUnit, Event)
    pUnit:PlaySoundToSet(11803)
    end
    RegisterUnitEvent (10000, 10, "MichaelSchweitzer_Playerinrange")


    You forgot Parentheses around 11803

  4. #64
    pachuco55's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would I make an 'if' function that calls for a players faction when clicking on a gossip menu item? I am wanting to have the npc teach horde a certain spell and alliance a certain spell when clicked on.


  5. #65
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wait for my advanced guide that comes out next week

  6. #66
    pachuco55's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol can't wait!

    and couldn't wait actually... got the answer already, but I'll still be needing the advanced guide soon

  7. #67
    BrantX's Avatar Contributor
    Reputation
    205
    Join Date
    Jul 2007
    Posts
    899
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wait for my advanced guide that comes out next week
    I shall not wait, this guide has made me become better and better in lua scripting i really thank you for this guide its the best i have seen out of all of them good guide.



  8. #68
    Rotty's Avatar Banned
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    81
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Best Guide Ever! +rep
    /sticky!
    Last edited by Rotty; 05-10-2008 at 03:29 PM.

  9. #69
    pachuco55's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, I finished my first script... I went to test it but either I'm not putting it in correctly or I made a mistake in the script. This is it anyways:

    Code:
    function Keleth_SendChatMessage (unit, Event)
        Unit:SendChatMessage(11, 0, "It seems that some classes are missing spells... Click on me to get them!")
    end
    
    function Keleth_MainMenu (unit, player)
        Unit:GossipCreateMenu(1228, player)
            Unit:GossipMenuAddItem(player, 4, "Teach me my spells!", 1, 0)
        player:GossipSendMenu()
    end
    
    function Keleth_OnGossipTalk (unit, event, player)
        Keleth_MainMenu(unit, player)
    end
    
    function Keleth_GetPlayerClass (unit, player)
        local id = Unit:GetPlayerClass()
    end
    
    function Keleth_OnGossipSelect (unit, event, player, id, intid, code)
        if(id == 11) then
            unit:LearnSpell(9634)
            unit:LearnSpell(40120)
            unit:LearnSpell(26996)
            unit:LearnSpell(33745)
            unit:LearnSpell(26999)
            unit:LearnSpell(26997)
            unit:LearnSpell(26998)
            unit:LearnSpell(8983)
            unit:LearnSpell(1066)
            player:GossipComplete()
        end
        if(intid == 3) then
            unit:LearnSpell(5149)
            unit:LearnSpell(883)
            unit:LearnSpell(2641)
            unit:LearnSpell(6991)
            unit:LearnSpell(982)
            unit:LearnSpell(1515)
            player:GossipComplete()
        end
        if(intid == 2) then
            unit:LearnSpell(20773)
            unit:LearnSpell(34767)
            unit:LearnSpell(23214)
            player:GossipComplete()
        end
        if(intid == 9) then
            unit:LearnSpell(688)
            unit:LearnSpell(697)
            unit:LearnSpell(712)
            unit:LearnSpell(691)
            unit:LearnSpell(23161)
            player:GossipComplete()
        end
        if(intid == 1) then
            unit:LearnSpell(2458)
            unit:LearnSpell(355)
            unit:LearnSpell(25275)
            unit:LearnSpell(71)
        end
    end
    
    RegisterUnitEvent(100000, 7, "Keleth_SendChatMessage")
    RegisterGossipEvent(100000, 7, "Keleth_MainMenu")
    RegisterGossipEvent(100000, 7, "Keleth_OnGossipTalk")
    RegisterGossipEvent(100000, 7, "Keleth_GetPlayerClass")
    RegisterGossipEvent(100000, 7, "Keleth_OnGossipSelect")
    The purpose of the script is to get an npc that detects a player's class and gives any missing spells if there are any. So a warrior can click it and get his stances instead of having to do the quests. I don't have all of the missing stuff, so I'll add more when I get it finally working.

    I am using SectorSeven's Blizzlike Repack v2. Server works fine, but I don't think I'm putting the code in correctly. It's saved under the lua folder, and I think lua is enabled.

    Anyways, any help would be appreciated
    Last edited by pachuco55; 05-11-2008 at 11:46 AM. Reason: updated script x2

  10. #70
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So does the script work or not? LUA is enabled in the core but it needs to be enabled in ascent-world configuration file.

  11. #71
    pachuco55's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I used it on your server it didn't work. Right now I'm setting up on a new rev because my devs want me to try out some other stuff too... Did you have the added lua functions such as GossipCreateMenu and such? We had to get a patch for those, could be it. I'll get back to you if it works or not.

  12. #72
    Aleski's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sweet - Looks a bit complicated for me but keep up the good work

  13. #73
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They do work. But Aleski this is as simple as it gets.

  14. #74
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice guide S7, have you released your advanced lua guide yet? I'll be waiting on it +Rep

  15. #75
    Shredfire's Avatar Member
    Reputation
    4
    Join Date
    Apr 2008
    Posts
    13
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, me again >.< SectorSeven umm thanks for the help before but i still cant get it to work

    MichaelSchweitzer_Playerinrange (pUnit, Event)
    pUnit:PlaySoundToSet(11803)
    end
    RegisterUnitEvent (23988, 7, "MichaelSchweitzer_Playerinrange")

    Thats the script....And i have it in a .lua file format so it should work i hoped.... but i cant figure out why its not working, and yes the server can run .lua files because of the fact we have scripted portals.

    Ps: Like i said before i am trying to get the band manager of the L70ETC to play the music, at least when you click on him to talk which is type 7 if i am right and yet it seems to not work at all, thanks for any help you give me and the help earlyer intill then ill keep working on it...

    Oh wait Nvm, I think i found a fix I forgot to add the Function to the top of it and that one little thing could screw it up i suppose....

    Ps: Nope dident work...... Still doesent work WHY!!!!
    Last edited by Shredfire; 05-16-2008 at 04:42 PM. Reason: Possably A fix?

Similar Threads

  1. [Release] My Custom boss script (LUA)
    By Nilrac in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 06-17-2008, 03:57 AM
  2. [share] mini-tut on gossip scripts lua
    By b!atch in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 05-29-2008, 05:11 AM
  3. Need help with my script [lua]
    By Satzen in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 05-18-2008, 05:19 PM
  4. [Guide] Troubleshooting LUA 101
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 04-10-2008, 08:23 AM
  5. script lua question
    By onilank in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 12-21-2007, 06:58 PM
All times are GMT -5. The time now is 05:38 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