Broken script
run if sourceGUID == UnitName("target") then
if spellname==("Blind") then CastSpellByName("Vanish(Rank 3)") end end end whats wrong with this |
Well, in terms of Lua as implemented in LotRO there's a lot wrong with that. I will try to explain line by line:
Quote:
It may be that another game's Lua implementation has a "UnitName" function but no such function exists in LotRO's implementation. EDIT: There is a UnitName function in WoW's implementation but that is specific to WoW and does not exist in LotRO. Quote:
if spellname=="Blind" then Quote:
Quote:
Quote:
If you are looking for help with a WoW script, you should probably try wowinterface.com which supports WoW and would be able to provide a better answer. I'm not sure but I believe in WoW that "run" is a macro command, "/run", in which case it should be followed by a single block of Lua code so you would need a "do" statement which would encapsulate the rest of the script and then the third "end" would be ok since it would be closing the block explicitly opened with a "do". That is, change the first line to: /run do if sourceGUID == UnitName("target") then but that is just a guess as I haven't written any scripts for WoW in many years so I really don't remember if that is correct for their implementation. |
All times are GMT -5. The time now is 12:23 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI