• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.2 Chest that gives critical hit chance.

liqeen

Active Member
Joined
Nov 26, 2014
Messages
151
Solutions
1
Reaction score
30
Location
Poland
Hello, can someone help me adding the function like in the title into this script?

Code:
local storage = 35432


function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if player:getStorageValue(35432) == 1 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It's empty.")
        return true
    end
 
   if(item.uid == 6663) then
        player:setStorageValue(storage, 1)
        player:addItem(11118, 1)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You received xyz")
    end
    return true
end
How can I add a attribute "criticalstrikechance" into this? I mean if player click the chest it gives him for example 5% permament critical strike chance.
 
Critical strike chance, if you have it on your sources, is an attribute that is added to an item.
Giving Critical to a character you will need to have an onHealthChange system that adds critical through a custom condition, storage, or whatever.
 
Back
Top