[Lua] My first own Boss Script does not work... menu

Shout-Out

User Tag List

Results 1 to 8 of 8
  1. #1
    Dark Guild's Avatar Active Member
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] My first own Boss Script does not work...

    Hello everybody,

    i have an problem with my own first Boss script. My Boss (namely Pandorra) does nothing. He does only attacking and the arcemu-world console only means

    scripts\Pandorra.lua:20: '(' expected near 'Unit'

    Here is the script:

    Code:
    function Pandorra_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "You insignificant nats cannot stop my rise! My awakening draws near!")
    pUnit:RegisterEvent("Pandorra_DeathTouch", 300, 1)
    pUnit:RegisterEvent("Pandorra_SoulBleeding", 60, 1)
    pUnit:RegisterEvent("Pandorra_Shackle", 40, 1)
    pUnit:RegisterEvent("Pandorra_Felstreak", 70, 1)
    end
    
    function Pandorra_DeathTouch(pUnit, Event)
    pUnit:FullCastSpellOnTarget(5, pUnit:GetRandomPlayer(0))
    pUnit:SendChatMessage(14, 8, "Your death is only a stepping stone for the massive fail you all will have.")
    end
    
    function Pandorra_SoulBleeding(pUnit, Event)
    pUnit:FullCastSpellOnTarget(41303, pUnit:GetRandomPlayer(4))
    pUnit:SendChatMessage(12, 0, "Everything drains from you.")
    end
    
    function Pandorra_Shackle
    pUnit:FullCastSpellOnTarget(38051, pUnit:GetRandomPlayer(7))
    pUnit:SendChatMessage(14, 8, "Be shackled!")
    end
    
    function Pandorra_FelStreak
    pUnit:FullCastSpellOnTarget(67044, pUnit:GetRandomPlayer(0))
    end
    
    function Pandorra_SummonMinion
    pUnit:CastSpell(38876)
    pUnit:SendChatMessage(14, 8, "Minons, assist your master!")
    end
    
    function Pandorra_RainofFire
    pUnit:CastSpell(47820)
    end
    
    function Pandorra_OnLeaveCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "So the pUnited forces of Sacredos have failed. Now the hour of my rise comes near."
    pUnit:SendChatMessage(14, 8, "Come my minions. Empower you master.")
    pUnit:RemoveEvents() 
    end
    
    function Pandorra_OnKilledTarget(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Pathetic!")
    end
    
    function Pandorra_OnDied(pUnit, Event)
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(14, 0, "No...NO! How could you weaken me? Why have you the power to imprison me again? WHY?")
    end
    
    RegisterUnitEvent(509358, 1, "Pandorra_OnCombat")
    RegisterUnitEvent(509358, 2, "Pandorra_OnLeaveCombat")
    RegisterUnitEvent(509358, 3, "Pandorra_OnKilledTarget")
    RegisterUnitEvent(509358, 4, "Pandorra_OnDied")
    Yes, he does not have any phases, but that should be.

    Can anyone skilled look over that "noobish" script and can help me to improve the script?
    I'm using P1ratens Repack.

    And i will +Rep if i can =)

    Dark Guild

    EDIT: And i have two question:

    1. How can i root an npc with lua? Do i need using "plr:root"?
    2. How can i add an buff to an NPC?
    Last edited by Dark Guild; 04-10-2010 at 05:09 PM.

    [Lua] My first own Boss Script does not work...
  2. #2
    gospag's Avatar Member
    Reputation
    1
    Join Date
    Jul 2009
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    replace
    Code:
    function Pandorra_Shackle
    pUnit:FullCastSpellOnTarget(38051, pUnit:GetRandomPlayer(7))
    pUnit:SendChatMessage(14, 8, "Be shackled!")
    end
    
    function Pandorra_FelStreak
    pUnit:FullCastSpellOnTarget(67044, pUnit:GetRandomPlayer(0))
    end
    
    function Pandorra_SummonMinion
    pUnit:CastSpell(38876)
    pUnit:SendChatMessage(14, 8, "Minons, assist your master!")
    end
    
    function Pandorra_RainofFire
    pUnit:CastSpell(47820)
    end
    with
    Code:
    function Pandorra_Shackle(pUnit, Event)
    pUnit:FullCastSpellOnTarget(38051, pUnit:GetRandomPlayer(7))
    pUnit:SendChatMessage(14, 8, "Be shackled!")
    end
    
    function Pandorra_FelStreak(pUnit, Event)
    pUnit:FullCastSpellOnTarget(67044, pUnit:GetRandomPlayer(0))
    end
    
    function Pandorra_SummonMinion(pUnit, Event)
    pUnit:CastSpell(38876)
    pUnit:SendChatMessage(14, 8, "Minons, assist your master!")
    end
    
    function Pandorra_RainofFire(pUnit, Event)
    pUnit:CastSpell(47820)
    end

  3. #3
    P1raten's Avatar Banned
    Reputation
    500
    Join Date
    Mar 2008
    Posts
    1,323
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by gospag View Post
    replace
    Code:
    function Pandorra_Shackle
    pUnit:FullCastSpellOnTarget(38051, pUnit:GetRandomPlayer(7))
    pUnit:SendChatMessage(14, 8, "Be shackled!")
    end
    
    function Pandorra_FelStreak
    pUnit:FullCastSpellOnTarget(67044, pUnit:GetRandomPlayer(0))
    end
    
    function Pandorra_SummonMinion
    pUnit:CastSpell(38876)
    pUnit:SendChatMessage(14, 8, "Minons, assist your master!")
    end
    
    function Pandorra_RainofFire
    pUnit:CastSpell(47820)
    end
    with
    Code:
    function Pandorra_Shackle(pUnit, Event)
    pUnit:FullCastSpellOnTarget(38051, pUnit:GetRandomPlayer(7))
    pUnit:SendChatMessage(14, 8, "Be shackled!")
    end
    
    function Pandorra_FelStreak(pUnit, Event)
    pUnit:FullCastSpellOnTarget(67044, pUnit:GetRandomPlayer(0))
    end
    
    function Pandorra_SummonMinion(pUnit, Event)
    pUnit:CastSpell(38876)
    pUnit:SendChatMessage(14, 8, "Minons, assist your master!")
    end
    
    function Pandorra_RainofFire(pUnit, Event)
    pUnit:CastSpell(47820)
    end
    ^this

    You need to always use parameters.

  4. #4
    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)
    You can root the npc with either pUnit:Root() and make the npc casts buffs on itself by pUnit:CastSpell(xxxx) or on players with player:CastSpell(xxxx) you can also make the NPC cast it on a target by defining the target and using pUnit:CastSpellOnTarget(spell, target)

  5. #5
    Dark Guild's Avatar Active Member
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /facepalm

    Oh my god... why i haven't saw that i've forgotten the parameters? Well, thanks for you help and thanks for your answers, GroundZero, but i have a new question:

    Pandorra shall cast FelStreak every 30 Seconds. But he does cast it only once after 30 Seconds an then never again.

    How can i let him cast FelStreak every 30 Seconds? By modifying the parameters?

  6. #6
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not a lua expert so I can only tell you what to do, not how to do it. When you register a function you can define the amount of time the spells are cast I believe. Someone else would have to come help you with the real code but that's the way to do it. At least I think so, ha.

    Freelance Digital Artist
    https://reflectionartwork.deviantart.com
    You did not desert me
    My brothers in arms


  7. #7
    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)
    You can register a new function like so

    unit:RegisterEvent(functionname, time, repeat)
    so
    unit:RegisterEvent("recast", 30000, 0)

    function recast (unit, event)
    unit:CastSpell(ID)
    end

  8. #8
    RyeRye's Avatar Contributor
    Reputation
    240
    Join Date
    Aug 2008
    Posts
    996
    Thanks G/R
    0/1
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You always have to make sure you have some type of ().



Similar Threads

  1. RvR Healing Bot (Does not work)
    By j_jones84 in forum MMO Exploits|Hacks
    Replies: 9
    Last Post: 12-05-2008, 01:47 PM
  2. WoW-ToolBox . com Does Not Work
    By Matt in forum World of Warcraft Bots and Programs
    Replies: 94
    Last Post: 07-16-2008, 08:11 PM
  3. [Help].DLL files in Script Bin not working?
    By MisterEMU in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 07-08-2008, 05:10 AM
  4. [Help] PVP does not work
    By baseballdude02 in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 06-29-2008, 12:25 PM
  5. [Question/Help]My reskin does not work propperly
    By lolister in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 06-03-2008, 09:40 AM
All times are GMT -5. The time now is 03:42 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