Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 01/27/20 em todas áreas

  1. Deadpool

    [BASE] PokeRoxy

    iai, tanto tempo desde q postei algo, então vou postar pra vocês, uma base legalzinha até, seguinte, eu não sei qual é esta versão, mas ela é a mesma que está online, do pokeroxy.. Então, qualquer duvida, me marquem, que eu tento ajuda-los.. vou está dando total suporte a vcs rs.. obs: me passaram a base, se me passaram é pq muita gente tem, eu so to dividindo com vocês rs algumas inforamações rapidas: pokemons que existem no server: tem sistema de torneio, tasks, dailys, tem a pokebar, sistema de addon, de card.. enfim, tem mt conteudo.. baixem e vejam.. se quiserem ver prints: https://www.facebook.com/pokemonroxy link: DOWNLOAD scan: scan link: https://www.virustotal.com/gui/url/4e81a833353b87691cbf606484d04ffe971e300253d3c790dc49998efbd4996f/detection creditos ao criador, desenvolvedor seja la quem for
    3 pontos
  2. Yan Oliveira

    (Pedido) NPC

    - Começando pelo NPC de Task de item Vai em Data/NPC e crie o arquivo Breno.xml e adicione o código dentro: <?xml version="1.0" encoding="UTF-8"?> <npc name="Breno" script="Breno.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="1421" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|, em que posso ajudar? Diga {help}, {ajuda} ou {task} para mais informações."/> </parameters> </npc> Agora em Data/NPC/Scripts crie o arquivo Breno.lua (com codificação ANSI) e adicione o código dentro: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -- VARIÁVEIS -- local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid msg = string.lower(msg) local storage = 150000 local storage_start = 150001 local id_item = 12163 -- ID DO ITEM QUE O NPC PEDE local quantidade_item = 100 -- QUANTIDADE DE ITENS QUE O NPC PEDE local id_item_recebido = 16563 -- ID DO ITEM QUE RECEBE AO COMPLETAR A TASK local quantidade_item_recebido = 1 -- QUANTIDADE DE ITENS QUE RECEBE AO COMPLETAR A TASK ----------------------------------- [ DIALOGO COM NPC] --------------------------------- if msgcontains(msg, 'help') or msgcontains(msg, 'ajuda') or msgcontains(msg, 'task') then if getPlayerStorageValue(cid, storage) == 1 then selfSay("Você já completou minha task.", cid) talkState[talkUser] = 0 return true else selfSay("Preciso que você me traga " ..quantidade_item.. " " ..getItemNameById(id_item).. " Você trouxe?", cid) talkState[talkUser] = 1 return true end elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage_start) < 1 then setPlayerStorageValue(cid, storage_start, 1) return true end if getPlayerItemCount(cid, id_item) >= quantidade_item then doPlayerRemoveItem(cid, id_item, quantidade_item) selfSay("Parabéns! Você trouxe " ..quantidade_item.. " " ..getItemNameById(id_item).. " que eu precisava. Receba sua recompensa.", cid) doPlayerAddItem(cid, id_item_recebido, quantidade_item_recebido) doSendMagicEffect(getPlayerPosition(cid), 29) setPlayerStorageValue(cid, storage, 1) talkState[talkUser] = 0 return true else selfSay("Você ainda não trouxe " ..quantidade_item.. " " ..getItemNameById(id_item).. " que eu preciso.", cid) talkState[talkUser] = 0 return true end return true elseif (msgcontains(msg, 'no') or msgcontains(msg, 'não')) and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage_start) < 1 then selfSay("Ok, fale comigo novamente caso queira fazer minha task.") talkState[talkUser] = 0 return true else selfSay("Então vá buscar os itens que eu pedi.") talkState[talkUser] = 0 return true end return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) - Agora é o NPC da Task que derrota Pokémon Vá em Data/NPC e crie o arquivo Brime.xml e adicione o código dentro: <?xml version="1.0" encoding="UTF-8"?> <npc name="Brime" script="Brime.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="1421" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|, eu recompenso jogadores que aceitam meus desafios. Diga {help}, {ajuda} ou {task} para mais informações."/> </parameters> </npc> Agora em Data/NPC/Scripts crie o arquivo Brime.lua (com codificação ANSI) e adicione o código dentro: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -- VARIÁVEIS -- local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid msg = string.lower(msg) local nome_poke_task = "Scyther" local quantidade_pokemon = 50 local storage_npc = 120000 local storage_task = 110000 local storage_start = 121000 -- RECOMPENSAS -- local id_item = 12545 local quantidade_item = 1 local exp = 500000 ----------------------------------- [ DIALOGO COM NPC] --------------------------------- if msgcontains(msg, 'help') or msgcontains(msg, 'ajuda') or msgcontains(msg, 'task') then if getPlayerStorageValue(cid, storage_task) == 1 then -- VERIFICA SE TERMINOU A TASK selfSay("Você já completou minha missão.", cid) talkState[talkUser] = 0 return true else selfSay("Preciso que você derrote alguns {"..nome_poke_task.."} para mim. Você aceita este desafio?", cid) talkState[talkUser] = 1 return true end elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim') or (msgcontains(msg, 'ok'))) and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage_start) < 1 then setPlayerStorageValue(cid, storage_start, 1) return true end if getPlayerStorageValue(cid, storage_npc) == 1 then selfSay("Parabéns! Você completou minha tarefa. Receba sua recompensa.", cid) doPlayerAddExp(cid, exp) doPlayerAddItem(cid, id_item, quantidade_item) doSendAnimatedText(getThingPos(cid), exp, 27) doSendMagicEffect(getPlayerPosition(cid), 29) setPlayerStorageValue(cid, storage_task, 1) talkState[talkUser] = 0 return true else if getPlayerStorageValue(cid, storage_npc) < 0 then selfSay("Vá derrotar todos os " ..quantidade_pokemon.. " " ..nome_poke_task.. " para mim.") setPlayerStorageValue(cid, storage_npc, 0) talkState[talkUser] = 0 return true elseif getPlayerStorageValue(cid, storage_npc) == 0 then selfSay("Você ainda não derrotou todos os " ..quantidade_pokemon.. " " ..nome_poke_task.. ". Vá derrotar os " ..nome_poke_task.. " restante antes de falar comigo.") talkState[talkUser] = 0 return true end return true end return true elseif (msgcontains(msg, 'no') or msgcontains(msg, 'não')) and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage_start) < 1 then selfSay("Ok, fale comigo novamente caso queira fazer minha task.", cid) talkState[talkUser] = 0 return true else selfSay("Então vá completar sua tarefa.") talkState[talkUser] = 0 return true end return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Agora em Data/Creaturescripts/scripts crie o arquivo task_npc.lua (com a codificação ANSI do arquivo pelo fato de ter acentuação no português) e adicione o código dentro: local storage_npc = 120000 local storage_contador = 120001 local pokemon = { [1] = {name = "Scyther", count = 50}, } local restante local nome = pokemon[1].name function onKill(cid, target) for _, t in ipairs(pokemon) do local quantidade = t.count if getCreatureName(target) == nome then if getPlayerStorageValue(cid, storage_npc) == 0 then if getPlayerStorageValue(cid, storage_contador) == quantidade then doPlayerSendTextMessage(cid, 27, "Não há mais " ..nome.. " para derrotar.") setPlayerStorageValue(cid, storage_contador, getPlayerStorageValue(cid, storage_contador) + 1) setPlayerStorageValue(cid, storage_npc, 1) return true elseif getPlayerStorageValue(cid, storage_contador) < quantidade then -- AS STORAGES COMEÇAM COM -1, ENTÃO NESSA PARTE EU APENAS DEFINO COMO 0 PARA NA LINHA SEGUINTE JÁ IR PARA 1. NÃO COLOQUE RETURN NESSE LAÇO PORQUE VAI ENCERRAR O ESCOPO E NÃO VAI CONTAR CORRETAMENTE -- if getPlayerStorageValue(cid, storage_contador) < 0 then setPlayerStorageValue(cid, storage_contador, 0) end setPlayerStorageValue(cid, storage_contador, getPlayerStorageValue(cid, storage_contador) + 1) restante = quantidade - getPlayerStorageValue(cid, storage_contador) doPlayerSendTextMessage(cid, 27, "Faltam " ..restante.. " " ..nome.. " para derrotar.") return true end elseif (getPlayerStorageValue(cid, storage_npc) < 0) or (getPlayerStorageValue(cid, storage_npc) > 0) then return true end return true end return true end end Agora em Data/Creaturescripts abra o creaturescripts.xml e adiciona a tag: <event type="kill" name="task_npc" script="task_npc.lua"/> E por último em Data/Creaturescripts/Scripts abra o Login.lua e adicione a tag na parte de eventos: registerCreatureEvent(cid, "task_npc")
    1 ponto
  3. Assim vai funcionar pra 2, 3, 4, 5, 800 portas, só q sugiro vc mudar o delay pra ser a quantidade de tempo q vc quer q demore dividido pelo numero de ids q vai trocar, assim independente de ser 3 ou 500 o tempo pra abrir fechar será o mesmo. script: -- Do not remove the credits -- -- [MOVEMENT] Porta que abre automáticamente -- -- Developed by Rigby (João Vitor) -- -- Xtibia.com -- local porta = {13680, 13679, ID DA POUCO ABERTA, 13677} -- porta fechada, porta pouco aberta, porta meio aberta, porta aberta local pos = {x = 1056, y = 1054, z = 7} -- local onde vai fica a porta local delay = 150 -- ela vai demorar 0.1 segundos para fica totalmente aberta ou totalmente fechada local action = 2701 -- action que ta no .xml, se muda la vai ter que muda aqui também function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getTileItemById(pos, porta[1]).uid > 0 then for i = 1, (#porta - 1) do addEvent(function() doTransformItem(getTileItemById(pos, porta[i]).uid, porta[i + 1]) end, i * delay) end end return true end function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) local tab = {} for _, pid in ipairs(getPlayersOnline()) do if getTileInfo(getCreaturePosition(pid)).actionid == action then table.insert(tab, pid) end end if #tab == 0 then if getTileItemById(pos, porta[#porta]).uid > 0 then for i = 1, (#porta - 1) do addEvent(function() doTransformItem(getTileItemById(pos, porta[(#porta - i) + 1]).uid, porta[(#porta - i)]) end, i * delay) end end end return true end dava pra fazer mais simples mas não quis mudar os fors pra vc não perder a lógica e aquele action ali era desnecessário já que vc podia usar item.actionid pra pegar o actionid do movements.xml
    1 ponto
  4. Bruno

    Erro no install.php

    Basta ir na pasta principal do seu site e criar um arquivo chamado install.php com o seguinte conteúdo: Agora crie um arquivo chamado install.txt com o seguinte conteúdo: 127.0.0.1Ou se preferir, pega o gesior oficial:https://github.com/gesior/Gesior2012/branches
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...