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 8 of 8
  1. #1
    Sergeant
    Dr. Fallen's Avatar
    Join Date
    Mar 2010
    Location
    Turkey
    Posts
    74
    Post Thanks / Like
    Rep Power
    15
    Reputation
    64

    [Lua - Double "H" Release] - Merc System


    Register to remove this ad
    This is a server wide mercenary system that will allow players to higher mercenaries to work for them and act as a group. The Mercenaries are composed of two base units. A Medic and a Soldier. What makes them unique however is their ability to change style based on what you tell them to do.

    For example if you want the Soldier to go into tank mode then it will switch its weapons and use pure tanking abilities. If you tell it to go into a Berserk Mode it will equip two - two-handed weapons and go into a Berserk aggressive fight style. If you tell it to go into a Balance style it will equip a single two handed weapon and fight with a balance between defensive and offensive.


    The Medic class will allow you to change between healer mode or DPS mode The healer has AI designed to look out for you as well as other Mercenaries that you have hired.


    The script is configurable and very simpl to use. It is plug and play, All you have to do is edit the cost to hire a mercenary (default is 150 gold), you can change how many Mercenaries you are allowing players to hire, (default is 3 and one officer, officer not yet implemented). And you can change the default style that the mercenary will start in (See Configurations in the Script)



    So without further a due i present to you, the first Double "H" Release.





    PHP Code:
    local MAX_MERC          2        --The allowed number of Mercenaries to hire  
    local MAX_OFFICER       
    1        --The allowed number of Officers to hire
    local GOLD_COST         
    1500000  --The amount of gold required to hire mercenaries in copper value.
    local GOLD_COST_OFFICER 4500000
    --===========================---
    --
    Creature AI Default Settings--
    --===========================---

    local WARRIOR_ENTRY 100000 
    local MEDIC_ENTRY 
    100001
    local OFFICER_ENTRY 
    100002

    -- Warrior Settings (Starting Fight Styleyou can only enable one default style to start in.  
    -- If 
    you attempt to activate more then one style via cofigsthe standard style will automatically apply itself. (1=balance2=defensive3=offensive)
    local    DEFAULT_WARRIOR_STYLE  1

    -- Priest Settings (Starting Fight Styleyou can only enable one default style to start inAll others will default to 0.  
    -- If you attempt to activate more then one style via cofigsthe standard style will automatically apply itself. (1=heals2=damage)
    local   DEFAULT_MEDIC_STYLE 1

    -- Officer Settings (Starting Fight Styleyou can only enable one default style to start inAll others will default to 0.  
    -- If you attempt to activate more then one style via cofigsthe standard style will automatically apply itself. (1=offensice2=defensive3=support)
    local DEFAULT_OFFICER_STYLE 3


    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--  
    --                        DO 
    NOT EDIT BELOW                                           --
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
    OLDSTRAT = {}
    OLDSTRAT.WARRIOR = {}
    OLDSTRAT.HEALER = {}
    OLDSTRAT.OFFICER = {}
    math.randomseed(os.time()); math.random(); math.random(); math.random();

    function 
    hasMerc(playerpUnit
        if (
    OLDSTRAT[player:GetName()] == nilthen return falseend
        
    if (OLDSTRAT[player:GetName()].mercs == nilthen return falseend
        
    for i,v in ipairs(OLDSTRAT[player:GetName()].mercs) do
            if (
    tostring(v) == tostring(pUnit)) then
                
    return true
            end
        end
        
    return false
    end

    function getNumMercs(player
        if (
    OLDSTRAT[player:GetName()] == nilthen return 0end
        
    if (OLDSTRAT[player:GetName()].mercs == nilthen return 0end
        local count 
    0
        
    for i,v in ipairs(OLDSTRAT[player:GetName()].mercs) do
            if (
    ~= 0then
                count 
    count+1
            end
        end
        
    return count
    end

    function hasOfficer(playerpUnit
        if (
    OLDSTRAT[player:GetName()] == nilthen return falseend
        
    if (OLDSTRAT[player:GetName()].officer == nilthen return falseend
        
    for i,v in ipairs(OLDSTRAT[player:GetName()].officer) do
            if (
    tostring(v) == tostring(pUnit)) then
                
    return true
            end
        end
        
    return false
    end

    function getNumOfficer(player
        if (
    OLDSTRAT[player:GetName()] == nilthen return 0end
        
    if (OLDSTRAT[player:GetName()].officer == nilthen return 0end
        local count 
    0
        
    for i,v in ipairs(OLDSTRAT[player:GetName()].officer) do
            if (
    ~= 0then
                count 
    count+1
            end
        end
        
    return count
    end

    function OLDSTRAT.HookPlayerGone(pUnitplayerName
        if (
    OLDSTRAT[playerName] == nilthen return; end --don't even bother with this func if no mercs.
        if (OLDSTRAT[playerName].mercs == nil) then return; end
        pUnit:RemoveEvents()
        for i,v in ipairs(OLDSTRAT[playerName].mercs) do
            if (tostring(v) == tostring(pUnit)) then
                OLDSTRAT[playerName].mercs[i] = 0
            end
        end
        OLDSTRAT[tostring(pUnit)] = nil
        --pUnit:Despawn(1, 60000) causes crashes...
    end

    function OLDSTRAT.HookPlayerGoneOfficer(pUnit, playerName) 
        if (OLDSTRAT[playerName] == nil) then return; end --don'
    t even bother with this func if no officer.
        if (
    OLDSTRAT[playerName].officer == nilthen return; end
        pUnit
    :RemoveEvents()
        for 
    i,v in ipairs(OLDSTRAT[playerName].officer) do
            if (
    tostring(v) == tostring(pUnit)) then
                OLDSTRAT
    [playerName].officer[i] = 0
            end
        end
        OLDSTRAT
    [tostring(pUnit)] = nil
    end

    function OLDSTRAT.LeaveCombat(pUnitevent
        if (
    OLDSTRAT[tostring(pUnit)] == nilthen return; end
        local player 
    OLDSTRAT[tostring(pUnit)].owner
        
    if (OLDSTRAT[player:GetName()] == nilthen return; end --don't even bother with this func if no mercs.
        if (OLDSTRAT[player:GetName()].mercs == nil) then return; end
        if (OLDSTRAT[player:GetName()].officer == nil) then return; end
        pUnit:SetUInt32Value(0x52, 1) --UNIT_NPC_FLAGS
        pUnit:SetUnitToFollow(player, math.random(1,8), 1)
        pUnit:RemoveEvents()
    end

    function OLDSTRAT.OfficerLeaveCombat(pUnit, event) 
        if (OLDSTRAT[tostring(pUnit)] == nil) then return; end
        local player = OLDSTRAT[tostring(pUnit)].ownerO
        if (OLDSTRAT[player:GetName()] == nil) then return; end --don'
    t even bother with this func if no mercs.
        if (
    OLDSTRAT[player:GetName()].officer == nilthen return; end
        pUnit
    :SetUInt32Value(0x521) --UNIT_NPC_FLAGS
        pUnit
    :SetUnitToFollow(playermath.random(1,8), 1)
        
    pUnit:RemoveEvents()
    end

    RegisterUnitEvent
    (WARRIOR_ENTRY2"OLDSTRAT.LeaveCombat"
    RegisterUnitEvent(MEDIC_ENTRY2"OLDSTRAT.LeaveCombat")
    RegisterUnitEvent(OFFICER_ENTRY2"OLDSTRAT.OfficerLeaveCombat")

    function 
    OLDSTRAT.OnTick(pUnit
        
    local p GetPlayer(OLDSTRAT[tostring(pUnit)].ownerName)
        if (
    == falsethen
            OLDSTRAT
    .HookPlayerGone(pUnitOLDSTRAT[tostring(pUnit)].ownerName)
            
    OLDSTRAT.HookPlayerGoneOfficer(pUnitOLDSTRAT[tostring(pUnit)].ownerNameO)
        elseif (
    p:IsDead() or p:IsInWorld() == falsethen
            OLDSTRAT
    .HookPlayerGone(pUnitOLDSTRAT[tostring(pUnit)].ownerName)
            
    OLDSTRAT.HookPlayerGoneOfficer(pUnitOLDSTRAT[tostring(pUnit)].ownerNameO)
        
    end
    end

    function OLDSTRAT.OfficerOnTick(pUnit
        
    local po GetPlayer(OLDSTRAT[tostring(pUnit)].ownerNameO)
        if (
    po == falsethen
            OLDSTRAT
    .HookPlayerGoneOfficer(pUnitOLDSTRAT[tostring(pUnit)].ownerNameO)
        elseif (
    po:IsDead() or po:IsInWorld() == falsethen
            OLDSTRAT
    .HookPlayerGoneOfficer(pUnitOLDSTRAT[tostring(pUnit)].ownerNameO)
        
    end
    end

    function OLDSTRAT.OnDied(pUnitevent
        
    pUnit:RemoveEvents()
            
    local player OLDSTRAT[tostring(pUnit)].ownerName
        pUnit
    :Despawn(500060000)
        for 
    i,v in ipairs(OLDSTRAT[player].mercs) do
            if (
    tostring(v) == tostring(pUnit)) then
                OLDSTRAT
    [player].mercs[i] = 0
                
    break
            
    end
        end
        
    for i,v in ipairs(OLDSTRAT[player].officer) do
            if (
    tostring(v) == tostring(pUnit)) then
                OLDSTRAT
    [player].officer[i] = 0
                
    break
            
    end
        end
        
    if (getNumMercs(player) == 0then OLDSTRAT[player] = nil end
    end
        
    RegisterUnitEvent
    (WARRIOR_ENTRY4"OLDSTRAT.OnDied")
    RegisterUnitEvent(MEDIC_ENTRY4"OLDSTRAT.OnDied")
    RegisterUnitEvent(OFFICER_ENTRY4"OLDSTRAT.OnDied")

    function 
    OLDSTRAT.WARRIOR.Speak1(pUniteventplayer
        if (
    OLDSTRAT[player:GetName()] == nil and OLDSTRAT[tostring(pUnit)] == nilthen
            pUnit
    :GossipCreateMenu(50020player0)
            
    pUnit:GossipMenuAddItem(0"I see. I accept your offer."10)
            
    pUnit:GossipMenuAddItem(0"I do not need you now, Mercenary."30)
            
    pUnit:GossipSendMenu(player)
        elseif (
    getNumMercs(player) < MAX_MERC) and (hasMerc(playerpUnit) == false) and (OLDSTRAT[tostring(pUnit)] == nilthen
            pUnit
    :GossipCreateMenu(50020player0)
            
    pUnit:GossipMenuAddItem(0"I see. I accept your offer."10)
            
    pUnit:GossipMenuAddItem(0"I do not need you now, Mercenary."30)
            
    pUnit:GossipSendMenu(player)
        elseif (
    hasMerc(playerpUnit) == truethen
            pUnit
    :GossipCreateMenu(50022player0)
            
    pUnit:GossipMenuAddItem(0"Focus more on defense right now."100)
            
    pUnit:GossipMenuAddItem(0"Use a more balance fight style right now."110)
            
    pUnit:GossipMenuAddItem(0"Go into a more aggressive fight style for now."120)
            
    pUnit:GossipSendMenu(player)
        else
            
    pUnit:GossipCreateMenu(50021player0)
            
    pUnit:GossipSendMenu(player)
        
    end
    end

    function OLDSTRAT.HEALER.Speak1(pUniteventplayer
        if (
    OLDSTRAT[player:GetName()] == nil and OLDSTRAT[tostring(pUnit)] == nilthen
            pUnit
    :GossipCreateMenu(50020player0)
            
    pUnit:GossipMenuAddItem(0"I see. I accept your offer."20)
            
    pUnit:GossipMenuAddItem(0"I do not need you now, Mercenary."30)
            
    pUnit:GossipSendMenu(player)
        elseif (
    getNumMercs(player) < MAX_MERC) and (hasMerc(playerpUnit) == false) and (OLDSTRAT[tostring(pUnit)] == nilthen
            pUnit
    :GossipCreateMenu(50020player0)
            
    pUnit:GossipMenuAddItem(0"I see. I accept your offer."20)
            
    pUnit:GossipMenuAddItem(0"I do not need you now, Mercenary."30)
            
    pUnit:GossipSendMenu(player)
        elseif (
    hasMerc(playerpUnit) == truethen
            pUnit
    :GossipCreateMenu(50022player0)
            
    pUnit:GossipMenuAddItem(0"Focus more on support right now."200)
            
    pUnit:GossipMenuAddItem(0"Use a heavy damage based style for now."210)
            
    pUnit:GossipSendMenu(player)
        else
            
    pUnit:GossipCreateMenu(50021player0)
            
    pUnit:GossipSendMenu(player)
        
    end
    end

    function OLDSTRAT.OFFICER.Speak1(pUniteventplayer
        if (
    OLDSTRAT[player:GetName()] == nil and OLDSTRAT[tostring(pUnit)] == nilthen
            pUnit
    :GossipCreateMenu(50020player0)
            
    pUnit:GossipMenuAddItem(0"I see. I accept your offer."10)
            
    pUnit:GossipMenuAddItem(0"I do not need you now, Mercenary."30)
            
    pUnit:GossipSendMenu(player)
        elseif (
    getNumOfficer(player) < MAX_OFFICER) and (hasOfficer(playerpUnit) == false) and (OLDSTRAT[tostring(pUnit)] == nilthen
            pUnit
    :GossipCreateMenu(50020player0)
            
    pUnit:GossipMenuAddItem(0"I see. I accept your offer."10)
            
    pUnit:GossipMenuAddItem(0"I do not need you now, Mercenary."30)
            
    pUnit:GossipSendMenu(player)
        elseif (
    hasOfficer(playerpUnit) == truethen
            pUnit
    :GossipCreateMenu(50022player0)
            
    pUnit:GossipMenuAddItem(0"I need you in an offensive state."300)
            
    pUnit:GossipMenuAddItem(0"I am going to need your defensive capabilities."310)
            
    pUnit:GossipMenuAddItem(0"I need you to play the supportive role."320)
            
    pUnit:GossipSendMenu(player)
        else
            
    pUnit:GossipCreateMenu(50021player0)
            
    pUnit:GossipSendMenu(player)
        
    end
    end

    function OLDSTRAT.WARRIOR.Selection1(pUniteventplayeridintidcode
        if (
    intid == 1then
            
    if (player:GetCoinage() < GOLD_COSTthen
                pUnit
    :SendChatMessage(120"I apologize, "..player:GetName().." but you do not have the amount of money I require.")
                
    player:GossipComplete()
            else
                if (
    OLDSTRAT[player:GetName()] == nilthen OLDSTRAT[player:GetName()] = {}; end
                
    if (OLDSTRAT[player:GetName()].mercs == nilthen OLDSTRAT[player:GetName()].mercs = {0,0,0}; end
                
    for i,v in ipairs(OLDSTRAT[player:GetName()].mercs) do
                    if (
    == 0then
                        OLDSTRAT
    [player:GetName()].mercs[i] = pUnit
                        
    break
                    
    end
                end
                OLDSTRAT
    [tostring(pUnit)] = {}
                
    OLDSTRAT[tostring(pUnit)].owner player
                OLDSTRAT
    [tostring(pUnit)].ownerName player:GetName()
                
    pUnit:RegisterEvent("OLDSTRAT.OnTick"10000)
                
    pUnit:SetFaction(player:GetFaction())
                
    pUnit:SendChatMessage(120"Excellent, I look forward to working with you, "..player:GetName()..".")
                
    OLDSTRAT[tostring(pUnit)].WARRIOR_STYLE DEFAULT_WARRIOR_STYLE
                pUnit
    :SetUnitToFollow(playermath.random(1,8), 1)
                
    player:DealGoldCost(GOLD_COST)
                
    player:GossipComplete()
            
    end
                
        end
        
    if (intid == 3then
            player
    :GossipComplete()
        
    end
        
    -- Warrior Segment Playstyle --
        if (
    intid == 10then  --Defensive Style
            pUnit
    :CastSpell(71)
            
    OLDSTRAT[tostring(pUnit)].WARRIOR_STYLE 2
            pUnit
    :SendChatMessage(120"Well, Tank mode it is then.")
            
    pUnit:EquipWeapons(45110407001)
            
    player:GossipComplete()
        
    end        
        
    if (intid == 11then  --Balance Style
            pUnit
    :CastSpell(2457)
            
    OLDSTRAT[tostring(pUnit)].WARRIOR_STYLE 1
            pUnit
    :SendChatMessage(120"Very well I shall fight in a mixed style.")
            
    pUnit:EquipWeapons(4516511)
            
    player:GossipComplete()
        
    end

          
    if (intid == 12then  --Agressive Style
            pUnit
    :CastSpell(2458)
            
    OLDSTRAT[tostring(pUnit)].WARRIOR_STYLE 3
            pUnit
    :SendChatMessage(120"Hmm, this should be entertaining, I will be taking more damage, just so you know.")
            
    pUnit:EquipWeapons(46016460161)
            
    player:GossipComplete()
        
    end
    end
        
    function OLDSTRAT.HEALER.Selection1(pUniteventplayeridintidcode)
        if (
    intid == 2then
            
    if (player:GetCoinage() < GOLD_COSTthen
                pUnit
    :SendChatMessage(120"I apologize, "..player:GetName().." but you do not have the amount of money I require.")
                
    player:GossipComplete()
            else
                if (
    OLDSTRAT[player:GetName()] == nilthen OLDSTRAT[player:GetName()] = {}; end
                
    if (OLDSTRAT[player:GetName()].mercs == nilthen OLDSTRAT[player:GetName()].mercs = {0,0,0}; end
                
    for i,v in ipairs(OLDSTRAT[player:GetName()].mercs) do
                    if (
    == 0then
                        OLDSTRAT
    [player:GetName()].mercs[i] = pUnit
                        
    break
                    
    end
                end
                OLDSTRAT
    [tostring(pUnit)] = {}
                
    OLDSTRAT[tostring(pUnit)].owner player
                OLDSTRAT
    [tostring(pUnit)].ownerName player:GetName()
                
    pUnit:RegisterEvent("OLDSTRAT.OnTick"10000)
                
    pUnit:SetFaction(player:GetFaction())
                
    pUnit:SendChatMessage(120"Excellent, I look forward to working with you, "..player:GetName()..".")
                
    OLDSTRAT[tostring(pUnit)].MEDIC_STYLE DEFAULT_MEDIC_STYLE
                pUnit
    :SetUnitToFollow(playermath.random(2,4), math.random(16))
                
    player:DealGoldCost(GOLD_COST)
                
    player:GossipComplete()
            
    end
        end
        
    if (intid == 3then
            player
    :GossipComplete()
        
    end
        
    -- Priest Segment Playstyle --
        if (
    intid == 20then  --Support Style
            OLDSTRAT
    [tostring(pUnit)].MEDIC_STYLE 1
            pUnit
    :RemoveAura(35194)
            
    pUnit:SendChatMessage(120"Oh well back to the heals.")
            
    player:GossipComplete()
        
    end        
        
    if (intid == 21then  --Damage Style
            OLDSTRAT
    [tostring(pUnit)].MEDIC_STYLE 2
            pUnit
    :CastSpell(35194)
            
    pUnit:SendChatMessage(120"Time for some fun.")
            
    player:GossipComplete()
        
    end
    end

    function OLDSTRAT.OFFICER.Selection1(pUniteventplayeridintidcode
        if 
    intid == 1 then
            
    if (player:GetCoinage() < GOLD_COST_OFFICERthen
                pUnit
    :SendChatMessage(120"I apologize, "..player:GetName().." but you do not have the amount of money I require.")
                
    player:GossipComplete()
            else
                if (
    OLDSTRAT[player:GetName()] == nilthen OLDSTRAT[player:GetName()] = {}; end
                
    if (OLDSTRAT[player:GetName()].officer == nilthen OLDSTRAT[player:GetName()].officer = {0,0,0}; end
                
    for i,v in ipairs(OLDSTRAT[player:GetName()].officer) do
                    if (
    == 0then
                        OLDSTRAT
    [player:GetName()].officer[i] = pUnit
                        
    break
                    
    end
                end
                OLDSTRAT
    [tostring(pUnit)] = {}
                
    OLDSTRAT[tostring(pUnit)].ownerO player
                OLDSTRAT
    [tostring(pUnit)].ownerNameO player:GetName()
                
    pUnit:RegisterEvent("OLDSTRAT.OfficerOnTick"10000)
                
    pUnit:SetFaction(player:GetFaction())
                
    pUnit:SendChatMessage(120"My service and leadership, are yours, "..player:GetName()..".")
                
    OLDSTRAT[tostring(pUnit)].OFFICER_STYLE DEFAULT_OFFICER_STYLE
                pUnit
    :SetUnitToFollow(playermath.random(1,8), 1)
                
    player:DealGoldCost(GOLD_COST_OFFICER)
                
    player:GossipComplete()
            
    end
                
        end
        
    if (intid == 3then
            player
    :GossipComplete()
        
    end
        
    -- Officer Segment Playstyle --
        if (
    intid == 30then  --Offensive Style
            pUnit
    :RemoveAura(13589)
            
    pUnit:RemoveAura(2457)
            
    pUnit:RemoveAura(48942)
            
    pUnit:CastSpell(2458)
            
    pUnit:CastSpell(54043)
            
    OLDSTRAT[tostring(pUnit)].OFFICER_STYLE 1
            pUnit
    :SendChatMessage(120"Well looks like there will be some blood spilled.")
            
    pUnit:EquipWeapons(5148111)
            
    player:GossipComplete()
        
    end        
        
    if (intid == 31then  --Defensive Style
            pUnit
    :RemoveAura(13589)
            
    pUnit:RemoveAura(2458)
            
    pUnit:RemoveAura(54043)
            
    pUnit:CastSpell(2457)
            
    pUnit:CastSpell(48942)
            
    OLDSTRAT[tostring(pUnit)].OFFICER_STYLE 2
            pUnit
    :SendChatMessage(120"Sometimes the best offense is an excellent defense.")
            
    pUnit:EquipWeapons(47314455871)
            
    player:GossipComplete()
        
    end

          
    if (intid == 32then  --Support Style
            pUnit
    :RemoveAura(2457)
            
    pUnit:RemoveAura(48942)
            
    pUnit:RemoveAura(2458)
            
    pUnit:RemoveAura(54043)
            
    pUnit:CastSpell(13589)
            
    OLDSTRAT[tostring(pUnit)].OFFICER_STYLE 3
            pUnit
    :SendChatMessage(120"Very well, I will provide additional support for you.")
            
    pUnit:EquipWeapons(45442458771)
            
    player:GossipComplete()
        
    end
    end

    RegisterUnitGossipEvent
    (WARRIOR_ENTRY1"OLDSTRAT.WARRIOR.Speak1"
    RegisterUnitGossipEvent(WARRIOR_ENTRY2"OLDSTRAT.WARRIOR.Selection1")

    RegisterUnitGossipEvent(MEDIC_ENTRY1"OLDSTRAT.HEALER.Speak1"
    RegisterUnitGossipEvent(MEDIC_ENTRY2"OLDSTRAT.HEALER.Selection1")

    RegisterUnitGossipEvent(OFFICER_ENTRY1"OLDSTRAT.OFFICER.Speak1"
    RegisterUnitGossipEvent(OFFICER_ENTRY2"OLDSTRAT.OFFICER.Selection1")

    --===============================================================================================-- 
    --                           
    COMBAT HANDLER FOR STANDARD WARRIORS                                --
    --===============================================================================================--
    --
    Balance Style                        
    local THUNDER_CLAP         
    58975
    local STANDARD_CLEAVE       
    30619
    local DEMORAL_SHOUT      
    29584
    local MORTAL_STRIKE           
    19643
    local RETALIATION            
    22857

    --Defensive Style 
    local SUNDER_ARMOR         
    27991
    local SHIELD_BASH          
    41180
    local SHIELD_WALL           
    29390
    local DISARM               
    30013
    local TAUNT                   
    37486

    --Aggressive Style 
    local BLADESTORM           
    63784
    local RECKLESSNESS         
    13847
    local SLICE_STRIKES      
    30470
    local SLAM               
    52026
    local REND               
    29574

    local Warrior_Balance    
    = {THUNDER_CLAPSTANDARD_CLEAVEDEMORAL_SHOUTMORTAL_STRIKERETALIATION
    local Warrior_Defensive  = {SUNDER_ARMORSHIELD_BASHSHIELD_WALLDISARMTAUNT}                        
    local Warrior_Aggressive = {BLADESTORMRECKLESSNESSSLICE_STRIKESSLAMREND}

    local Warrior_Taunts  = {"This ends now!""You stand no match against my blade!""I fear no death!""For the city of Stratholme!""Your insolence amuses me.",  
                            
    "I grow tired of these games!""Is this truly my entertainment?""Your blood shall quench my blade!""Death fears me!""Fun time!"}
                            
    function 
    OLDSTRAT.WARRIOR.OnAggro1(pUnitevent)
        
    pUnit:SetUInt32Value(0x520) --UNIT_NPC_FLAGS
        local speechCheck 
    math.random(1100)
        if (
    speechCheck <= 32then
            local yellSay 
    math.random(12)
            if 
    yellSay == 1 then
                yellSay 
    12
            
    else
                
    yellSay 14
            end
            local i 
    math.random(110)
            
    pUnit:SendChatMessage(yellSay0Warrior_Taunts[i])
        
    end
        pUnit
    :RegisterEvent("OLDSTRAT.WARRIOR.Select1"70000)
    end

    function OLDSTRAT.WARRIOR.Select1(pUnitevent
        if (
    OLDSTRAT[tostring(pUnit)].WARRIOR_STYLE == 1then
            OLDSTRAT
    .WARRIOR.Balance1(pUnitevent)
        elseif (
    OLDSTRAT[tostring(pUnit)].WARRIOR_STYLE == 2then
            OLDSTRAT
    .WARRIOR.Defensive1(pUnitevent)
        elseif (
    OLDSTRAT[tostring(pUnit)].WARRIOR_STYLE == 3then
            OLDSTRAT
    .WARRIOR.Aggressive1(pUnitevent)
        
    end
    end

    function OLDSTRAT.WARRIOR.Balance1(pUnitevent
        
    local target pUnit:GetMainTank()
        if (
    target == nilthen return; end
        local b 
    math.random(15)
        if (
    ~= 3) and (~= 5then
            pUnit
    :FullCastSpellOnTarget(Warrior_Balance[b], target)
        else
            
    pUnit:CastSpell(Warrior_Balance[b])
        
    end
    end

    function OLDSTRAT.WARRIOR.Defensive1(pUnitevent
        
    local target pUnit:GetMainTank()
        if (
    target == nilthen return; end
        local d 
    math.random(15)
        if (
    ~= 3then
            pUnit
    :FullCastSpellOnTarget(Warrior_Defensive[d], target)
        else
            
    pUnit:CastSpell(Warrior_Defensive[d])
        
    end
    end

    function OLDSTRAT.WARRIOR.Aggressive1(pUnitevent
        
    local target pUnit:GetMainTank()
        if (
    target == nilthen return; end
        local a 
    math.random(15)
        if (
    ~= 2) and (~= 3then
            pUnit
    :FullCastSpellOnTarget(Warrior_Aggressive[a], target)
        else
            
    pUnit:CastSpell(Warrior_Aggressive[a])
        
    end
    end

    RegisterUnitEvent
    (WARRIOR_ENTRY1"OLDSTRAT.WARRIOR.OnAggro1"
    --===============================================================================================--
    --                           
    COMBAT HANDLER FOR STANDARD HEALERS                                 --
    --===============================================================================================--
    local Medic_Taunts  = {"Oh well, another battle to fight.""Always wtith the fighting and then me with the healing.""This should be a fun sight.""For the city of Stratholme!"
                            
    "I get no respect whatsoever.""Is this truly my entertainment?"}
                            
    --
    Healing Style                        
    local SHIELD               
    47753
    local HOLY_LIGHT         
    32769
    local CHAIN_HEAL           
    42477
    --TODOrez

    --Shadow Style 
    local MIND_BLAST            
    60500
    local MIND_FLAY          
    28310
    local WORD_DEATH           
    41375

    local Medic_Healing 
    = {SHIELDHOLY_LIGHTCHAIN_HEAL
    local Medic_Shadow  = {MIND_BLASTMIND_FLAYWORD_DEATH}

    function 
    OLDSTRAT.HEALER.OnAggro1(pUnitevent
        
    pUnit:SetUInt32Value(0x520) --UNIT_NPC_FLAGS
        local speechCheck 
    math.random(1100)
        if (
    speechCheck <= 32then
            local yellSay 
    math.random(12)
            if 
    yellSay == 1 then
                yellSay 
    12
            
    else
                
    yellSay 14
            end
            local i 
    math.random(16)
            
    pUnit:SendChatMessage(yellSay0Medic_Taunts[i])
        
    end
        pUnit
    :RegisterEvent("OLDSTRAT.HEALER.Select1"80000)
    end

    function OLDSTRAT.HEALER.Select1(pUnit
        if (
    OLDSTRAT[tostring(pUnit)].MEDIC_STYLE == 1then
            OLDSTRAT
    .HEALER.Healing1(pUnit)
        elseif (
    OLDSTRAT[tostring(pUnit)].MEDIC_STYLE == 2then
            OLDSTRAT
    .HEALER.Shadow1(pUnit)
        
    end
    end

    function OLDSTRAT.HEALER.Healing1(pUnit
        
    local target pUnit:GetRandomFriend()
        for 
    i=1,10 do
            if (
    target ~= nilthen break; end
            target 
    pUnit:GetRandomFriend()
        
    end
        
    if (OLDSTRAT[tostring(pUnit)].owner:GetHealthPct() < 30then target OLDSTRAT[tostring(pUnit)].ownerend
        
    if (target == nilthen target pUnitend
        local h 
    math.random(13)
        
    pUnit:FullCastSpellOnTarget(Medic_Healing[h], target)
    end

    function OLDSTRAT.HEALER.Shadow1(pUnit
        
    local target pUnit:GetMainTank()
        if (
    target == nilthen return; end
        local s 
    math.random(13)        
        
    pUnit:FullCastSpellOnTarget(Medic_Shadow[s], target)
    end

    RegisterUnitEvent
    (MEDIC_ENTRY1"OLDSTRAT.HEALER.OnAggro1"

    -- 
    TODOOfficers 
    --===============================================================================================--
    --                           
    COMBAT HANDLER FOR STANDARD OFFICER                                 --
    --===============================================================================================--
    local Officer_Taunts  = {"Lets get this over with!""This amuses me!""I fear death is your only option!""My blade will meet your throat!""Your insolence amuses me."
                            
    "Enough of these distractions!""Is this truly my entertainment?""My blade yerns to cut!""Let's go over your situation!""Play time!"}
                            
    --
    Offensive Style--
    local OFFICER_SABER_LASH         71021
    local OFFICER_DEAFENING_ROAR     
    38850
    local OFFICER_PIERCE_ARMOR       
    38187
    local OFFICER_DARK_STRIKE        
    45271
    --Defensive Style--
    local OFFICER_SHIELD_SLAM        29684
    local OFFICER_MORTAL_STRIKE      
    44268
    local OFFICER_DEVASTATE          
    57795
    local OFFICER_SUNDER_ARMOR       
    65936
    --Support Style--
    local OFFICER_HOLY_LIGHT         29562
    local OFFICER_POWER_SHIELD       
    66099
    local OFFICER_CHAIN_HEAL           
    42477
    local OFFICER_SMITE              
    71842

    local Officer_AggressiveStore 
    = {OFFICER_SABER_LASHOFFICER_DEAFENING_ROAROFFICER_PIERCE_ARMOROFFICER_DARK_STRIKE
    local Officer_DefensiveStore  = {OFFICER_SHIELD_SLAMOFFICER_MORTAL_STRIKEOFFICER_DEVASTATEOFFICER_SUNDER_ARMOR}
    local Officer_SupportStore    = {OFFICER_HOLY_LIGHTOFFICER_POWER_SHIELDOFFICER_CHAIN_HEALOFFICER_SMITE}

    function 
    OLDSTRAT.OFFICER.OnAggro1(pUnitevent
        
    pUnit:SetUInt32Value(0x520)
        
    local speechCheck math.random(1100)
        if (
    speechCheck <= 32then
            local yellSay 
    math.random(12)
            if 
    yellSay == 1 then
                yellSay 
    12
            
    else
                
    yellSay 14
            end
            local i 
    math.random(110)
            
    pUnit:SendChatMessage(yellSay0Warrior_Taunts[i])
        
    end
        pUnit
    :RegisterEvent("OLDSTRAT.OFFICER.Select1"70000)
    end


    function OLDSTRAT.OFFICER.Select1(pUnitevent)  
        if (
    OLDSTRAT[tostring(pUnit)].OFFICER_STYLE == 1then
            OLDSTRAT
    .OFFICER.Offense1(pUnitevent) -- run offense
        
    elseif (OLDSTRAT[tostring(pUnit)].OFFICER_STYLE == 2then
            OLDSTRAT
    .OFFICER.Defensive1(pUnitevent) -- run defense
        
    elseif (OLDSTRAT[tostring(pUnit)].OFFICER_STYLE == 3then
            OLDSTRAT
    .OFFICER.Support1(pUnitevent) -- run support
        end
    end

    function OLDSTRAT.OFFICER.Offense1(pUnitevent
        
    local target pUnit:GetMainTank()
        if (
    target == nilthen return; end
        local o 
    math.random(14)
        if (
    ~= 1) and (~= 3) and (~= 4then
            pUnit
    :FullCastSpellOnTarget(Officer_AggressiveStore[o], target)
        else
            
    pUnit:CastSpell(Officer_AggressiveStore[o])
        
    end
    end

    function OLDSTRAT.OFFICER.Defensive1(pUnitevent
        
    local target pUnit:GetMainTank()
        if (
    target == nilthen return; end
        local d 
    math.random(14)
        
    pUnit:FullCastSpellOnTarget(Officer_DefensiveStore[d], target)
    end

    function OLDSTRAT.OFFICER.Support1(pUnitevent
        
    local target pUnit:GetRandomFriend()
        for 
    i=1,10 do
            if (
    target ~= nilthen break; end
            target 
    pUnit:GetRandomFriend()
        
    end
        
    if (OLDSTRAT[tostring(pUnit)].ownerO:GetHealthPct() < 40then target OLDSTRAT[tostring(pUnit)].ownerOend
        
    if (target == nilthen target pUnitend
        local s 
    math.random(14)
        
    pUnit:FullCastSpellOnTarget(Officer_SupportStore[s], target)
    end

    RegisterUnitEvent
    (OFFICER_ENTRY1"OLDSTRAT.OFFICER.OnAggro1"
    [/
    b



    › See More: [Lua - Double "H" Release] - Merc System
    Last edited by Dr. Fallen; 13-03-10 at 10:33 AM.



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

  3. #2
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    Gotta admit, if this works it's epic.

  4. #3
    Sergeant
    Dr. Fallen's Avatar
    Join Date
    Mar 2010
    Location
    Turkey
    Posts
    74
    Post Thanks / Like
    Rep Power
    15
    Reputation
    64
    thx for rep and comment dude its workin

  5. #4
    Elite Member
    Dimman's Avatar
    Join Date
    Apr 2009
    Posts
    1,091
    Post Thanks / Like
    Rep Power
    21
    Reputation
    319
    Thanks Dr. Fallen
    No touching please.

  6. #5
    Sergeant
    Dr. Fallen's Avatar
    Join Date
    Mar 2010
    Location
    Turkey
    Posts
    74
    Post Thanks / Like
    Rep Power
    15
    Reputation
    64
    Quote Originally Posted by «Dimman» View Post
    Thanks Dr. Fallen
    Lok tar ogar

    Thanks for your comment Mr. Dimman

  7. #6
    Beginner
    tandt40's Avatar
    Join Date
    Jan 2010
    Posts
    5
    Post Thanks / Like
    Rep Power
    15
    Reputation
    1
    Taken directly from wow-v forums: Forums: Double -H- Release - Merc System | WoW-V.com

  8. #7
    Contributor
    Boxxy's Avatar
    Join Date
    Aug 2008
    Location
    Florida
    Posts
    351
    Post Thanks / Like
    Rep Power
    18
    Reputation
    136
    Quote Originally Posted by tandt40 View Post
    =O blastfumy
    your mother

  9. #8
    Beginner

    Join Date
    Aug 2010
    Posts
    5
    Post Thanks / Like
    Rep Power
    15
    Reputation
    1

    Register to remove this ad
    who this script work?

 

 

Visitors found this page by searching for:

mercenary lua script trinity

double h release

lua setuint32value defined

SEO Blog

Tags for this Thread

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 01:38 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