Page 1 of 1
New LUA Functions: IsEpic, ProcDamage
Posted: Fri Dec 06, 2013 4:59 pm
by Jabantiz
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Fri Dec 06, 2013 5:15 pm
by John Adams
I find myself saying this all the time.
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Fri Dec 06, 2013 5:31 pm
by Zcoretri
John Adams wrote:
I find myself saying this all the time.
LMAO
Guess I don't have to ask for a LUA function to test for Epic like I was gonna do when I got home.
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Sat Dec 21, 2013 11:58 am
by John Adams
11:50:41 E LUA : Error loading Spells/Scout/CheapShot.lua:11: ')' expected near ',' (file name: 'Spells/Scout/CheapShot.lua')
Code: Select all
function precast(Caster, Target)
-- Does not affect Epic targets
return (not IsEpic(Target), 43)
end
I fixed the what I thought was a missing paren, but LUA engine still complaining about this line.
side note: I don't think LUA:Precast made it to the wiki, as I cannot seem to search for it.
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Sat Dec 21, 2013 12:56 pm
by Jabantiz
That is my mistake sorry, should have been
And I never put precast on the wiki, will look into making a page for it and other new functions like this (equip, unequip, combat_reset, and so on) this weekend
EDIT: Just fixed the error on the editor
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Sat Dec 21, 2013 1:06 pm
by John Adams
Let me ask this, since I tend to not understand double and triple negatives == true
Doesn't precast() just return true/false (and your new error code)? So why do you need a (not (check-if-true)) double dip? Can't it just be IsEpic or not?
Edit: Oh, is this precast a check that if it is NOT IsEpic, then it's True? lol... my god, how does this make sense to you? haha
Edit2: So it could more practically be
Code: Select all
if IsEpic(Target) then
return false;
else
return true;
end
???
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Sat Dec 21, 2013 5:06 pm
by Jabantiz
Yes it is checking to make sure the target is not epic
And yes your code is the same result.
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Fri Dec 27, 2013 5:41 pm
by Jabantiz
Jabantiz wrote:And I never put precast on the wiki, will look into making a page for it and other new functions like this (equip, unequip, combat_reset, and so on) this weekend
Later then I intended but I put precast on the spell scripts wiki page, haven't put the others up yet as there is no pages for item, zone, quest, or spawn scripts. I will work on these but it will take some time.
Re: New LUA Functions: IsEpic, ProcDamage
Posted: Fri Dec 27, 2013 11:25 pm
by Jabantiz
Worked on the wiki pages and added basic info
Spawn scripts
Quest Scripts
Item Scripts
Zone scripts
I had planned to add a lot more and basically make them like tutorials but the more I think of it it might be better to leave them like this as a reference and detailed info on how to use them in a tutorial page. Thoughts?