Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 3 of 3
  1. #1
    Scout

    Join Date
    Feb 2009
    Posts
    3
    Post Thanks / Like
    Rep Power
    16
    Reputation
    15

    Exclamation [LuaHypArc] PvP System - Faction Boss's


    Register to remove this ad
    Code:
    --[[    
          __                        __  __                  ______                 
         /\ \                      /\ \/\ \                /\  _  \                 
         \ \ \      __  __     __  \ \ \_\ \  __  __  _____\ \ \_\ \  _____  ___   
          \ \ \  __/\ \/\ \  /'__`\ \ \  _  \/\ \/\ \/\ '__`\ \  __ \/\`'__\/'___\  
           \ \ \_\ \ \ \_\ \/\ \_\.\_\ \ \ \ \ \ \_\ \ \ \_\ \ \ \/\ \ \ \//\ \__/  
            \ \____/\ \____/\ \__/ \_\\ \_\ \_\/`____ \ \  __/\ \_\ \_\ \_\\ \____\ 
             \/___/  \/___/  \/__/\/_/ \/_/\/_/`/___// \ \ \/  \/_/\/_/\/_/ \/____/ 
                                                  /\___/\ \_\                       
                                                  \/__/  \/_/   .zapto.org 
     
        Author: Myerz
                                   ]]--
     
            --[ DEFINE_VARIABLES ]--
            local MSG_LANGUAGE_UNIVERSAL = 14
            local ON_COMBAT_MSG = "Who dares challenge the king!?"
            local IFKing = nil
            local TBKing = nil
            local BUFFS = {48161, 48073, 48469, 53307, 20217, 48936, 48932, 15366}
     
            --[ TB_KING_ID ]--
            local tb_id = put id here
     
            --[ IF_KING_ID ]--
            local if_id = put id here
     
            --[ ITEM_ID && AMOUNT ]--
            local itm_id = 121214
            local amount = 1
     
    --[[ 
     
        REGISTER_ON_DEFINE 
     
        ]]--
     
    --[ DEFINE_IF_KING ]--
    function IF_Define(Unit, Event)
             IFKing = Unit
    end
     
    --[ DEFINE_TB_KING ]--
    function TB_Define(Unit, Event)
             TBKing    = Unit
    end
     
    --[[ 
     
        REGISTER_UNIT_COMBAT 
     
        ]]--
     
    --[ KING_IRON_FORGE ]--
    function KingIronforge_OnCombat(Unit, Event)
        Unit:SendChatMessage(MSG_LANGUAGE_UNIVERSAL, 0, " "..ON_COMBAT_MSG" ")
    end
     
    function KingIronforge_OnDeath(Unit, Event)
                logcol(12)
                print("[King of Ironforge]: King has been killed")
                logcol(5)
                Unit:RemoveEvents()
     
                --[ REGISTER_BROADCAST ]--
            if (player:GetPlayerRace() == 1) or (player:GetPlayerRace() == 3) or (player:GetPlayerRace() == 4) or (player:GetPlayerRace() == 7) and (player:GetPlayerRace() == 11) then
                --[ ON_KILL_BOSS ]--
                local rndmplyr = IFKing:GetRandomPlayer(0)
                                 local x, y, z, o = rndmplyr:GetX(), rndmplyr:GetY(), rndmplyr:GetZ(), rndmplyr:GetO()
                      IFKing:SpawnCreature(5595, x, y, z, o, 21, 0)
             IFKing:SpawnCreature(5595, x+5, y, z+3, o, 21, 0)
                --[ RNGPLAYER_ITEM_ADD ]--
                local rngplyr = IFKing:GetInRangePlayers()
                                for i = 1, #rngplyr do
                      rngplyr[i]:AddItem(itm_id, amount)
                --[ PLRS_BUFF ]--
                local plyrsrng = IFKing:GetInRangePlayers()
                             for k, v in pairs(BUFFS)
                and
                               for k, v in pairs(plyrsrng) do
                      plyrsrng[i]:CastSpell(BUFFS[v])
                --[ PLRS_MSG ]--
                local rgplrs = GetPlayersInWorld()
                             for k, v in pairs(plrs) do
        plrs[i]:SendBroadCastMessage(MSG_LANGUAGE_UNIVERSAL, 0, "The horde have taken over Ironforge")
     
        else -- killed by a command or spell
     
            if (player:GetPlayerRace() == 2) or (player:GetPlayerRace() == 5) or (player:GetPlayerRace() == 6) or (player:GetPlayerRace() == 8) and (player:GetPlayerRace() == 10) then
        Unit:SendBroadCastMessage(MSG_LANGUAGE_UNIVERSAL, 0, "The alliance have betrayed their own king!") 
    end
         end
       end
    end
       end
        end
     
    --[ KING_THUNDER_BLUFF ]--
    function KingThunderBluff_OnCombat(Unit, Event)
         Unit:SendChatMessage(MSG_LANGUAGE_UNIVERSAL, 0, " "..ON_COMBAT_MSG" ")
    end
     
    function KingThunderBluff_OnDeath(Unit, Event)
            logcol(13)
            print("[King of Ironforge]: King has been killed")
            logcol(7)
            Unit:RemoveEvents()
     
                --[ REGISTER_BROADCAST ]-- 
            if (player:GetPlayerRace() == 1) or (player:GetPlayerRace() == 3) or (player:GetPlayerRace() == 4) or (player:GetPlayerRace() == 7) and (player:GetPlayerRace() == 11) then
                --[ ON_KILL_BOSS ]--
                local rndmplyr = Unit:GetRandomPlayer(0)
                     local x, y, z, o = rndmplyr:GetX(), rndmplyr:GetY(), rndmplyr:GetZ(), rndmplyr:GetO()
                      TBKing:SpawnCreature(14720, x, y, z, o, 21, 0)
                  TBKing:SpawnCreature(14720, x+5, y, z+3, o, 21, 0)
                --[ RNGPLAYER_ITEM_ADD ]--                  
                local rngplyr = TBKing:GetInRangePlayers()
                                for i = 1, #rngplyr do
                      rngplyr[i]:AddItem(itm_id, amount)
            --[ PLRS_BUFF ]--
                local plyrsrng = TBKing:GetInRangePlayers()
                             for k, v in pairs(BUFFS)
                and
                               for k, v in pairs(plyrsrng) do
                      plyrsrng[i]:CastSpell(BUFFS[v])
                --[ PLRS_MSG ]--
                local plrs = GetPlayersInWorld()
                             for k, v in pairs(plrs) do
        plrs[i]:SendBroadCastMessage(MSG_LANGUAGE_UNIVERSAL, 0, "The alliance have taken over Thunderbluff")
     
     
        else -- killed by a command or spell
     
            if (player:GetPlayerRace() == 2) or (player:GetPlayerRace() == 5) or (player:GetPlayerRace() == 6) or (player:GetPlayerRace() == 8) and (player:GetPlayerRace() == 10) then
        Unit:SendBroadCastMessage(MSG_LANGUAGE_UNIVERSAL, 0, "The horde have betrayed their own king!") 
    end
         end
       end
    end
       end
        end
     
    --[ LOCALS ]--
    local bosstimer = math.random (180000, 360000)
     
    --[ BOSS_PVP_CHECK ]--
    function BossCheck(event, pPlayer)
        --[ CHECK_TBKing ]--
        if (TBKing = nil) then
           TBKing:Despawn(0, 3000)
        else
           local plrs = GetPlayersInWorld()
              for k, v in pairs(plrs) do
        plrs[i]:SendBroadCastMessage(MSG_LANGUAGE_UNIVERSAL, 0, "King of Thunderbluff is still waiting for a challenge")
     
        --[ CHECK_IFKing ]--
        if (IFKing = nil) then
           IFKing:Despawn(0, 3000)
        else
           local plrs = GetPlayersInWorld()
              for k, v in pairs(plrs) do
        plrs[i]:SendBroadCastMessage(MSG_LANGUAGE_UNIVERSAL, 0, "King of Ironforge is still waiting for a challenge")
    end
      end
    end end
       end
     
     
     
    --[[
     
        REGISTER_UNIT_EVENT
     
        ]]--
     
    if (GetLuaEngine() ~= "LuaHypArc") then
                   print("[IF-TB]: Did not load script - LuaHypArc not installed.")
                   print("[IF-TB]: Please visit http://luahyparc.zapto.org/ for more information.")
     
    else      
              --[ REGISTER_TIMED_EVENT ]--
              RegisterTimedEvent("BossCheck", bosstimer, 0)
     
              --[ REGISTER_UNIT_EVENT ]--
              RegisterUnitEvent(tb_id, 1, "KingThunderBluff_OnCombat")
              RegisterUnitEvent(tb_id, 4, "KingThunderBluff_OnDeath")
              RegisterUnitEvent(if_id, 1, "KingIronforge_OnCombat")
              RegisterUnitEvent(if_id, 4, "KingIronforge_OnDeath")
    end



    › See More: [LuaHypArc] PvP System - Faction Boss's

  2. #2
    Scout

    Join Date
    Oct 2009
    Posts
    12
    Post Thanks / Like
    Rep Power
    15
    Reputation
    7
    Code:
    IFKing = Unit - IFKing = nil
    Doesn't that crashes?

  3. #3
    Sergeant
    Paradox's Avatar
    Join Date
    Jul 2009
    Posts
    71
    Post Thanks / Like
    Rep Power
    15
    Reputation
    26

    Register to remove this ad
    Quote Originally Posted by Wolferine View Post
    Code:
    IFKing = Unit - IFKing = nil
    Doesn't that crashes?

    It used to, but Hypersniper fixed that error in the core, I don't know how, but he did.




  4. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

 

 

Visitors found this page by searching for:

LuaHypArc

how to use luahyparc wow

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 04:09 PM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org