Evaexe
-
Posts
19 -
Joined
-
Last visited
Content Type
Forums
Articles
Bug Tracker
Downloads
Store
Posts posted by Evaexe
-
-
Hi,
To ger debuff of a target i use this code, but its seem to be very slow :
public void SerpentStingskill() { List<Aura> peon = Fight.CurrentTarget.GetAllBuff(); bool shouldCastSerpentSting = true; //SERPENT STING foreach (Aura a in peon) { if (a.SpellId == 49001 && a.Owner == ObjectManager.Me.Guid && isTargetGood()) { shouldCastSerpentSting = false; break; } } if (shouldCastSerpentSting) { Logging.Write($"{ObjectManager.Me.Guid} - SERPENT STING"); SerpentSting.Launch(); } } }
-
-
-
I'm eventully trying to check distance with :
playerToHeal.GetDistance <= 40;
But i don't know if u should use :
playerToHeal.GetDistance2D <= 40; or playerToHeal.GetDistanceZ <= 40;
What is the difference between classic, 2D and Z ?
Thanks -
Hello Wrobot community,
I'm currently working on a C# script for WoW 3.3.5a using the Wrobot framework. I've encountered an issue with my
CanCast
function, where it returnstrue
even if the player is too far away from the target. Here's my original code:internal static bool CanCast(Spell spell, WoWUnit target, bool canMove = true, bool tank = false) { // Check if the caster is not stunned, not dead, not casting, the target is alive, the spell is usable, // the distance to the target is good, and there is no line of sight issue if (!ObjectManager.Me.IsStunned && !ObjectManager.Me.IsDead && !ObjectManager.Me.IsCast && !target.IsDead && spell.IsSpellUsable && spell.IsDistanceGood && !TraceLine.TraceLineGo(target.Position) && !target.IsMounted) { if (target.MaxHealth - target.Health != 0 || tank) { return true; } } // Return false, indicating the spell cannot be cast return false; }
}
The problem seems to be related to the
spell.IsDistanceGood
condition, which does not seem to be working as intended. I'd appreciate it if anyone could help me identify the issue and suggest a solution.Thank you in advance for your assistance!
-
Hello Wrobot Community,
I am currently working on a script for WoW 3.3.5a private server, and I need some assistance in making my function asynchronous to ensure it is executed properly. Here's the code snippet I am using:
public static bool WildGrowthHeal(WowPlayerExtended player) { if (CanCast(Main.WildGrowth, player.OriginalPlayer)) { SpellManager.CastSpellByNameOn("Wild Growth", player.OriginalPlayer.Name); Logging.WriteDebug($"{player.OriginalPlayer.Name}Wild Growth"); return true; } return false; }
&&
internal static bool CanCast(Spell spell, WoWUnit target, bool canMove = true, bool tank = false) { // Check if the caster is not stunned, not dead, not casting, the target is alive, the spell is usable, // the distance to the target is good, and there is no line of sight issue if (!ObjectManager.Me.IsStunned && !ObjectManager.Me.IsDead && !ObjectManager.Me.IsCast && !target.IsDead && spell.IsSpellUsable && spell.IsDistanceGood && !TraceLine.TraceLineGo(target.Position)) { if (target.MaxHealth - target.Health != 0 || tank) { // Log the spell cast and the target's health percentage Logging.WriteDebug($"Cast: {spell.NameInGame} on {target.Name} because life had less than {target.MaxHealth - target.Health} PV and he is a {target.WowClass}"); // Return true, indicating the spell can be cast return true; } } // Return false, indicating the spell cannot be cast return false; }
This function checks if "Wild Growth" can be cast on a player and casts the spell if possible. However, I want to make sure that the function waits for the spell to be cast before proceeding further. I am aware that using
Thread.Sleep
is not the best solution, as it can block the thread and cause other issues.Instead, I would like to make this function asynchronous using
async
andawait
, but I'm not sure how to do this with the currentSpellManager.CastSpellByNameOn
method, which is not asynchronous.Could anyone please provide guidance on how to make this function asynchronous or suggest an alternative way to ensure that the spell is cast before the function proceeds further? Any help would be greatly appreciated
Thank you in advance for your assistance!
-
I would like to thank the Wholsome Discord for their help. It turns out that my
debuffAuraType
was in the third position, when it should have been in the fourth position inUnitDebuff
.Here is the modified code:
public bool CanPurify(string playerName) { var lua = $@" canPurify = false for i = 1, 40 do local name, _, _, _, debuffAuraType, _, _, _, _ = UnitDebuff(""{playerName}"", i); print(""{playerName}"") print(name) print(debuffAuraType) if (name and debuffAuraType) and (debuffAuraType == 'Magic' or debuffAuraType == 'Disease' or debuffAuraType == 'Poison') then canPurify = true break end end return canPurify "; Logging.Write($"Checking if {playerName} can be purified..."); bool result = Lua.LuaDoString<bool>(lua); Logging.Write($"Result: {result}"); return result; } public void Purify(WoWUnit p) { while (CanPurify(p.Name) && CastHeal(Cleanse, p, 100)) { SpellManager.CastSpellByNameOn("Holy Light", p.Name); } }
-
Hello Droidz,
Unfortunately, the code is not working. I am playing on WoW 3.3.5a.
At the moment, I have added some print statements:
csharpvar lua = $@" canPurify = false for i = 1, 40 do local name, _, _, debuffAuraType, _, _, _, _, _ = UnitDebuff(""{unit}"", i); print(""{unit}"") print(name) print(debuffAuraType) if (name and debuffAuraType) and (debuffAuraType == 'Magic' or debuffAuraType == 'Disease' or debuffAuraType == 'Poison') then canPurify = true break end end return canPurify ";
Here is the output:
Thank you.
-
Thank you very much! I will try your code later.
Regarding your code, my fightclass already has a priority list established based on the people in my party or raid. So, I will not use the first part of your code, as I understand it is trying to find a wowUnit to dispel.
Instead, I will pass a Wowunit player to the second function, rather than just the pseudo.
Thanks!
-
Hello Wrobot community,
I'm having an issue with the CanPurify function in my code, and I was hoping someone could help me figure out what's going on. Currently, no matter what, the function always returns false, even when the player has a debuff that should be able to be purified.
Here is the current code for the function:
public bool CanPurify(string playerName) { var lua = $@" canPurify = false for i = 1, 40 do local name, _, _, debuffAuraType, _, _, _, _, _ = UnitDebuff(""{playerName}"", i); if (name and debuffAuraType) and (debuffAuraType == 'Magic' or debuffAuraType == 'Disease' or debuffAuraType == 'Poison') then canPurify = true break end end return canPurify "; Logging.Write($"Checking if {playerName} can be purified..."); bool result = Lua.LuaDoString<bool>(lua); Logging.Write($"Result: {result}"); return result;
If anyone has any idea what might be causing this issue, or any suggestions for how I can fix it, I would really appreciate it. Thank you in advance for your help!
Best regards,
-
We maybe should update the pluging ?
-
-
with the PartyRegen pluggin party regen.
but only if "resurect when dead" is enable
-
Hi
In party product, the bot will not start regen if "ressurect when dead" is disabled
thanks
-
When i activate the 3d radar the bot tries to go in random directions around my character for a small distance and changes every 0.5 seconds, causing it to "go around in circles" and freeze it
Hi ! i'll tru to to record a path not too high and offset from the nodes (to avoid vertical movements).
-
Hello.
I have a profil gather hand made, and for unknow reason :
sometine bot turn around in fly mount at max altitude.
Someone know the reason ? What information do u need to help me ?
Thanks !
-
solved
-
Hello !
I'm trying to add smelting type of npc in my db.
But i have an issue.
When bot is launched, i go to dev tool -> NPC database -> select smelting on "Type", left "Name" blank, click on the button and nothing append
When bot is paused, i go to dev tool -> NPC database -> select smelting on "Type", left "Name" blank, click on the button and nothing append
When bot is stoped, i go to dev tool -> NPC database -> select smelting on "Type", left "Name" blank, click on the button and nothing appendWhen i put someting in the field name and clic on it appear a message box "Object not found." so the button seem work.
Thanks
C code to detect multiple buffs by ID
in Fight Classes assistance
Posted
Hi,
With ur code Zero i modified my code to write that :
That will be better than my precedent code ?
Thanks