Jump to content

Bugreporter

WRobot user
  • Posts

    438
  • Joined

  • Last visited

Posts posted by Bugreporter

  1. I used this snippet in my old fightclasses

    SinisterStrike (1792) is just to check, if the target is in range. Use a spell of your spellbook which have the same range as the trinket.

     

        <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>
    if UnitExists("target") then
    	if not UnitIsFriend("player", "target") and not UnitIsDead("target") then
    		if not IsStealthed() then
    				local slot="Trinket0Slot"
    				local SinisterStrike=GetSpellInfo(1752)
    				if (GetComboPoints("player") > 0) and (IsSpellInRange(SinisterStrike,"target")==1) then
    					local slotId, texture, checkRelic = GetInventorySlotInfo(slot)
    					local itemId = GetInventoryItemID("player", slotId)
    					local start, duration, enable = GetItemCooldown(itemId)
    					if (duration==0) then
    						UseInventoryItem( slotId );
    						result=true
    					end
    				end
    		end
    	end
    end
    			</LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>--use 13 (first trinket)</SpellName>
          <CombatOnly>false</CombatOnly>
          <CastIfMounted>true</CastIfMounted>
          <CheckIfKnow>false</CheckIfKnow>
          <CheckIfSpellUsable>false</CheckIfSpellUsable>
          <CheckSpellDistance>false</CheckSpellDistance>
          <AddToSettings>true</AddToSettings>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <CanMoveDuringCast>Yes</CanMoveDuringCast>
          <DescriptionSpell>/use 13</DescriptionSpell>
        </FightClassSpell>

     

  2. GetSpellCharges do, what you want. Its not difficult to check if there are 2 charges. But it could very difficult to check, if you used one before (and want now used the second one). With my Sub-Rogue i can check a buff (31223) which exist 5 sec's longer then shadowdance (185313). (but only if a special talent used)

     

    local spellname=GetSpellInfo(36554)  --[[ Shadowstep ]]
    if UnitExists("target") and not UnitIsFriend("player", "target") and (IsSpellInRange(spellname,"target")==1) and (UnitHealth("target")&gt;1) then
    	local currentCharges, maxCharges, cooldownStart, cooldownDuration = GetSpellCharges(185313)
    	local now=GetTime();
    	if (currentCharges&gt;=2) or ((UnitBuff("player",GetSpellInfo(31223))~=nil) and (currentCharges~=0)) then
    		result=true
    		--[[ Stealth, Shadow Dance or Subterfuge ]]
    		if IsStealthed() or (UnitBuff("player",GetSpellInfo(185313))~=nil) or (UnitBuff("player",GetSpellInfo(108208))~=nil) then
    			result=false
    		end
    	end
    end

     

  3. If I add an item id, I get an CS error

    AppData\Local\Temp\unke1xss.0.cs(56,165) : error CS1001:

    As spellname, I add the item-ID. What is the right usage of this.

     

        <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>Energy</ContionType>
              <Param xsi:type="FightClassConditionNumber">
                <Type>Smaller</Type>
                <Value>30</Value>
              </Param>
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>
    function hasValue (tab, val)
        for index, value in ipairs (tab) do
            if value == val then
                return true
            end
        end
        return false
    end
    
    local Cont={}
    local mapID, isContinent = GetCurrentMapAreaID()
    if mapID and not isContinent then
    	Cont["BrokenIsles"]={1007,1015,1021,1014,1098,1024,1017,1033,1018,1081,1087,1067,1046,1041,1042,1065,1079,1045,1066,1094,1088}
    	result=hasValue(Cont["BrokenIsles"],mapID)
    	if not result then 
    		if (mapID &gt; 1008) and mapID~=1026 then
    			print("new Zone: "..mapID)
    		end
    	end
    end
    </LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>TargetHealthPercent</ContionType>
              <Param xsi:type="FightClassConditionNumber">
                <Type>Bigger</Type>
                <Value>10</Value>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>139586</SpellName>
          <CheckSpellDistance>false</CheckSpellDistance>
          <CheckIfView>false</CheckIfView>
          <AddToSettings>true</AddToSettings>
          <AddToSettingsActiveByDefault>true</AddToSettingsActiveByDefault>
          <NotSpellIsItemId>true</NotSpellIsItemId>
          <CastOnSelf>true</CastOnSelf>
          <CastOn>player</CastOn>
        </FightClassSpell>

     

  4. I've add a routine in my Rogue Assa Profile. But be aware, you will lose your main target. And @Jhin : You dont want pull all Targets in a range of 45 yard ! Thats a hunter spell and is called barrage. ;-)

    2. Line:  check if we have a target and if it is in range (in this case a Meele spell, Rupture). Use your spell with the smallest range, that you want provide

    3+4 Line: Other Buffs that we want check

    6.Line (from the bottom): Check if the DeBuffs are on the target up and running and if they are run long enough. In this case rupture must run longer then 6 seconds

    5.Line (from the bottom); next target will be selected

    In the next Code window  i've pasted the XML-Snippet to cut-and-past-and-change it in you fightclass

    local Rupture=GetSpellInfo(1943)
    if UnitExists("target") and not UnitIsFriend("player", "target") and (IsSpellInRange(Rupture,"target")==1) then
    	local CripplingPoison=GetSpellInfo(3408)
    	local DeadlyPoison=GetSpellInfo(2823)
    	local t=GetTime();
    	local buffexp,buff,buffcnt,bufftyp={},{},{},{};
    	local i,n,c,y,x,id,found=0;
    	repeat 
    		i=i+1;
    		n,_,_,c,y,_,x,_,_,_,id=UnitAura("target",i,"PLAYER HARMFUL"); 
    		if n then
    			buffcnt[n]=c
    			bufftyp[n]=y
    			buffexp[n]=x-t
    			buff[n]=id;
    			found=true
    		end
    	until (not n) or (i==40);
    	if found then
    		if (buff[Rupture] and buffexp[Rupture] &gt; 6) and buff[CripplingPoison] and buff[DeadlyPoison] then 
    			TargetNearestEnemy() 
    			result=true
    		end
    	end
    end;

    XML-snippet: (dont forget to change the value in "HostileUnitNear")

        <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>HostileUnitNear</ContionType>
              <Param xsi:type="FightClassConditionUnitNear">
                <Number>2</Number>
                <Type>BiggerOrEqual</Type>
                <Radius>5</Radius>
              </Param>
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>
    local Rupture=GetSpellInfo(1943)
    if UnitExists("target") and not UnitIsFriend("player", "target") and (IsSpellInRange(Rupture,"target")==1) then
    	local CripplingPoison=GetSpellInfo(3408)
    	local DeadlyPoison=GetSpellInfo(2823)
    	local t=GetTime();
    	local buffexp,buff,buffcnt,bufftyp={},{},{},{};
    	local i,n,c,y,x,id,found=0;
    	repeat 
    		i=i+1;
    		n,_,_,c,y,_,x,_,_,_,id=UnitAura("target",i,"PLAYER HARMFUL"); 
    		if n then
    			buffcnt[n]=c
    			bufftyp[n]=y
    			buffexp[n]=x-t
    			buff[n]=id;
    			found=true
    		end
    	until (not n) or (i==40);
    	if found then
    		if (buff[Rupture] and buffexp[Rupture] &gt; 6) and buff[CripplingPoison] and buff[DeadlyPoison] then 
    			TargetNearestEnemy() 
    			result=true
    		end
    	end
    end;
    			
                </LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>--NextEnemy</SpellName>
          <Priority>2</Priority>
          <CheckIfKnow>false</CheckIfKnow>
          <CheckIfSpellUsable>false</CheckIfSpellUsable>
          <CheckSpellDistance>false</CheckSpellDistance>
          <CheckIfView>false</CheckIfView>
          <AddToSettings>true</AddToSettings>
          <AddToSettingsActiveByDefault>true</AddToSettingsActiveByDefault>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
        </FightClassSpell>

     

  5. You can try to change the priority of spells with the fightclass editor. the most importend spells should be the first on the list. but this is tricky, because you have also a view on CP and energy and distance and Buffs and CD. Ambush (i.e.) has a very low priority, because CP used spells should be executed first, if CP>=5, and Buffs should be also used before the CP5 spells are used and Buffs only if the are not already set, or a better buff is set ... and so on

  6. A better Buffcheck.

    The charm of this check is:

    • you dont need to check all 40 possible buffs
    • you can access the buff with his name (clearer code)
    • and because you access with the name, you dont get trouble with change buff id's
    • and you can check simple buff combinations without check twice

     

     

    		local Moonfire=GetSpellInfo(155625)
    		local t=GetTime();
    		local buffexp,buff,buffcnt={},{},{};
    		local i,n,c,x,id,found=0;
    		repeat 
    			i=i+1;
    			n,_,_,c,_,_,x,_,_,_,id=UnitAura("target",i,"PLAYER HARMFUL"); 
    			if n then
    				buffcnt[n]=c
    				buffexp[n]=x-t
    				buff[n]=id;
    				found=true
    			end
    		until (not n) or (i==40);
    		if found then
    			if buff[Moonfire] then
    				...
    			end
    		end

     

  7. The problem with pickpocking is, that wrobot do attack after a view seconds doing nothing. you can

     

    -create a empty fightclass,

    -disable "Start attack" and "Attack before attacked"

    -go in stealth

    -get mob in target

    ....and the mob will be killed...(Its a bug in wrobot. I opened a bug report last year,) I have tried to disable autoattack, doing an "null-spell" , but the mob will be killed....

  8. (UnitHealth("target")==0) or direct with UnitIsDead

    or, in a quester profile:

    (wManager.Wow.Helpers.Lua.LuaDoString("local _, _, numCriteria = C_Scenario.GetStepInfo(); if not numCriteria or numCriteria == 0  then completedObj = 'true'; return; end; local critID; _, _, completedObj,_,_,_,_,_,critID = C_Scenario.GetCriteriaInfo(4); if critID ~= 24921 then completedObj = 'true'; end;", "completedObj").ToLower() == "true")

    (You have o change the (4) in GetCriteriaInfo and the 24921 to the critID of your dungeon

  9. I dont know why, but I have a lot of duplicates of downloads at the same time and from the same user. Good for the statistic, but not really informative. Maybe it would better to cleanup all statistics from duplicate User-downloads and count only the latest download from the same user. And I think this problem is not only at my file.statistics.

    Additional feature: Inform the Users, who have downloaded an older Version, that a new version is available. (i.e. Forum Notification, enable/disable per file)

    Additional feature: Statistic how many users downloaded which Version (make only sense with the feature above)

  10. Sure, you can use strict conditions, but with this bug you can never be sure, that a spell is used just in time if needed (or just skipped). It's maybe different with classes which have casttime or do channeling Spells, but with a fight class (i.e. Rogue), which has only instant spells, it destroy the rota

×
×
  • Create New...