Postado Fevereiro 15, 2015 10 anos Tava querendo criar uns 30 livros espalhados com misterio pelo mapa, tu abre a quest vem um livro escrito uma parada Ah e outra coisa vi um sistema de multilingua no fórum que funciona por storage 8971 sem valor (-1 ou 0 n sei como é)= ingles 1= ingles 2= portugues
Postado Fevereiro 15, 2015 10 anos totalmente confuso, explica melhor isso Toda terça-feira um tópico novo: Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/ Peça sua spell (Suporte): https://tibiaking.com/forums/topic/84162-peça-sua-spell/ Chuva de flechas (Spell): https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/ Doom (Spell): https://tibiaking.com/forums/topic/51622-doom-spell/ Utilização do VS Code (Infra): https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/ SD com Combo (Spell): https://tibiaking.com/forums/topic/94520-sd-modificada/ Alteração attack speed (C++): https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/ Bônus de Speed (NPC): https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
Postado Fevereiro 15, 2015 10 anos Este sistema de multilingua que você se refere é o que fiz neste tópico? --Comando que muda linguagem. local lang = { ["portuguese"] = 1, ["english"] = 2, ["spanish"] = 3, } local storage = 8971 function onSay(cid, words, param) if not param or param == "" then return doPlayerSendCancel(cid, "Command: command portuguese/english/spanish") elseif not lang[param:lower()] then return doPlayerSendCancel(cid, "This language isn't available.") elseif getPlayerStorageValue(cid, storage) == lang[param:lower()] then return doPlayerSendCancel(cid, "Your game is already on this language.") end doPlayerSendTextMessage(cid, 27, "Game language changed to "..param..".") setPlayerStorageValue(cid, storage, lang[param:lower()]) return true end --Exemplo de talkaction que manda um popup com linguagem dependendo da configurada pelo comando acima. local messages = { [1] = "Oi, como vai?", [2] = "Hello, how are you?", [3] = "Hola, cómo estás?", } local default = "Hello, how are you?" --Mensagem padrão. function onSay(cid, words) return doPlayerPopupFYI(cid, messages[getPlayerStorageValue(cid, 8971)] or default) end Editado Fevereiro 17, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Fevereiro 16, 2015 10 anos Autor Este sistema de multilingua que você se refere é o que fiz neste tópico? --Comando que muda linguagem. local lang = { ["portuguese"] = 1, ["english"] = 2, ["spanish"] = 3, } local storage = 8971 function onSay(cid, words, param) if not param or param == "" then return doPlayerSendCancel(cid, "Command: command portuguese/english/spanish") elseif not lang[param:lower()] then return doPlayerSendCancel(cid, "This language isn't available.") elseif getPlayerStorageValue(cid, storage) == lang[param:lower()] then return doPlayerSendCancel(cid, "Your game is already on this language.") end doPlayerSendTextMessage(cid, 27, "Game language changed to "..param..".") setPlayerStorageValue(cid, storage, lang[param:lower()]) return true end --Exemplo de talkaction que manda um popup com linguagem dependendo da configurada pelo comando acima. local messages = { [1] = "Oi, como vai?", [2] = "Hello, how are you?", [3] = "Hola, cómo estás?", } local default = "Hello, how are you?" --Mensagem padrão. function onSay(cid, words) local msg = messages[getPlayerStorageValue(cid, 8971)] if not msg then msg = default end doPlayerPopupFYI(cid, msg) return true end É esse aí mesmo! kkkk
Postado Fevereiro 16, 2015 10 anos local config = { --[uid] = {bookId, "texto"} [55560] = {6533, "Texto1"}, [55561] = {6533, "Texto2"} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(config[item.uid] ~= nil) then if(getPlayerStorageValue(cid, item.uid) == -1) then local book, text = doPlayerAddItem(cid, config[item.uid][1], 1), config[item.uid][2] doSetItemText(book, text) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have found a "..getItemNameById(config[item.uid][1])..".") setPlayerStorageValue(cid, item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "It's empty.") end end return true end Editado Fevereiro 16, 2015 10 anos por MaTTch (veja o histórico de edições)
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.