Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    72

Tudo que zipter98 postou

  1. Iron Body: exp2.0.lua: Em baixo de: if damageCombat == GROUNDDAMAGE then if isInArray(specialabilities["levitate"], getCreatureName(cid)) then valor = 0 end end coloque: if getCreatureName(cid) == ironBody.name and getPlayerStorageValue(cid, 2818) < os.time() and math.random(1, 100) <= ironBody.chance then doSetCreatureOutfit(cid, {lookType = ironBody.outfit}, ironBody.duration * 1000) setPlayerStorageValue(cid, 9658783, 1) setPlayerStorageValue(cid, 2818, os.time() + ironBody.cooldown) addEvent(function() if isCreature(cid) then doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 9658783, -1) end end, ironBody.duration * 1000) end Em goback.lua (actions), abaixo de: doCreatureSay(cid, mgo, TALKTYPE_SAY) coloque: if pokename == ironBody.name then doSetCreatureOutfit(pk, {lookType = ironBody.outfit}, ironBody.duration * 1000) setPlayerStorageValue(pk, 9658783, 1) setPlayerStorageValue(pk, 2818, os.time() + ironBody.cooldown) addEvent(function() if isCreature(pk) then doRemoveCondition(pk, CONDITION_OUTFIT) setPlayerStorageValue(pk, 9658783, -1) end end, ironBody.duration * 1000) end Depois, em configuration.lua: ironBody = { name = "Bronzong", --Nome do pokémon. outfit = xxx, --Outfit. duration = 5, --Duração. chance = 35, --Chance, em %, de ativar a passiva. cooldown = 15, --Cooldown para usá-la novamente. } E você tem certeza absoluta que o pulo do Bronzong não é um efeito? Conferiu no client da PxG? Se for literalmente um salto, já imagino como foi feito. E, assim, adianto: será necessária a criação de um item invisível, com a propriedade do jogador poder passar por cima dele e sofrer uma elevação (como os bancos e parcels, sabe?).
  2. O Iron Body pode ser ativado quando, exatamente? Parece ser diferente das outras passivas, já que no segundo gif ele foi ativado sem o Bronzong receber dano.
  3. local config = { --[actionid] = {item = itemid, desc = "description"}, [9191] = {item = 5805, desc = "Premio ao jogador %s por ficar em primeiro lugar do war event."}, } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) local trophy = config[item.actionid] if isPlayer(cid) and trophy then local pos = getCreaturePosition(cid) pos.y = pos.y - 1 local thing = doCreateItem(trophy.item, 1, pos) doItemSetAttribute(thing, "description", string.format(trophy.desc, getCreatureName(cid))) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) end return true end
  4. 1ª spell: Isso é basicamente um Iron Defense, só que em forma de passiva, não é? 2ª spell: Saberia dizer se esse "pulo" do pokémon é um effect, outfit ou o pokémon literalmente pula? E os oponentes na área são logo teleportados para trás ou são empurrados?
  5. Troque o código do Unown Help por esse: elseif spell == "Unown Help" then local config = { summonPoke = "Unown", health = 5, --% de HP (baseada na HP máxima do pokémon) tirada do Unown Legion. } if isSummon(cid) then local pid = getCreatureMaster(cid) doSummonMonster(pid, config.summonPoke) local newPoke = getCreatureSummons(pid)[#getCreatureSummons(pid)] doTeleportThing(newPoke, getClosestFreeTile(newPoke, getThingPos(cid), false)) adjustStatus(newPoke, getPlayerSlotItem(pid, 8).uid, true, true, true, true) end Troque: function adjustStatus(pk, item, health, vite, conditions) por: function adjustStatus(pk, item, health, vite, conditions, unown) Acima de: setPlayerStorageValue(pk, 1007, nick) coloque: if unown then nick = "Unown" end Acima de: if isSummon(pk) and conditions then --alterado v2.5 daki pra baixo!! coloque: if unown then return true end
  6. Ué, você configurou corretamente o nome do monstro no código (letras maiúsculas e minúsculas fazem diferença)? local config = { name = "xxx", --nome do monstro vocId = xxx, --vocation id } function onTarget(cid, target) if isMonster(cid) and isPlayer(target) then if getPlayerVocation(target) ~= config.vocId then return false end elseif isPlayer(cid) and isMonster(target) then if getCreatureName(target) == config.name and getPlayerVocation(cid) ~= config.vocId then return doPlayerSendCancel(cid, "você não pode atacar esta criatura.") and false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isMonster(attacker) and isPlayer(cid) then if getPlayerVocation(cid) ~= config.vocId then return false end elseif isPlayer(attacker) and isMonster(cid) and type == STATSCHANGE_HEALTHLOSS then if getCreatureName(cid) == config.name and getPlayerVocation(attacker) ~= config.vocId then return doPlayerSendCancel(attacker, "você não pode atacar esta criatura.") and false end end return true end
  7. move1.lua: Abaixo de: if getPlayerStorageValue(mypoke, 3894) >= 1 then return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3 end coloque: if move.name == "Morph" then for i = 1, 12 do if getCD(getPlayerSlotItem(cid, 8).uid, "move"..i) > 0 then return doPlayerSendCancel(cid, "To use Morph, all the spells of your pokemon need to be ready.") end end end
  8. Tenho uma ideia melhor: poste aqui o código da spell Shredder Team, encontrada em pokemon moves.lua.
  9. @Lordbaxx Uhum, manda PM. @FlamesAdmin Troque: doSendMagicEffect(getThingPos(cid), effect) por: doSendMagicEffect({x = getThingPos(cid).x + 1, y = getThingPos(cid).y + 1, z = getThingPos(cid).z}, effect)
  10. Use este código e informe tudo que for imprimido no console. local config = { name = "xxx", --nome do monstro vocId = xxx, --vocation id } function onTarget(cid, target) if isMonster(cid) and isPlayer(target) then if getPlayerVocation(target) ~= config.vocId then return false end elseif isPlayer(cid) and isMonster(target) then print("[Target] - "..getCreatureName(cid)) print("[Target] - Vocation ID: [configurada: "..config.vocId.."] / [cid: "..getPlayerVocation(cid).."]") if getCreatureName(target) == config.name and getPlayerVocation(cid) ~= config.vocId then print("[Target] Cid can't target monster.") return doPlayerSendCancel(cid, "você não pode atacar esta criatura.") and false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isMonster(attacker) and isPlayer(cid) then if getPlayerVocation(cid) ~= config.vocId then return false end elseif isPlayer(attacker) and isMonster(cid) and type == STATSCHANGE_HEALTHLOSS then print("[StatsChange] - "..getCreatureName(attacker)) print("[StatsChange] - Vocation ID: [configurada: "..config.vocId.."] / [cid: "..getPlayerVocation(attacker).."]") if getCreatureName(cid) == config.name and getPlayerVocation(attacker) ~= config.vocId then print("[StatsChange] Cid can't damage monster.") return doPlayerSendCancel(attacker, "você não pode atacar esta criatura.") and false end end return true end
  11. Cara, se ela estiver declarada como variável global em algum arquivo da lib, basta chamá-la normalmente no código (a não ser que haja uma variável local com mesmo nome neste script, não haverá problemas).
  12. Seria sim, mas não programo no OTClient. No entanto, li um pouco do código da barra de magias de lá e pensei que a modificação que fiz em cooldown bar.lua a alteraria. Você testou o sistema depois da última atualização?
  13. EDIT: Já editei aquele meu primeiro comentário com o código corrigido.
  14. Não se esqueça de registrar o evento em login.lua. function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and type == STATSCHANGE_HEALTHLOSS and value >= getCreatureHealth(cid) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) return false end return true end
  15. Desculpe, é a pressa para ir jantar. Código corrigido. E sim (podem ser mais jogadores, basta configurar a quantidade equivalente de posições).
  16. C++, por ser bem mais complicado e muito mais útil. Lua você aprende em pouco tempo lendo tutoriais na internet. Depois, é só prática.
  17. Tag: <talkaction words="!abrir;!quest" event="script" value="nome_do_arquivo.lua"/> Código: local config = { players = { {x = 1056, y = 1056, z = 7}, --Posições para onde os jogadores serão teleportados. {x = 1055, y = 1056, z = 7}, {x = 1054, y = 1056, z = 7}, }, storage = {91812, 91813}, } function onSay(cid, words) if words == "!abrir" then if getPlayerGroupId(cid) ~= 6 then return false elseif getGlobalStorageValue(config.storage[1]) > -1 then return doPlayerSendCancel(cid, "The quest is already open.") end setGlobalStorageValue(config.storage[1], 1) broadcastMessage("The quest was open! Waiting for "..#config.players.." players...") elseif words == "!quest" then if getGlobalStorageValue(config.storage[1]) < 1 then return doPlayerSendCancel(cid, "The quest isn't open.") end local message, newStorage, count = getCreatureName(cid).." was registered in the quest!", 0, 0 for i = 0, #config.players - 1 do count = count + 1 newStorage = config.storage[2] + i if getGlobalStorageValue(newStorage) == getPlayerGUID(cid) then return doPlayerSendCancel(cid, "You are already registered in the quest.") elseif getGlobalStorageValue(newStorage) == -1 then break end end setGlobalStorageValue(newStorage, getPlayerGUID(cid)) doPlayerSendTextMessage(cid, 27, "You were registered in the quest.") if count == #config.players then local startQuest, p = true, {} for i = 0, #config.players - 1 do local pid = getPlayerByName(getPlayerNameByGUID(getGlobalStorageValue(config.storage[2] + i))) if not isPlayer(pid) then if startQuest then startQuest = false end setGlobalStorageValue(config.storage[2] + i, -1) else p[#p + 1] = pid end end if startQuest then for i = 1, #p do doPlayerSendTextMessage(p[i], MESSAGE_STATUS_CONSOLE_ORANGE, "Good luck at the quest! ^^") doTeleportThing(p[i], config.players[i]) end for i = 0, #config.players - 1 do setGlobalStorageValue(config.storage[2] + i, -1) end setGlobalStorageValue(config.storage[1], -1) message = message.." It has started now, with "..#p.." players!" end end broadcastMessage(message) end return true end
  18. É, basicamente. Não que isso vá influenciar em muita coisa, já que os Unowns servirão basicamente para o Unown Rush (ou outra utilidade que você possa achar para eles).
  19. Ah, é com level mesmo. Você se importaria se os Unowns fossem "balanceados" de acordo com o Unown Legion? Porque, se não, vai ser bem chato arrumar essa spell. PS: Se ajustados como mencionei, o nick deles, aura e status serão os mesmos do Unown Legion.
  20. 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.
  21. Deve ser a base que você está usando (escrevi estes códigos para PDA, sem level nos pokémons). Entretanto, se ela for a mesma, peço que poste aqui o código da função adjustStatus (data/lib, level system.lua).
  22. Ajudaria mais se você gravasse um vídeo ou fizesse uma gif da spell.
  • Quem Está Navegando   0 membros estão online

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