bj_HEROSTAT_STR // Strength
bj_HEROSTAT_AGI // Agility
bj_HEROSTAT_INT // Intelligence
call SaveInteger(hash, 'Hpal', 0, bj_HEROSTAT_STR)
local integer stat = LoadInteger(hash, GetUnitTypeId(GetTriggerUnit()), 0)
if (stat == bj_HEROSTAT_STR) then
BJDebugMsg("Main attribute is strength.")
elseif (stat == bj_HEROSTAT_AGI) then
BJDebugMsg("Main attribute is agility.")
elseif (stat == bj_HEROSTAT_Int) then
BJDebugMsg("Main attribute is intelligence.")
endif
I don't know anything about hashtables. But i think when using hashtables im still going to use if/then/else for the spell set-up.