What's Wrong? menu

User Tag List

Results 1 to 8 of 8
  1. #1
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's Wrong?

    I wanted to make a script for my private server, about a friend from retail that got Kingslayer, with a very low gearscore, and everyone makes fun of him because he was carried by the 30% buff, I made a boss-like npc, but he isn't listening, there's somthing wrong with the phase, but for the life of me, I cannot figure it out, here is the script:

    Code:
    function Menion_OnCombat(pUnit, Event)
    local RandomTalk=math.random(1, 4);
    if RandomTalk == 1 then
    pUnit:SendChatMessage(14, 0, "I'm going to be a Kingslayer!") 
    elseif RandomTalk == 2 then
    pUnit:SendChatMessage(14, 0, "It's title time!")
    elseif RandomTalk == 3 then
    pUnit:SendChatMessage(14, 0, "I need more buffs!")
    elseif RandomTalk == 4 then
    pUnit:SendChatMessage(14, 0, "Ok, heal me, I'm going to be taking tons of damage!")
    pUnit:RegisterEvent("Menion_DivineProtection)
    end
    end
    
    function Menion_DivineProtection(pUnit, Event)
    if pUnit:GetHealthPct() <= 60 then
    pUnit:SendChatMessage(14, 0, "Heal me, y'all")
    pUnit:CastSpell(498) --Divine Protection
    end
    end
    
    function Menion_OnDied(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "They should make it 50%...")
    pUnit:RemoveEvents()
    end
    
    RegisterUnitEvent(900014, 1, "Menion_OnCombat")
    RegisterUnitEvent(900014, 4, "Menion_OnDied")
    end
    Also, if anyone knows where I can find the correct syntax for the commands, I would really appreciate a link.

    What's Wrong?
  2. #2
    covert_cat's Avatar Member
    Reputation
    55
    Join Date
    Sep 2009
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can't tell what's wrong with it.. I have problems with my boss scripts too. But the best place for Lua help has got to be the arcemu wiki.

  3. #3
    DarkVanir's Avatar Master Sergeant
    Reputation
    25
    Join Date
    Jul 2010
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or post your question here. They will help. In WoW-V there are some very professional lua scripters.
    Γαια αγια

  4. #4
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function Menion_OnCombat(pUnit, Event)
      pUnit:RegisterEvent("Menion_DivineProtection", 1000, 0) --checks every second if the boss is at 60%
        local RandomTalk=math.random(1, 4);
        if RandomTalk == 1 then
        pUnit:SendChatMessage(14, 0, "I'm going to be a Kingslayer!")
        elseif RandomTalk == 2 then
        pUnit:SendChatMessage(14, 0, "It's title time!")
        elseif RandomTalk == 3 then
        pUnit:SendChatMessage(14, 0, "I need more buffs!")
        elseif RandomTalk == 4 then
        pUnit:SendChatMessage(14, 0, "Ok, heal me, I'm going to be taking tons of damage!")
        end
    end
    
    function Menion_DivineProtection(pUnit, Event)
      if pUnit:GetHealthPct() <= 60 then
        pUnit:RemoveEvents() --remove the 1 second check function
        pUnit:SendChatMessage(14, 0, "Heal me, y'all")
        pUnit:CastSpell(498) --Divine Protection
      end
    end
    
    function Menion_OnDied(pUnit, Event)
      pUnit:SendChatMessage(14, 0, "They should make it 50%...")
      pUnit:RemoveEvents()
    end
    
    RegisterUnitEvent(900014, 1, "Menion_OnCombat")
    RegisterUnitEvent(900014, 4, "Menion_OnDied")
    end

  5. #5
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks alot, it works fine now! +Rep

  6. #6
    Trle94's Avatar Contributor
    Reputation
    167
    Join Date
    May 2009
    Posts
    329
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why would you need an "end" after Register events? :S
    it should be like this:
    Code:
    function Menion_OnCombat(pUnit, Event)
      pUnit:RegisterEvent("Menion_DivineProtection", 1000, 0) --checks every second if the boss is at 60%
        local RandomTalk=math.random(1, 4);
        if RandomTalk == 1 then
        pUnit:SendChatMessage(14, 0, "I'm going to be a Kingslayer!")
        elseif RandomTalk == 2 then
        pUnit:SendChatMessage(14, 0, "It's title time!")
        elseif RandomTalk == 3 then
        pUnit:SendChatMessage(14, 0, "I need more buffs!")
        elseif RandomTalk == 4 then
        pUnit:SendChatMessage(14, 0, "Ok, heal me, I'm going to be taking tons of damage!")
        end
    end
    
    function Menion_DivineProtection(pUnit, Event)
      if pUnit:GetHealthPct() <= 60 then
        pUnit:RemoveEvents() --remove the 1 second check function
        pUnit:SendChatMessage(14, 0, "Heal me, y'all")
        pUnit:CastSpell(498) --Divine Protection
      end
    end
    
    function Menion_OnDied(pUnit, Event)
      pUnit:SendChatMessage(14, 0, "They should make it 50%...")
      pUnit:RemoveEvents()
    end
    
    RegisterUnitEvent(900014, 1, "Menion_OnCombat")
    RegisterUnitEvent(900014, 4, "Menion_OnDied")


  7. #7
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh yeah right...the "end" at the end should be removed :P

  8. #8
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh, I just started scripting the other day, noob mistake

Similar Threads

  1. What is wrong with ppl and blaming WoW...?
    By Eskiimo in forum World of Warcraft General
    Replies: 5
    Last Post: 12-31-2007, 05:21 PM
  2. I don't understand what's wrong?
    By karpis in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 11-27-2007, 12:37 PM
  3. Whats gone wrong?
    By subzero1337 in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 09-26-2007, 01:45 PM
  4. What is wrong?
    By iccy in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 09-02-2007, 10:23 AM
  5. What is wrong with mywarcraft studio?...
    By xigon in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 08-03-2007, 01:13 AM
All times are GMT -5. The time now is 07:56 PM. 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