Help with a simple (not to me) ingame /script command
Okie, first off thanks for looking at the thread. Basically i wanna make a button that casts shadowform, and if shadowform is already up i want it to cast Power Word: Fort. SO heres waht i tried
/script if (not string.find(UnitBuff("player", 1), "Shadowform")) then CastSpellByName("Shadowform"); else CastSpellByName("Power Word: Fortitude");end What is the index in the unitbuff command supposed to be? thanks in advance -Cenarus :p |
First off, I belive you can only cast shadow spells while in Shadoform.. so that might be your problem :) Second off, about UnitBuff:
http://www.wowwiki.com/API_UnitBuff Hope that helps! :) |
Quote:
To check if Shadowform is up you need to check all buff slots. /script local i,found,buff for i=1,24 do buff=UnitBuff("player",i) if buff and string.find(UnitBuff("player",i),"Shadowform") then found=1 end end; if not found then CastSpellByName("Shadowform") else CastSpellByName("Power Word: Fortitude") end |
All times are GMT -6. The time now is 12:15 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI