77 lines
3.3 KiB
XML
77 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
<soap:Body>
|
|
<OpenJobEx xmlns="http://roblox.com/">
|
|
<job>
|
|
<id>{JobID}</id>
|
|
<expirationInSeconds>30</expirationInSeconds>
|
|
<category>1</category>
|
|
<cores>1</cores>
|
|
</job>
|
|
<script>
|
|
<name>RenderScript</name>
|
|
<script>
|
|
-- Avatar v1.0.2
|
|
-- This is the thumbnail script for R6 avatars. Straight up and down, with the right arm out if they have a gear.
|
|
|
|
local baseUrl, thumbnailKey, renderType, assetId, synchronous = ...
|
|
|
|
local ThumbnailGenerator = game:GetService("ThumbnailGenerator")
|
|
|
|
pcall(function()
|
|
game:GetService("ContentProvider"):SetBaseUrl(baseUrl)
|
|
game:GetService("InsertService"):SetAssetUrl(baseUrl .. "/Asset/?id=%d")
|
|
game:GetService("InsertService"):SetAssetVersionUrl(baseUrl .. "/Asset/?assetversionid=%d")
|
|
end)
|
|
|
|
game:GetService("HttpService").HttpEnabled = true
|
|
game:GetService("ScriptContext").ScriptsDisabled = true
|
|
|
|
print("[" .. game.JobId .. "] Starting new render for " .. renderType .. " ID " .. assetId)
|
|
game:HttpPost(baseUrl .. "/api/render/update?ApiKey=" .. thumbnailKey .. "&RenderJobID=" .. game.JobId, '{"Status": 1}', synchronous, "text/plain", true)
|
|
|
|
local player = game:GetService("Players"):CreateLocalPlayer(0)
|
|
player.CharacterAppearance = baseUrl .. "/Asset/CharacterFetch.ashx?userId=" .. assetId .. "&serverId=-1&t=" .. tick()
|
|
player:LoadCharacter(false)
|
|
|
|
-- Raise up the character's arm if they have gear.
|
|
local gear = player.Backpack:GetChildren()[1]
|
|
if gear then
|
|
gear.Parent = player.Character
|
|
player.Character.Torso['Right Shoulder'].CurrentAngle = math.rad(90)
|
|
end
|
|
|
|
local click = ThumbnailGenerator:Click("PNG", 1024, 1024, true)
|
|
local clickObject = ThumbnailGenerator:Click("OBJ", 420, 420, true)
|
|
|
|
result = '{"Status": 2, "Click": "' .. tostring(click) .. '", "ClickObject": [' .. tostring(clickObject) .. ']}'
|
|
print("[" .. game.JobId .. "] Successfully rendered, moving on...")
|
|
|
|
game:HttpPost(baseUrl .. "/api/render/update?ApiKey=" .. thumbnailKey .. "&RenderJobID=" .. game.JobId, result, synchronous, "text/plain", true)
|
|
</script>
|
|
<arguments>
|
|
<LuaValue>
|
|
<type>LUA_TSTRING</type>
|
|
<value>{BaseURL}</value>
|
|
</LuaValue>
|
|
<LuaValue>
|
|
<type>LUA_TSTRING</type>
|
|
<value>{ThumbnailKey}</value>
|
|
</LuaValue>
|
|
<LuaValue>
|
|
<type>LUA_TSTRING</type>
|
|
<value>{RenderType}</value>
|
|
</LuaValue>
|
|
<LuaValue>
|
|
<type>LUA_TNUMBER</type>
|
|
<value>{AssetID}</value>
|
|
</LuaValue>
|
|
<LuaValue>
|
|
<type>LUA_TBOOLEAN</type>
|
|
<value>{Synchronous}</value>
|
|
</LuaValue>
|
|
</arguments>
|
|
</script>
|
|
</OpenJobEx>
|
|
</soap:Body>
|
|
</soap:Envelope> |