Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    73

Tudo que zipter98 postou

  1. Aqui está, testei, e está funcionando perfeitamente. Crie um arquivo .lua em data/movements/scripts com o nome tileheal, e adicione nele o seguinte conteúdo: Depois, em data/movements, coloque a seguinte tag em movements.xml. <movevent type="StepIn" actionid="coloque um action id que não esteja em uso no seu servidor" event="script" value="tileheal.lua"/> Depois, basta configurar o tile no map editor.
  2. Se não me engano, é no look.lua.
  3. Bom, eu tentei fazer aqui. Não está completo, pois a configuração é bem grande. Sobre as special evolutions, fiz/tentei apenas do Eevee. Para fazer as outras, basta seguir esta como base. Qualquer erro, só postar. Ah, não se esqueça de ir configurando as words na tag, a medida que configura no script. Enfim, crie um arquivo .lua com o nome evolvetalk,em data/talkactions/scripts, com o conteúdo: Depois, em data/talkactions, talkactions.xml, adicione a tag: <talkaction words="!fire;!normal;!leaf;!water;!cocoon" event="script" value="evolvetalk.lua"/>
  4. Se um pokémon evoluisse, por exemplo, com leaf stone, o comando seria qual? !grass ou !leaf? E se um pokémon tiver dois elementos, será verificado o elemento primário? Por exemplo, Venusaur é grass/poison. Então, com qual comando seria evoluído o Ivysaur? Ah, tem alguma informação adicional? Poderá evoluir o pokémon durante batalha?
  5. Claro, reportado. E, de nada ^^
  6. Na linha 5948 do seu configuration.lua, vocês esqueceu de uma vírgula antes do "Shiny Ninetales". Troque: ["ride"] = {"Shiny Onix", "Venusaur", "Ninetales", "Arcanine", "Ponyta", "Rapidash", "Doduo", "Dodrio", "Onix", "Rhyhorn", "Tauros", "Shiny Venusaur", "Shiny Arcanine", "Steelix", "Houndoom", "Meganium", "Bayleef", "Stantler", "Mareep", "Piloswine" "Shiny Ninetales"}, Por: ["ride"] = {"Shiny Onix", "Venusaur", "Ninetales", "Arcanine", "Ponyta", "Rapidash", "Doduo", "Dodrio", "Onix", "Rhyhorn", "Tauros", "Shiny Venusaur", "Shiny Arcanine", "Steelix", "Houndoom", "Meganium", "Bayleef", "Stantler", "Mareep", "Piloswine", "Shiny Ninetales"},
  7. Fiz aqui bem rápido, porque já estou de saída. Qualquer erro, só postar. Arquivo .lua do npc [data/npc/scripts] 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 local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local cfg = { vip1 = {x = xxx, y = yyy, z = zzz}, --Posição que o player será teleportado (da cidade vip1). vip2 = {x = xxx, y = yyy, z = zzz}, --Posição que o player será teleportado (da cidade vip2). id_item = 5785, } if msgcontains(msg, 'viajem') or msgcontains(msg, 'viajar') then selfSay("Então, você gostaria de viajar? Para isso, você deverá ter o item x em sua mochila!", cid) doPlayerSendTextMessage(cid, 27, "Diga yes se quiser viajar, e não se não quiser. Lembre-se de ter o item x na bag!") talkState[talkUser] = 1 return true elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerItemCount(cid, cfg.id_item) >= 1 then selfSay("Certo. Para onde você deseja viajar? A cidade vip1, ou a cidade vip2?", cid) doPlayerSendTextMessage(cid, 27, "Diga vip1 se quiser ir para a cidade vip1, ou vip2 para ir para a cidade vip2.") talkState[talkUser] = 2 return true else selfSay("Você não tem o item, vá embora!", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Tudo bem então...", cid) talkState[talkUser] = 0 return true elseif msgcontains(msg, 'vip1') and talkState[talkUser] == 2 then selfSay("Boa viagem!", cid) doTeleportThing(cid, cfg.vip1) talkState[talkUser] = 0 return true elseif msgcontains(msg, 'vip2') and talkState[talkUser] == 2 then selfSay("Boa viagem!", cid) doTeleportThing(cid, cfg.vip2) talkState[talkUser] = 0 return true end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) XML do npc [data/npc] <?xml version="1.0" encoding="UTF-8"?> <npc name="Nome do npc" script="arquivo do npc.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="523" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|, gostaria de {viajar}?"/> </parameters> </npc> Não se esqueça de editar essa parte <look type="523" head="114" body="119" legs="114" feet="114" corpse="2212"/> para deixar seu NPC à seu gosto.
  8. O slicer já respondeu em um tópico que havia a mesma dúvida que a sua (exatamente, na mesma linha). Não tenho certeza se a causa do erro é realmente a mesma, mas, se for, provavelmente você esqueceu de adicionar um (ou mais) pokémon em todas as tabelas de lib/configuration.lua.
  9. Esse erro ocorre quando o player clica na pokedex, e depois em si mesmo?
  10. Pronto, editei lá no meu post a spell sem essa proteção do helmo.
  11. A spell que você postou, sem edições, funcionava direitinho? Direitinho que eu digo, é que, se o player estivesse sem o helmo equipado, mandava a mensagem "Você não possui o helmo." Dei mais um edit na spell, novamente, não sei se vai funcionar; mas se mesmo assim quiser testar.
  12. Achei ótimos, principalmente o Typhlosion. Parabéns xD
  13. Tenta assim:
  14. Editei meu post acima. Não sei se do jeito que eu fiz vai funcionar (até porque, não sou bom com spells ._.), mas se mesmo assim quiser testar.
  15. Se o do Adriano não funcionar, tenta assim: Moto: local outfits = { [0] = {lookType = 101}, [1] = {lookType = 258} } local speed = 500 --qnt velo o player vai ficar function onUse(cid, item, fromPosition, itemEx, toPosition) local out = outfits[getPlayerSex(cid)] if not out then return true end local speed_final = speed + getCreatureSpeed(cid) if getCreatureOutfit(cid).lookType == out.lookType then doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 112001, -1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, getCreatureBaseSpeed(cid)) else doSetCreatureOutfit(cid, outfits[getPlayerSex(cid)], -1) setPlayerStorageValue(cid, 112001, 1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, speed_final) end return true end Spell: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 50, 60, 80, 1200) local area = createCombatArea(AREA_BEAM7, AREADIAGONAL_BEAM7) setCombatArea(combat, area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end function onCastSpell(cid, var) if getPlayerStorageValue(cid, 112001) < 1 then return doPlayerSendCancel(cid, "Você não pode fazer isso.") end if isExhausted(cid, "!chamas") == FALSE then return doCombat(cid, combat, var), setCooldown(cid, "!chamas", 3) end return FALSE, doPlayerSendCancel(cid, "You are exhausted.") end Ou local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 50, 60, 80, 1200) local area = createCombatArea(AREA_BEAM7, AREADIAGONAL_BEAM7) setCombatArea(combat, area) function onCastSpell(cid, var) if getPlayerStorageValue(cid, 112001) < 1 then return doPlayerSendCancel(cid, "Você não pode fazer isso.") end if isExhausted(cid, "!chamas") == FALSE then return doCombat(cid, combat, var), setCooldown(cid, "!chamas", 3) end return FALSE, doPlayerSendCancel(cid, "You are exhausted.") end edit: Adriano, não sei se é só impressão minha, mas acho que você só verificou se o player está usando a outfit 258 (no caso, a outfit versão male). Se for isso mesmo que eu percebi, tenta fazer como tá no script da moto. Uma tabela com as outfits, uma variável que verifica a outfit dependendo do sexo do player e, depois, getCreatureOutfit(cid).lookType ~= variável
  16. Se teleportar todos ao deslogar, tenta assim: local pos = {x = 100, y = 60, z = 7} function onLogout(cid) if getCreatureName(cid) == "Account Manager" then doTeleportThing(cid, pos) end return true end Não sei se dessa maneira irá funcionar, mas se quiser tentar.
  17. O player tem que clicar em algum item para montar na moto? Ou essa outfit da moto é só uma outfit "normal"? Se for a primeira opção, suponho que bastaria setar uma storage no player ao montar na moto, e, nesse script da spell, verificasse essa storage.
  18. Fiz rapidinho aqui, qualquer erro, só postar: XML (OBS: Não se esqueça de configurá-lo corretamente [no caso, looktype, head, body, name, etc]) <?xml version="1.0" encoding="UTF-8"?> <npc name="Nome do npc" script="tradenpc.lua" walkinterval="350000" floorchange="0" speed="0" lookdir="2"> <health now="150" max="150"/> <look type="1485" head="10" body="15" legs="20" feet="25"/> <parameters> <parameter key="message_greet" value="Ola, eu posso {trocar} alguns items por 30 Major Tokens."/> </parameters> </npc> Crie um arquivo .lua em data/npc/scripts com nome tradenpc, e coloque nele o seguinte conteúdo: 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 local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local t = {items = {xxx, yyy, zzz}, give_items = {xxx, yyy, zzz}} local cfg = { token_id = xxx, --ID do Major Token. token_qnt = 30, --Quantidade de Major Tokens que o player terá que dar pro NPC. } if msgcontains(msg, 'trocar') or msgcontains(msg, 'troca') then selfSay("Então, você gostaria de trocar "..token_qnt.." Major Tokens por x quantidade de x items?", cid) talkState[talkUser] = 1 return true elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerItemCount(cid, cfg.token_id) >= cfg.token_qnt then item = t.items qnt = t.give_items for a, b in pairs(t) do for i = 1, #item do selfSay("Certo, aqui estão os items!", cid) doPlayerRemoveItem(cid, cfg.token_id, cfg.token_qnt) doPlayerAddItem(cid, item[i], qnt[i]) talkState[talkUser] = 0 return true end end else selfSay("Você não tem os items necessários...", cid) talkState[talkUser] = 0 end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Sobre a tabela t, mude em items os items que irá ganhar, e a quantidade em give_items. Por exemplo, você quer que o player receba os items de ID 2156 (4 unidades) e 2157(7 unidades). Então, a configuração ficaria assim: local t = {items = {2156, 2157}, give_items = {4, 7}} Se o ID do item fica na primeira posição da tabela items, então sua quantidade deve ficar na primeira posição da tabela give_items.
  19. Vish, vou colocar esse NPC no meu server pra analisar melhor. Ai, quando eu corrigir os erros, posto aqui, ou se você preferir, mando por PM.
  20. Outra burrice, desculpe :c 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 local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local t = {need_items = {2160, 2159, 2158}, remove_items = {1, 2, 3}} local g = t.need_items local h = t.remove_items premio1 = x -- coloque aqui o id do dinheiro quant1 = x -- quantidade de grana que vai ganhar pexp = x -- experiencia que vai ganhar no premio if msgcontains(msg, 'mission') or msgcontains(msg, 'help') then selfSay("Você gostaria de me ajudar numa missão?", cid) doPlayerSendTextMessage(cid, 27, "Say yes or no.") talkState[talkUser] = 1 return true elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) < 1 then selfSay("Certo, vá pegar x qnt de x items!", cid) setPlayerStorageValue(cid, 222011, 1) doPlayerSendTextMessage(cid, 27, "If you alreay have the items, say complete.") talkState[talkUser] = 2 return true else selfSay("Você já me ajudou.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay("Ok então...", cid) talkState[talkUser] = 0 return true elseif msgcontains(msg, 'complete') and (talkState[talkUser] == 2 or getPlayerStorageValue(cid, 222011) >= 1) then for i = 1, #g do if getPlayerItemCount(cid, g[i]) >= h[i] then doPlayerRemoveItem(cid, g[i], h[i]) selfSay("Obrigado! Aqui está seu prêmio.", cid) doPlayerAddItem(cid, premio1, quant1) setPlayerStorageValue(cid, storage, 1) setPlayerStorageValue(cid, 222011, -1) talkState[talkUser] = 0 return true else selfSay("Você não possui os items requisitados.", cid) talkState[talkUser] = 0 return true end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  21. Não lembro direito desse script. Me passe por PM, que dou uma olhada melhor.
  22. Vá em data/lib/Movement_Effects.lua, procure por: if isCreature(cid) then addEvent(sendAuraEffect, 3000, cid, eff) --Não sei se no seu estará 3000, de qualquer maneira, procure por essa parte. end E mude para: if isCreature(cid) then addEvent(sendAuraEffect, 1000, cid, eff) end 1000 = 1 segundo.
  23. Help é no data/xml/channels.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...