Jump to content

Mage conjuring too many water


Recommended Posts

  • 2 weeks later...

Not sure if it was fixed but I couldn't make it work properly with the lua that Droidz suggested or any other way, so I put one together that works with vanilla API

local food, water = 0, 0; for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name, "Conjured") then local _, count = GetContainerItemInfo(bag,slot); if string.find(name, 'Water') then water = water + count; else food = food + count; end; end; end; end; if food <= 4 then CastSpellByName('Conjure Food') end; if water <= 4 then CastSpellByName('Conjure Water') end

 

Link to post
Share on other sites
  • 3 months later...
Quote

local count = GetItemCount(5350); if (count <= 1) { local name = GetSpellInfo(29975); RunMacroText("/cast " .. name) }

 

the problem is the item id for 5350 is rank 1 conjured water. https://tbc-twinhead.twinstar.cz/?item=5350
 
the spell 29975 is rank 8 conjured water https://tbc-twinhead.twinstar.cz/?spell=29975

the correct spell id is 5504 for rank 1 conjured water https://tbc-twinhead.twinstar.cz/?spell=5504

The below snippet of code will work for rank 1 conjured water. 

 

local count = GetItemCount(5350);
if (count <= 1)
{
	local name = GetSpellInfo(5504);
	RunMacroText("/cast " .. name) 
}



after repeated attempts I couldnt get this code to work either. i ended up using the code Twineye posted above this post.
Link to post
Share on other sites
  • 1 month later...
On 28.5.2017 at 9:01 AM, dirtyjobs said:

 

the problem is the item id for 5350 is rank 1 conjured water. https://tbc-twinhead.twinstar.cz/?item=5350
 
the spell 29975 is rank 8 conjured water https://tbc-twinhead.twinstar.cz/?spell=29975

the correct spell id is 5504 for rank 1 conjured water https://tbc-twinhead.twinstar.cz/?spell=5504

The below snippet of code will work for rank 1 conjured water. 

 

local count = GetItemCount(5350);
if (count <= 1)
{
	local name = GetSpellInfo(5504);
	RunMacroText("/cast " .. name) 
}



after repeated attempts I couldnt get this code to work either. i ended up using the code Twineye posted above this post.

Pretty sure GetItemCount isnt in the vanilla api

Link to post
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.

×
×
  • Create New...