Hi, I have this script
but I was wondering how do I print the percentage of this particular storage "33250" for example when you look at yourself or in someone else it says Total Damage: "The number of percentages that I have from wearing this item"but I couldn't because when I try to create an onLook event with creatruescripts to check this storage it says
Using tfs 1.4.1
edit: I found player.lua but I don't know how to make it in the events folder seems so complicated.
Lua:
local config = {
[2361] = {damageincrease = 5}, -- frozen starlight = 5% extra damage
[2123] = {damageincrease = 10} -- ring of the sky = 10% extra damage
}
function onEquip(player, item, slot, isCall)
if isCall == false then
player:setStorageValue(33250, player:getStorageValue(33250) + config[item:getId()].damageincrease) -- add damage increase
end
return true
end
function onDeEquip(player, item, slot)
player:setStorageValue(33250, player:getStorageValue(33250) - config[item:getId()].damageincrease) -- remove damage increase
return true
end
Code:
[Error - CreatureEvent::configureEvent] Invalid type for creature event: onlook_damage_increase
[Warning - BaseEvents::loadFromXml] Failed to configure event
edit: I found player.lua but I don't know how to make it in the events folder seems so complicated.
Last edited: