Fermantor
Active Member
I like the crates in RL Tibia, where you get an Item every hour. My problem was, that if I change the storage back via setPlayerStorage, it only works, if the player is online. So I tried to use db.querry, but it won't work 
This is my code:
I am using TSF 0.2.14 on the 9.61 OT (Mystic Spirit)

This is my code:
LUA:
function back(id) --as id here, the GUID is sent from the player
db.query("UPDATE `player_storage` SET `value` = -1 WHERE `player_id` = " .. id .. " AND `key` = 11010")
end
I am using TSF 0.2.14 on the 9.61 OT (Mystic Spirit)