Jump to content

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
https://wrobot.eu/forums/topic/12002-check-mammoth-spell/
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
https://wrobot.eu/forums/topic/12002-check-mammoth-spell/#findComment-57442
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
https://wrobot.eu/forums/topic/12002-check-mammoth-spell/#findComment-59964
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
https://wrobot.eu/forums/topic/12002-check-mammoth-spell/#findComment-59965
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
https://wrobot.eu/forums/topic/12002-check-mammoth-spell/#findComment-59967
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
https://wrobot.eu/forums/topic/12002-check-mammoth-spell/#findComment-59968
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
https://wrobot.eu/forums/topic/12002-check-mammoth-spell/#findComment-61071
Share on other sites

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...