Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    73

Tudo que zipter98 postou

  1. Ops, esqueci uma informação específica no segundo passo de instalação do sistema (doUpdateMoves). Editado.
  2. Base usada: PDA by Slicer, v1.9 Para quem não conhece o sistema de mega evoluções, recomendo acessar este link. A diferença é que a pedra (mega stone) não ocupa o espaço de um Held Item tier Y (visto que não são todos os servidores que possuem Held Itens). Instalação do sistema (atenção nos detalhes) data/lib: cooldown bar.lua: Troque o código da função getNewMoveTable(table, n) por este: function getNewMoveTable(table, n) if table == nil then return false end local moves = {table.move1, table.move2, table.move3, table.move4, table.move5, table.move6, table.move7, table.move8, table.move9, table.move10, table.move11, table.move12} local returnValue = moves if n then returnValue = moves[n] end return returnValueend No código da função doUpdateMoves(cid), troque o segundo: table.insert(ret, "n/n,") por: local mEvolveif not getCreatureName(summon):find("Mega") and getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") then if not isInArray(ret, "Mega Evolution,") then table.insert(ret, "Mega Evolution,") mEvolve = true endendif not mEvolve then table.insert(ret, "n/n,")end Depois, em pokemon moves.lua: Troque: min = getSpecialAttack(cid) * table.f * 0.1 --alterado v1.6 por: min = getSpecialAttack(cid) * (table and table.f or 0) * 0.1 --alterado v1.6 Código da spell: elseif spell == "Mega Evolution" then local effect = xxx --Efeito de mega evolução. if isSummon(cid) then local pid = getCreatureMaster(cid) if isPlayer(pid) then local ball = getPlayerSlotItem(pid, 8).uid if ball > 0 then local attr = getItemAttribute(ball, "megaStone") if attr and megaEvolutions[attr] then local oldPosition, oldLookdir, health_percent_lost = getThingPos(cid), getCreatureLookDir(cid), (getCreatureMaxHealth(cid) - getCreatureHealth(cid)) * 100 / getCreatureMaxHealth(cid) doItemSetAttribute(ball, "poke", megaEvolutions[attr][2]) doSendMagicEffect(getThingPos(cid), effect) doRemoveCreature(cid) doSummonMonster(pid, megaEvolutions[attr][2]) local newPoke = getCreatureSummons(pid)[1] doTeleportThing(newPoke, oldPosition, false) doCreatureSetLookDir(newPoke, oldLookdir) adjustStatus(newPoke, ball, true, false) doCreatureAddHealth(newPoke, -(health_percent_lost * getCreatureMaxHealth(newPoke) / 100)) if useKpdoDlls then addEvent(doUpdateMoves, 5, pid) end end end end end Depois, em configuration.lua: megaEvolutions = { --[itemid] = {"poke_name", "mega_evolution"}, [11638] = {"Charizard", "Mega Charizard X"}, [11639] = {"Charizard", "Mega Charizard Y"},} Agora, em data/actions/scripts, código da mega stone: function onUse(cid, item) local mEvolution, ball = megaEvolutions[item.itemid], getPlayerSlotItem(cid, 8).uid if not mEvolution then return doPlayerSendCancel(cid, "Sorry, this isn't a mega stone.") elseif ball < 1 then return doPlayerSendCancel(cid, "Put a pokeball in the pokeball slot.") elseif #getCreatureSummons(cid) > 0 then return doPlayerSendCancel(cid, "Return your pokemon.") elseif getItemAttribute(ball, "poke") ~= mEvolution[1] then return doPlayerSendCancel(cid, "Put a pokeball with a(n) "..mEvolution[1].." in the pokeball slot.") elseif getItemAttribute(ball, "megaStone") then return doPlayerSendCancel(cid, "Your pokemon is already holding a mega stone.") end doItemSetAttribute(ball, "megaStone", item.itemid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Now your "..getItemAttribute(ball, "poke").." is holding a(n) "..getItemNameById(item.itemid)..".") doRemoveItem(item.uid) return trueend Depois, em goback.lua: Abaixo de: if not pokes[pokemon] then return trueend coloque: if pokemon:find("Mega") then local normalPoke = megaEvolutions[getItemAttribute(item.uid, "megaStone")][1] if normalPoke then doItemSetAttribute(item.uid, "poke", normalPoke) pokemon = normalPoke end end Depois, em data/creaturescripts/scripts, look.lua: Abaixo de: local boost = getItemAttribute(thing.uid, "boost") or 0 coloque: local extraInfo, megaStone = "", getItemAttribute(thing.uid, "megaStone")if megaStone then extraInfo = getItemNameById(megaStone) if pokename:find("Mega") then pokename = megaEvolutions[megaStone][1] endend Depois, acima do primeiro: doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) coloque: if extraInfo ~= "" then table.insert(str, "\nIt's holding a(n) "..extraInfo..".")end Já em data/talkactions/scripts, move1.lua: Abaixo de: function doAlertReady(cid, id, movename, n, cd) coloque: if movename == "Mega Evolution" then return true end Troque: if not move then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end por: if not move then local isMega = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") if not isMega or name:find("Mega") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end local moveTable, index = getNewMoveTable(movestable[name]), 0 for i = 1, 12 do if not moveTable[i] then index = i break end end if tonumber(it) ~= index then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end local needCds = true --Coloque false se o pokémon puder mega evoluir mesmo com spells em cooldown. if needCds then for i = 1, 12 do if getCD(getPlayerSlotItem(cid, 8).uid, "move"..i) > 0 then return doPlayerSendCancel(cid, "To mega evolve, all the spells of your pokemon need to be ready.") end end end move = {name = "Mega Evolution", level = 0, cd = 0, dist = 1, target = 0} end E troque: doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY) por: local spellMessage = msgs[math.random(#msgs)]..""..move.name.."!"if move.name == "Mega Evolution" then spellMessage = "Mega Evolve!"enddoCreatureSay(cid, getPokeName(mypoke)..", "..spellMessage, TALKTYPE_SAY) Se não quiser que o "Mega" apareça no nome do pokémon, vá em data/lib, level system.lua: Acima de: if getItemAttribute(item, "nick") then nick = getItemAttribute(item, "nick")end coloque: if nick:find("Mega") then nick = nick:match("Mega (.*)") if not pokes[nick] then nick = nick:explode(" ")[1] end end Caso queiram que cada mega evolução tenha um clã específico: Em move1.lua, acima de: move = {name = "Mega Evolution", level = 0, cd = 0, dist = 1, target = 0, f = 0, t = "?"} coloque: local megaEvoClans = { --[mega_stone_id] = "clan_name", [91912] = "Volcanic", [91913] = "Seavell", --etc,}if megaEvoClans[isMega] then if getPlayerClanName(cid) ~= megaEvoClans[isMega] then return doPlayerSendCancel(cid, "You can't mega evolve this pokemon.") endend Finalizando o tópico após uma pequena reestruturação na indexação, gostaria de levantar algo que acredito ser bem claro: o sistema é cheio de detalhes, muitas vezes minuciosos. Um simples erro e bugs aparecem por toda parte. Se você encontrou algum, pelo menos uma das duas seguintes condições acontecem: Base DIFERENTE da usada. Peço desculpas, mas não pretendo adaptar o sistema para todas as bases diferentes que aparecerem. Se a base for a mesma, você com certeza errou em algum ponto da instalação. O sistema foi testado inúmeras vezes, não apenas por mim, e seu funcionamento foi seguidamente comprovado. Façam bom uso, invocadores.
  3. Sobre o player atacar um NPC, suponho ser bem difícil tornar isso possível. Já sobre um monstro atacar outro, não acho que seja tão complicado como o caso acima. Entretanto, preciso ler os códigos das sources responsáveis por isso e tentar (ênfase neste tentar) encontrar uma solução.
  4. Ops, é mesmo. local config = { name = "xxx", --nome do monstro vocId = xxx, --vocation id } function onTarget(cid, target) local player = isMonster(cid) and isPlayer(target) and target or isPlayer(cid) and isMonster(target) and getCreatureName(target) == config.name and cid or false if player then if getPlayerVocation(player) ~= config.vocId then if isPlayer(cid) then doPlayerSendCancel(cid, "você não pode atacar esta criatura.") end return false end end return true end function onStatsChange(cid, attacker, type, combat, value) local player = isMonster(attacker) and isPlayer(cid) and cid or isPlayer(attacker) and isMonster(cid) and getCreatureName(cid) == config.name and attacker or false if player then return getPlayerVocation(player) == config.vocId end return true end PS: O diretório na tag de ambos os creatureevents deve ser o mesmo.
  5. Não crie magias para o PDA usando este programa. Ele é direcionado a criação de spells tradicionais do Tibia. Para a sua base, siga este tutorial. Para criação do código de magias, recomendo aprender Lua e/ou solicitá-las na área de pedidos e dúvidas de derivados (como por exemplo você fez aqui). A propósito, e essas três spells que fiz? Você por acaso as testou? Depois do meu último comentário, parece que você simplesmente se esqueceu deste tópico.
  6. Foi mal, é o sono. Códigos corrigidos.
  7. Ah, pelo fato do Zet0N0Murmurouu ter usado esta função, acreditei que ela existisse neste servidor. Saberia dizer como os gêneros dos pokémons são atribuídos? Ou teria ao menos um código que chame esta informação para termos como base?
  8. function onLook(cid, thing, position, lookDistance) --for rocks = 0, 8 do --if thing == rocks then --if rocks == 8 then --if #getCreatureSummons(cid) >= 1 then --setCreatureMaxHealth(getCreatureSummons(cid)[1], getCreatureMaxHealth(getCreatureSummons(cid)[1]) + pokes[getCreatureName(getCreatureSummons(cid)[1])].cons) --doCreatureAddHealth(getCreatureSummons(cid)[1],getCreatureMaxHealth(getCreatureSummons(cid)[1]))doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28) --doSendMagicEffect(getThingPos(cid), 29) --end --elseif rocks == 2 then --doSendMagicEffect(getThingPos(cid), 28) --if getPlayerStorageValue(cid, 91859) >= 1 then --local speedskills = getPlayerSkill(cid,2)*10 --doChangeSpeed(cid, -getCreatureSpeed(cid)) --doChangeSpeed(cid, getCreatureBaseSpeed(cid)+speedskills) --end --end --return true --end --end if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." ,Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local apelido = getPlayerStorageValue(dono,9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") local sex = getPokemonGender(thing.uid) == SEX_MALE and "macho" or getPokemonGender(thing.uid) == SEX_FEMALE and "femea" or "indefinido" doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".("..apelido..")\n It belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".\nEste pokémon é "..sex..".") else return true end return false end return true end
  9. Hm, neste caso, vamos fazer em C++ e Lua: Troque: Player* player = creature->getPlayer(); std::string value; std::string check = "15"; if (getName() == "Rat" && player && ( !(player->getStorage(8000,value)) || check != value ) ) return false; por: CreatureEventList targetEvents = getCreatureEvents(CREATURE_EVENT_TARGET); for(CreatureEventList::iterator it = targetEvents.begin(); it != targetEvents.end(); ++it) { if(!(*it)->executeTarget(this, creature)) return false; } Depois, troque: Player* player = attackedCreature->getPlayer(); std::string value; std::string check = "15"; if (getName() == "Rat" && player && ( !(player->getStorage(8000,value)) || check != value ) ) { setFollowCreature(NULL); setAttackedCreature(NULL); searchTarget(TARGETSEARCH_NEAREST); } por: Creature* creature = attackedCreature->getCreature(); if(creature) { CreatureEventList targetEvents = getCreatureEvents(CREATURE_EVENT_TARGET); for(CreatureEventList::iterator it = targetEvents.begin(); it != targetEvents.end(); ++it) { if(!(*it)->executeTarget(this, creature)) { setFollowCreature(NULL); setAttackedCreature(NULL); searchTarget(TARGETSEARCH_NEAREST); break; } } } Aí, em data/creaturescripts/scripts: local config = { name = "xxx", --nome do monstro vocId = xxx, --vocation id } function onTarget(cid, target) local player = isMonster(cid) and isPlayer(target) and target or isPlayer(cid) and isMonster(target) and getCreatureName(target) == config.name and cid or false if player then if getPlayerVocation(player) ~= config.vocId then if isPlayer(cid) then doPlayerSendCancel(cid, "você não pode atacar esta criatura.") end return false end end return true end function onStatsChange(cid, attacker, type, combat, value) local player = isMonster(attacker) and isPlayer(cid) and cid or isPlayer(attacker) and isMonster(cid) and getCreatureName(cid) == config.name and attacker or false if player then return getPlayerVocation(player) == config.vocId end return true end Registre o evento tanto em login.lua quanto no arquivo XML do monstro.
  10. Use: Player* player = attackedCreature->getPlayer(); std::string value; std::string check = "15"; uint32_t storage = 8000; if (getName() == "Rat" && player && ( !(player->getStorage(storage, value)) || check != value ) ) { setFollowCreature(NULL); setAttackedCreature(NULL); searchTarget(TARGETSEARCH_NEAREST); } e: Player* player = creature->getPlayer(); std::string value; std::string check = "15"; uint32_t storage = 8000; if (getName() == "Rat" && player && ( !(player->getStorage(storage, value)) || check != value ) ) return false;
  11. Use esta versão com proteções: --local toloot = {11441, 11441, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244} -- PREFERENCIAL - SE QUISER APENAS COM ALGUNS ITENS function onUse(cid, item, frompos, item2, topos) if getItemAttribute(item.uid, "corpseowner") ~= cid then doPlayerSendCancel(cid, "You're not the owner.") return true end if getPlayerStorageValue(cid, 4919) < 1 then return false else local items = {} for x=0, (getContainerSize(item.uid)) do local itens = getContainerItem(item.uid, 0) if itens and itens.uid > 0 and itens.itemid ~= 0 then --if isInArray(toloot, itens.itemid) then table.insert(items, {i=itens.itemid, q=itens.type}) doRemoveItem(itens.uid) --break --end end end for y=1, #items do doPlayerAddItemStacking(cid, items[y].i, items[y].q) doPlayerSendTextMessage(cid, 20, "Looted "..items[y].q.."x "..getItemNameById(items[y].i)..".") end if #items > 0 then return true else return false end end end --[[ AUTO LOOT BY GABRIEL SALES SE QUISER ATIVAR O AUTOLOOT APENAS PARA ALGUNS ITENS, ADICIONE OS IDS NA TABELA toloot E TIRE OS COMENTÁRIOS(--). --]]
  12. Na verdade eu pretendia fazer quando tivesse mais tempo livre (por ser um código grande), mas tudo bem. Se desistir, avise aqui, por gentileza. Se tiver alguma dificuldade, peço que também informe aqui para podermos ajudá-lo.
  13. Já terminei e postei no outro fórum para você.
  14. local doors = { --[actionid] = {level = xxx, pos = {x = x, y = y, z = z}}, [4810] = {level = 50, pos = {x = 1049, y = 590, z = 7}}, --etc, } function onUse(cid, item) local door = doors[item.actionid] if door then if getPlayerLevel(cid) < door.level then return doPlayerSendCancel(cid, "You need level "..door.level.." to pass here.") end doTeleportThing(cid, door.pos) end return true end
  15. Se não me engano essa alteração deve ser feita em monster.cpp, função selectTarget.
  16. Você trocou aquela linha que indiquei anteriormente?
  17. Algum item, ao mínimo, é coletado pelo jogador?
  18. Zet0N0Murmurouu, suponho que você não tenha lido o conteúdo do tópico que você mesmo enviou (do autoloot escrito pelo Gabrielbsales). Nele, o autor posta o código da função doPlayerAddItemStacking. function doPlayerAddItemStacking(cid, itemid, quant) local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid) local piles = 0 if #item > 0 then for i,x in pairs(item) do if getThing(x).type < 100 then local it = getThing(x) doTransformItem(it.uid, itemid, it.type+quant) if it.type+quant > 100 then doPlayerAddItem(cid, itemid, it.type+quant-100) end else piles = piles+1 end break end else return doPlayerAddItem(cid, itemid, quant) end if piles == #item then doPlayerAddItem(cid, itemid, quant) end end Coloque este código em algum arquivo da lib e depois utilize os scripts que enviei anteriormente.
  19. Se você não colocar a função doPlayerAddItemStacking na lib, como indicado no tópico do sistema, é claro que não vai funcionar. Também troque esta linha: local itens = getContainerItem(item.uid, x) por: local itens = getContainerItem(item.uid, 0)
  20. Talkaction: function onSay(cid, words, param) if param == "" then return doPlayerSendCancel(cid, "/autoloot on/off") end local value = param:lower() == "on" and 1 or param:lower() == "off" and -1 or false if not value then return doPlayerSendCancel(cid, "/autoloot on/off") elseif getPlayerStorageValue(cid, 4919) == value then return doPlayerSendCancel(cid, "Your autoloot is already "..param..".") end setPlayerStorageValue(cid, 4919, value) doPlayerSendTextMessage(cid, 27, "Your autoloot is now "..param..".") return true end Tag da action: <action actionid="9282" event="script" value="Autoloot.lua"/> Novo código da action: --local toloot = {11441, 11441, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244} -- PREFERENCIAL - SE QUISER APENAS COM ALGUNS ITENS function onUse(cid, item, frompos, item2, topos) if getItemAttribute(item.uid, "corpseowner") ~= cid then doPlayerSendCancel(cid, "You're not the owner.") return true end if getPlayerStorageValue(cid, 4919) < 1 then return false else local items = {} for x=0, (getContainerSize(item.uid)) do local itens = getContainerItem(item.uid, x) --if isInArray(toloot, itens.itemid) then table.insert(items, {i=itens.itemid, q=itens.type}) doRemoveItem(itens.uid) --break --end end for y=1, #items do doPlayerAddItemStacking(cid, items[y].i, items[y].q) doPlayerSendTextMessage(cid, 20, "Looted "..items[y].q.."x "..getItemNameById(items[y].i)..".") end if #items > 0 then return true else return false end end end --[[ AUTO LOOT BY GABRIEL SALES SE QUISER ATIVAR O AUTOLOOT APENAS PARA ALGUNS ITENS, ADICIONE OS IDS NA TABELA toloot E TIRE OS COMENTÁRIOS(--). --]] Se a base de seu servidor for PDA: Em data/creaturescripts/scripts, pokeexp.lua: Abaixo de: function onDeath(cid, corpse, deathList) coloque: doItemSetAttribute(corpse.uid, "aid", 9282) Se a base do seu servidor não for PDA, avise.
  21. Poderia postar o link deste sistema que você citou (do Gabrielbsales)?
  22. Poste aqui (ou por PM, se preferir) todos os arquivos que mencionei (pokemon moves.lua, move1.lua, newStatusSyst.lua, goback.lua, areas.lua) em spoiler (são arquivos grandes). Assim, posso instalar todos as spells para você, sobrando apenas a tarefa de configurar as spells em configuration.lua. EDIT: Ops, agora que percebi ter esqueci de também postar as áreas da spell. Meu comentário anterior foi atualizado com elas.
  23. Copiar uma spell como este Unown Rush, ou seja, uma spell cheia de mínimos detalhes, é algo bem chato. Demorei um bom tempo vendo e revendo o vídeo, tentando chegar num resultado semelhante dos intervalos de tempo entre as ações. Caso o resultado não lhe agrade, recomendo alterar as variáveis responsáveis pela manipulação do tempo, juntamente das áreas de dano e efeito. Todas as 3 spells que postei neste tópico foram testadas e estão funcionando perfeitamente. 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) Em areas.lua: rushAreaEffect = { --Área do Unown Rush de efeito (até onde o efeito vai, a partir do usuário da spell). {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, } rushAreaDamage = createCombatArea{ --Área do Unown Rush de dano. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } 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
  24. local p = { --[actionid] = "pokemon_name", --Ex.: [9282] = "Charmander", --etc, } function onStepIn(cid, item, position, fromPosition) local poke = p[item.actionid] if poke then if not isPlayer(cid) then return true elseif getPlayerStorageValue(cid, 9658754) ~= 1 then return sendMsgToPlayer(cid, 27, "Talk to Prof. Robert for choose your city first!") and doTeleportThing(cid, fromPosition) elseif getPlayerStorageValue(cid, 49191) > -1 then return doPlayerSendCancel(cid, "You already got your pokemon.") and doTeleportThing(cid, fromPosition) end doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.") doPlayerSendTextMessage(cid, 27, "Don't forget to use your pokedex on every undiscovered pokemon!") addPokeToPlayer(cid, poke, 0, nil, "normal", true) doPlayerAddItem(cid, 2394, 10) doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) setPlayerStorageValue(cid, 49191, 1) end return true end
  • Quem Está Navegando   0 membros estão online

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