undead mage
Active Member
Hey, I was wondering if someone could help me out? So im trying to set a storage if someone doesn't have it yet but the problem is that I don't know how to get that storage from the list above. I've tried to make it myself looking at some other scripts but I can't figure it out. The part where im stuck is the part that says "STORAGE FROM LIST HERE". Im using tfs 1.3 btw.
Lua:
local rewards = {
[1044] = Storage.HiddenTreasures.WizardTower,
[1029] = Storage.HiddenTreasures.CrownQuest, -- 1030 + 1031
[1015] = Storage.HiddenTreasures.UndeadTower
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local reward = rewards[item.uid]
if not reward then
return false
end
if item[item.uid] == reward then
if player:getStorageValue(STORAGE FROM LIST HERE) < 1 then
player:setStorageValue(STORAGE FROM LIST HERE, 1)
end
end
return true
end