Jump to content

Evaexe

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Evaexe's Achievements

  1. Hi, With ur code Zero i modified my code to write that : public void SerpentStingsSkill2() { Dictionary<uint, Aura> auras = new Dictionary<uint, Aura>(); foreach (Aura aura in BuffManager.GetAuras(Fight.CurrentTarget.GetBaseAddress)) { if (aura.Owner == ObjectManager.Me.Guid) auras[aura.SpellId] = aura; } if (!auras.ContainsKey(49001)) //Check if the target don't have te debuff Serpent Sting { Logging.Write($"{ObjectManager.Me.Guid} - SERPENT STING"); // Pas nécessaire pour le fonctionnement de la fonction SerpentSting.Launch(); } } That will be better than my precedent code ? Thanks
  2. 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(); } } }
  3. Imo you'r a genius !! French : Merci Zero pour ton travail, j'apprend le c# sur Wrobot, et t'est 2 video tuto sont merveilleuse ! Engl : Thanks Zero for u work, i learn c# on Wrobot, and ur 2vid are perfect for me
  4. 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
  5. 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 returns true 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!
  6. 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 and await, but I'm not sure how to do this with the current SpellManager.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!
  7. 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 in UnitDebuff. 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); } }
  8. 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: csharp var 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.
  9. 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!
  10. 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,
  11. with the PartyRegen pluggin party regen. but only if "resurect when dead" is enable
  12. Hi In party product, the bot will not start regen if "ressurect when dead" is disabled thanks
×
×
  • Create New...