Roy_Mer
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 396 |
|
|
| 23 May 2016 03:15 PM |
Is there any way so when you input the ID of a decal, it does the -1 or how many needed to get the actual AssetId by a script?
|
|
|
| Report Abuse |
|
|
|
| 23 May 2016 03:16 PM |
ItemId = 2330811 --That's my UserId, just as an example AssetId = ItemId - 1 |
|
|
| Report Abuse |
|
|
Roy_Mer
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 396 |
|
|
| 23 May 2016 03:18 PM |
But for instance whether it's a shirt or a decal, something it's -1,-2,-3, not always -1.
|
|
|
| Report Abuse |
|
|
|
| 23 May 2016 03:20 PM |
| You can probably get the AssetInfo from the ID and determine what kind of product it is. Use AssetService or MarketplaceService |
|
|
| Report Abuse |
|
|
Roy_Mer
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 396 |
|
|
| 23 May 2016 03:23 PM |
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/GetProductInfo
Asset.AssetId still doesn't give me the Id I'm trying to get :/
|
|
|
| Report Abuse |
|
|
Roy_Mer
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 396 |
|
|
| 23 May 2016 03:24 PM |
Well I could match some of the Asset data and if it doesn't get matched I'd make it do another -1 till it matches I guess.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 23 May 2016 03:27 PM |
why not look at free mods?
Here is person299 minigames decal changing commands
decal = script.Parent.Decal
function inform(guy) local m = Instance.new("Hint") m.Text = "That is not a valid decal page URL." m.Parent = guy.PlayerGui wait(4) m:remove() end
game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(msg)
if string.sub(string.lower(msg),1,3) == "ad/" then local dastring = string.sub(msg,4) --"http://www.roblox.com/Item.aspx?ID=8247268"
if string.sub(dastring,1,1) == " " then dastring = string.sub(dastring,2) end
local numba = string.find(dastring,"id=") if numba ~= nil then
local numba2 = "http://www.roblox.com/asset/?id=" .. tostring(tonumber(string.sub(dastring,numba + 3)) - 1)
for a,b in ipairs(list) do if b[1] == p then table.remove(list,a) end end
table.insert(list,{p,numba2})
pcall(function() p:SaveNumber("LastAdBoardPost",tonumber(string.sub(dastring,numba + 3)) - 1) end)
else
inform(p)
end
|
|
|
| Report Abuse |
|
|
Roy_Mer
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 396 |
|
|
| 23 May 2016 03:39 PM |
To be honest I think I'll stick with my thought of matching the decal title or some other asset info.
|
|
|
| Report Abuse |
|
|
Coinye
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4347 |
|
|
| 23 May 2016 04:09 PM |
local assetId = 417137126 local asset = game:GetService("InsertService"):LoadAsset(assetId) print(asset.Decal.Texture)
|
|
|
| Report Abuse |
|
|