Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    73

Tudo que zipter98 postou

  1. Se você não tiver a função getPosfromArea no seu servidor, recomendo instalá-la. local config = { effect = xxx, --Efeito. combat = xxx, --Combat/elemento da spell. area = { --Área da spell. {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } } local combat = createCombatObject() setCombatArea(combat, createCombatArea(config.area)) setCombatParam(combat, COMBAT_PARAM_TYPE, config.combat) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -xx.x, x, -xx.x, x) function onCastSpell(cid, var) doCombat(cid, combat, var) for _, pos in pairs(getPosfromArea(cid, config.area)) do local pid = getTopCreature(pos).uid if isMonster(pid) then doSendMagicEffect(getThingPos(pid), config.effect) end end return true end
  2. Hm, troque: math.random(#SOUNDS[i].sound) por: math.random(1, #SOUNDS[i].sound) e troque: math.random(#toPlay.sound) por: math.random(1, #toPlay.sound)
  3. function onUse(cid, item, fromPosition, item2, toPosition) local myball = getPlayerSlotItem(cid, 8) if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "Retorne seu pokemon para poder usar a boost stone.") elseif myball.uid < 1 or item2.uid ~= myball.uid then return doPlayerSendCancel(cid, "Use this item on a pokeball in the pokeball slot.") end local boost = getItemAttribute(myball.uid, "boost") or 0 local boosts = 10 if boost == 70 then doPlayerSendCancel(cid, "Seu pokemon está no lvl máximo.") return true end boosts = boosts local pokemon = getItemAttribute(myball.uid, "poke") local off = pokes[pokemon].offense * boost_rate * boosts local def = pokes[pokemon].defense * boost_rate * boosts local agi = pokes[pokemon].agility * boosts local spatk = pokes[pokemon].specialattack * boost_rate * boosts local vit = pokes[pokemon].vitality * boost_rate * boosts newBoost = boost + boosts if newBoost > 70 then newBoost = 70 end doSetItemAttribute(myball.uid, "boost", newBoost) doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off) doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def) doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi) doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk) doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(item2.uid), 103) doPlayerSendTextMessage(cid, 27, "Parabéns, o seu "..pokemon..", foi bostado +"..boosts..".") doPlayerSendTextMessage(cid, 27, "Agora, o seu "..pokemon.." está bostado +"..newBoost..".") doSendAnimatedText(getThingPos(item2.uid), "+"..boosts.." Boost", 215) return true end
  4. function onUse(cid, item, fromPosition, item2, toPosition) local myball = getPlayerSlotItem(cid, 8) if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "Retorne seu pokemon para poder usar a boost stone.") elseif myball.uid < 1 or item2.uid ~= myball.uid then return doPlayerSendCancel(cid, "Use this item on a pokeball in the pokeball slot.") end local boost = getItemAttribute(myball.uid, "boost") or 0 local boosts = 10 if boost == 70 then doPlayerSendCancel(cid, "Seu pokemon está no lvl máximo.") return true end boosts = boosts local pokemon = getItemAttribute(myball.uid, "poke") local off = pokes[pokemon].offense * boost_rate * boosts local def = pokes[pokemon].defense * boost_rate * boosts local agi = pokes[pokemon].agility * boosts local spatk = pokes[pokemon].specialattack * boost_rate * boosts local vit = pokes[pokemon].vitality * boost_rate * boosts newBoost = boost + boosts if newBoost > 70 then newBoost = 70 end doSetItemAttribute(myball.uid, "boost", newBoost) doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off) doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def) doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi) doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk) doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(item2.uid), 103) doPlayerSendTextMessage(cid, 27, "Parabéns, o seu "..pokemon..", foi bostado +"..boosts..".") doPlayerSendTextMessage(cid, 27, "Agora, o seu "..pokemon.." está bostado +"..newBoost..".") doSendAnimatedText(getThingPos(item2.uid), "+"..boosts.." Boost", 215) return true end
  5. Você removeu uma linha importante... Acima de: for i = 1, #SOUNDS do local newSound = type(SOUNDS[i].sound) == "table" and SOUNDS[i].sound[math.random(#SOUNDS[i].sound)] or SOUNDS[i].sound SOUNDS[i].sound = SOUNDS_CONFIG.folder .. newSound end coloque: function init() ficando: function init() for i = 1, #SOUNDS do local newSound = type(SOUNDS[i].sound) == "table" and SOUNDS[i].sound[math.random(#SOUNDS[i].sound)] or SOUNDS[i].sound SOUNDS[i].sound = SOUNDS_CONFIG.folder .. newSound end
  6. Se possível, poste como ficou o código alterado.
  7. Por acaso é a magia Chakra Impulse?
  8. Remova estas linhas do código: if combat == COMBAT_PHYSICALDAMAGE then return false end
  9. function onAdvance(cid, skill, oldLevel, newLevel, time) db.query("INSERT INTO player_advances (cid, skill, oldlevel, newlevel, time) VALUES ('" .. getPlayerGUID(cid) .. "', '" .. skill .."', '" .. oldLevel .."', '" .. newLevel .."', '" .. os.time() .. "' )") return true end
  10. O dano será aplicado quando o Mega Scizor reaparecer em outro lugar, independente se longe ou não do alvo?
  11. What? Você entra na quest por esta porta mas tenta sair da quest pela mesma porta?
  12. Ops. Troque: for i = 1, #SOUNDS do SOUNDS[i].sound = SOUNDS_CONFIG.folder .. SOUNDS[i].sound end por: for i = 1, #SOUNDS do local newSound = type(SOUNDS[i].sound) == "table" and SOUNDS[i].sound[math.random(#SOUNDS[i].sound)] or SOUNDS[i].sound SOUNDS[i].sound = SOUNDS_CONFIG.folder .. newSound end
  13. Não. As funções que enviei o link são responsáveis por manipular storages da account. Sem elas, o código que enviei não vai funcionar.
  14. zipter98

    Oie =)

    ;s
  15. Não. Na função magicEffect316 há um loop que envia um efeito para cada instância da tabela effect. for i=1, #effect do local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect[i]) end
  16. Troque: for i = 1, #SOUNDS do if(isInPos(pos, SOUNDS[i].fromPos, SOUNDS[i].toPos)) then if(toPlay) then toPlay.priority = toPlay.priority or 0 if((toPlay.sound~=SOUNDS[i].sound) and (SOUNDS[i].priority>toPlay.priority)) then toPlay = SOUNDS[i] end else toPlay = SOUNDS[i] end end end por: for i = 1, #SOUNDS do if(isInPos(pos, SOUNDS[i].fromPos, SOUNDS[i].toPos)) then if(toPlay) then toPlay.priority = toPlay.priority or 0 if((toPlay.sound~=SOUNDS[i].sound) and (SOUNDS[i].priority>toPlay.priority)) then toPlay = SOUNDS[i] end else toPlay = SOUNDS[i] if type(toPlay.sound) == "table" then toPlay.sound = toPlay.sound[math.random(#toPlay.sound)] end end end end Para mais de uma música, coloque-as numa tabela. Exemplo: SOUNDS = { -- PVP {fromPos = {x=936, y=1025, z=13}, toPos = {x=952, y=1043, z=13}, priority = 1, sound="Balada.ogg"}, {fromPos = {x=x, y=y, z=z}, toPos = {x=x, y=y, z=z}, priority = 1, sound = {"PkmCenter.ogg", "PkmCenter2.ogg", "BW_PkmCenter.ogg"}}, } ----------
  17. Se não funcionar o método acima, poste (em spoiler) o conteúdo do arquivo exp2.0.lua.
  18. Instale essas funções no seu servidor, antes de tudo. local points, storage = 30, 48481 function onUse(cid) if getAccountStorageValue(getPlayerAccountId(cid), storage < 1 then doPlayerSendTextMessage(cid, 27, "You received "..points.." points.") setAccountStorageValue(getPlayerAccountId(cid), storage, 1) doAccountAddPoints(cid, 30) else doPlayerSendCancel(cid, "You have already done this quest.") end return true end
  19. -- Do not remove the credits -- -- [MOVEEVENT] Limite de player por sala -- -- Developed by Rigby -- -- Especially for the Xtibia.com -- function onUse(cid, item, topos) local config = { -- Config -- -- [ACTIONID] = {area = getPlayersInArea(AREA QUE IRA CHECAR (FROMPOS,TOPOS)), amountOfPlayers = QUANTIDADE QUE CABE} [50000] = {area = getPlayersInArea({x = 1030, y = 1020, z = 7}, {x = 1040, y = 1030, z = 7}), amountOfPlayers = 1} -- Config -- } if config[item.actionid] then if #config[item.actionid].area >= config[item.actionid].amountOfPlayers then return doPlayerSendCancel(cid, 'Ja tem um player fazendo a quest, aguarde...') end doTeleportThing(cid, topos, true) end return true end function getPlayersInArea(fromPos, toPos) -- Function made by Vodkart local players = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then table.insert(players, pid) end end return players end
  20. Sim, basta configurar na tabela effect. Ex.: local effect = {316, 19} -- effect no player
  21. O problema provavelmente está em wildpoke.lua ou exp2.0.lua.
  22. Ah, entendi. Isso, na verdade, não seria uma spell, e sim o ataque básico do jogador. Provavelmente há algum creaturescript bloqueando o dano de players, talvez um onAttack ou um onStatsChange retornando falso. Recomendaria procurar por tais arquivos, e, caso não tenha noções de Lua, postá-los aqui.
  23. local config = { level = 50, count = 5, messages = { [12000] = "A guild %s está penetrando no castelo.", [12001] = "A guild %s já está dentro do castelo.", [12002] = "A guild %s está perto de conquistar o castelo." } } function table.insert(table, value) table[#table + 1] = value end function getGuildOnlineMembers(guildId) local pid, ip = {}, {} for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) == guildId and getPlayerLevel(cid) >= config.level and not isInArray(ip, getPlayerIp(cid)) then table.insert(pid, cid) table.insert(ip, getPlayerIp(cid)) end end return pid end function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if item.actionid == 12000 then if getPlayerGuildId(cid) < 1 or #getGuildOnlineMembers(getPlayerGuildId(cid)) < config.count then doPlayerSendCancel(cid, "Você precisa estar em guild ou sua guild precisa ter no minimo "..config.count.." jogadores level "..config.level.." ou mais.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doTeleportThing(cid, fromPosition, true) return true end end if getGlobalStorageValue(item.actionid + 4819) < os.time() then broadcastMessage(config.messages[item.actionid]:format(getPlayerGuildName(cid))) setGlobalStorageValue(item.actionid + 4819, os.time() + 10) end return true end
  24. Desculpe, não jogo Tibia e, logo, não entendi as referências acima. Basicamente, você quer uma spell que só possa ser usada a 1 SQM de distância do alvo e que altere a sprite do jogador por uma fração de segundo, simulando um soco? Um vídeo ou gif poderiam também ajudar na compreensão.
  • Quem Está Navegando   0 membros estão online

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