Postado Outubro 2, 2017 7 anos Boa noite galera!venho aqui pedir alguns comandos que esta faltando no meu server uso TFS 0.4 --Tibia 8.60 precisava de 3 comandos 1º !aol ---> que ao player usar esse comando ele compra um aol por 10k 2º !bless -> player usar esse comando ele compra bless por 50k 3º !spells --> ao usar esse comando cada vocação vai ver suas spells separadamente tipo "se um druid usar ele ve só as skills que ele pode usar sem aparecer as de kina"nao sei se e facil mais ja vi em muitos servers! desde já obrigado valendo rep+ pra fortalecer
Postado Outubro 2, 2017 7 anos @Leomonti Amigão, você poderia procurar aqui no TK, tem no mínimo uns 30 tópicos relacionado ao que você pediu, mas como é coisa boba eu vou te ajudar rapidinho. Em data/talkactions.xml <talkaction words="!aol" script="aol.lua"/> <talkaction words="!bless" script="bless.lua"/> <talkaction words="!spells" script="spellsinfo.lua"/> Vá em data/talkactions/scripts e crie um arquivo aol.lua e adicione dentro: Spoiler function onSay(cid, words, param) if(words == "!aol") then if(doPlayerRemoveMoney(cid, 10000) == TRUE) then doPlayerAddItem(cid,2173,1) doSendMagicEffect(getCreaturePosition(cid),tmp, CONST_ME_MAGIC_RED) else doPlayerSendCancel(cid, "Você não tem o dinheiro suficiente.") return TRUE end elseif(words == "!sellaol") then if doPlayerRemoveItem(cid,2173,1) == TRUE then doPlayerAddMoney(cid, 10000) doSendMagicEffect(getCreaturePosition(cid),tmp, CONST_ME_MAGIC_RED) else doPlayerSendCancel(cid, "Você não tem o Amulet of Loss(AoL)") end end return TRUE end Agora crie um arquivo chamado bless.lua e adicione: Spoiler local bless = {1, 2, 3, 4, 5} local cost = 250000 function onSay(cid, words, param) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless)) thendoPlayerSendCancel(cid, "Você ja tem todas as bless.")doSendMagicEffect(getPlayerPosition(cid), 2)return TRUEendend if(doPlayerRemoveMoney(cid, cost) == TRUE) thenfor i = 1, table.maxn(bless) dodoPlayerAddBlessing(cid, bless)enddoCreatureSay(cid, "Bless!" ,19)doSendMagicEffect(getPlayerPosition(cid), 49)doSendMagicEffect(getPlayerPosition(cid), 48)elsedoPlayerSendCancel(cid, "Você precisa de 250k para comprar bless.")endreturn TRUEend E agora por fim, crie um arquivo chamado spellsinfo.lua e adicione dentro: Spoiler function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid)local text = ""local t = {}for i = 0, count - 1 dolocal spell = getPlayerInstantSpellInfo(cid, i)if spell.level ~= 0 thenif spell.manapercent > 0 thenspell.mana = spell.manapercent .. "%"endtable.insert(t, spell)endendtable.sort(t, function(a, b) return a.level < b.level end)local prevLevel = -1for i, spell in ipairs(t) dolocal line = ""if prevLevel ~= spell.level thenif i ~= 1 thenline = "\n"endline = line .. "Spells for Level " .. spell.level .. "\n"prevLevel = spell.levelendtext = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n"enddoShowTextDialog(cid,2175,text)return TRUEend Espero ter lhe ajudado, e na próxima procure mais no fórum, ele é bem grande.. =) Editado Outubro 2, 2017 7 anos por Mathwsz (veja o histórico de edições)
Postado Outubro 3, 2017 7 anos Autor 29 minutos atrás, Mathwsz disse: @Leomonti Amigão, você poderia procurar aqui no TK, tem no mínimo uns 30 tópicos relacionado ao que você pediu, mas como é coisa boba eu vou te ajudar rapidinho. Em data/talkactions.xml <talkaction words="!aol" script="aol.lua"/> <talkaction words="!bless" script="bless.lua"/> <talkaction words="!spells" script="spellsinfo.lua"/> Vá em data/talkactions/scripts e crie um arquivo aol.lua e adicione dentro: Ocultar conteúdo function onSay(cid, words, param) if(words == "!aol") then if(doPlayerRemoveMoney(cid, 10000) == TRUE) then doPlayerAddItem(cid,2173,1) doSendMagicEffect(getCreaturePosition(cid),tmp, CONST_ME_MAGIC_RED) else doPlayerSendCancel(cid, "Você não tem o dinheiro suficiente.") return TRUE end elseif(words == "!sellaol") then if doPlayerRemoveItem(cid,2173,1) == TRUE then doPlayerAddMoney(cid, 10000) doSendMagicEffect(getCreaturePosition(cid),tmp, CONST_ME_MAGIC_RED) else doPlayerSendCancel(cid, "Você não tem o Amulet of Loss(AoL)") end end return TRUE end Agora crie um arquivo chamado bless.lua e adicione: Ocultar conteúdo local bless = {1, 2, 3, 4, 5} local cost = 250000 function onSay(cid, words, param) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless)) thendoPlayerSendCancel(cid, "Você ja tem todas as bless.")doSendMagicEffect(getPlayerPosition(cid), 2)return TRUEendend if(doPlayerRemoveMoney(cid, cost) == TRUE) thenfor i = 1, table.maxn(bless) dodoPlayerAddBlessing(cid, bless)enddoCreatureSay(cid, "Bless!" ,19)doSendMagicEffect(getPlayerPosition(cid), 49)doSendMagicEffect(getPlayerPosition(cid), 48)elsedoPlayerSendCancel(cid, "Você precisa de 250k para comprar bless.")endreturn TRUEend E agora por fim, crie um arquivo chamado spellsinfo.lua e adicione dentro: Ocultar conteúdo function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid)local text = ""local t = {}for i = 0, count - 1 dolocal spell = getPlayerInstantSpellInfo(cid, i)if spell.level ~= 0 thenif spell.manapercent > 0 thenspell.mana = spell.manapercent .. "%"endtable.insert(t, spell)endendtable.sort(t, function(a, b) return a.level < b.level end)local prevLevel = -1for i, spell in ipairs(t) dolocal line = ""if prevLevel ~= spell.level thenif i ~= 1 thenline = "\n"endline = line .. "Spells for Level " .. spell.level .. "\n"prevLevel = spell.levelendtext = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n"enddoShowTextDialog(cid,2175,text)return TRUEend Espero ter lhe ajudado, e na próxima procure mais no fórum, ele é bem grande.. =) Muito obrigado parceiro...só tem um problema! ao usar o comando !bless ta com algum problema porque quando eu uso! ele faz o efeito certinho no player mais quando tento comprar dnv ..ele compra infinito ! nao aparece a msg (Você ja tem todas as bless) achei aqui no topico um outro pra bless! e funcionou! obrigado pra quem estiver com o mesmo problema
Postado Novembro 1, 2017 7 anos Aqui está brother esse eu uso no meu servidor tfs 0.4 cliente 8.60 arquivo bless.lua na pasta talkactions/scripts/ function onSay(cid, words, param) if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then doPlayerSendCancel(cid,'Você ja esta com bless!') else if doPlayerRemoveMoney(cid, 50000) == TRUE then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doSendMagicEffect(getPlayerPosition(cid), 28) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!') else doPlayerSendCancel(cid, "You need 50000 gold coins to get blessed!") end end return TRUE end
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.