-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathSteam.lua
25 lines (22 loc) · 1.21 KB
/
Steam.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--to view examples and lua params go in this github page: https://github.com/Y0URD34TH/Project-GLD/blob/main/LuaParams.md
local version = client.GetVersionDouble()
if version < 3.50 then
Notifications.push_error("Lua Script", "Program is outdated. Please update the app to use this script!")
else
Notifications.push_success("Lua Script", "Steam script is loaded and working!")
local function main()
local getgamename = game.getgamename()
local gameid = SteamApi.GetAppID(getgamename)
local results = {}
local mtable = { name = "Main",
links = {},
ScriptName = "Steam"
}
table.insert(mtable.links,{ name = "View on Browser", link = "https://store.steampowered.com/app/" .. gameid .. "/", addtodownloadlist = false })
table.insert(mtable.links,{ name = "Open in Steam Client", link = "steam://rungameid/".. gameid, addtodownloadlist = false })
table.insert(mtable.links,{ name = "Show Page on Steam Client", link = "steam://store/".. gameid, addtodownloadlist = false })
table.insert(results, mtable)
communication.receiveSearchResults(results)
end
client.add_callback("on_scriptselected", main)--on a game is selected in menu callback
end