nociam 90 Posted June 10, 2015 Report Share Posted June 10, 2015 (edited) Bom ta ai o melhor jeito de se usar a transparência. Crie um arquivo things.otml na pasta OTClient\data\things ai se coloca nesse arquivo items:622:opacity:0.7full-ground: false Agora em OTClient\modules\game_things abre o seu arquivo things.lua e add essa função acima de function load() function onClientVersionChange(version)g_things.loadOtml('/things/things.otml')end logo acima na parte function init() add essa parte nela connect(g_game, {onClientVersionChange = onClientVersionChange}) ficando assim function init()connect(g_game, { onClientVersionChange = load })connect(g_game, {onClientVersionChange = onClientVersionChange})end Atençao: observe que vc tem que pegar o id do spr e não o id do jogo olhe o exemplo de item items: 12007: opacity:0.7 Pronto agora se tem a transparência que muitos desejavam. Créditos: baxnie. Edited June 10, 2015 by nociam Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/ Share on other sites More sharing options...
FlamesAdmin 261 Posted June 11, 2015 Report Share Posted June 11, 2015 Tipo, e quando eu for adicionar mais items para ficar com transparencia, como faço ? Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655410 Share on other sites More sharing options...
Avronex 104 Posted June 11, 2015 Report Share Posted June 11, 2015 Boa maninho, vai ajudar bastante gente! Eu atualmente uso esse sistema kk Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655416 Share on other sites More sharing options...
nociam 90 Posted June 11, 2015 Author Report Share Posted June 11, 2015 Tipo, e quando eu for adicionar mais items para ficar com transparencia, como faço ? items: 622: opacity:0.7 items: 1623: opacity:0.7 items: 1624: opacity:0.7 Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655427 Share on other sites More sharing options...
Mudrock 326 Posted June 11, 2015 Report Share Posted June 11, 2015 Muito bom obg por compartilhar conosco ! reputado Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655429 Share on other sites More sharing options...
Soulviling 65 Posted June 13, 2015 Report Share Posted June 13, 2015 Bom ta ai o melhor jeito de se usar a transparência. Crie um arquivo things.otml na pasta OTClient\data\things ai se coloca nesse arquivo items: 622: opacity:0.7 full-ground: false Agora em OTClient\modules\game_things abre o seu arquivo things.lua e add essa função acima de function load() function onClientVersionChange(version) g_things.loadOtml('/things/things.otml') end logo acima na parte function init() add essa parte nela connect(g_game, {onClientVersionChange = onClientVersionChange}) ficando assim function init() connect(g_game, { onClientVersionChange = load }) connect(g_game, {onClientVersionChange = onClientVersionChange}) end Atençao: observe que vc tem que pegar o id do spr e não o id do jogo olhe o exemplo de item items: 12007: opacity:0.7 Pronto agora se tem a transparência que muitos desejavam. Créditos: baxnie. Fica dando esse erro: ERROR: invalid thing type client id 116 in category 2 ERROR: invalid thing type client id 258 in category 2 ERROR: invalid thing type client id 38 in category 2 Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655716 Share on other sites More sharing options...
nociam 90 Posted June 14, 2015 Author Report Share Posted June 14, 2015 Fica dando esse erro: ERROR: invalid thing type client id 116 in category 2 ERROR: invalid thing type client id 258 in category 2 ERROR: invalid thing type client id 38 in category 2 Ai e algo errado no seu things.lua muda por esse filename = nil loaded = false function init() connect(g_game, { onProtocolVersionChange = load }) connect(g_game, {onClientVersionChange = onClientVersionChange}) end function terminate() disconnect(g_game, { onProtocolVersionChange = load }) end function setFileName(name) filename = name end function onClientVersionChange(version) g_things.loadOtml('/things/things.otml') end function isLoaded() return loaded end function load() local version = g_game.getProtocolVersion() g_game.enableFeature(GameSpritesU32) local datPath, sprPath if filename then datPath = resolvepath('/things/' .. filename) sprPath = resolvepath('/things/' .. filename) else datPath = resolvepath('/things/' .. version .. '/Tibia') sprPath = resolvepath('/things/' .. version .. '/Tibia') end local errorMessage = '' if not g_things.loadDat(datPath) then errorMessage = errorMessage .. tr("Unable to load dat file, please place a valid dat in '%s'", datPath) .. '\n' end if not g_sprites.loadSpr(sprPath) then errorMessage = errorMessage .. tr("Unable to load spr file, please place a valid spr in '%s'", sprPath) end loaded = (errorMessage:len() == 0) g_game.enableFeature(GameDiagonalAnimatedText) if errorMessage:len() > 0 then local messageBox = displayErrorBox(tr('Error'), errorMessage) addEvent(function() messageBox:raise() messageBox:focus() end) disconnect(g_game, { onProtocolVersionChange = load }) g_game.setProtocolVersion(0) connect(g_game, { onProtocolVersionChange = load }) end g_game.enableFeature(GameBlueNpcNameColor) end Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655823 Share on other sites More sharing options...
Soulviling 65 Posted June 14, 2015 Report Share Posted June 14, 2015 Continua com mesmo erro: ERROR: invalid thing type client id 1019 in category 1 ERROR: invalid thing type client id 2714 in category 1 ERROR: invalid thing type client id 1484 in category 1 ERROR: invalid thing type client id 666 in category 1 ERROR: invalid thing type client id 1487 in category 1 ERROR: invalid thing type client id 1489 in category 1 Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655831 Share on other sites More sharing options...
niccocancino21 0 Posted June 14, 2015 Report Share Posted June 14, 2015 (edited) EDIT:Fixed! Edited June 15, 2015 by Elwthz Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655839 Share on other sites More sharing options...
HeelNox 71 Posted June 14, 2015 Report Share Posted June 14, 2015 Oi, Eu fiz seu tutorial, usando um sprite com 50% de opacidade (fiz no photoshop) Acontece o siguente: (Pode ajudar pf?) error.jpg Deixa ela normal é configura 0.5 no otc. Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655844 Share on other sites More sharing options...
niccocancino21 0 Posted June 14, 2015 Report Share Posted June 14, 2015 (edited) EDIT: so preciso arrumar isso... ERROR: Unable to send extended opcode 1, extended opcodes are not enabled ERROR: Unable to send extended opcode 4, extended opcodes are not enabledtenho esse report no module Terminal em OT Client :c Edited June 15, 2015 by Elwthz Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655849 Share on other sites More sharing options...
nociam 90 Posted June 15, 2015 Author Report Share Posted June 15, 2015 (edited) 1 vc tem um arquivo thing.otml na pasta correta ? depois troque o thing.lua pelo meu. filename = nilloaded = falsefunction init()connect(g_game, { onClientVersionChange = load })connect(g_game, {onClientVersionChange = onClientVersionChange})endfunction terminate()disconnect(g_game, { onClientVersionChange = load })endfunction setFileName(name)filename = nameendfunction isLoaded()return loadedendfunction onClientVersionChange(version)g_things.loadOtml('/things/things.otml')endfunction load()local version = g_game.getClientVersion()local datPath, sprPathif filename thendatPath = resolvepath('/things/' .. filename)sprPath = resolvepath('/things/' .. filename)elsedatPath = resolvepath('/things/' .. version .. '/Tibia')sprPath = resolvepath('/things/' .. version .. '/Tibia')endlocal errorMessage = ''if not g_things.loadDat(datPath) thenerrorMessage = errorMessage .. tr("Unable to load dat file, please place a valid dat in '%s'", datPath) .. '\n'endif not g_sprites.loadSpr(sprPath) thenerrorMessage = errorMessage .. tr("Unable to load spr file, please place a valid spr in '%s'", sprPath)endloaded = (errorMessage:len() == 0)if errorMessage:len() > 0 thenlocal messageBox = displayErrorBox(tr('Error'), errorMessage)addEvent(function() messageBox:raise() messageBox:focus() end)disconnect(g_game, { onClientVersionChange = load })g_game.setClientVersion(0)g_game.setProtocolVersion(0)connect(g_game, { onClientVersionChange = load })endend Edited June 15, 2015 by nociam Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655855 Share on other sites More sharing options...
niccocancino21 0 Posted June 15, 2015 Report Share Posted June 15, 2015 (edited) EDIT: Fixed! Edited June 15, 2015 by Elwthz Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655856 Share on other sites More sharing options...
xSONYx 31 Posted June 15, 2015 Report Share Posted June 15, 2015 Qual a diferença desse pro que eu postei? Daquele jeito eu consegui transparencia tb, será que tem alguma diferença? Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655857 Share on other sites More sharing options...
Soulviling 65 Posted June 15, 2015 Report Share Posted June 15, 2015 Qual a diferença desse pro que eu postei? Daquele jeito eu consegui transparencia tb, será que tem alguma diferença? Desse jeito não precisa editar no photoshop, imagem por imagem. Link to comment https://xtibia.com/forum/topic/234621-transpar%C3%AAncia/#findComment-1655860 Share on other sites More sharing options...
Recommended Posts