Postado Junho 8, 2015 10 anos Gostaria de fazer um unown legion. mais nao sei como fazer as magias unown help.(ela invoca um unown tirando um pouco de life do unwn legion o unow criado nao morre ate que se use a magia unown rush que usa os unows pra atacar toda area e ae eles somen e tem que invocalos denovo. tempo de invocaçao e de 2 sec pra cada unow) eu encontrei um ot que tem o unown legion ja funcional. pokedg.com Editado Junho 8, 2015 10 anos por cleber13 (veja o histórico de edições)
Postado Dezembro 7, 2015 9 anos Vou te Ajudar Primeiramente, em pokemon moves.lua: 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)] setPlayerStorageValue(newPoke, 1001, pokes[getCreatureName(newPoke)].offense * getPlayerLevel(pid)) setPlayerStorageValue(newPoke, 1002, pokes[getCreatureName(newPoke)].defense) setPlayerStorageValue(newPoke, 1003, pokes[getCreatureName(newPoke)].agility) setPlayerStorageValue(newPoke, 1004, pokes[getCreatureName(newPoke)].vitality * getPlayerLevel(pid)) setPlayerStorageValue(newPoke, 1005, pokes[getCreatureName(newPoke)].specialattack * getPlayerLevel(pid)) setCreatureMaxHealth(newPoke, getVitality(newPoke) * HPperVITsummon) doCreatureAddHealth(newPoke, getCreatureMaxHealth(newPoke)) doCreatureAddHealth(cid, -getCreatureMaxHealth(cid) * (config.health / 100)) end elseif spell == "Unown Rush" then local config = { distEffect = xxx, --Distance effect. effect = xxx, --Efeito de invisibilidade. barrierEffect = xxx, --Effect do Barrier. barrierTime = 8, --Duração do Barrier, em segundos. barrierInterval = 500, --Intervalo de tempo, em milésimos de segundo, entre cada efeito do Barrier. times = 4, --Quantas vezes a spell em área será "lançada" (também quantas vezes o efeito será "rebatido" entre Unown Legion e os Unowns). interval = 400, --Intervalo de tempo entre as "rebatidas", em milésimos de segundo. intervalAOE = 200, --Intervalo de tempo entre os "lances" da spell em área. combat = ghostDmg, --Elemento da spell. } function barrierEffect(cid, time) if isCreature(cid) then if time < 0 then return true end doSendMagicEffect({x = getThingPos(cid).x + 1, y = getThingPos(cid).y + 1, z = getThingPos(cid).z}, config.barrierEffect) addEvent(barrierEffect, config.barrierInterval, cid, time - 1) end end local summons, t = getCreatureSummons(getCreatureMaster(cid)), {} doDisapear(cid) doSendMagicEffect(getThingPos(cid), config.effect) for i = 1, config.times do for j = 2, #summons do if isCreature(summons[j]) and isCreature(cid) then t[#t + 1] = summons[j] addEvent(function() doSendDistanceShoot(getThingPos(cid), getThingPos(summons[j]), config.distEffect) addEvent(function() doSendDistanceShoot(getThingPos(summons[j]), getThingPos(cid), config.distEffect) end, 100) end, i * config.interval + 100) end end end addEvent(function() barrierEffect(cid, math.floor(config.barrierTime * 1000 / config.barrierInterval)) if isCreature(cid) then for i = 1, #t do if isCreature(t[i]) then doRemoveCreature(t[i]) end end for i = 1, config.times do addEvent(function() if isCreature(cid) then local area = getPosfromArea(cid, rushAreaEffect) for j = 1, #area do doSendDistanceShoot(getThingPos(cid), area[j], config.distEffect) end doDanoWithProtect(cid, config.combat, getThingPos(cid), rushAreaDamage, -min, -max, 0) if i == config.times then doAppear(cid) setPlayerStorageValue(cid, 9658783, 1) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 9658783, -1) end end, config.barrierTime * 1000 - (config.times * (config.interval + config.intervalAOE))) end end end, i * config.intervalAOE) end end end, config.times * config.interval + 100 * config.times) Depois, em data/actions/scripts, goback.lua: Acima de: local cd = getCD(item.uid, "blink", 30) coloque: if #getCreatureSummons(cid) > 1 then for _, s in pairs(getCreatureSummons(cid)) do if getCreatureName(s) == "Unown" then doRemoveCreature(s) end end end Depois, em data/talkactions/scripts, move1.lua: Abaixo de: if getPlayerStorageValue(mypoke, 93828) > os.time() then return doPlayerSendCancel(cid, "Your pokemon can't use moves right now.") end coloque: local unownCount = 7 --Quantidade de Unowns máxima/quantidade de Unowns para usar o Unown Rush. if move.name == "Unown Help" then if #getCreatureSummons(cid) >= unownCount + 1 then return doPlayerSendCancel(cid, "You already have "..unownCount.." Unowns helping you.") end elseif move.name == "Unown Rush" then if #getCreatureSummons(cid) < unownCount + 1 then return doPlayerSendCancel(cid, "You need "..unownCount.." Unowns helping you to use this spell.") end end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.