Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    73

Tudo que zipter98 postou

  1. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  2. Tópico atendido e movido para a seção de pedidos entregues.
  3. Área incorreta, tópico movido. Mais cuidado da próxima vez.
  4. Obviamente, destacado/fixado.
  5. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  6. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  7. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  8. Bom, suponho que então, dúvida sanada. Sobre o aumento de level máximo, peço que faça outro tópico com tal pedido. Sanado, movido.
  9. Ops, foi mal, erro de digitação. local event_pos1 = {x=x, y=y, z=z} local event_pos2 = {x=x, y=y, z=z} function onPrepareDeath(cid) if not isPlayer(cid) then return true elseif getGlobalStorageValue(81236) == 1 then if isInArea(getThingPos(cid), event_pos1, event_pos2) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, false) return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "eventDeath") return true end
  10. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  11. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  12. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  13. Primeiramente, vá em level system.lua (data/lib). Abaixo de: local gender = getItemAttribute(item, "gender") and getItemAttribute(item, "gender") or 0 addEvent(doCreatureSetSkullType, 10, pk, gender) Adicione: local bonus = 0 if gender == 4 then bonus = (pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk)))*5/100 elseif gender == 3 then bonus = (pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk)))*5/100 end Troque: setPlayerStorageValue(pk, 1001, pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk))) Por: setPlayerStorageValue(pk, 1001, pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk)) + bonus) Depois, troque: setPlayerStorageValue(pk, 1004, pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk))) Por: setPlayerStorageValue(pk, 1004, pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk)) + bonus) fim.
  14. Suja, só por observação (eu não sei absolutamente nada de programação): na parte substituída de HP, não faltou um parênteses? Digo, tendo como base a parte de mana, devendo ser (uint16_t)std, e não (uint16_tstd? OBS: Como eu já disse, não sei nada de programação. Talvez eu esteja errado. msg->AddU16((uint16_t)std::ceil((float)player->getHealth() * 100 / std::max(player->getMaxHealth(), 1)));
  15. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  16. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  17. Sobre o NPC, vou arrumar logo. function onKill(cid, target, lastHit) local min_lv = 100 --Level mínimo para a frag contar. if getPlayerStorageValue(cid, 193811) >= 1 and getPlayerStorageValue(cid, 193811) <= qnt_kill then if isPlayer(target) then if getPlayerLevel(target) >= min_lv then if getPlayerStorageValue(cid, 193811) >= 2 then setPlayerStorageValue(cid, 193811, getPlayerStorageValue(cid, 193811) - 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You killed 1 player. You need kill more "..(getPlayerStorageValue(cid, 193811) - 1).." "..((getPlayerStorageValue(cid, 193811) - 1) > 1 and "players" or "player").." to complete the task.") else setPlayerStorageValue(cid, 183811, 0) setPlayerStorageValue(cid, 918381, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Congratulations, you complete the task! Talk to the NPC for get your prize.") end end end end return true end function onLogin(cid) registerCreatureEvent(cid, "taskPlayer") return true end NPC:
  18. Tópico movido para a seção de dúvidas e pedidos resolvidos.
  19. Tenta assim: function onKill(cid, target, lastHit) local qnt_kill = 50 --Quantidade necessário de players que o jogador deverá matar. local min_lv = 100 --Level mínimo para a frag contar. if getPlayerStorageValue(cid, 193811) >= 1 and getPlayerStorageValue(cid, 193811) <= qnt_kill then if isPlayer(target) then if getPlayerLevel(target) >= min_lv then if getPlayerStorageValue(cid, 193811) >= 2 then setPlayerStorageValue(cid, 193811, getPlayerStorageValue(cid, 193811) - 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You killed 1 player. You need kill more "..(qnt_kill - getPlayerStorageValue(cid, 193811)).." "..((qnt_kill - getPlayerStorageValue(cid, 193811)) > 1 and "players" or "player").." to complete the task.") else setPlayerStorageValue(cid, 183811, 0) setPlayerStorageValue(cid, 918381, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Congratulations, you complete the task! Talk to the NPC for get your prize.") end end end end return true end function onLogin(cid) registerCreatureEvent(cid, "taskPlayer") return true end
  20. Área incorreta, tópico movido. Mais cuidado da próxima vez.
  21. Vou alterar aqui o NPC. O valor, sim, você coloca 1. O script .lua do NPC, eu passei acima. O .xml, tente fazer tirando como base outros NPCs no mesmo modelo. #EDIT: Códigos alterados.
  22. Tenta esse aqui, se não funcionar e der erro no console, poste-o aqui. function onUse(cid, item, frompos, item2, topos) local cfg = { [3000] = 1000, --[quanto vai healar] = lv mínimo necessário, [6000] = 3000, } local cfg_two = { has_exausted = true, --Terá exausted? [true/sim] [false/não] exausted = 5, --Se colocar true acima, configure o exausted aqui (em segundos). } local heal = {} for a, b in pairs(cfg) do if getPlayerLevel(cid) >= b then table.insert(heal, a) end end if cfg_two.has_exausted == true then if getPlayerStorageValue(cid, 91831) > os.time() then return doPlayerSendCancel(cid, "Wait some seconds to use this again.") end end doCreatureSay(cid, "Hmmm, now I feel better!", TALKTYPE_MONSTER) if cfg_two.has_exausted == true then setPlayerStorageValue(cid, 91831, os.time() + cfg_two.exausted) end doCreatureAddMana(cid, heal[math.random(#heal)]) doRemoveItem(item.uid, 1) return true end
  23. Só clicar no Curtir, próximo ao comentário. Sanado, movido.
  24. O jogador irá receber a storage automaticamente, após matar os 50 jogadores, ou terá que falar novamente com o NPC? Bom, fiz aqui. Qualquer erro, só postar. NPC: (suponho que você saiba fazer o .xml dele) data/creaturescripts/scripts function onKill(cid, target, lastHit) local qnt_kill = 50 --Quantidade necessário de players que o jogador deverá matar. if getPlayerStorageValue(cid, 193811) >= 1 and getPlayerStorageValue(cid, 193811) <= qnt_kill then if isPlayer(target) then if getPlayerStorageValue(cid, 193811) <= (qnt_kill - 2) then setPlayerStorageValue(cid, 193811, getPlayerStorageValue(cid, 193811) - 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You killed 1 player. You need kill more "..(qnt_kill - getPlayerStorageValue(cid, 193811)).." "..((qnt_kill - getPlayerStorageValue(cid, 193811)) > 1 and "players" or "player").." to complete the task.") else setPlayerStorageValue(cid, 183811, 0) setPlayerStorageValue(cid, 918381, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Congratulations, you complete the task! Talk to the NPC for get your prize.") end end end return true end function onLogin(cid) registerCreatureEvent(cid, "taskPlayer") return true end Tags: <event type="kill" name="taskPlayer" script="nome do arquivo.lua"/> <event type="login" name="taskPlayerLogin" script="nome do arquivo.lua"/>
  • Quem Está Navegando   0 membros estão online

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