From f2668b6c88791dc4b6ce702556c4685cd1444eac Mon Sep 17 00:00:00 2001 From: insweater Date: Thu, 5 Feb 2015 18:54:35 +0300 Subject: [PATCH] Add giveTrophy --- gamejolt.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gamejolt.lua b/gamejolt.lua index 47595ba..7332e82 100644 --- a/gamejolt.lua +++ b/gamejolt.lua @@ -135,4 +135,9 @@ function GJ.fetchStorageKeys(isGlobal) return t end +-- trophies +function GJ.giveTrophy(id) + return string.find(req("trophies/add-achieved/?trophy_id=" .. tostring(id), "dump", true, true), "SUCCESS") ~= nil +end + return GJ \ No newline at end of file