[PQR]4.3.4 Rogue PvP profile menu

Shout-Out

User Tag List

Page 10 of 11 FirstFirst ... 67891011 LastLast
Results 136 to 150 of 156
  1. #136
    zordiak's Avatar Member
    Reputation
    3
    Join Date
    Jul 2012
    Posts
    50
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Out of curiosity, will the profile cost anything or will it be free, and in that case is there a way to donate to the cause?

    [PQR]4.3.4 Rogue PvP profile
  2. #137
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Zordiak it's free and open source. Most of it is tested and written by me.

    Changelog:

    big update...
    the goal of this profile is not just to make it good, but also to make it very customizable. Practically everything in this profile can be enabled/disabled.

    -Users can now save his variables so that he does not lose them on every profile update.
    -Profile now has all the variables in a nice table so that the user may provide his own filters. For example:

    Code:
    CustomFunctions = false
    Instead of simply having a table that sets values/boolean, the user can modify it even more.

    Code:
    local framerate = GetFramerate();
    if framerate < 60 then CustomFunctions = false else CustomFunctions = true end
    This simply turns off multi-targetting to increase FPS when the game is running less than 60FPS.

    -Fixed a burst timer logic that was using DRInfo instead of DRTimer function, the profile will now properly prepare burst based on DR values/reset timers.
    -Added a debug slash command
    -Removed spell event text scrolling
    -Added better logic for Recuperate and Slice and Dice CP generation based on rogue spec (Backstab or Hemo)
    -Profile now properly prevents queued spells from casting before more important spells.
    -Enemy bubbles now contributes to total calculated HP (also incorporates defensive buffs, as before)
    -Minimum Energy is now set to 0 when enemy is 1 spell from dying (calculations based on defensive buffs, bubbles, and healthpoints). Percentage defensive buffs are multiplicative, whereas bubbles are additive.
    -Custom functions should now run smoother.
    -Added Custom function splash messages.
    -Fixed a problem which some functions would ignore enemy healers. Abilities for caster classes should now work (which includes garrote, defensive cooldowns).
    -Made the profile even easier to read.
    -Reordered filters (yet again) to improve FPS.
    -Fixed sudden FPS drop in Auto Focus
    -Fixed some slash abilities.
    -Added customizable filters for slash commands (filters separate from the automated rotation).
    -Fixed a problem which would try to premeditate the target with combo points that was too far to premeditate (the profile tries to premeditate the target with combo points instead of player's target to prevent wasting combo points for openers which use Recuperate/Slice and Dice before opening).
    -Smoke bomb now has adjustable target specific and distance (ex. 15m from focus). This only applies to targets that are outside the radius of smokebomb and are not CC'd. You can now make it smoke bomb for arena targets that are not cc'd.
    -Smokebomb now has class specific filter.
    -Smokebomb now has a cast list filter (for example, if mage tries to cast poly on you outside of smoke bomb radius, you can now smoke bomb to prevent it).
    -Fixed a problem which burst energy pooling would prevent redirect kidney from generating combo points. The profile now prioritizes redirect kidney before applying burst filters and pooling.
    Last edited by Numba1stunna1; 11-13-2015 at 07:44 PM.

  3. #138
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    - made DR timers more accurate. In the duration of the debuff, the timer will return the maximum dr time (15 seconds). DR calculators usually start time at start of debuff and at the end. This is to give more accurate windows for Finishers.
    - 95% stable version is coming out soon.

  4. #139
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    - Had to add an Event GCD Check (not just Event Spell Cooldown Check) for GCD abilities. Spells that fail to cast give a false cooldown, in which the server will temporarily run the spell as on cooldown. This is problematic for the smoothness of spellcasting. Therefore, the spells must be at least <= 1 second (to counter cooldown bug) and the Event trigger from GCD abilities must pass at least 0.6 seconds (0.4 seconds from full reset). Both functions counter false cooldown returns (GetSpellCooldown).

    - Tested, the profile now properly returns Backstab fails and Backstab fail timers. Profile now properly executes spells.
    Last edited by Numba1stunna1; 11-23-2015 at 05:15 PM.

  5. #140
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A lot of work has been put into this profile. Most changes have been to greatly improve performance by changing or removing functions.

    - Fixed a major problem which would not redirect Kidney after the specified target was in Fear DR (including Blind).
    - Reorganized all other important combat logs to another frame.
    - Ability pooling energy is now 0 when target is in kill range.
    - Peeling now also involves offensive cooldowns, not just the target's target health.
    - Removed range check for peeling, as this caused a drastic FPS drop.
    - Applied "Good CPU" filter for functions using PQR_UnitFacing and PQR_UnitDistance
    - Killing Spirit Link Totem should be instantaneous if in range. However, if player is not in range, the profile will instead use Smoke Bomb if totem is in range of Smoke Bomb.
    - Kidney Shot is now reprioritized over Recuperate (used to be whichever was castable first under specific conditions).
    - Ambush, Garrote, and Cheap Shot toggle no longer auto toggles off without an enemy target (to use Stealth abilities against stealth).
    - Fixed a string issue with Blind Peeling. Blind should now properly peel.
    - Bursting now has the following options : Burst Find Weakness (bursting even if the enemy has Find Weakness debuff), Burst Defense (bursting even if enemy has defensive buffs), Burst Bleeds (bursting only if enemy has bleeds for the duration of the burst, profile will calculate based on DR timer, cooldowns, combo points, and buffs/debuffs), Burst Recuperate (bursting only if player has enough recuperate for the duration of the burst), Burst Slice And DIce (bursting only if the player has enough Slice and DIce for the duration of the burst). All of these values are calculated in the duration of the Burst Prepraration timer (default 10 seconds)
    - Cheap Shot and Garrote now automatically toggle off if the target is already CS'd or Garroted (to prevent accidental spam).
    Last edited by Numba1stunna1; 12-03-2015 at 06:32 PM.

  6. #141
    solenrus's Avatar Member Authenticator enabled
    Reputation
    1
    Join Date
    Jan 2015
    Posts
    17
    Thanks G/R
    6/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    don't mean to be rude, but where are you realising this profile, since I wasnt around since you started the thread so long ago, I didnt follow it. appreciate your hard work nonetheless.

    tl;dr dl link, pls

  7. #142
    masohysta's Avatar Member
    Reputation
    1
    Join Date
    Dec 2015
    Posts
    5
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ive recently started working with PQR and now i see how much fun it gives when ur script is working as you wanted... but ur profiles are just f.. awsome. I wish my profiles one day will quite good as urs. Anyway gj bro

  8. #143
    solenrus's Avatar Member Authenticator enabled
    Reputation
    1
    Join Date
    Jan 2015
    Posts
    17
    Thanks G/R
    6/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Numba1stunna1, your inbox is full. Is there any way of contacting you regarding thic CC. I want to use it if it's possible, cheers.

  9. #144
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, a lot of debugging. There are FPS drops and having to localize a lot of things. Been lazy about it for the past month.

  10. #145
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Holy shit, I finally found the problem with massive FPS drop. After months of optimizing and troubleshooting, I finally found it. Well at least it's well optimized.

  11. #146
    solenrus's Avatar Member Authenticator enabled
    Reputation
    1
    Join Date
    Jan 2015
    Posts
    17
    Thanks G/R
    6/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dude, where is the link to use it or what's the deal, I don't get it?

  12. #147
    xian65's Avatar Member
    Reputation
    2
    Join Date
    Feb 2015
    Posts
    19
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PQR is crap wow+ is much better to make rotations example death knight main loop:
    Code:
    function Offensive()
        if Plus.IsKeyPressed( VK_W) then
            DeathAndDecay()
        end
        unit = ObjectManager.GetCurrentTarget()
        player = ObjectManager.GetActivePlayer()
        if not UnitHaveBuff("Horn of Winter",player) then CastSpellByName("Horn of Winter",unit,30) end
        if unit and isEnemy() then 
        Plus.DoString('RunMacroText("/startattack")')
        Plus.DoString( 'RunMacroText("/petattack")' )
        if not UnitHaveDebuff("Frost Fever",unit) and not UnitHaveDebuff("Blood Plague",unit) then CastSpellByName("Outbreak",unit) end
            if not SpellAvailable("Outbreak") then 
                if not UnitHaveDebuff("Frost Fever",unit) then CastSpellByName("Icy Touch",unit) end
                if not UnitHaveDebuff("Blood Plague",unit) then CastSpellByName("Plague Strike",unit) end
            end 
        if SpellAvailable("Dark Transformation") then     CastSpellByName("Dark Transformation") end
        if UnitHaveBuff("Sudden Doom",player) then CastSpellByName("Death Coil",unit,30) end
        if UnitHaveBuff("Unholy Strength",player) then 
            if CheckRuneNotReady() then EmpowerRuneWeapon() end 
            if CheckTrinket() then Plus.DoString('RunMacroText("/use 13")') end
            if CheckGloves() then Plus.DoString('RunMacroText("/use 10")') end 
            CastSpellByName("Unholy Frenzy",unit)
        end
          --CastSpellByName("Necrotic Strike",unit,5)
        CastSpellByName("Necrotic Strike",unit,5)
        CastSpellByName("Festering Strike",unit,5)
        CastSpellByName("Scourge Strike",unit,5)
        --DeathAndDecay()
        if not Plus.IsKeyPressed( VK_Q ) then
            if GetRunicPower()>34  then CastSpellByName("Death Coil",unit,30) end
        else
            CastSpellByName("Summon Gargoyle",unit)
        end
    
        if getDistance(unit)>5 and not UnitHaveDebuff("Chains of Ice",unit) then CastSpellByName("Chains of Ice",unit,30) end
        if getDistance(unit)<6 then CastSpellByName("Summon Gargoyle",unit,30) end 
        if UnitHaveDebuff("Frost Fever",unit) and UnitHaveDebuff("Blood Plague",unit) then 
                if SpreadPlague() then CastSpellByName("Pestilence",unit) end 
            end 
        if CheckBloodNotReady() then CastSpellByName("Blood Tap") end
        end
        
    end
    You can check distance , check if gcd is off, you can check for any kind of key is pressed (ABCDEFGHQ etc ), you can check los, you can scan all units around you for anything ( life, mana, energy, buffs) without targetting,you can make auto-follow, auto go and hold on back of enemy and many other thins which pqr can not.

    Function for check if anybody around you don't have frost fever:

    Code:
    function SpreadPlague()
        local entryCount = ObjectManager.GetObjectListEntryCount();
        local player = ObjectManager.GetActivePlayer()
        for i = 1, entryCount, 1 do
            local unit = ObjectManager.GetObjectListEntry( i )
            local objectType = unit:GetType();
            local unitReaction = player:GetReaction( unit );
            unitName = unit:GetName();
            distance =  getDistance(unit)
                if distance<8 and ( objectType == 4 or objectType == 3) and (unitReaction < 3 or string.find(unitName, "Dummy")) and UNIT_FIELD_HEALTH(unit)>0 and isNotDead(unit) then
                  if not UnitHaveDebuff("Frost Fever",unit) then return true end 
                end
        end
    end
    CastSpellByName with targeting by GUID , distance check and los check

    Code:
    function CastSpellByName(spellName,unit,maxDistance)
        if maxDistance==nil then maxDistance=40 end 
        if not unit then unit = ObjectManager.GetActivePlayer() end
        unitGUID = unit:GetGUID();
        unitName = unit:GetName();
         if SpellAvailable(spellName) and CanCast==1 and GCD_ResetTimer==1 then
            if not unitChanneling("player") and not unitCasting("player") and not iHaveLos(unit) and getDistance(unit)<maxDistance  then   
                Plus.DoString( 'CastSpellByName("'..spellName..'","'..unitGUID..'")' )
            end
    	end
    end
    etc. PQR is primivite.

    Full Working wow+ 4.3.4 unholy dk pvp? rotation
    Code:
    function Load()
        Plus.PrintChat("\124c00FF00ff".. Plus.GetScriptName().."\124cFFFFFFff loaded" );
    	Event.RegisterTimerCallback( Offensive,20, true );
    	Event.RegisterTimerCallback( Interrupt,200, true );
    	Event.RegisterTimerCallback( GetStats, 1, true );
    	Event.RegisterSignalCallback(UNIT_SPELLCAST_SUCCEEDED, FRAMEEVENT_UNIT_SPELLCAST_SUCCEEDED)
    end
    function Interrupt()
    		unit = ObjectManager.GetCurrentTarget()
    			if CheckCasting()~=0 then
    				if getDistance(unit)<=5 and SpellAvailable("Mind Freeze") then CastSpellByName("Mind Freeze",unit,5) end
    				if getDistance(unit)>5 then  
    				if not SpellAvailable("Strangulate") then CastSpellByName("Death Grip",unit,25) end 
    				CastSpellByName("Strangulate",unit,30)
    				end 
    			end
    end
    			
    CanCast=1
    GCD_ResetTimer = 1
    GCD_StartTime = os.clock()
    GCD_Time = 1.0
    
    function GetStats()
    	GCD_Difference = os.clock()-GCD_StartTime
    	if GCD_Difference>GCD_Time then	CanCast=1 GCD_ResetTimer = 1 else CanCast=0 end
    end
    
    function UNIT_SPELLCAST_SUCCEEDED( identifier, spellId,unitID, spell)
        --if unitID=="player" then Plus.PrintChat(unitID.." "..spell.." "..os.clock()); end
        if unitID=="player" then
    		if GCD_ResetTimer == 1 then GCD_StartTime = os.clock() GCD_ResetTimer = 0 end
    	end
    end
    
    function CastSpellByName(spellName,unit,maxDistance)
        if maxDistance==nil then maxDistance=40 end 
        if not unit then unit = ObjectManager.GetActivePlayer() end
        unitGUID = unit:GetGUID();
        unitName = unit:GetName();
         if SpellAvailable(spellName) and CanCast==1 and GCD_ResetTimer==1 then
            if not unitChanneling("player") and not unitCasting("player") and not iHaveLos(unit) and getDistance(unit)<maxDistance  then   
                Plus.DoString( 'CastSpellByName("'..spellName..'","'..unitGUID..'")' )
                Plus.PrintChat(spellName.." ".." "..unitName.." "..os.clock())
            end
    	end
    end
    
    function CheckTrinket()
    	trinketReady = Plus.DoString( "startTime, duration, enable = GetItemCooldown(61034);return duration" );
    	if trinketReady == "0" then return true else return false end
    end
    
    function CheckGloves()
    	glovesReady = Plus.DoString( "startTime, duration, enable = GetItemCooldown(60409);return duration" );
    	if glovesReady == "0" then return true else return false end
    end
    
    function CheckCasting()
    	startTime = Plus.DoString('if (UnitCastingInfo("target") or UnitChannelInfo("target")) then return 1 end' );
    	if startTime=="1" then return os.clock() else return 0 end 
    end
    
    
    
    
    
    
    
    function Offensive()
    	if Plus.IsKeyPressed( VK_W) then
    		DeathAndDecay()
    	end
    	unit = ObjectManager.GetCurrentTarget()
    	player = ObjectManager.GetActivePlayer()
    	if not UnitHaveBuff("Horn of Winter",player) then CastSpellByName("Horn of Winter",unit,30) end
    	if unit and isEnemy() then 
    	Plus.DoString('RunMacroText("/startattack")')
    	Plus.DoString( 'RunMacroText("/petattack")' )
    	if not UnitHaveDebuff("Frost Fever",unit) and not UnitHaveDebuff("Blood Plague",unit) then CastSpellByName("Outbreak",unit) end
            if not SpellAvailable("Outbreak") then 
                if not UnitHaveDebuff("Frost Fever",unit) then CastSpellByName("Icy Touch",unit) end
                if not UnitHaveDebuff("Blood Plague",unit) then CastSpellByName("Plague Strike",unit) end
            end 
    	if SpellAvailable("Dark Transformation") then 	CastSpellByName("Dark Transformation") end
    	if UnitHaveBuff("Sudden Doom",player) then CastSpellByName("Death Coil",unit,30) end
    	if UnitHaveBuff("Unholy Strength",player) then 
    		if CheckRuneNotReady() then EmpowerRuneWeapon() end 
    		if CheckTrinket() then Plus.DoString('RunMacroText("/use 13")') end
    		if CheckGloves() then Plus.DoString('RunMacroText("/use 10")') end 
    		CastSpellByName("Unholy Frenzy",unit)
    	end
      	--CastSpellByName("Necrotic Strike",unit,5)
    	CastSpellByName("Necrotic Strike",unit,5)
    	CastSpellByName("Festering Strike",unit,5)
    	CastSpellByName("Scourge Strike",unit,5)
    	--DeathAndDecay()
    	if not Plus.IsKeyPressed( VK_Q ) then
    		if GetRunicPower()>34  then CastSpellByName("Death Coil",unit,30) end
    	else
    		CastSpellByName("Summon Gargoyle",unit)
    	end
    
    	if getDistance(unit)>5 and not UnitHaveDebuff("Chains of Ice",unit) then CastSpellByName("Chains of Ice",unit,30) end
    	if getDistance(unit)<6 then CastSpellByName("Summon Gargoyle",unit,30) end 
    	if UnitHaveDebuff("Frost Fever",unit) and UnitHaveDebuff("Blood Plague",unit) then 
                if SpreadPlague() then CastSpellByName("Pestilence",unit) end 
            end 
    	if CheckBloodNotReady() then CastSpellByName("Blood Tap") end
    	end
    	
    end
    
    function SpreadPlague()
        local entryCount = ObjectManager.GetObjectListEntryCount();
        local player = ObjectManager.GetActivePlayer()
        for i = 1, entryCount, 1 do
            local unit = ObjectManager.GetObjectListEntry( i )
            local objectType = unit:GetType();
            local unitReaction = player:GetReaction( unit );
            unitName = unit:GetName();
            distance =  getDistance(unit)
                if distance<8 and ( objectType == 4 or objectType == 3) and (unitReaction < 3 or string.find(unitName, "Dummy")) and UNIT_FIELD_HEALTH(unit)>0 and isNotDead(unit) then
                  if not UnitHaveDebuff("Frost Fever",unit) then return true end 
                end
        end
    end
    
    function isNotDead(unit)
        unitGUID = unit:GetGUID();
        if Plus.DoString('if UnitIsDeadOrGhost("'..unitGUID..'")~=1 then return true end')=="true" then return true end
    end 
    function DarkSimulacrum(unit)
    	mana = UNIT_FIELD_MAXMANA(unit)
    	if mana>0  then 
    		CastSpellByName("Dark Simulacrum",unit,30) 
    	end
    end	
    
    function Mounted()
        if Plus.DoString( 'return IsMounted()')=="1" then return true else return false end
    end
    
    function strBuff()
    	if UNIT_FIELD_HEALTH(unit)>30000 then 
    	if getDistance(unit)<=5 then 
    		if not UnitHaveBuff("Pillar of Frost",player) and SpellAvailable("Pillar of Frost") then
    			CastSpellByName("Pillar of Frost")
    		end
    		
    	end
    	end 
    end
    
    function kmProc()
    	if UnitHaveBuff("Killing Machine",player) then 
    	if CheckRuneNotReady() then EmpowerRuneWeapon() end 
    	if CheckBloodNotReady() then CastSpellByName("Blood Tap") end
    		strBuff()
    	end
    end
    
    function isEnemy()
        local Target = ObjectManager.GetCurrentTarget();
        if Target then 
        local currPlayer = ObjectManager.GetActivePlayer();
        local objectType = Target:GetType();
    	local unitReaction = currPlayer:GetReaction( Target );
        unitName = Target:GetName();
        if ( objectType == 4 or objectType == 3) and unitReaction < 3 or string.find(unitName, "Dummy")  then return true end
        end
    end
    
    function EmpowerRuneWeapon()
    	if getDistance(unit)<5 and CheckRuneNotReady() then CastSpellByName("Empower Rune Weapon") end
    end 
    
    function CheckRuneNotReady()
    	runeStatusFrost = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(6);return start" );
    	runeStatusDeath = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(2);return start" );
    	if runeStatusFrost~="0" and runeStatusDeath~="0" then return true else return false end
    end 
    
    function CheckFirstReady()
    	runeStatusFrost = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(1);return start" );
    	if runeStatusFrost=="0" then return true else return false end
    end 
    
    function CheckFifthtReady()
    	runeStatusFrost = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(5);return start" );
    	if runeStatusFrost=="0" then return true else return false end
    end 
    
    function CheckThirdReady()
    	runeStatusFrost = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(3);return start" );
    	if runeStatusFrost=="0" then return true else return false end
    end 
    
    function CheckFourthReady()
    	runeStatusFrost = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(3);return start" );
    	if runeStatusFrost=="0" then return true else return false end
    end 
    
    
    function CheckSixthReady()
    	runeStatusFrost = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(6);return start" );
    	if runeStatusFrost=="0" then return true else return false end
    end 
    
    function CheckBloodNotReady()
    	runeStatusDeath1 = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(1);return start" );
    	runeStatusDeath2 = Plus.DoString( "start, duration, runeReady = GetRuneCooldown(2);return start" );
    	if runeStatusDeath2~="0" and runeStatusDeath1~="0" then return true else return false end
    end 
    
    
    function GetRunicPower()
        runicPower = Plus.DoString('return UnitPower("player",6)')
        toInt = runicPower + 0
        return toInt
    end
    
    
    function DeathAndDecay()
    	if SpellAvailable("Death and Decay") and getDistance(unit)<8 then 
    	Target = ObjectManager.GetCurrentTarget();
        X,Y,Z = Target:GetLocation()
        Plus.DoString('RunMacroText("/cast Death and Decay")')
        Player.CastCurrentSpell( X, Y, Z )
    	end
    end
    
    
    function  PowerWordBarrier(unit)
    	if SpellAvailable("Power Word: Barrier") and getDistance(unit)<30 then 
    		X,Y,Z = unit:GetLocation()
    		Plus.DoString('RunMacroText("/cast Power Word: Barrier")')
    		Player.CastCurrentSpell( X, Y, Z )
    	end
    end
    
    
    
    function Defend()
    		player = ObjectManager.GetActivePlayer()
            PLAYER_FIELD_MAXHEALTH = UNIT_FIELD_MAXHEALTH(player)
            PLAYER_FIELD_HEALTH = UNIT_FIELD_HEALTH(player)
            PLAYER_HEALTH_PERCENT = 100 * PLAYER_FIELD_HEALTH/PLAYER_FIELD_MAXHEALTH
        if PLAYER_HEALTH_PERCENT<45 then
    		if not UnitHaveBuff("Power Word: Shield",player) and not UnitHaveBuff("Weakened Soul",player) then  CastSpellByName("Power Word: Shield",player) end
    		if not UnitHaveBuff("Prayer of Mending",player) then  CastSpellByName("Prayer of Mending",player) end
            if SpellAvailable("Desperate Prayer") then Plus.DoString('RunMacroText("/stopcasting")') CastSpellByName("Desperate Prayer",player) end
        end
    end
    
    function FindLowestHealth()
        g_distanceList = {};
        g_objectList ={};
        counter = 0
        local entryCount = ObjectManager.GetObjectListEntryCount();
        local player = ObjectManager.GetActivePlayer()
        for i = 1, entryCount, 1 do
            local unit = ObjectManager.GetObjectListEntry( i )
            local objectType = unit:GetType();
            -- if FIELD_HEALTH> and distance<40 and objectType == 4 and unitReaction > 3 and HEALTH_PERCENT<90 then
            if  objectType == 4  then
                local unitReaction = player:GetReaction(unit);
                if unitReaction > 3 then
                    distance =  getDistance(unit)
                        if distance<40 then
                        if UnitHaveToDispell(unit) then CastSpellByName("Dispel Magic",unit) end
                        FIELD_MAXHEALTH = UNIT_FIELD_MAXHEALTH(unit)
                        FIELD_HEALTH = UNIT_FIELD_HEALTH(unit)
                        HEALTH_PERCENT = 100 * FIELD_HEALTH/FIELD_MAXHEALTH
                            if FIELD_HEALTH>1 and HEALTH_PERCENT<90 then 
                            g_distanceList[counter] =  HEALTH_PERCENT
                            g_objectList[counter] = unit
                            counter = counter + 1
                            end
                        end 
                end 
            end
        end
        for counter,HEALTH_PERCENT in spairs(g_distanceList, function(t,a,b) return t[b] < t[a] end) do
            selectedObjectNumber = counter
            end
            --Plus.PrintChat( selectedObjectNumber )
            return g_objectList[selectedObjectNumber]
    end
    
    
    function UnitHaveToDispell(unit)
        unitGUID = unit:GetGUID();
        if Plus.DoString('local f=0; for i=1,40 do  debuff,_,_,count,bufftype,dur = UnitDebuff("'..unitGUID..'", i)  if ((bufftype == "Magic") ) and dur > 1 then f=1  end  end if f==1 then return true end')=="true" then return true end
    end
    
    function spairs(t, order)
        -- collect the keys
        local keys = {}
        for k in pairs(t) do keys[#keys+1] = k end
    
        -- if order function given, sort by it by passing the table and keys a, b,
        -- otherwise just sort the keys 
        if order then
            table.sort(keys, function(a,b) return order(t, a, b) end)
        else
            table.sort(keys)
        end
    
        -- return the iterator function
        local i = 0
        return function()
            i = i + 1
            if keys[i] then
                return keys[i], t[keys[i]]
            end
        end
    end
    
    
    function UnitHaveBuff(spellName,unit) 
        unitGUID = unit:GetGUID();
    	if Plus.DoString('local f= 0  for i=1,40 do local name, count, unitCaster = UnitBuff("'..unitGUID..'",i)  if  name=="'..spellName..'" then f=1 end  end  if f==1 then return true end') == "true" then return true end
    end
    
    function UnitHaveMyDebuff(spellName,unit) 
        unitGUID = unit:GetGUID();
    	if Plus.DoString('local f=0; for i=1,40 do debuff={UnitDebuff("'..unitGUID..'",i)} if debuff[8]=="player" and debuff[1]=="'..spellName..'" then f=1 end end if f==1 then return true end') == "true" then return true end
    end
    
    function UnitHaveDebuff(spellName,unit) 
        unitGUID = unit:GetGUID();
    	if Plus.DoString('local f=0; for i=1,40 do debuff={UnitDebuff("'..unitGUID..'",i)} if debuff[1]=="'..spellName..'" then f=1 end end if f==1 then return true end') == "true" then return true end
    end
    
    function IsMoving()
         if resetTimer==nil then resetTimer =1 end
         if not player then player = ObjectManager.GetActivePlayer() end
         if resetTimer == 1 then
            startTime = os.clock()
            pX, pY = player:GetLocation();
            positionSum = pX+pY
            resetTimer = 0
        end
        difference = os.clock()-startTime
        if difference>0.1 then
            pX, pY, pZ = player:GetLocation();
            positionSum2 = pX+pY
            if positionSum~=positionSum2 then resetTimer=1 return true   end
        end
    end
    
    
    function iHaveLos(unit)
        local Target = unit;
        local currPlayer = ObjectManager.GetActivePlayer();
        local pX, pY, pZ = currPlayer:GetLocation();
        oX,oY,oZ = Target:GetLocation()
        local result = D3D.TraceLine(oX, oY, oZ + 2.35, pX, pY, pZ + 2.35);
        if result~=nil then return true else return false end
    end
    
    function getDistance(unit)
        local player = ObjectManager.GetActivePlayer()
        local oX,oY,oZ = unit:GetLocation()
        local pX, pY, pZ = player:GetLocation();
        local diffX = pX - oX;
        local diffY = pY - oY;
        local distance =  math.sqrt( math.pow( diffX, 2 ) + math.pow( diffY, 2 ) )
        return distance
    end
    
    function unitCasting(unitGUID)
    	isCasting = Plus.DoString('spell, _, _, _, _, endTime = UnitCastingInfo("'..unitGUID..'");return spell')
    	if isCasting ~="nil" then return true else return false end
    end
    
    function unitChanneling(unitGUID)
    	isCasting = Plus.DoString('spell, _, _, _, _, endTime = UnitChannelInfo("'..unitGUID..'");return spell')
    	if isCasting ~="nil" then return true else return false end
    end
    
    function GetSpellCooldown(spellName)
        start,duration=Plus.DoString( 'start, duration, enabled = GetSpellCooldown("'..spellName..'");return start,duration')
    	start = os.clock()
        return start,duration
    end
    
    function IsUsableSpell(spellName)
        usable=Plus.DoString( 'usable, nomana = IsUsableSpell("'..spellName..'");return usable' )
        return usable
    end
    
    function SpellAvailable(spellName)
        local spellStartTime, spellDuration = GetSpellCooldown(spellName)
        local spellUsable = IsUsableSpell(spellName)
        local spellAvailable = false
    
        if spellUsable then
            if spellStartTime ~= nil then
                local spellTimeLeft = spellStartTime + spellDuration - os.clock()
                    if spellTimeLeft <= 0.125 then spellAvailable = true end
            end
        end
        return spellAvailable
    end
    
    function UNIT_FIELD_HEALTH(unit)
        local currentTargetPointer = unit:GetPointer()
        local ObjStorage = currentTargetPointer  + 0xC
        local unitMemoryBlockStart = Memory.Read( ObjStorage, "int" )
        local value = Memory.Read( unitMemoryBlockStart+0x20+0x12*4, "int" )
        return value
    end
    
    function UNIT_FIELD_MAXHEALTH(unit)
        local currentTargetPointer = unit:GetPointer()
        local ObjStorage = currentTargetPointer  + 0xC
        local unitMemoryBlockStart = Memory.Read( ObjStorage, "int" )
        local value = Memory.Read( unitMemoryBlockStart+0x20+0x18*4, "int" )
        return value
    end
    
    function UNIT_FIELD_MAXMANA(unit)
        local currentTargetPointer = unit:GetPointer()
        local ObjStorage = currentTargetPointer  + 0xC
        local unitMemoryBlockStart = Memory.Read( ObjStorage, "int" )
        local value = Memory.Read( unitMemoryBlockStart+0x20+0x19*4, "int" )
        return value
    end
    
    function Unload()
        Plus.PrintChat("\124c00FF00ff".. Plus.GetScriptName().."\124cFFFFFFff unloaded" );
    end
    Last edited by xian65; 01-17-2016 at 10:38 AM.

  13. #148
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the Check Distance and Player/Target Facing CPU consuming for WoW+?

  14. #149
    xian65's Avatar Member
    Reputation
    2
    Join Date
    Feb 2015
    Posts
    19
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No lags for that. The isBehind checking function ( om my crappy code :P )
    Code:
    function isBehind()
    	local tyllewo = 0
    	local tylprawo = 0
    	local oX,oY,oZ = ObjectManager.GetCurrentTarget():GetLocation()
    	local pX, pY, pZ =  ObjectManager.GetActivePlayer():GetLocation();
    	d = math.atan2((oY - pY), (oX - pX))
    	r = d - unit:GetRotation()
    	if (r < 0) then  r = r + (math.pi * 2)  end
    	r = (r*180/math.pi)
    	if r<0 then r=360+r end
    	--Plus.PrintChat(r)
    	if r>315 then tyllewo=1 end
    	if r<40 then tylprawo=1 end
    	if tyllewo==1 or tylprawo==1 then return true end
    end

  15. #150
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh, I meant to ask for the Line of Sight function. Have you tested it and does it work? PQR uses relatively the same coding for in front and behind. The function should be 180 degrees behind the target (or in front). So it's like a semi-circle. So the vector angle between Target and Player (d) and the difference between "d" must be > pi/2. for the 2nd calculation (if r<0 then r=360+r end), r is never < 0, because you already convert the radians into a positive number. r < pi/2 (90 degrees) or r > 3pi/2 (270 degrees). You can keep it in radians to avoid doing more calculations. math.atan2 return the value in radians, so keep the whole thing in radians. Here it is if you're lazy, localizing the math function is slightly more efficient (and multiplication):

    Code:
    function isBehind()
    local pi = math.pi
    local arctan = math.arctan
    	local tyllewo = 0
    	local tylprawo = 0
    	local oX,oY,oZ = ObjectManager.GetCurrentTarget():GetLocation()
    	local pX, pY, pZ =  ObjectManager.GetActivePlayer():GetLocation();
    	d = arctan((oY - pY), (oX - pX))
    	r = d - unit:GetRotation()
    	if (r < 0) then  r = r + (pi * 2)  end
    	--Plus.PrintChat(r)
    	if r> 1.5*pi then tyllewo=1 end
    	if r< 0.5*pi then tylprawo=1 end
    	if tyllewo==1 or tylprawo==1 then return true end
    end
    Last edited by Numba1stunna1; 02-03-2016 at 04:25 PM.

Page 10 of 11 FirstFirst ... 67891011 LastLast

Similar Threads

  1. [PQR] Sub Rogue PvP Profile Public Edition
    By cpowroks in forum WoW Bot Maps And Profiles
    Replies: 36
    Last Post: 11-12-2013, 10:02 PM
  2. [Buying] [PQR] WTB Rogue PvP Profile
    By jarrito66 in forum World of Warcraft Buy Sell Trade
    Replies: 3
    Last Post: 08-08-2013, 10:58 AM
  3. Subtlety Rogue PvP profile 5.2
    By Vinshom in forum WoW Bot Maps And Profiles
    Replies: 35
    Last Post: 07-06-2013, 09:02 PM
  4. [Selling] Sub Rogue PvP Profile Premium Edition
    By cpowroks in forum World of Warcraft Buy Sell Trade
    Replies: 11
    Last Post: 05-23-2013, 08:35 PM
  5. [Release] Looking for PQR Profile for Rogue PvP
    By alyssaisit in forum World of Warcraft Bots and Programs
    Replies: 2
    Last Post: 10-17-2012, 05:21 PM
All times are GMT -5. The time now is 07:04 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