Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 05/16/16 em todas áreas
-
Olá! Eu estava ajudando um cara com um task system , ele disse que pegou na net, mas as alterações que ele queria eu tive que refazer algumas partes do sistemas! Testei e funcionou perfeitamente! Funciona com Poketibia e Tibia! Vamos deixar de enrolação e adicionar o sistema! Lembrando também que funciona com tfs 0.3.6 e tfs 0.4! Não testei com tfs 1.x mas acho que não funciona. Vá em creaturescripts.xml e adicione isso: <event type="kill" name="KillTask" event="script" value="task.lua"/> No login.lua adiciona isso com os demais: registerCreatureEvent(cid, "KillTask") Agora crie um arquivo chamado task.lua e adicione isso: local tasksss = { [1] = {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, [2] = {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},}function onKill(cid, target) for _, t in ipairs(tasksss) do local total_count = t.count local m_sto = t.sto local count_sto = t.sto_count if getPlayerStorageValue(cid, m_sto) ~= -1 then if getCreatureName(target) == t.name then if (total_count - getPlayerStorageValue(cid, count_sto)) == 1 then setPlayerStorageValue(cid, count_sto, getPlayerStorageValue(cid, count_sto) + 1) doPlayerSendTextMessage(cid, 20, "You are killed ".. getPlayerStorageValue(cid, count_sto) .." " .. t.name .. " and finished the task!") return true elseif (total_count - getPlayerStorageValue(cid, count_sto)) >= 1 then setPlayerStorageValue(cid, count_sto, getPlayerStorageValue(cid, count_sto) + 1) doPlayerSendTextMessage(cid, 20, "You are killed ".. getPlayerStorageValue(cid, count_sto) .." of ".. total_count .." " .. t.name .. " kills to finish the task.") return true end end end end return trueend Agora vá em npc/scripts e crie um arquivo chamado task.lua e adicione isso: local tasksss = { [1] = {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, [2] = {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},}local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)local talkState = {}function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() endfunction creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid value = -1 for i = 1, #tasksss do if msgcontains(msg, tasksss[i].name) and not value ~= -1 then value = i end end if value == -1 then selfSay('I don\'t have a this task!', cid) talkState[talkUser] = 0 return true end local configss = tasksss[value] local name = configss.name local m_sto = configss.sto local time_sto = configss.time_sto local count_sto = configss.sto_count local total_count = configss.count local rest = total_count - getPlayerStorageValue(cid, count_sto) if getPlayerStorageValue(cid, time_sto) < os.time() then -- verifica se o player ainda está no prazo if getPlayerStorageValue(cid, m_sto) <= 0 then -- verifica se o player não pegou está task selfSay('Ready! Now you need kill a '.. total_count .. ' '.. name .. '!', cid) setPlayerStorageValue(cid, m_sto, 1) setPlayerStorageValue(cid, total_count, 0) talkState[talkUser] = 0 else if rest <= 0 then -- Verifica se o player matou todos os monstros nescessários doPlayerAddItem(cid, configss.rewardid, configss.rewardcount) setPlayerStorageValue(cid, count_sto, 0) setPlayerStorageValue(cid, m_sto, -1) setPlayerStorageValue(cid, time_sto, os.time() + configss.time) doPlayerAddExperience(cid, configss.rewardexp) doSendAnimatedText(getCreaturePosition(cid), configss.rewardexp, 215) selfSay(configss.text, cid) talkState[talkUser] = 0 else selfSay('You need to kill '..rest..' '..name..' to gain a reward.', cid) talkState[talkUser] = 0 end end else selfSay('You already did this task, player. Wait '..math.ceil((getPlayerStorageValue(cid, time_sto) - os.time())/(60*60))..' hours to do it again.', cid) talkState[talkUser] = 0 endendnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) Pronto, agora volte para a pasta npc e crie um novo arquivo .xml chamado de Task e adicione isso lá: <?xml version="1.0" encoding="UTF-8"?><npc name="Npc Nome" script="task.lua" walkinterval="350000" floorchange="0" speed="0"> <health now="150" max="150"/> <look type="369" head="91" body="102" legs="83" feet="0"/> <parameters> <parameter key="message_greet" value="You want gain a task of {Blastoise}?"/> </parameters></npc> Pronto, agora o sistema de task está funcionando, e para adicionar um novo monstro pra fazer a task? Basta editar a tabela, mas não esqueça que tem que atualizar a tabela nos 2 scripts .lua !! local tasksss = { [1] = {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, [2] = {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},} Para configurar siga as seguintes instruções: Modificações da versão 2.0: Corrigido bug de apenas o primeiro monstro configurado funcionava, agora todos configurados funcionam! Quando player fala qual quer coisa que não seja o nome do monstro, diz que não tem aquela task! Modificado modo de contagem de kill, agora monstra quantos você matou e o total que precisa matar, quando mata o ultimo monstro, aparece a mensagem que terminou a task! Créditos: Criador @miguel223 Drazyn1291 -- Editei e reformulei muita coisa! Adicionei coisas como a contagem que falta ao matar os monstros, editei pra fazer a task apenas se o player falar com o NPC e outras coisas!2 pontos
-
Fala galera do xtibia beleza? hoje trago a vocês o Wodbohs de 2015 Atualmente o servidor está online com 60 jogadores, esta versão é de 2015 mais não se preocupe na versão de 2016 a unica coisa que muda é a aparência do mapa Com algumas alterações vocês irão deixar igualzin ao servidor de 2016. Imagens: Distro está estavel deve aguentar mais de 100 players Algumas transformações estão dentro da distro e outras por script. Tem todos personagens menos Wiss,Paikuhan,Dabura e Hitto... Bills e Vegeta God estão no cliente de 2016 basta apenas vocês criar a transform deles. Os personagens Mestre Kame e King Vegetta são frees. O vegetto pode ganhar fazendo a quest reborn ou comprando, já os restantes, Chilled,Shenron,Tapion,Kagome,Zaiko e Goku God são pagos. Você pode comprar com o item demonic essence ID: 6500. Basta dizer no Say: buygokugod... DOWNLOAD: DOWNLOAD DO SERVIDOR COMPLETO + DATABASE: --------------------------------------------------------- DOWNLOAD DO SITE: --------------------------------------------------------- DOWNLOAD DO CLIENTE DESCOMPILADO: Já que o dono disse que não ligaria de postar o servidor na internet e o sub-dono me desafiou, está ai xD Conteúdo exclusivo do xtibia, proibido postar esse servidor em outro fórum sem a minha autorização Créditos: Luiz Henrique - Zero Bruno Nascimento - Dago Yan Liima - Night Veja também o Newstory Dbo Nto Bleach misturado! 8.01 ponto
-
[8.54] Base Shinobi Online / OTNaruto {DOWNLOAD}
superboy0008 reagiu a luiz smania por um tópico no fórum
Este servidor é uma base cópia do projeto original "Shinobi Online", no qual foi desenvolvido por Ramza (Ricardo Ianelli) & Equipe, no qual foi adaptado por Thalia se tornando "OTNaruto". Base inovadora com um novo formato a ser aprimorado para os Narutibia, com novos sistemas e funções. + VÍDEOS & FOTOS DO SERVIDOR: + DOWNLOAD DO SERVIDOR: (ATUALIZADO 17/12/17) Servidor & Cliente: MEGA.nz (Clique Aqui) Scan: VirusTotal.com (Clique Aqui) Página do OTNaruto: https://www.facebook.com/otNarutoOnline Página do Shinobi Online: https://www.facebook.com/ShinobiOnlineGame/ Tópico atualizado e fixado por Stigal.1 ponto -
OTChecker - Notificações de players e servers
Silveira Crtba reagiu a Wo11ven por um tópico no fórum
OTChecker é uma ferramenta para jogadores e OT admins. O sistema coleta informações de jogadores e OT Servers e as utiliza para enviar notificações. Para jogadores: Encontre os melhores servidores e veja informações legais sobre eles. Você pode receber notificações quando um jogador for visto online ou avançar de level. Além disso, você pode seguir seus servers favoritos e saber quando eles estiverem offline, dentre outras opções. Para admins: Dê ao seu OT uma página bonita, mais visibilidade e veja informações úteis. Configure canais de notificação e aumente a competitividade entre seus jogadores. Diversas opções estão disponíveis. Beta test liberado! Lembre-se de selecionar o pacote Beta Tester ao criar sua conta. Site: https://otchecker.net Alguns guias: Como adicionar um server na OT List/Grid Aumentando o tamanho máximo das Network Messages Configurando notificações de OTServers e Players1 ponto -
Suggestname - monster system - programando c++ opentibia
DarkWore reagiu a BananaFight por um tópico no fórum
Fala galera, eu resolvi criar esse sistema aonde os montros tem seu dano / defesa / vida definidos pelo level / atributo que são configurados no XML, e eu fiz esse sistema em stream para mostrar um pouco de como trabalhar nas source do TFS 1.2, no sistema trabalhamos editando o MonsterType, Monster, Combat e a estrutura do xml dos monsters, é bastante conteúdo e vale apena conferir, uma boa fonte de aprendizado. LINK DO REPOSITÓRIO COM A VERSÃO APRIMORADA DOS SISTEMAS: https://bitbucket.org/eduardovicente/pokemo-new-era Video Essa é uma versão resumida e com uma melhor qualidade no audio - Playlist passo a passo Criando na hora. [ 13 vídeos ] - Imagens1 ponto -
[TFS 1.1] Monster Tasks
Mendiguinho91 reagiu a Furabio por um tópico no fórum
Esse npc permite escolher qual task o player irá fazer : Adonai.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Adonai" script="tasks.lua" walkinterval="2000" speed ="0" floorchange="0"> <health now="100" max="100"/> <look type="433" head="58" body="113" legs="50" feet="78" addons="1" mount="688"/> </npc> tasks.lua 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) creaturescripts.xml <event type="kill" name="Tasks" script="killtasks.lua"/> login.lua player:registerEvent("Tasks") killtasks.lua local config = { ['dragon'] = {amount = 10, storage = 19000, startstorage = 5010, startvalue = 1}, ['dragon lord'] = {amount = 10, storage = 19001, startstorage = 5011, startvalue = 1}, ['hydra'] = {amount = 10, storage = 19002, startstorage = 5012, startvalue = 1}, ['demon'] = {amount = 10, storage = 19003, startstorage = 5013, startvalue = 1} } function onKill(player, target) local monster = config[target:getName():lower()] if target:isPlayer() or not monster or target:getMaster() then return true end local stor = player:getStorageValue(monster.storage)+1 if stor < monster.amount and player:getStorageValue(monster.startstorage) >= monster.startvalue then player:setStorageValue(monster.storage, stor) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Task message: '..(stor +1)..' of '..monster.amount..' '..target:getName()..'s killed.') end if (stor +1) == monster.amount then player:sendTextMessage(MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..(stor +1)..' '..target:getName()..'s and completed the '..target:getName()..'s mission.') player:setStorageValue(monster.storage, stor +1) end return true end ___________________________________________________________________________________________ Como funciona ? O NPC oferece-lhe várias task, você pode escolher qual você deseja fazer. Se você não matar todos os monstros, o NPC irá dizer-lhe quantos você ainda tem que matar. Você pode para ver a lista de recompensa e as tasks que você já fez. Você pode parar com as tasks e ir fazer outra e depois continuar a antiga. Ao terminar as task elas não serão mais mencionados pelo NPC mas será mostrado como terminado na lista. Quando terminar as task o npc, dirá que todas foram completadas. Créditos : Limos1 ponto -
Lord Loras
Kluivert reagiu a Marco Oliveira por um tópico no fórum
Lord Loras Lord Loras é o terceiro filho de Lorde Mace Tyrell. Conhecido como O Cavaleiro das Flores, é extremamente habilidoso nas justas e torneios. Suas habilidades e seu estilo o tornaram famoso nas cortes dos Sete Reinos. Seu brasão pessoal são três rosas douradas sobre um campo verde, indicando-o como terceiro filho. História Em sua juventude, Loras foi criado em Luminera, onde serviu como pajem e escudeiro de Renly Baratheon. Supõe-se que foi nesse período que teve início o relacionamento secreto dos dois. Apesar disso, muitos na corte sabem dessa relação proibida. Durante o casamento de Sansa com Tyrion, Sor Garlan Tyrell puxa a noiva para dançar. Ele diz a ele que viu o modo como ela olha para seu irmão, e que Loras e bonito e valente, e que todos o amam muito Equipamento1 ponto -
Wodbohs 2014-2015 8.0
Yan Liima reagiu a Dragon Ball Hiper por um tópico no fórum
Show Parabens yaan sempre trazendo novidade1 ponto -
[dúvida] como editar a pallet do rme
Administrador reagiu a LeoTK por uma questão
Valeu foi de grande ajuda eu estava usando um rme diferente eu peguei o que usava antes e estou editando valeu mano ^^1 ponto -
[dúvida] como editar a pallet do rme
LeoTK reagiu a Administrador por uma questão
http://www.xtibia.com/forum/topico/232873-remeres-map-editor-criando-e-modificando-extens%C3%B5es/#comment-16446511 ponto -
Flying system tfs 1.2
Administrador reagiu a BananaFight por um tópico no fórum
Fly System é um sistema que permite ao player voar pelo mapa em locais aonde antes não era possível. Arrumando algumas coisas na source, comando /fly on, off, up, down funcionando, nova variável no player isFlying, canFly ( salvo no MySql ) Bugs - Descer em itens bloqueáveis. Changelog To do To Do- Done1 ponto -
pronto! Dei uma ajeitada no script e concertei o que estava faltando! Npc: local tasksss = { [1] = {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, [2] = {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},}local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)local talkState = {}function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() endfunction creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid value = -1 for i = 1, #tasksss do if msgcontains(msg, tasksss[i].name) and not value ~= -1 then value = i end end if value == -1 then selfSay('I don\'t have a this task!', cid) talkState[talkUser] = 0 return true end local configss = tasksss[value] local name = configss.name local m_sto = configss.sto local time_sto = configss.time_sto local count_sto = configss.sto_count local total_count = configss.count local rest = total_count - getPlayerStorageValue(cid, count_sto) if getPlayerStorageValue(cid, time_sto) < os.time() then -- verifica se o player ainda está no prazo if getPlayerStorageValue(cid, m_sto) <= 0 then -- verifica se o player não pegou está task selfSay('Ready! Now you need kill a '.. total_count .. ' '.. name .. '!', cid) setPlayerStorageValue(cid, m_sto, 1) setPlayerStorageValue(cid, total_count, 0) talkState[talkUser] = 0 else if rest <= 0 then -- Verifica se o player matou todos os monstros nescessários doPlayerAddItem(cid, configss.rewardid, configss.rewardcount) setPlayerStorageValue(cid, count_sto, 0) setPlayerStorageValue(cid, m_sto, -1) setPlayerStorageValue(cid, time_sto, os.time() + configss.time) doPlayerAddExperience(cid, configss.rewardexp) doSendAnimatedText(getCreaturePosition(cid), configss.rewardexp, 215) selfSay(configss.text, cid) talkState[talkUser] = 0 else selfSay('You need to kill '..rest..' '..name..' to gain a reward.', cid) talkState[talkUser] = 0 end end else selfSay('You already did this task, player. Wait '..math.ceil((getPlayerStorageValue(cid, time_sto) - os.time())/(60*60))..' hours to do it again.', cid) talkState[talkUser] = 0 endendnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) Kill: local tasksss = { {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},}function onKill(cid, target) for _, t in ipairs(tasksss) do local total_count = t.count local m_sto = t.sto local count_sto = t.sto_count if getPlayerStorageValue(cid, m_sto) ~= -1 then if getCreatureName(target) == t.name then if (total_count - getPlayerStorageValue(cid, count_sto)) == 1 then setPlayerStorageValue(cid, count_sto, getPlayerStorageValue(cid, count_sto) + 1) doPlayerSendTextMessage(cid, 20, "You are killed ".. getPlayerStorageValue(cid, count_sto) .." " .. t.name .. " and finished the task!") return true elseif (total_count - getPlayerStorageValue(cid, count_sto)) >= 1 then setPlayerStorageValue(cid, count_sto, getPlayerStorageValue(cid, count_sto) + 1) doPlayerSendTextMessage(cid, 20, "You are killed ".. getPlayerStorageValue(cid, count_sto) .." of ".. total_count .." " .. t.name .. " kills to finish the task.") return true end end end end return trueend Testei com mais de um monstro configurado na tabela funcionou! Está mandando mensagem de quando termina a task e quantos faltam e quando fala com o npc e o mostro não está na tabela, o npc diz que não tem essa task!1 ponto
-
Obrigado a todos!@milbradt @Poccnn @Danihcv1 ponto
-
Bug bag 6 pokemons
samlecter reagiu a RodriigoRobson por uma questão
Posta o login.lua em data/creaturescripts/login.lua ou procure por "Cap" no login.lua vai esta "0" Pois voce esta usando uma Base Open Source e esta bugado o sistema de 6 Pokemons da Bag diferente de um PDA normal . - Troca o "0" por "6" mesmo assim nao vai funcionar o sistema de 6 pokemons na bag 7 para o Depot, Pois no PDA é ao contrario voce nasce com "0" de cap e quando equipa Pokemons de 1 em 1 vai (aumentando) a cap ate chegar no "6" e no seu Open Source nasce com "6" de Cap e quando equipa Pokemons de 1 em 1 vai (Diminuindo) ate chegar no "0". - Tem que refazer todo o Sistema de catch do seu Servidor!1 ponto -
A função doPlayerSetExperienceRate(cid, value) fica na lib em 050-function.lua. Ela retorna a função doPlayerSetRate(cid, SKILL__LEVEL, value) Ou seja, se preferir pode ser usado doPlayerSetRate(cid, SKILL__LEVEL, 1.5), mas como é do meu costume usar "doPlayerSetExperienceRate" eu coloquei ela. Essa função(doPlayerSetRate) já checa o rate atual do jogador, não precisando fazer qualquer outra checagem para definir o valor a ser dado, eu testei na prática também, usando exp por stages e fixa. Sobre o movements.xml não é necessário colocar mais do que coloquei, tendo em vista que no próprio script ele transforma o itemId para o outro. A função existe tendo em vista que o autor do topico disse que a exp aumentou, porem como o danihcv usou, ele ta multiplicando a atual exp rate pelo stage atual. Que é 1.5(que é o extraExp declarado) * Numero checado do stage(podendo ser 50,100,300,1000, depende da stage atual). Por isso que a exp esta aumentando drasticamente, o que o danihcv fez no seu calculo foi dar 50% a mais de exp bonus em cima do stage, ficando uma extraExp bem "valorizada". --Topico-- Enfim, eu testei em uma rev3777, funcionou perfeitamente o script podendo usar com anel de duração ou sem duração.1 ponto
-
Não tinha prestado atenção a forma como tu fizeste. Está certo. Na questão do xml, o que o milbradt postou é certo pois, se você prestar atenção vera que: O item desequipado ao ser equipado muda de id (equip). Como ele já mudou de id, ele não será desequipado - pois já não é o mesmo item, foi transformado em outro item - quem será desequipado é o item que está equipado - que no caso é o item transformado. Agora voltando ao assunto do tópico, o autor do mesmo tem que fazer o teste da função rate para saber se ela existe e está funcionando normalmente ou como ela funciona (parâmetros).1 ponto
-
Acho que isso não funcionará caso ele use stages... :s É preciso fazer movements para 2 itens com id's diferentes, pois o membro quer que o anel se transforme em outro (id) quando for equipado e volte ao normal ao ser desequipado. Se eu entendi direito o que vc quis explicar, o meu script já faz isso, observe: doPlayerSetRate(cid, SKILL__LEVEL, extraRate*getExperienceStage(getPlayerLevel(cid))) *getExperienceStage retornará o valor do rate normal. Ao multiplicar este valor por 1.5, o resultado será a rate normal + metade da rate normal.1 ponto
-
movements.xml: <movevent type="Equip" itemid="ID DO ITEM" slot="ring" event="script" value="nameScript.lua"/><movevent type="DeEquip" itemid="ID DO ITEM" slot="ring" event="script" value="nameScript.lua"/> nameScript.lua: local idAnelDesequipado = ID DO ITEMlocal idAnelEquipado = ID DO ITEMlocal extraRate = 1.5function onEquip(cid, item, slot) local value = getItemAttribute(item.uid, "duration") doTransformItem(item.uid, idAnelEquipado) if value ~= nil then doItemSetAttribute(item.uid, "duration", value) end doDecayItem(item.uid) doPlayerSetExperienceRate(cid, extraRate) return trueendfunction onDeEquip(cid, item, slot) if item.uid ~= 0 then local value = getItemAttribute(item.uid, "duration") doTransformItem(item.uid, idAnelDesequipado) if value ~= nil then doItemSetAttribute(item.uid, "duration", value) end end doPlayerSetExperienceRate(cid, 1.0) return trueend1 ponto
-
Bug? script drop item message - by zipter
Mendiguinho91 reagiu a zipter98 por uma questão
Hm, curioso. Mesmo não dropando o item, a mensagem que aparece informa o nome deste? De qualquer maneira, fiz algumas pequenas modificações no código:1 ponto -
[Encerrado] [Pedido Spells] [PDA}
samlecter reagiu a FlamesAdmin por um tópico no fórum
elseif spell == "Hex" then local tempo = 3 local a = {} local outfit = { ["Mega Gengar"] = 1942, ["Dusclops"] = 1949, ["Dusknoir"] = 1944, } local ret1 = {} ret1.id = 0 ret1.cd = 5 ret1.eff = 0 ret1.check = 0 ret1.first = true ret1.cond = "Slow" local ret2 = {} ret2.id = 0 ret2.cd = 5 ret2.eff = 0 ret2.check = 0 ret2.first = true ret2.cond = "Miss" doSetCreatureOutfit(cid, {lookType = outfit[getCreatureName(cid)]}, -1) setPlayerStorageValue(cid, 9658783, 1) a.speed = getCreatureSpeed(cid) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, a.speed*1.8) addEvent(function() if not isCreature(cid) then return true end doRemoveCondition(cid, CONDITION_OUTFIT) doRegainSpeed(cid) doMoveInArea2(cid, 33, selfArea1, ghostDmg, min, max, spell, ret1) doMoveInArea2(cid, 33, selfArea1, ghostDmg, 0, 0, spell, ret2) end, tempo*1000)1 ponto -
data/lib/pokemon moves.lua: elseif spell == "Iron Body" then local ironBody = { outfit = xxx, --Outfit. duration = 5, --Duração. } doSetCreatureOutfit(cid, {lookType = ironBody.outfit}, ironBody.duration * 1000) setPlayerStorageValue(cid, 9658783, 1) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 9658783, -1) end end, ironBody.duration * 1000)1 ponto
-
Cara, não dá para se basear muito por este vídeo, mas enfim: elseif spell == "Mamaragan" then local effect = 207 --Efeito. local areas = {rock1, rock2, rock3, rock4, rock5} --Áreas, em ordem de execução, da spell (de areas.lua). for i = 0, #areas do addEvent(function() doMoveInArea2(cid, effect, areas[i + 1], ELECTRICDAMAGE, min, max, spell) end, i * 300) end PS: Coloquei como padrão as áreas de execução do Power Wave, que achei bem semelhante.1 ponto