shivaria
Active Member
- Joined
- Sep 2, 2009
- Messages
- 158
- Reaction score
- 36
SOLVED: When using Shield Skills, always "getEffectiveSkillLevel" and not "getSkillLevel"
Wish I knew about this before! lol
Does anyone know why these two different codes arent giving an accurate shield level when calling for it?
TFS 1.1
10.77
Im using this to call for it
Wish I knew about this before! lol
Does anyone know why these two different codes arent giving an accurate shield level when calling for it?
TFS 1.1
10.77
Code:
local config = {
db_table = 'players',
db_pointsColumn = 'skill_shielding',
db_idColumn = 'id',
}
local shieldLevel = db.storeQuery("SELECT `"..config.db_pointsColumn.."` FROM `"..config.db_table.."` WHERE `"..config.db_idColumn.."` = "..player:getAccountId())
Code:
local shieldLevel = player:getSkillLevel(cid, SKILL_SHIELD)
Im using this to call for it
Code:
function equalsRandomNumber(num)
return math.floor(math.random(1, num)) == 1
end
function returnMinMax(min, max, value)
return min <= value and max >= value
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if returnMinMax(1, 3, shieldLevel) then
if equalsRandomNumber(5) then
Last edited: