Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    72

Tudo que zipter98 postou

  1. 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)
  2. 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.
  3. Poderia postar o link deste sistema que você citou (do Gabrielbsales)?
  4. 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.
  5. 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
  6. 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
  7. Tirando a parte da movimentação e do alvo dos monstros, o sistema em si não seria algo complexo. No entanto, sem modificações nas sources, ficaria muito sujeito a bugs. Se eu pensar em uma maneira mais leve e viável de fazer estas duas complicações, avisarei.
  8. Provavelmente você errou alguma coisa nesta parte da instalação. Peço que refaça os passos e informe se o erro continua. Ou, se preferir, poste aqui seu newStatusSyst.lua que eu corrijo.
  9. zipter98

    Chance em Tabela

    local monster = { ["Demon"] = {itemid = 1403, count = 1, chance = 20} } function onKill(cid, target, lastHit) local m = monster[getCreatureName(target)] if m and math.random(1, 100) <= m.chance then doPlayerAddItem(cid, m.itemid, m.count) end return true end
  10. Em game.cpp, abaixo de: if(!toTile) { player->sendCancelMessage(RET_NOTPOSSIBLE); return false; } adicione: if(movingCreature->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)) { player->sendCancelMessage("voce nao pode empurrar players em protection zone"); return false; }
  11. Claro. local items = { {itemid, vocation_id, outfit}, --{ID_do_item, vocação, outfit}, {itemid, vocation_id, outfit}, {itemid, vocation_id, outfit}, --etc } function onLogin(cid) for _, item in pairs(items) do if getPlayerItemCount(cid, item[1]) > 0 then doPlayerRemoveItem(cid, item[1], 1) doPlayerSetVocation(cid, item[2]) doPlayerAddOutfit(cid, item[3], 1) break end end return true end
  12. Ops, esqueci de aplicar o debuff Código corrigido.
  13. Infelizmente, destas mensagens apenas "Stone!" não ultrapassa o limite de caracteres da função doSendAnimatedText. Amanhã farei esta modificação para você.
  14. Ops, código corrigido. @shept function isStone(itemid) local ids = {itemid, itemid, itemid, ...} --ID das stones. return isInArray(ids, itemid) end
  15. Deu erro no console? Se não, então já há tal função em seu servidor. Caso contrário, a procurarei aqui e lhe enviarei. Qualquer coisa, faço direto em C++.
  16. Não funcionou absolutamente nada? Você registrou o evento em login.lua? Se sim, use este código e informe o que for imprimido no console: local effect = 173 --by brun123 --alterado v2.9 \/ local function func(cid, position, corpseid, effect) print(1) if not isCreature(cid) then return true end local corpse = getTileItemById(position, corpseid).uid if corpse <= 1 then return end if not isContainer(corpse) then return true end for slot = 0, (getContainerSize(corpse)-1) do local item = getContainerItem(corpse, slot) if item.uid <= 1 then return end if isStone(item.itemid) then print(2) return doSendMagicEffect(position, effect) and doPlayerSendTextMessage(getCreatureMaster(cid), 27, "You found a "..getItemNameById(item.itemid).."!") end end end function onKill(cid, target, lastHit) print(0) if not ehMonstro(target) then return true end local corpse = getMonsterInfo(getCreatureName(target)).lookCorpse addEvent(func, 5, getCreatureSummons(cid)[1], getThingPos(target), corpse, effect) return true end
  17. Não sei se esta versão tem o creatureevent onPush, mas enfim, tente: function onPush(cid, target) if getTileInfo(getThingPos(cid)).protection or getTileInfo(getThingPos(target)).protection then return false end return true end Tag: <event type="push" name="antiPush" event="script" value="nome_do_arquivo.lua"/> Não se esqueça de registrar o evento em login.lua.
  18. local items = { {itemid, vocation_id}, --{ID_do_item, vocação}, {itemid, vocation_id}, {itemid, vocation_id}, --etc } function onLogin(cid) for _, item in pairs(items) do if getPlayerItemCount(cid, item[1]) > 0 then doPlayerRemoveItem(cid, item[1], 1) doPlayerSetVocation(cid, item[2]) break end end return true end
  19. Em pokemon moves.lua: elseif spell == "Air Vortex" then local config = { outfit = xxx, --Outfit. time = {xxx, xxx}, --{Duração da spell, intervalo entre cada "tick" de dano (em milésimos de segundos)}, storage = 93828, effects = { pullEffects = { distance = xxx, --Distance effect do efeito de puxar pokémons. effect = xxx, --Efeito de tornado. }, damageEffect = xxx, --Efeito do redemoinho que aplica dano. }, } local time = os.time() + config.time[1] function Pull(cid, ret) local pos = getPosfromArea(cid, pullArea) if pos and #pos > 0 then for i = 1, #pos do local c = getTopCreature(pos[i]).uid if c > 0 then if ehMonstro(c) then doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) elseif isSummon(c) then local master = getCreatureMaster(c) if isSummon(cid) then if getPlayerStorageValue(master, 52480) >= 1 and getPlayerStorageValue(master, 52481) >= 0 then local masterCid = getCreatureMaster(cid) if isDuelingAgainst(masterCid, master) then doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) end end else doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) end end end end end end function doSendTornado(cid, pos) if not isCreature(cid) then return true end if isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end if isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end doSendDistanceShoot(getThingPos(cid), pos, config.effects.pullEffects.distance) doSendMagicEffect(pos, config.effects.pullEffects.effect) end function vortexDamage(cid) if not isCreature(cid) then return true elseif time - os.time() < 0 then return true end doDanoWithProtect(cid, FLYINGDAMAGE, getThingPos(cid), damageArea, min, max, config.effects.damageEffect) addEvent(vortexDamage, config.time[2], cid) end local ret = {id = 0, cd = config.time[1], check = 0, cond = {"Silence", "Paralyze"}} for b = 1, 3 do for a = 1, 20 do local pos = {x = getThingPos(cid).x + math.random(-4, 4), y = getThingPos(cid).y + math.random(-3, 3), z = getThingPos(cid).z} addEvent(doSendTornado, a * 75, cid, pos) end end Pull(cid, ret) vortexDamage(cid) doCreatureSetNoMove(cid, true) doChangeSpeed(cid, -getCreatureSpeed(cid)) doSetCreatureOutfit(cid, {lookType = config.outfit}, config.time[1] * 1000) setPlayerStorageValue(cid, config.storage, time) addEvent(function() if isCreature(cid) then doCreatureSetNoMove(cid, false) doRegainSpeed(cid) end end, config.time[1] * 1000) Em areas.lua: damageArea = createCombatArea{ --Área do dano da spell + redemoinhos. {1, 1, 1}, {1, 2, 1}, {1, 1, 1}, } pullArea = { --Área onde os pokémons serão puxados. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } Em newStatusSyst.lua: Troque todos os: if ret and ret.cond then ret.id = pid ret.check = getPlayerStorageValue(pid, conds[ret.cond]) doCondition2(ret) end por: if ret and ret.cond then if type(ret.cond) == "table" then for i = 1, #ret.cond do ret.id = pid ret.check = getPlayerStorageValue(pid, conds[ret.cond[i]]) doCondition2(ret) end else ret.id = pid ret.check = getPlayerStorageValue(pid, conds[ret.cond]) doCondition2(ret) end end Depois, troque: if ret.cond and ret.cond == "Miss" then doMiss2(ret.id, ret.cd, ret.eff, ret.check, ret.spell) elseif ret.cond and ret.cond == "Silence" then doSilence2(ret.id, ret.cd, ret.eff, ret.check) elseif ret.cond and ret.cond == "Slow" then doSlow2(ret.id, ret.cd, ret.eff, ret.check, ret.first) elseif ret.cond and ret.cond == "Confusion" then doConfusion2(ret.id, ret.cd, ret.check) elseif ret.cond and ret.cond == "Burn" then doBurn2(ret.id, ret.cd, ret.check, ret.damage) elseif ret.cond and ret.cond == "Poison" then doPoison2(ret.id, ret.cd, ret.check, ret.damage) elseif ret.cond and ret.cond == "Fear" then doFear2(ret.id, ret.cd, ret.check, ret.skill) elseif ret.cond and ret.cond == "Stun" then doStun2(ret.id, ret.cd, ret.eff, ret.check, ret.spell) elseif ret.cond and ret.cond == "Paralyze" then doParalyze2(ret.id, ret.cd, ret.eff, ret.check, ret.first) elseif ret.cond and ret.cond == "Sleep" then doSleep2(ret.id, ret.cd, ret.check, ret.first) elseif ret.cond and ret.cond == "Leech" then doLeech2(ret.id, ret.attacker, ret.cd, ret.check, ret.damage) end por: if type(ret.cond) == "table" then for i = 1, #ret.cond do if ret.cond[i] and ret.cond[i] == "Miss" then doMiss2(ret.id, ret.cd, ret.eff, ret.check, ret.spell) elseif ret.cond[i] and ret.cond[i] == "Silence" then doSilence2(ret.id, ret.cd, ret.eff, ret.check) elseif ret.cond[i] and ret.cond[i] == "Slow" then doSlow2(ret.id, ret.cd, ret.eff, ret.check, ret.first) elseif ret.cond[i] and ret.cond[i] == "Confusion" then doConfusion2(ret.id, ret.cd, ret.check) elseif ret.cond[i] and ret.cond[i] == "Burn" then doBurn2(ret.id, ret.cd, ret.check, ret.damage) elseif ret.cond[i] and ret.cond[i] == "Poison" then doPoison2(ret.id, ret.cd, ret.check, ret.damage) elseif ret.cond[i] and ret.cond[i] == "Fear" then doFear2(ret.id, ret.cd, ret.check, ret.skill) elseif ret.cond[i] and ret.cond[i] == "Stun" then doStun2(ret.id, ret.cd, ret.eff, ret.check, ret.spell) elseif ret.cond[i] and ret.cond[i] == "Paralyze" then doParalyze2(ret.id, ret.cd, ret.eff, ret.check, ret.first) elseif ret.cond[i] and ret.cond[i] == "Sleep" then doSleep2(ret.id, ret.cd, ret.check, ret.first) elseif ret.cond[i] and ret.cond[i] == "Leech" then doLeech2(ret.id, ret.attacker, ret.cd, ret.check, ret.damage) end end else if ret.cond and ret.cond == "Miss" then doMiss2(ret.id, ret.cd, ret.eff, ret.check, ret.spell) elseif ret.cond and ret.cond == "Silence" then doSilence2(ret.id, ret.cd, ret.eff, ret.check) elseif ret.cond and ret.cond == "Slow" then doSlow2(ret.id, ret.cd, ret.eff, ret.check, ret.first) elseif ret.cond and ret.cond == "Confusion" then doConfusion2(ret.id, ret.cd, ret.check) elseif ret.cond and ret.cond == "Burn" then doBurn2(ret.id, ret.cd, ret.check, ret.damage) elseif ret.cond and ret.cond == "Poison" then doPoison2(ret.id, ret.cd, ret.check, ret.damage) elseif ret.cond and ret.cond == "Fear" then doFear2(ret.id, ret.cd, ret.check, ret.skill) elseif ret.cond and ret.cond == "Stun" then doStun2(ret.id, ret.cd, ret.eff, ret.check, ret.spell) elseif ret.cond and ret.cond == "Paralyze" then doParalyze2(ret.id, ret.cd, ret.eff, ret.check, ret.first) elseif ret.cond and ret.cond == "Sleep" then doSleep2(ret.id, ret.cd, ret.check, ret.first) elseif ret.cond and ret.cond == "Leech" then doLeech2(ret.id, ret.attacker, ret.cd, ret.check, ret.damage) end end Depois, em data/talkactions/scripts, move1.lua: Abaixo de: if isSleeping(mypoke) or isSilence(mypoke) then --alterado v1.5 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode fazer isso agora.") return 0 else newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd) end coloque: if getPlayerStorageValue(mypoke, 93828) > os.time() then return doPlayerSendCancel(cid, "Your pokemon can't use moves right now.") end Outra hora escrevo o código do Unown Help e Unown Rush (vou sair daqui a pouco). Perguntas: Há uma quantia mínima de Unowns para usar o Unown Rush? O dano de tal spell aumenta de acordo com o número de Unowns summonados? Seria bem legal isso (ex.: cada Unown aumenta o dano da spell em 5%).
  20. @ricardoberg Seria possível fazer algo assim, porém com uma mensagem menor. Se conseguir pensar em outra (ex.: "Stone!"), avise que eu altero o código para você. @Zet0N0Murmurouu Por acaso seu servidor tem todas as funções utilizadas neste código?
  21. Claro. local effect = 169 --by brun123 --alterado v1.9 \/ local arrow = {effect, duration} --Respectivamente, efeito e duração (segundos). local items = {itemid, itemid, itemid, ...} --Tabela para configurar os items. function sendEffect(pos, time) if time < 0 then return true end doSendMagicEffect(pos, arrow[1]) addEvent(sendEffect, 1000, pos, time - 1) end local function func(cid, position, corpseid, effect) if not isCreature(cid) then return true end local corpse = getTileItemById(position, corpseid).uid if corpse <= 1 then return end if not isContainer(corpse) then return true end for slot = 0, (getContainerSize(corpse)-1) do local item = getContainerItem(corpse, slot) if item.uid <= 1 then return end if isInArray(items, item.itemid) then return doSendMagicEffect(getThingPos(cid), effect) and sendEffect(position, arrow[2]) end end end function onKill(cid, target, lastHit) if not isMonster(target) then return true end local corpse = getMonsterInfo(getCreatureName(target)).lookCorpse addEvent(func, 5, getCreatureSummons(cid)[1], getThingPos(target), corpse, effect) return true end Tag: <event type="kill" name="dropStone" script="nome_do_arquivo.lua"/> Não se esqueça de registrar o evento em login.lua.
  22. Qual a versão do seu TFS?
  23. Se fossemos seguir a lógica do League of Legends dos minions atacarem apenas criaturas do time inimigo, o código seria bem complexo (além de envolver C++ também). Porém, se fosse colocado para atacarem qualquer um que aparecesse, não faria muito sentido. Já a parte responsável pela movimentação deles, se fosse escrito puramente em Lua seria necessária uma bela gambiarra. Se houvessem alterações em C++, poderia ser instalada a função getCreaturePathTo (se não me engano, tem disponível aqui). Summonar um monstro a cada 30 segundos é algo bem simples. Por exemplo: function summonMonster() doCreateMonster("monster", position) addEvent(summonMonster, 30000) end
  24. Não há nenhuma função, pelo menos padrão no TFS, que execute uma action. Logo, seria de grande ajuda se você informasse o que o item deveria fazer.
  • Quem Está Navegando   0 membros estão online

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