BananaFight 196 Postado Julho 7, 2013 Share Postado Julho 7, 2013 (editado) getPlayerVocation para todas as versões com o opcode. Instalação Client OtClient/Modules/gamelib/game.lua function getPlayerVocation() local protocol = g_game.getProtocolGame() protocol:sendExtendedOpcode(25, 5) end e no seu script ProtocolGame.registerExtendedOpcode(26, function (protocol, opcode, buffer) vocation = buffer print(vocation) end ) Server creaturescripts/extendedopcode.lua function onExtendedOpcode(cid, opcode, buffer) if opcode == 25 then doSendPlayerExtendedOpcode(cid, 26, getPlayerVocation(cid)) end return true end Editado Setembro 12, 2013 por BananaFight Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/ Compartilhar em outros sites More sharing options...
manoelneto 24 Postado Julho 7, 2013 Share Postado Julho 7, 2013 Opa Banana! Voltou a ativa? Isso aí, a area tava carente dos seus tópicos. Rola uns tutoriais de Opcode? Seria bem útil.. Abraços. Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1537329 Compartilhar em outros sites More sharing options...
rohfagundes 78 Postado Julho 7, 2013 Share Postado Julho 7, 2013 coloquei do jeito q ta ai e n funcionou n tem q colocar mais alguma coisa n? Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1537375 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Julho 7, 2013 Share Postado Julho 7, 2013 (editado) /\ tens opcode no teu serv? ¬¬ Editado Julho 7, 2013 por Slicer Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1537376 Compartilhar em outros sites More sharing options...
rohfagundes 78 Postado Julho 7, 2013 Share Postado Julho 7, 2013 /\ tens opcode no teu serv? ¬¬ claro -.- Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1537383 Compartilhar em outros sites More sharing options...
3145288 17 Postado Julho 9, 2013 Share Postado Julho 9, 2013 como jogar aquele vocation em uma label? e pq aquele "5" no sendopcode? Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1537898 Compartilhar em outros sites More sharing options...
BananaFight 196 Postado Julho 12, 2013 Autor Share Postado Julho 12, 2013 O 5 no opcode é meramente ilustrativo '-' Sim, tem como por em um label, Só você fazer labelName:setText(buffer) Se me lembro bem é assim. Não, não voltei a ativa, só fiz pra um amigo e resolvi compartilhar com vocês. Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1538803 Compartilhar em outros sites More sharing options...
akira021 28 Postado Julho 16, 2013 Share Postado Julho 16, 2013 ta retired banana? quem eh o moderador agora? Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1540074 Compartilhar em outros sites More sharing options...
itachibrrrr 0 Postado Setembro 7, 2013 Share Postado Setembro 7, 2013 banana teria como vc me ajuda e q tou com um poblema muito serio aqui Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1559158 Compartilhar em outros sites More sharing options...
Waterson 9 Postado Janeiro 2, 2014 Share Postado Janeiro 2, 2014 [2/1/2014 6:13:12] [Error - CreatureScript Interface] [2/1/2014 6:13:12] data/creaturescripts/scripts/extendedopcode.lua:onExtendedOpcode [2/1/2014 6:13:12] Description: [2/1/2014 6:13:12] data/creaturescripts/scripts/extendedopcode.lua:19: attempt to call global 'doSendPlayerExtendedOpcode' (a nil value) [2/1/2014 6:13:12] stack traceback: [2/1/2014 6:13:12] data/creaturescripts/scripts/extendedopcode.lua:19: in function <data/creaturescripts/scripts/extendedopcode.lua:14> Eu sei que está configurado nas souces corretamente porque funciona; if isPlayerUsingOtclient(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "YOU USE OTCLIENT") end Aqui está o sistema inteiro: OPCODE_LANGUAGE = 1 function onExtendedOpcode(cid, opcode, buffer) if(opcode == OPCODE_LANGUAGE) then -- otclient language if(buffer == 'en' or buffer == 'pt') then -- example, setting player language, because otclient is multi-language... --doCreatureSetStorage(cid, CREATURE_STORAGE_LANGUAGE, buffer) end else -- other opcodes can be ignored, and the server will just work fine... end end function onExtendedOpcode(cid, opcode, buffer) if isPlayerUsingOtclient(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "YOU USE OTCLIENT") end if opcode == 25 then doSendPlayerExtendedOpcode(cid, 26, "ALOU") end return true end Link para o comentário https://xtibia.com/forum/topic/217227-opcode-getplayervocation/#findComment-1597803 Compartilhar em outros sites More sharing options...
Posts Recomendados