Jump to content

Check Mammoth spell


Pudge
 Share

Recommended Posts

 

is it possible to check the mount summon spell?  

I want to add the purchase of the traveler’s tundra mammoth to my quest profile, but after using the item https://www.wowhead.com/item=44234/reins-of-the-travelers-tundra-mammoth  how can I check the presence of the mount in the book. But the way SpellManager.KnowSpell () returns false. 

I will be glad of any help

Link to comment
Share on other sites

Hey,

to check if has mount try

wManager.Wow.Helpers.SpellManager.ExistMount("mount name");

or

wManager.Wow.Helpers.SpellManager.ExistSpellBook("mount name");

 

to check if mount is mounted try

wManager.Wow.Helpers.SpellManager.HaveBuffLua("mount name");

 

Link to comment
Share on other sites

  • 5 months later...

For me it doesn't seem to be working. I want to check if the character has learned the mount yet. My code looks like this and it isnt working:

if(wManager.Wow.Helpers.SpellManager.ExistMount("White Kodo")) { wManager.wManagerSetting.CurrentSetting.GroundMountName = "White Kodo"; }

I`m using this complete condition for it:

return wManager.wManagerSetting.CurrentSetting.GroundMountName == "White Kodo" ;

Can you help me?

Link to comment
Share on other sites

1 minute ago, Wiceradon said:

For me it doesn't seem to be working. I want to check if the character has learned the mount yet. My code looks like this and it isnt working:

if(wManager.Wow.Helpers.SpellManager.ExistMount("White Kodo")) { wManager.wManagerSetting.CurrentSetting.GroundMountName = "White Kodo"; }

I`m using this complete condition for it:

return wManager.wManagerSetting.CurrentSetting.GroundMountName == "White Kodo" ;

Can you help me?

try

wManager.Wow.Helpers.SpellManager.ExistSpellBook("mount name");

 

Link to comment
Share on other sites

wManager.Wow.Helpers.SpellManager.UpdateSpellBook();
if(wManager.Wow.Helpers.SpellManager.ExistSpellBook("White Kodo")) 
{ 
Logging.Write("Exist");
wManager.wManagerSetting.CurrentSetting.GroundMountName = "White Kodo"; 
}

or use lua check


if (Lua.LuaDoString<bool>(@"for i=1,GetNumCompanions('MOUNT') do _,creatureName = GetCompanionInfo('MOUNT', i) if creatureName == 'White Kodo' then return true end end"))
{ 
Logging.Write("Exist");
wManager.wManagerSetting.CurrentSetting.GroundMountName = "White Kodo"; 
}

both should work

Link to comment
Share on other sites

12 minutes ago, pudge said:
wManager.Wow.Helpers.SpellManager.UpdateSpellBook();
if(wManager.Wow.Helpers.SpellManager.ExistSpellBook("White Kodo")) 
{ 
Logging.Write("Exist");
wManager.wManagerSetting.CurrentSetting.GroundMountName = "White Kodo"; 
}

or use lua check


if (Lua.LuaDoString<bool>(@"for i=1,GetNumCompanions('MOUNT') do _,creatureName = GetCompanionInfo('MOUNT', i) if creatureName == 'White Kodo' then return true end end"))
{ 
Logging.Write("Exist");
wManager.wManagerSetting.CurrentSetting.GroundMountName = "White Kodo"; 
}

both should work

It works! Thank you!

Link to comment
Share on other sites

  • 4 months later...

@Harvest Golem you can use something like this,

local MountsNames = { }
for i = 1, GetNumCompanions('MOUNT') do 
    local _, Name = GetCompanionInfo('MOUNT', i);
    table.insert(MountsNames, Name);
end


for B = 1 , 25 do
    local BuffName = UnitBuff("player", B);
        for Y = 1, #MountsNames do
        if string.match(BuffName, MountsNames[Y]) then
            return true;
        else
            return false;
        end
    end
end

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...