Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isSpellUp(sources,minCount,minDuration,minPoints,modify)
- if type(sources) == "string" then sources = { sources } end -- if sources is a string make it a table...
- if cnl_util.checkMSDP(report) then
- local spell_up = false
- for k, v in pairs(msdp.CHARACTER_AFFECTS) do
- for _k, _v in pairs(sources) do
- if (v.SOURCE or "") == _v then
- if
- (minCount and v.COUNT and minCount <= tonumber(v.COUNT)) or
- (minDuration and v.DURATION and minDuration <= tonumber(v.DURATION)) or
- (minPoints and v.POINTS and minPoints <= tonumber(v.POINTS)) or
- (modify and v.MODIFY and modify == v.MODIFY) or
- not (minCount or minDuration or minPoints or modify)
- then
- spell_up = true
- end
- end
- end
- end
- return spell_up
- else
- error("isSpellUp cannot read msdp.CHARACTER_AFFECTS")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement