need help with luahyparc! menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need help with luahyparc!

    Code:
    local buffmessage = "#buffme"
      
            function OnChat(event, plr, message, type, language)
                  if (message == Buffmessage) then
                                  if (plr:IsGm()) then
                                          plr:CastSpell(38688)
                                          plr:CastSpell(45743)
                                          plr:CastSpell(41105)
                                          plr:CastSpell(56525)
                                          plr:CastSpell(26393)
                                          plr:SendBroadcastMessage("Enjoy your GameMaster Buffs!")
                                          else
                                          plr:CastSpell(48162)
                                          plr:CastSpell(42995)
                                          plr:CastSpell(58499)
                                          plr:CastSpell(43046)
                                          plr:CastSpell(25472)
                                          plr:SendBroadcastMessage("Enjoy your Buffs!")                                     
                                         
                                  end
                          return 0
                  end
    end
    
    RegisterServerHook(16, "OnChat")
    i wanna make it so when someone types #buffme then it will check if they are a gm and if they are then it will give them one set of buffs. and if they are not a gm then it will give them another set of buffs.
    i tried doing it on my own and i just wanna know where i went wrong in the code because when i type #buffme in game it wont do anything but display a normal chat message.

    thanks ahead of time for your help

    need help with luahyparc!
  2. #2
    dffrntdnl's Avatar Active Member
    Reputation
    20
    Join Date
    Feb 2007
    Posts
    159
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    because the core isn't setup to hook into commands when you call them with #. you should probably just add this to the c++ file that handles your gm commands as is. it would make this much easier. Faster too.
    dont be douche; it wont get you rep.

  3. #3
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am using luahyparc and when i type #reload or #food(which are set up through another script) it works... so that isnt the problem but thank you for trying

  4. #4
    dffrntdnl's Avatar Active Member
    Reputation
    20
    Join Date
    Feb 2007
    Posts
    159
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that's because I need to l2read the subject title.... sorry m8, no experience with luahyparc
    dont be douche; it wont get you rep.

  5. #5
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol its fine people make simple mistakes but thanks for trying

  6. #6
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You could try FullCastSpell instead of CastSpell.
    Everything else appears to be working fine, apart from the return 0 that people use, which I still don't understand what it does. I never use it and all my scripts work 100% fine.

  7. #7
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea its still not working for some reason which is odd because i can out someone elses scripts in there that use the same commands and it doesnt work:/

  8. #8
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seeing as ya'll are blind.

    Your local buffmessage the "b" is lower case.
    The "if (message == Buffmessage) then" the "b" is upper case.

    Just change one or the other to match and it will work.

  9. #9
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks GZ i missed that +Rep

  10. #10
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea still didnt work :/

  11. #11
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try changing;
    if (plr:IsGm()) then

    To;

    if plr:IsGm() == true then

    Also remove Return 0, it's bugged after ppl use it they can't talk.
    Try changing your function name, it may already be in use, eg zZzOnChat.

  12. #12
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea neither one of those worked
    Code:
    local Buffchat = "#buffme"
      
    function OnChat(event, plr, message, type, language)
         if (message == Buffchat) then
             if plr:IsGm() then
                 plr:FullCastSpell(38688)
                 plr:FullCastSpell(45743)
                 plr:FullCastSpell(41105)
                 plr:FullCastSpell(56525)
                 plr:FullCastSpell(26393)
                 plr:SendBroadcastMessage("Enjoy your GameMaster Buffs!")
                 else
                 plr:FullCastSpell(48162)
                 plr:FullCastSpell(42995)
                 plr:FullCastSpell(58499)
                 plr:FullCastSpell(43046)
                 plr:FullCastSpell(25472)
                 plr:FullCastSpell(25472)
                 plr:SendBroadcastMessage("Enjoy your Buffs!")                                     
             end
         end
    end
    
    RegisterServerHook(16, "OnChat")
    thats what i have now for the script

  13. #13
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you getting any errors at all, also did you try and change the function name?

  14. #14
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes i tried changing the function name and i dont get any errors it runs the script fine and loads it just doesnt actually make it so i can use the command

  15. #15
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In-game make sure you are writing "#buffme" not "buffme".




Page 1 of 2 12 LastLast

Similar Threads

  1. Need help with sig
    By sudnrage111 in forum Community Chat
    Replies: 0
    Last Post: 09-24-2006, 02:12 AM
  2. Need help with weapon model edit!
    By Chewbbaca in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 09-20-2006, 07:02 PM
  3. need help with model editing experts please
    By sportstud10124 in forum Community Chat
    Replies: 0
    Last Post: 08-10-2006, 09:30 PM
  4. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  5. Need Help with WoW Glider
    By paypal in forum World of Warcraft General
    Replies: 2
    Last Post: 07-07-2006, 02:08 AM
All times are GMT -5. The time now is 01:06 PM. 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