Postado Abril 24, 2015 10 anos Autor Você instalou e tentou usar? Não é necessária nenhuma alteração no script, ele ajuda o servidor a passar dados ao client... No console do client aparece algum erro.? Editado Abril 24, 2015 10 anos por david0703 (veja o histórico de edições) Atenciosamente, David Araujo Meu Conteúdo Fui útil? Gostou? Faça uma doação. "É errando que se erra." "Gambiarras resolvem instantemente, porém podem complicar em problemas futuros." "Cada dia vivido é um aprendizado."
Postado Junho 19, 2015 9 anos Cara podem me ajudar por favor.. na parte do textmessage. Não encontrei a liha que você solicitou.. onde devo adicionar então? Segue meu textmessage MessageSettings = { none = {}, consoleRed = { color = TextColors.red, consoleTab='Default' }, consoleOrange = { color = TextColors.orange, consoleTab='Default' }, consoleBlue = { color = TextColors.blue, consoleTab='Default' }, centerRed = { color = TextColors.red, consoleTab='Server Log', screenTarget='lowCenterLabel' }, centerGreen = { color = TextColors.green, consoleTab='Server Log', screenTarget='highCenterLabel', consoleOption='showInfoMessagesInConsole' }, centerWhite = { color = TextColors.white, consoleTab='Server Log', screenTarget='middleCenterLabel', consoleOption='showEventMessagesInConsole' }, bottomWhite = { color = TextColors.white, consoleTab='Server Log', screenTarget='statusLabel', consoleOption='showEventMessagesInConsole' }, status = { color = TextColors.white, consoleTab='Server Log', screenTarget='statusLabel', consoleOption='showStatusMessagesInConsole' }, statusSmall = { color = TextColors.white, screenTarget='statusLabel' }, private = { color = TextColors.lightblue, screenTarget='privateLabel' } } MessageTypes = { [MessageModes.MonsterSay] = MessageSettings.consoleOrange, [MessageModes.MonsterYell] = MessageSettings.consoleOrange, [MessageModes.BarkLow] = MessageSettings.consoleOrange, [MessageModes.BarkLoud] = MessageSettings.consoleOrange, [MessageModes.Failure] = MessageSettings.statusSmall, [MessageModes.Login] = MessageSettings.bottomWhite, [MessageModes.Game] = MessageSettings.centerWhite, [MessageModes.Status] = MessageSettings.status, [MessageModes.Warning] = MessageSettings.centerRed, [MessageModes.Look] = MessageSettings.centerGreen, [MessageModes.Loot] = MessageSettings.centerGreen, [MessageModes.Red] = MessageSettings.consoleRed, [MessageModes.Blue] = MessageSettings.consoleBlue, [MessageModes.PrivateFrom] = MessageSettings.consoleBlue, [MessageModes.GamemasterBroadcast] = MessageSettings.consoleRed, [MessageModes.DamageDealed] = MessageSettings.status, [MessageModes.DamageReceived] = MessageSettings.status, [MessageModes.Heal] = MessageSettings.status, [MessageModes.Exp] = MessageSettings.status, [MessageModes.DamageOthers] = MessageSettings.none, [MessageModes.HealOthers] = MessageSettings.none, [MessageModes.ExpOthers] = MessageSettings.none, [MessageModes.TradeNpc] = MessageSettings.centerWhite, [MessageModes.Guild] = MessageSettings.centerWhite, [MessageModes.Party] = MessageSettings.centerGreen, [MessageModes.PartyManagement] = MessageSettings.centerWhite, [MessageModes.TutorialHint] = MessageSettings.centerWhite, [MessageModes.Market] = MessageSettings.centerWhite, [MessageModes.BeyondLast] = MessageSettings.centerWhite, [MessageModes.Report] = MessageSettings.consoleRed, [MessageModes.HotkeyUse] = MessageSettings.centerGreen, [254] = MessageSettings.private } messagesPanel = nil function init() connect(g_game, 'onTextMessage', displayMessage) connect(g_game, 'onGameEnd', clearMessages) messagesPanel = g_ui.loadUI('textmessage', modules.game_interface.getRootPanel()) end function terminate() disconnect(g_game, 'onTextMessage', displayMessage) disconnect(g_game, 'onGameEnd', clearMessages) clearMessages() messagesPanel:destroy() end function calculateVisibleTime(text) return math.max(#text * 100, 4000) end function displayMessage(mode, text) if not g_game.isOnline() then return end local msgtype = MessageTypes[mode] if not msgtype then perror('unhandled onTextMessage message mode ' .. mode .. ': ' .. text) return end if msgtype == MessageSettings.none then return end if msgtype.consoleTab ~= nil and (msgtype.consoleOption == nil or modules.client_options.getOption(msgtype.consoleOption)) then modules.game_console.addText(text, msgtype, tr(msgtype.consoleTab)) --TODO move to game_console end if msgtype.screenTarget then local label = messagesPanel:recursiveGetChildById(msgtype.screenTarget) label:setText(text) label:setColor(msgtype.color) label:setVisible(true) removeEvent(label.hideEvent) label.hideEvent = scheduleEvent(function() label:setVisible(false) end, calculateVisibleTime(text)) end end function displayPrivateMessage(text) displayMessage(254, text) end function displayStatusMessage(text) displayMessage(MessageModes.Status, text) end function displayFailureMessage(text) displayMessage(MessageModes.Failure, text) end function displayGameMessage(text) displayMessage(MessageModes.Game, text) end function displayBroadcastMessage(text) displayMessage(MessageModes.Warning, text) end function clearMessages() for _i,child in pairs(messagesPanel:recursiveGetChildren()) do if child:getId():match('Label') then child:hide() removeEvent(child.hideEvent) end end end function LocalPlayer:onAutoWalkFail(player) modules.game_textmessage.displayFailureMessage(tr('There is no way.')) end xBlackWolf THX @Storm Night Best Avatar Ever
Postado Junho 22, 2015 9 anos "ERROR: Unable to send extended opcode 1, extended opcodes are not enabled" Oi, isso sai desde antes de usar seu smod, ainda continua falando q "extended opcodes" nao ta habilitado? :c @XBlackWolf, colo isso despois de: "if msgtype.consoleTab ~= nil and (msgtype.consoleOption == nil or modules.client_options.getOption(msgtype.consoleOption)) then modules.game_console.addText(text, msgtype, tr(msgtype.consoleTab))--TODO move to game_consoleend" Ficando assim: MessageSettings = { none = {}, consoleRed = { color = TextColors.red, consoleTab='Default' }, consoleOrange = { color = TextColors.orange, consoleTab='Default' }, consoleBlue = { color = TextColors.blue, consoleTab='Default' }, centerRed = { color = TextColors.red, consoleTab='Server Log', screenTarget='lowCenterLabel' }, centerGreen = { color = TextColors.green, consoleTab='Server Log', screenTarget='highCenterLabel', consoleOption='showInfoMessagesInConsole' }, centerWhite = { color = TextColors.white, consoleTab='Server Log', screenTarget='middleCenterLabel', consoleOption='showEventMessagesInConsole' }, bottomWhite = { color = TextColors.white, consoleTab='Server Log', screenTarget='statusLabel', consoleOption='showEventMessagesInConsole' }, status = { color = TextColors.white, consoleTab='Server Log', screenTarget='statusLabel', consoleOption='showStatusMessagesInConsole' }, statusSmall = { color = TextColors.white, screenTarget='statusLabel' }, private = { color = TextColors.lightblue, screenTarget='privateLabel' } } MessageTypes = { [MessageModes.MonsterSay] = MessageSettings.consoleOrange, [MessageModes.MonsterYell] = MessageSettings.consoleOrange, [MessageModes.BarkLow] = MessageSettings.consoleOrange, [MessageModes.BarkLoud] = MessageSettings.consoleOrange, [MessageModes.Failure] = MessageSettings.statusSmall, [MessageModes.Login] = MessageSettings.bottomWhite, [MessageModes.Game] = MessageSettings.centerWhite, [MessageModes.Status] = MessageSettings.status, [MessageModes.Warning] = MessageSettings.centerRed, [MessageModes.Look] = MessageSettings.centerGreen, [MessageModes.Loot] = MessageSettings.centerGreen, [MessageModes.Red] = MessageSettings.consoleRed, [MessageModes.Blue] = MessageSettings.consoleBlue, [MessageModes.PrivateFrom] = MessageSettings.consoleBlue, [MessageModes.GamemasterBroadcast] = MessageSettings.consoleRed, [MessageModes.DamageDealed] = MessageSettings.status, [MessageModes.DamageReceived] = MessageSettings.status, [MessageModes.Heal] = MessageSettings.status, [MessageModes.Exp] = MessageSettings.status, [MessageModes.DamageOthers] = MessageSettings.none, [MessageModes.HealOthers] = MessageSettings.none, [MessageModes.ExpOthers] = MessageSettings.none, [MessageModes.TradeNpc] = MessageSettings.centerWhite, [MessageModes.Guild] = MessageSettings.centerWhite, [MessageModes.Party] = MessageSettings.centerGreen, [MessageModes.PartyManagement] = MessageSettings.centerWhite, [MessageModes.TutorialHint] = MessageSettings.centerWhite, [MessageModes.Market] = MessageSettings.centerWhite, [MessageModes.BeyondLast] = MessageSettings.centerWhite, [MessageModes.Report] = MessageSettings.consoleRed, [MessageModes.HotkeyUse] = MessageSettings.centerGreen, [254] = MessageSettings.private } messagesPanel = nil function init() connect(g_game, 'onTextMessage', displayMessage) connect(g_game, 'onGameEnd', clearMessages) messagesPanel = g_ui.loadUI('textmessage', modules.game_interface.getRootPanel()) end function terminate() disconnect(g_game, 'onTextMessage', displayMessage) disconnect(g_game, 'onGameEnd', clearMessages) clearMessages() messagesPanel:destroy() end function calculateVisibleTime(text) return math.max(#text * 100, 4000) end function displayMessage(mode, text) if not g_game.isOnline() then return end local msgtype = MessageTypes[mode] if not msgtype then perror('unhandled onTextMessage message mode ' .. mode .. ': ' .. text) return end if msgtype == MessageSettings.none then return end if msgtype.consoleTab ~= nil and (msgtype.consoleOption == nil or modules.client_options.getOption(msgtype.consoleOption)) then modules.game_console.addText(text, msgtype, tr(msgtype.consoleTab)) --TODO move to game_console end if text:find('#<=>#ModOpcode#<=>#') then return end if msgtype.screenTarget then local label = messagesPanel:recursiveGetChildById(msgtype.screenTarget) label:setText(text) label:setColor(msgtype.color) label:setVisible(true) removeEvent(label.hideEvent) label.hideEvent = scheduleEvent(function() label:setVisible(false) end, calculateVisibleTime(text)) end end function displayPrivateMessage(text) displayMessage(254, text) end function displayStatusMessage(text) displayMessage(MessageModes.Status, text) end function displayFailureMessage(text) displayMessage(MessageModes.Failure, text) end function displayGameMessage(text) displayMessage(MessageModes.Game, text) end function displayBroadcastMessage(text) displayMessage(MessageModes.Warning, text) end function clearMessages() for _i,child in pairs(messagesPanel:recursiveGetChildren()) do if child:getId():match('Label') then child:hide() removeEvent(child.hideEvent) end end end function LocalPlayer:onAutoWalkFail(player) modules.game_textmessage.displayFailureMessage(tr('There is no way.')) end
Postado Agosto 17, 2015 9 anos Modo gambiarra, mas funcional, recomendo para não ficar aparecendo as informações em baixo aonde apareceria o "Sorry, you cannot use this object.", coloque \n\n\n\n\n, deixando assim: function doPlayerSendModOpcode(cid, port, param) doPlayerSendCancel(cid, '#<=>#ModOpcode#<=>#'..port..'#<&>#'..param..'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n') end Oufunction doPlayerSendModOpcode(cid, port, param) local lineBreak = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" doPlayerSendCancel(cid, "#<=>#ModOpcode#<=>#"..port.."#<&>#"..param.." "..lineBreak) end Skype: Jonhy172 (۩V͇̿I͇̿P͇̿۩ Jopheno ۩V͇̿I͇̿P͇̿۩) Te Ajudei ? Rep +
Postado Agosto 18, 2015 9 anos Modo gambiarra, mas funcional, recomendo para não ficar aparecendo as informações em baixo aonde apareceria o "Sorry, you cannot use this object.", coloque \n\n\n\n\n, deixando assim: function doPlayerSendModOpcode(cid, port, param) doPlayerSendCancel(cid, '#<=>#ModOpcode#<=>#'..port..'#<&>#'..param..'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n') end Ou function doPlayerSendModOpcode(cid, port, param) local lineBreak = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" doPlayerSendCancel(cid, "#<=>#ModOpcode#<=>#"..port.."#<&>#"..param.." "..lineBreak) end Não seria melhor simplesmente deixar assim? function doPlayerSendModOpcode(cid, port, param) doPlayerSendCancel(cid, "#<=>#ModOpcode#<=>#"..port.."#<&>#"..param) doPlayerSendCancel(cid, " ") end Só enviar uma mensagem sem nada, sempre usei assim. _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.