
Tudo que mullino postou
-
Player escolhe o nome da Task que Quer fazer
Ola Galerinha do Tk Descupa encomodar de novo mas vcs poderia me ajudar com um Script de Task Quero um npc que o Player fale... player. hi Npc oi porfavor fale o nome do monstro que deseje fazer a task o player fala exemplo Demon npc vc esta participando da tassk demon vc prescisa matar x demons para completar a task o player que escolhe o nome do monstro que ele quer fazer a task!! desde ja agradeço quem puder ajudar!!!] tenho um mas esta dando erro data/npc/scripts/task.lua:43: in function 'callback' data/npc/lib/npcsystem/npchandler.lua:456: in function 'onCreatureSay' data/npc/scripts/task.lua:8: in function <data/npc/scripts/task.lua:8> script local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local xmsg = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local storage = 62003 local monsters = { ["Dragons"] = {storage = 5010, mstorage = 19000, amount = 10, exp = 5000, items = {{id = 2157, count = 1}, {id = 2160, count = 3}}}, ["Dragon Lords"] = {storage = 5011, mstorage = 19001, amount = 10, exp = 10000, items = {{id = 2492, count = 1}, {id = 2160, count = 5}}}, ["Hydras"] = {storage = 5012, mstorage = 19002, amount = 10, exp = 18000, items = {{id = 2195, count = 1}, {id = 2157, count = 8}}}, ["Demons"] = {storage = 5013, mstorage = 19003, amount = 10, exp = 20000, items = {{id = 2520, count = 1}, {id = 2160, count = 10}}} } local function getItemsFromTable(itemtable) local text = "" for v = 1, #itemtable do count, info = itemtable[v].count, ItemType(itemtable[v].id) local ret = ", " if v == 1 then ret = "" elseif v == #itemtable then ret = " and " end text = text .. ret text = text .. (count > 1 and count or info:getArticle()).." "..(count > 1 and info:getPluralName() or info:getName()) end return text end local function Cptl(f, r) return f:upper()..r:lower() end function creatureSayCallback(cid, type, msg) local player, cmsg = Player(cid), msg:gsub("(%a)([%w_']*)", Cptl) if not npcHandler:isFocused(cid) then if msg == "hi" or msg == "hello" then npcHandler:addFocus(cid) if player:getStorageValue(storage) == -1 then local text, n = "", 0 for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then n = n + 1 text = text .. ", " text = text .. ""..x.amount.." {"..k.."}" end end if n > 1 then npcHandler:say("I have several tasks for you to kill monsters"..text..", which one do you choose? I can also show you a {list} with rewards and you can {stop} a task if you want.", cid) npcHandler.topic[cid] = 1 xmsg[cid] = msg elseif n == 1 then npcHandler:say("I have one last task for you"..text..".", cid) npcHandler.topic[cid] = 1 else npcHandler:say("You already did all tasks, I have nothing for you to do anymore, good job though.", cid) end elseif player:getStorageValue(storage) == 1 then for k, x in pairs(monsters) do if player:getStorageValue(x.storage) == 1 then npcHandler:say("Did you kill "..x.amount.." "..k.."?", cid) npcHandler.topic[cid] = 2 xmsg[cid] = k end end end else return false end elseif monsters[cmsg] and npcHandler.topic[cid] == 1 then if player:getStorageValue(monsters[cmsg].storage) == -1 then npcHandler:say("Good luck, come back when you killed "..monsters[cmsg].amount.." "..cmsg..".", cid) player:setStorageValue(storage, 1) player:setStorageValue(monsters[cmsg].storage, 1) else npcHandler:say("You already did the "..cmsg.." mission.", cid) end npcHandler.topic[cid] = 0 elseif msgcontains(msg, "yes") and npcHandler.topic[cid] == 2 then local x = monsters[xmsg[cid]] if player:getStorageValue(x.mstorage) >= x.amount then npcHandler:say("Good job, here is your reward, "..getItemsFromTable(x.items)..".", cid) for g = 1, #x.items do player:addItem(x.items[g].id, x.items[g].count) end player:addExperience(x.exp) player:setStorageValue(x.storage, 2) player:setStorageValue(storage, -1) npcHandler.topic[cid] = 3 else npcHandler:say("You didn't kill them all, you still need to kill "..x.amount -(player:getStorageValue(x.mstorage) + 1).." "..xmsg[cid]..".", cid) end elseif msgcontains(msg, "task") and npcHandler.topic[cid] == 3 then local text, n = "", 0 for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then n = n + 1 text = text .. (n == 1 and "" or ", ") text = text .. "{"..k.."}" end end if text ~= "" then npcHandler:say("Want to do another task? You can choose "..text..".", cid) npcHandler.topic[cid] = 1 else npcHandler:say("You already did all tasks.", cid) end elseif msgcontains(msg, "no") and npcHandler.topic[cid] == 1 then npcHandler:say("Ok then.", cid) npcHandler.topic[cid] = 0 elseif msgcontains(msg, "stop") then local text, n = "", 0 for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then n = n + 1 text = text .. (n == 1 and "" or ", ") text = text .. "{"..k.."}" if player:getStorageValue(x.storage) == 1 then player:setStorageValue(x.storage, -1) end end end if player:getStorageValue(storage) == 1 then npcHandler:say("Alright, let me know if you want to continue an other task, you can still choose "..text..".", cid) else npcHandler:say("You didn't start any new task yet, if you want to start one, you can choose "..text..".", cid) end player:setStorageValue(storage, -1) npcHandler.topic[cid] = 1 elseif msgcontains(msg, "list") then local text = "Tasks\n\n" for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then text = text ..k .." ["..(player:getStorageValue(x.mstorage) + 1).."/"..x.amount.."]:\n Rewards:\n "..getItemsFromTable(x.items).."\n "..x.exp.." experience \n\n" else text = text .. k .." [DONE]\n" end end player:showTextDialog(1949, "" .. text) npcHandler:say("Here you are.", cid) elseif msgcontains(msg, "bye") then npcHandler:say("Bye.", cid) npcHandler:releaseFocus(cid) else npcHandler:say("What?", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
-
script de missão
Ola Descupe Reviver O Topico mas vc poderia me ajudar Quero um npc que o Player Chege nele Exemplo player. hi Npc oi porfavor fale o nome do monstro que deseje fazer a task o player fala exemplo Demon npc vc esta participando da tassk demon vc prescisa matar x demons para completar a task o player que escolhe o nome do monstro que ele quer fazer a task!! desde ja agradeço quem puder ajudar!!!
-
Task System Simples e Eficiente
ola amigo vc ja encontrou essa task? ajuda e tbm presciso dela
-
Erro ao passar Servidor Windows Para VPS Linux
Ola Galerinha Do tk Tenho um server que eu mesmo editei varias coisas dele roda comigo aki em casa em windows na distrito OTX Server 8.6 ae comprei um Dedicado VPS Linux mas agora quando vou rodar ele no vps da muitos erros alguem poderia me ajuda???? Des de Ja agradeço a Ajuda !!
-
[LUA] Ban System 9.6+
descupa reviver o topico mas presciso dissu pois a minha distrito nao tem o comando CTRL + Y o meu o player nao toma ban ele fica kicando e voltando toda hora alguem sabe como arrumar issu??
-
[Duvida] Como banir na Distrito OTX
boa noite galera do tk como ja disse no Titulo Como eu bano um char Na distrito Otx ???? o comando /ban nao funciona nem mesmo o CTRL + Y tbm nao funciona ajudem por favor Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
-
[8.6] Task System 4.0! (Task system + Daily Task System)
o meu deu erro ajuda [Error - ScriptManager::loadFromXml] Cannot load mod simple task.lua Line: 1, Info: Start tag expected, '<' not found
-
OTx Sources
Bom Dia Galerinha do Tk Alguem poderia Disponibilizar as sources do otx 3.2??? ou compilar para min com algumas coisas que eu quero? pois nao consigo !! ja vi varios tutoriais na net inclusive aki no tk mesmo mas as souces q estao disponibilizando nao compila!!! presciso muito delas !! ja ouvi um comentario q otx bom e so comprado se for o casa alguem entre em contato comigo que resolvemos issu mas se alguem puder ajudar fiqcarei muito agradecido sempre q eu vou compilar da erro no comesso nem comessa a compilar!!
-
GonkaKill
obrigado funcionou perfeitamente da outra vez so removi o debrodcastmenssage ae ficou normal
-
GonkaKill
o meu deu esse erro amigo [Error - CreatureScript Interface] [1/3/2018 12:17:6] data/creaturescripts/scripts/Gonka.lua:onDeath [1/3/2018 12:17:6] Description: [1/3/2018 12:17:6] data/creaturescripts/scripts/Gonka.lua:4: attempt to concatenate global 'getPlayerName' (a function value) [1/3/2018 12:17:6] stack traceback: [1/3/2018 12:17:6] data/creaturescripts/scripts/Gonka.lua:4: in function <data/creaturescripts/scripts/Gonka.lua:1>
-
GonkaKill
em data\actions\scripts crie um arquivo lua e renomeie para GonkaLever e coloque issu function onUse(cid, item, fromPosition, itemEx, toPosition) if getGlobalStorageValue(15421) == 1 then doPlayerSendCancel(cid, "Já tem alguém lutando contra o Gonka, espere ele sair.") return true end doTeleportThing(cid, {x = 347, y = 158, z = 7}) -- loca onde o player vai nascer doSendMagicEffect({x = 347, y = 158, z = 7}, CONST_ME_TELEPORT) -- efeito no player doCreateMonster("Gonka", {x = 337, y = 149, z = 7}) -- Local onde vai criar o gonka setGlobalStorageValue(15421,1) -- storage return true end e add essa tag em actions xml <action actionid="1450" script="GonkaLever.lua"/> action id vc coloca esse id na alavanca que o player vai clicar pelo remeres em moster gonka aki esta o script <?xml version="1.0" encoding="UTF-8"?> <monster name="Gonka" nameDescription="Gonka" race="blood" experience="3000000" speed="1200" manacost="0"> <health now="9900000" max="9900000"/> <look type="306" corpse="9823"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="fire" interval="1000" chance="14" range="7" radius="7" target="1" min="-3687" max="-3948"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="15" range="7" radius="1" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="melee" interval="130" skill="200" attack="320"/> <attack name="physical" interval="2000" chance="50" range="7" min="-3403" max="-3584"> <attribute key="shootEffect" value="largerock"/> </attack> </attacks> <defenses armor="50" defense="55"> <defense name="speed" interval="1000" chance="7" speedchange="290" duration="4000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element earthPercent="80"/> <element holyPercent="30"/> <element firePercent="30"/> <element energyPercent="10"/> <element physicalPercent="10"/> <element icePercent="-10"/> <element deathPercent="5"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="20"> <voice sentence="Acha que consegue me derrotar?!"/> </voices> <loot> <item id="9971" countmax="80" chance="29500"/><!-- gold coin --> <item id="6527" chance="1260"/> <item id="2493" chance="6000"/> <item id="2520" chance="17650"/> <item id="12575" countmax="2" chance="1000"/> <item id="12396" countmax="2" chance="1000"/> </loot> <script> <event name="GonkaKill2"/> </script> <script> <event name="GonkaKill"/> </script> </monster> se ajudei +rep
- Alavanca que troca itens
- Matar O Top Level E Receber Reconpenssa
- Matar O Top Level E Receber Reconpenssa
-
Matar O Top Level E Receber Reconpenssa
Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). Ex. TFS 1.3; Base: OTX 8.6 Fala Galera Do Tk Estou procurando um Script q quando o player mata o top level do servidor apareça uma menssagem em vermelhor para o server dizendo que o jogador X matou o top Level Do servidor e Recebeu 5 evet coins se estiver na seçao errada mude por favor moderadors mais rep pra quem ajudar uso sistema de efect top level --[[ Script by Bruno Minervino para o Tibia King Caso for postar, colocar os créditos ]] local config = { tempo = 10, --tempo em segundos mensagem = { texto = "[TOP]", --não use mais de 9 caracteres efeito = TEXTCOLOR_LIGHTBLUE --efeito para a função doSendAnimatedText }, efeito = 30, --efeito da função doSendMagicEffect globalstr = 5687 -- uma global storage qualquer q esteje vazia } --[[ Não mexa em nada abaixo ]] local topPlayer = getGlobalStorageValue(config.globalstr) > 0 and getGlobalStorageValue(config.globalstr) or 0 function onLogin(cid) local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local pid = query:getDataString("id") local name = query:getDataString("name") if getPlayerName(cid) == name then if topPlayer ~= getPlayerID(cid) then topPlayer = getPlayerID(cid) end setGlobalStorageValue(config.globalstr, pid) TopEffect(cid) end end registerCreatureEvent(cid, "CheckTop") return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == 8 then local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local level = tonumber(query:getDataString("level")) if level < newlevel and topPlayer ~= getPlayerID(cid) then doBroadcastMessage("O jogador " .. getPlayerName(cid) .. " tornou-se o novo Top Level. Parabens!", 22) topPlayer = getPlayerID(cid) doSaveServer() setGlobalStorageValue(config.globalstr, getPlayerID(cid)) TopEffect(cid) end end end return true end function TopEffect(cid) if not isPlayer(cid) then return true end if topPlayer == getPlayerID(cid) then doSendAnimatedText(getCreaturePosition(cid), config.mensagem.texto, config.mensagem.efeito) doSendMagicEffect(getCreaturePosition(cid), config.efeito) addEvent(TopEffect, config.tempo * 1000, cid) end end function getPlayerNameById(id) local query = db.getResult("SELECT `name` FROM `players` WHERE `id` = " .. db.escapeString(id)) if query:getID() ~= -1 then return query:getDataString("name") end return 0 end function getPlayerIdByName(name) local query = db.getResult("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name)) if query:getID() ~= -1 then return tonumber(query:getDataString("id")) end return 0 end function getPlayerID(cid) return getPlayerIdByName(getPlayerName(cid)) end Qual erro está surgindo/O que você procura? Você tem o código disponível? Se tiver publique-o aqui: Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
-
Matar O Top Level E Receber Reconpenssa
Fala Galera Do Tk Estou procurando um Script q quando o player mata o top level do servidor apareça uma menssagem em vermelhor para o server dizendo que o jogador X matou o top Level Do servidor e Recebeu 5 evet coins se estiver na seçao errada mude por favor moderadors mais rep pra quem ajudar uso sistema de efect top level --[[ Script by Bruno Minervino para o Tibia King Caso for postar, colocar os créditos ]] local config = { tempo = 10, --tempo em segundos mensagem = { texto = "[TOP]", --não use mais de 9 caracteres efeito = TEXTCOLOR_LIGHTBLUE --efeito para a função doSendAnimatedText }, efeito = 30, --efeito da função doSendMagicEffect globalstr = 5687 -- uma global storage qualquer q esteje vazia } --[[ Não mexa em nada abaixo ]] local topPlayer = getGlobalStorageValue(config.globalstr) > 0 and getGlobalStorageValue(config.globalstr) or 0 function onLogin(cid) local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local pid = query:getDataString("id") local name = query:getDataString("name") if getPlayerName(cid) == name then if topPlayer ~= getPlayerID(cid) then topPlayer = getPlayerID(cid) end setGlobalStorageValue(config.globalstr, pid) TopEffect(cid) end end registerCreatureEvent(cid, "CheckTop") return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == 8 then local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local level = tonumber(query:getDataString("level")) if level < newlevel and topPlayer ~= getPlayerID(cid) then doBroadcastMessage("O jogador " .. getPlayerName(cid) .. " tornou-se o novo Top Level. Parabens!", 22) topPlayer = getPlayerID(cid) doSaveServer() setGlobalStorageValue(config.globalstr, getPlayerID(cid)) TopEffect(cid) end end end return true end function TopEffect(cid) if not isPlayer(cid) then return true end if topPlayer == getPlayerID(cid) then doSendAnimatedText(getCreaturePosition(cid), config.mensagem.texto, config.mensagem.efeito) doSendMagicEffect(getCreaturePosition(cid), config.efeito) addEvent(TopEffect, config.tempo * 1000, cid) end end function getPlayerNameById(id) local query = db.getResult("SELECT `name` FROM `players` WHERE `id` = " .. db.escapeString(id)) if query:getID() ~= -1 then return query:getDataString("name") end return 0 end function getPlayerIdByName(name) local query = db.getResult("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name)) if query:getID() ~= -1 then return tonumber(query:getDataString("id")) end return 0 end function getPlayerID(cid) return getPlayerIdByName(getPlayerName(cid)) end
-
como fazer For your information
descupa reviver o topico mas nao teria como colocar essa menssagem ao criar ne um uma alavanca para compra um item q nao tiver o dinheiro nessessario e aparecer um tela dessas dizendo q presciza de tantos de dinheiro para compra o item??
-
GonkaKill
ajuda ae tbm estou atraz desse script
-
Addons com efeitos
creature script amigo vou testar aki e ja volto respondendo e em global events xml add essas 2 tags <event type="outfit" name="OutfitEffects" event="script" value="outfiteffect.lua"/> <event type="login" name="EffectOutLogin" event="script" value="outfiteffect.lua"/> nossa parece interessante esse elemento quando achar me mostre quero tbm kk @PedroSTT como eu marco o topico como resolvido amigo??
- EVENTO ILHAS TEMATICAS + PHP + MAPA
-
DEFEND THE TOWER
Descupe reviver o topico mas estou com um problema similar... Aparece a menssagem q o evento vai iniciar daki 2 minutos depois aparece a menssagem q o evento foi iniciado mas nao aparece o teleporte para entrar no evento nem aparece erro... Obs uso otx
-
Como fazer hotkey de minerar
nao sei se esta na seçao correta se nao estiver mova por favor alguem poderia me ajudar a fazer uma hotkey de minerar pois nao estou conseguindo ja testei varias e nenhuma da certo no meu otserver 8.60
-
VPS Windows
Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). Ex. TFS 1.3; Base: Qual erro está surgindo/O que você procura? Nao sei se esta na area correta mas presciso de um vps windows para meu server 8.6 vc poderiao estar me indicando um com link para comprar???? pode ser um mais tranquilo que suporte ums 50 a 100 players nao posso mais deixar meu server on no meu pc Você tem o código disponível? Se tiver publique-o aqui: Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
-
[PEDIDO] Script de NPC para trocar items
perdoe por reviver o topico mas e seu fosse esse script ne uma alavanca???? o que eu quero é tipo issu ae quero q o player clique na alavanca para trocar 10 vip coins id 11192 por 1 star of hell id 12706 mas ele prescisa ter na bp o item star of lord para efetuar a troca ou seja ele vai trocar 2 items por um...... pode me ajudar??
-
Sistema de Mineração
como fasso uma hotkey de mineraçao para esse sistema