SixNine
Active Member
- Joined
- Dec 12, 2018
- Messages
- 442
- Reaction score
- 40
tfs 1.2
Hello so im using stones that upgrades your weapon by adding some attack. But for some reason it doesnt allow to upgrade distanced weapons and not sure how to edit the code, but i know that its this code part
Hello so im using stones that upgrades your weapon by adding some attack. But for some reason it doesnt allow to upgrade distanced weapons and not sure how to edit the code, but i know that its this code part
Lua:
local itemAttack = targetItem:getAttack()
local itemDefense = targetItem:getDefense()
if ((upgradeItem.addAttack and upgradeItem.addAttack > 0) and itemAttack <= 0) or ((upgradeItem.addDefense and upgradeItem.addDefense > 0) and itemDefense <= 0) then
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Item %s upgrades only weapons.", item:getName()))
return true
end