Jump to content

Recommended Posts

hi...so i cant say how happy i am u fixed the stunn/bot stop thing...been using it hardcore now lol...but im stumped with a fightclass....well a healer one

 

i need this code    

if (target.Guid == ObjectManager.Me.Guid)
                {
                    // Cast on self
                    Lua.LuaDoString($"CastSpellByID({spell.Id}, \"player\")");
                }
                else
                {
                    // Cast on target
                    Lua.LuaDoString($"CastSpellByID({spell.Id}, \"{target.Name}\")");
                }

 

added to ------------------FightClass_Heal_Sample.zip------------------

 

im not a coder or anything so i cant fig it out

really i want a 2.4.3 paladin heal fightclass without targeting who im healing...and maybe a priority on target only if i target them.....if any one can do this id love them forever

im sure its pretty simple to some 1 on here 

anyways still cant thank you enuff for this awesome bot...im having a ball in TBC

and if its not possible what im asking its ok...

Link to comment
https://wrobot.eu/forums/topic/5982-need-help-from-one-of-you-geniuses/
Share on other sites

Hello, you can try my new fight class (should also work on tbc):

And by the way, i actually wanted to write a small fix for your problem but the file was getting bigger and bigger while i got new ideas in my mind which also needs to be implemented.

hi...this is downloading as holy grail.dll   and my computer is saying it aint safe to download....odd 

none of the other files ive downloaded from this website have ever said that...ive downloaded  lots

and even if it downloaded right i have no idea wwhat to do with a .Dll file...everthing is .xml and .cs that ive downloaded on here

thanx for the help i just dont know what to do lol

@nate11 don't worry about that. Librarys are generally better for the more  advanced tasks(gui, merge dll together & more). I know it is pretty rare to meet a .dll file here hehe but anyway if you have doubts just decompile the library & you can see everything :)

ok i finally got it to work...just put it in ur fightclass and start it lol...that simple...

however it dont work right :(

it will heal me just fine [no target] but wont heal my target or party members....

tryed it all difff ways party mode non party mode

Ok. I have setup everything for tbc: so far i can assume that raidmember or party methods / properties from wManager doesn't work correctly on 2.4.3(got raidmemberlist while not in raid, true on various party getter while not in party and so on) this is also the reason why the cast method doesn't work ;(

I will maybe report it to the bugtracker while i rewrite it with more lua values hehe

And thanks for your feedback.

 

Edit: it seems like the one lua function itself returning different values from 2.4.3 to 3.3.5a

To cast a spell over mouseover (any mouseover ) you must write the guid of target directly into mouseover adress and then cast the spell on mouseover.

For pandaria that solution is working:

string spellName = "Heal";
unit = ObjectManager.Target;
var baseAdress = (uint)wManager.Wow.Memory.WowMemory.Memory.MainModuleAddress;
uint s_MouseOver = baseAdress + 0xD65B28;
wManager.Wow.Memory.WowMemory.Memory.WriteUInt64(s_MouseOver, unit.Guid);
SpellManager.CastSpellByNameOn(spellName, "mouseover");

after digging on ownedcore I found the value of 2.4.3 mouse over adress ( I hope so: ulong mouseOverGuid: wow.exe + 0x86E950 )

so probably for 2.4.3 the function to cast somethin on mouseover will look like that:

string spellName = "Heal";
unit = ObjectManager.Target;
var baseAdress = (uint)wManager.Wow.Memory.WowMemory.Memory.MainModuleAddress;
uint s_MouseOver = baseAdress + 0x86E950;
wManager.Wow.Memory.WowMemory.Memory.WriteUInt64(s_MouseOver, unit.Guid); //WriteUInt64 or 32?
SpellManager.CastSpellByNameOn(spellName, "mouseover");

But idk that guid is already 64 bit on tbc or 32? I don't have tbc here but I think this is a good solution maybe somebody skilled can check it? ;)

 

 

@forerun the guids in tbc are in ulong = UInt64.

But i recommend to override the focus guid like @Droidz mentioned in another post & write it back.

I see no reason why not to use it while focus is still working(it's already built in every expansion in wManager.dll so you don't need to write offsets for each one).

This is how it looks like:

    public bool CastSpell(string name, wManager.Wow.ObjectManager.WoWObject obj)
    {
        if (!string.IsNullOrWhiteSpace(name) && obj != null)
        {
            var tmp = wManager.Wow.ObjectManager.ObjectManager.Me.FocusGuid;
            wManager.Wow.ObjectManager.ObjectManager.Me.FocusGuid = obj.Guid;
            new wManager.Wow.Class.Spell(name).Launch(false, false, false, "focus");
            wManager.Wow.ObjectManager.ObjectManager.Me.FocusGuid = tmp;
            return true;
        }
        return false;
    }

usage:

//closest player
CastSpell("Flash of Light", wManager.Wow.ObjectManager.ObjectManager.GetNearestWoWPlayer(wManager.Wow.ObjectManager.ObjectManager.GetObjectWoWPlayer()));

//target
CastSpell("Flash of Light", wManager.Wow.ObjectManager.ObjectManager.Me.TargetObject);

 

 

 

For someone who also needs a method for getting the WoWObject by LuaUnitId (can be used then for other things):

public WoWObject GetWoWObjectByLuaUnitId(string luaUnitId)
{
    ulong guid;
    if (!string.IsNullOrWhiteSpace(luaUnitId) && ulong.TryParse(wManager.Wow.Helpers.Lua.LuaDoString("guid = UnitGUID('" + luaUnitId + "')", "guid").Replace("x", string.Empty), System.Globalization.NumberStyles.HexNumber, null, out guid))
    	return wManager.Wow.ObjectManager.ObjectManager.GetObjectByGuid(guid);
    return new wManager.Wow.ObjectManager.WoWObject(0);
}

usage:

//can be used for any unit => http://wowwiki.wikia.com/wiki/UnitId
//get target position from object
Logging.Write(GetWoWObjectByLuaUnitId("target").Position.ToString());

//get mouseover guid from object
Logging.Write(GetWoWObjectByLuaUnitId("mouseover").Guid.ToString());

//get arena1 maxlevel by descriptor field
Logging.Write((GetWoWObjectByLuaUnitId("arena1") as wManager.Wow.ObjectManager.WoWPlayer)?.GetDescriptorAddress(Descriptors.PlayerFields.Maxlevel).ToString());

 

you guys are awesome...

i tested this agin in raid  [didnt think to try that last night]  it works

is it a wrobot bug ? <--- if it is help us on mighty @Droidz

after some more testing....it works in raids and if u convert back to party it starts working

even if i leave group [only been testing with 1 alt tho]  and rejoin

also my log is adding new stuff that it wuldnt in party like---  

Change draw object: name (Player) : 0x11C73A18 : 128324 : 1F544
to
name (Player) : 0x2E080008 : 53105 : CF71

its looking like it wont add ppl in party but will in a raid...and if i switch back to party with those same ppl in group it will heal them...but not if i form anther group with diff ppl

agin cant thank you guys enuff...

Edited by nate11

@nate11I've researched a bit more i guess i need to lookup some more lua functions which are also used for some WRobot properties.

In short: my fault was to belive that it really get the desired value from api ;)

I looked a bit at the api documentation & the offsets should be ok in wManager. For example UnitInParty("unit") if used on player:

Quote

Observed in 2.0.3: UnitInParty("player") always returns true. Even when you are not in a party. Assumed reason being: you are always in your own party (of at least one, yourself.)

 

ive used all kinds of bots like honnorbuddy and PQR and they all have the cast spell heals without having to target built in...wrobots the only 1 ive used that didnt...duno why

i wish i was smart enuff to learn the ins and outs of the code so i dont have to get help...ive tryed a bit but i cant get it...but still thanx

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...