What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

AoE Click to cast spells as simple as possible.

Shinugami

New Member
Joined
Mar 1, 2012
Messages
17
Reaction score
0
Hi,
I've progressed a lot since my last post about targeting. This time my question is about the following quote from FPSware

Code:
/// <summary>
/// Cast a given spell using click-to-cast
/// </summary>
/// <param name="spellName">Spell name to cast</param>
/// <param name="clickCastLocation">WoWPoint to cast the spell</param>
/// <returns></returns>
public static bool Cast(string spellName, WoWPoint clickCastLocation)
{

bool result = SpellManager.Cast(spellName);
LegacySpellManager.ClickRemoteLocation(clickCastLocation);
Utils.Log("-" + spellName, Utils.Colour("Blue"));
return result;

}

When I type in
Code:
LegacySpellManager.
I only get the option for MouseButton, like this:

Code:
LegacySpellManager.MouseButton
Am I missing a namespace? I'm using the following:
Code:
using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using TreeSharp;

Also, how do I get the the Namespace for Utils in this code:
Code:
Utils.Log("-" + spellName, Utils.Colour("Blue"));
I think if I work out how to access these it will make my coding efforts a lot easier. At the moment I've been learning how to code by tweaking other people's code and gradually writing my own code but I haven't got the AoE to work for me because it usually uses code I cannot access I assume because I'm not using a correct namespace or I'm missing a reference.
Any help will be greatly appreciated.
 
Code:
Styx.Logic.Combat.LegacySpellManager.ClickRemoteLocation(WoWPoint goes here)
thats the full tree.

the fact you said you have it pulling mouse button means you have it, just try putting in ClickRemoteLocation and see if it takes it, or make sure you references are correctly linked in your visual studio project.
 
With the references, are they the HB.EXE and the Tripper.Tools.dll only? I have only added these 2 as references.
 
With the references, are they the HB.EXE and the Tripper.Tools.dll only? I have only added these 2 as references.
what i meant was, get rid of them then re-add them back in, so visual studio can uild the api again, maybe it missed something the first time.


put this in VS
Styx.Logic.Combat.LegacySpellManager.ClickRemoteLocation(StyxWoW.Me.CurrentTarget.Location);

if it dost underline it red then its fine.
 
Last edited:
Yeah that line doesn't show up red at all anymore. I'll give it a go and get back to you. Thanks very much!
---moments later. Tried it!! it works like a charm!

I didn't re-add the references, it just worked after I put in the full path of the code.

And as for the Utils.

I replaced it with:

Logging.Write(Color.Yellow, "[Type Text here] Casting " + spellName);
 
Last edited:
i figured as such, if you where getting "MouseButton" the rest wasnt far off.
as far as the Logging. you should be able to do
Logging.Write(Color.Yellow, "Casting {0}". WoWSpell.Name);

depending on your spellcasting method you should be able to use something like that to automatically put the name in there.
 
Back
Top