Merge pull request #306 from tp-link-extender/main

Mainj
This commit is contained in:
Lewin Kelly 2023-11-05 00:39:54 +00:00 committed by GitHub
commit a8df71e9e4
4 changed files with 40 additions and 10 deletions

View File

@ -3226,7 +3226,8 @@ declare class PathWaypoint
end
declare class CFrame
LookVector: Vector3
lookVector: Vector3
LookVector: Vector3 -- ?
Position: Vector3
RightVector: Vector3
Rotation: CFrame
@ -5661,6 +5662,9 @@ declare class InsertService extends Instance
function LoadLocalAsset(self, assetPath: string): Instance
function LoadPackageAsset(self, url: Content): { Instance }
function LoadPackageAssetAsync(self, url: Content): { Instance }
function SetAssetUrl(self, assetUrl: Content): nil
function SetAssetVersionUrl(self, assetVersionUrl: Content): nil
end
declare class JointInstance extends Instance

View File

@ -54,8 +54,8 @@ ContentProvider:SetThreadPool(16)
InsertService:SetBaseSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=10&type=base"
InsertService:SetUserSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
InsertService:SetCollectionUrl "http://banland.xyz/game/tools/insertasset?sid=%d"
InsertService:SetAssetUrl "http://banland.xyz/Asset/?id=%d"
InsertService:SetAssetVersionUrl "http://banland.xyz/Asset/?assetversionid=%d"
InsertService:SetAssetUrl "http://banland.xyz/asset?id=%d"
InsertService:SetAssetVersionUrl "http://banland.xyz/asset?assetversionid=%d"
pcall(function()
SocialService:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"

View File

@ -51,10 +51,36 @@ if gear then
player.Character.Torso["Right Shoulder"].CurrentAngle = math.rad(90)
end
local click = ThumbnailGenerator:Click("PNG", 420, 420, true)
local clickBody = ThumbnailGenerator:Click("PNG", 840, 840, true)
local result = '{"Status": "Completed", "Click": "' .. tostring(click) .. '"}'
print("[" .. game.JobId .. "] Successfully rendered, moving on...")
print("[" .. game.JobId .. "] Rendered bodyshot")
player.Character.Torso["Right Shoulder"].CurrentAngle = 0
-- Headshot Camera
local FOV = 52.5
local CameraAngle = player.Character.Head.CFrame
local CameraPosition = CameraAngle
+ CFrame.Angles(0, math.pi, 0).lookVector.unit * 2.75
local Camera = Instance.new "Camera"
Camera.Name = "ThumbnailCamera"
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CoordinateFrame = CFrame.new(CameraPosition.p, CameraAngle.p)
Camera.FieldOfView = FOV
Camera.Parent = player.Character
workspace.CurrentCamera = Camera
local clickHead = ThumbnailGenerator:Click("PNG", 300, 300, true)
local result = '{"Status": "Completed", "ClickBody": "'
.. tostring(clickBody)
.. '", "ClickHead": "'
.. tostring(clickHead)
.. '"}'
print("[" .. game.JobId .. "] Rendered headshot")
while true do
local ok, err = pcall(function()

View File

@ -14,10 +14,8 @@ local ScriptContext = game:GetService "ScriptContext"
pcall(function()
ContentProvider:SetBaseUrl(baseUrl)
InsertService:SetAssetUrl(baseUrl .. "/asset/assetfetch?id=%d")
InsertService:SetAssetVersionUrl(
baseUrl .. "/asset/assetfetch?assetversionid=%d"
)
InsertService:SetAssetUrl(baseUrl .. "/asset?id=%d")
InsertService:SetAssetVersionUrl(baseUrl .. "/asset?assetversionid=%d")
end)
HttpService.HttpEnabled = true
@ -46,6 +44,8 @@ local player = game:GetService("Players"):CreateLocalPlayer(0)
player.CharacterAppearance = baseUrl
.. "/api/render/characterasset?id="
.. assetId
.. "&apiKey="
.. thumbnailKey
player:LoadCharacter(false)
-- Raise up the character's arm if they have gear.