noshirtstan
New Member
- Joined
- Aug 2, 2020
- Messages
- 68
- Reaction score
- 2
Hey folks, I'm trying to get my scrip to check if the player has a certain item before doing an action, but it doesn't seem to want to work.
I'm using TFS 1.3.
Here is what I have so far.
Any thoughts or help would be greatly appreciated.
I'm using TFS 1.3.
Here is what I have so far.
Lua:
if player:getItemById(2553) then -- check for pick
mathCheck = math.floor(math.random() * 100) + 1
if mathCheck >= 75 then
player:addItem(26410, math.floor(math.random() * 3) + 1)
elseif mathCheck <= 74 then
player:addItem(26409, math.floor(math.random() * 3) + 1)
end
else
return player:sendCancelMessage("You need a pick to use this!")
end
end
player:setStorageValue(205000, os.time() + 1)
Any thoughts or help would be greatly appreciated.