Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    73

Tudo que zipter98 postou

  1. OK. Como vou dormir agora, amanhã (ou quando possível) eu corrijo o sistema.
  2. Como imaginei. Se possível, poste o arquivo catch system.lua, de data/lib.
  3. Talvez seja necessária uma edição no arquivo de catch da lib. local ballcatch = { --id normal, id da ball shiy [2394] = {cr = 3, on = 24, off = 23, ball = {11826, 11737}, send = 47, typeee = "normal"}, --alterado v1.9 \/ [2391] = {cr = 6, on = 198, off = 197, ball = {11832, 11740}, send = 48, typeee = "great"}, [2393] = {cr = 10, on = 202, off = 201, ball = {11835, 11743}, send = 46, typeee = "super"}, [2392] = {cr = 15, on = 200, off = 199, ball = {11829, 11746}, send = 49, typeee = "ultra"}, [12617] = {cr = 3, on = 204, off = 203, ball = {10975, 12621}, send = 35, typeee = "saffari"}, } local health_catch = xxx --Porcentagem mínima de HP para poder jogar a pokeball. function onUse(cid, item, frompos, itemEx, topos) if not ehMonstro(itemEx.uid) then return doPlayerSendCancel(cid, "Throw pokeballs in pokemons.") elseif getCreatureHealth(itemEx.uid) > getCreatureMaxHealth(itemEx.uid) * health_catch / 100 then return doPlayerSendCancel(cid, "This pokemon has too much HP at the moment.") end local name = getCreatureName(itemEx.uid) local x = pokecatches[name] if not x then return true end local storage = newpokedex[name].stoCatch if getPlayerStorageValue(cid, storage) == -1 or not string.find(getPlayerStorageValue(cid, storage), ";") then --alterado v1.9 setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0;") --alterado v1.9 end local newidd = isShinyName(name) and ballcatch[item.itemid].ball[2] or ballcatch[item.itemid].ball[1] --alterado v1.9 local typeee = ballcatch[item.itemid].typeee local catchinfo = {} catchinfo.rate = ballcatch[item.itemid].cr catchinfo.catch = ballcatch[item.itemid].on catchinfo.fail = ballcatch[item.itemid].off catchinfo.newid = newidd catchinfo.name = name catchinfo.topos = topos catchinfo.chance = x.chance doSendDistanceShoot(getThingPos(cid), topos, ballcatch[item.itemid].send) doRemoveItem(item.uid, 1) doRemoveCreature(itemEx.uid) local d = getDistanceBetween(getThingPos(cid), topos) if getPlayerStorageValue(cid, 98796) >= 1 and getPlayerItemCount(cid, 12617) <= 0 then --alterado v1.9 setPlayerStorageValue(cid, 98796, -1) setPlayerStorageValue(cid, 98797, -1) doTeleportThing(cid, SafariOut, false) doSendMagicEffect(getThingPos(cid), 21) doPlayerSendTextMessage(cid, 27, "You spend all your saffari balls, good luck in the next time...") end addEvent(doSendPokeBall, d * 70 + 100 - (d * 14) , cid, catchinfo, false, false, typeee) addEvent(doSendMagicEffect, (d * 70 + 100 - (d * 14)) - 100, topos, 3) return true end
  4. Instale o AGS criado pelo Omega e use as seguintes funções para manipulação de guild storages: setGuildStorageValue(guild_id, key, value) getGuildStorageValue(guild_id, key)
  5. Tem sim. Poderia postar seu catch.lua, de data/actions/scripts?
  6. Nas sources: game.cpp: No código da função: bool Game::playerSay Abaixo de: if(!player || player->isRemoved()) return false; Coloque: if(channelId == 10) return false;
  7. Por ser um PDA, você pode registrar o evento em spawn.lua. local config = { itemid = xxx, --ID do item. count = 1, --Quantidade. chance = xxx --Chance. (como em loots comuns, sorteado entre 0 e 100000) } function onDeath(cid, corpse) if math.random(0, 100000) <= config.chance then doAddContainerItem(corpse.uid, config.itemid, config.count) end return true end
  8. você é um gênio do spriting
  9. 20 é o número do canal. <channel id="20" name="Loot"/> Você pode ver a lista de cores na tabela TALKTYPE_TYPES, de 000-constant.lua. Entretanto, nem todas as opções lá disponíveis são válidas para a função doPlayerSendChannelMessage. As que funcionam nesta função são aquelas com o prefixo TALKTYPE_CHANNEL. Exemplo: TALKTYPE_CHANNEL_O TALKTYPE_CHANNEL_RA TALKTYPE_CHANNEL_Y
  10. doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_RN, 20)
  11. Coloca o "Blastoise" da tabela em letra minúscula (blastoise).
  12. local outfits = { --["outfit_name"] = storage, --A storage é o atributo quest, de outfits.xml. --Ex.: ["Naruto"] = 181603, ["Sasuke"] = 181601, } function onSay(cid, words, param) local msg = {"Digite o nome correto!", "Voce não possui Addon Doll!", "Bad param!", "Você recebeu seu addons!"} local param = string.lower(param) if not isPremium(cid) then doPlayerSendCancel(cid, "Você nao tem premium account.") return true end if getPlayerItemCount(cid, 9693) > 0 then if param ~= "" and outfits[param] then doPlayerRemoveItem(cid, 9693, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) setPlayerStorageValue(cid, outfits[param], 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end return true end
  13. O NPC só remove dinheiro se você não tiver configurado o preço em diamonds na tabela. Exemplo: local outs = { ["blastoise female"] = {181656, 5}, ["venusaur male"] = {181657, 5}, ["skarmory male"] = {181658}, } O preço das duas primeiras outfits seria 5 diamonds. Entretanto, por a terceira outfit não ter um valor configurado na 2ª posição da tabela (que no caso é o preço), por padrão o NPC vai cobrar dinheiro.
  14. doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'))
  15. ^ Como se Open Tibia se resumisse a esses derivados que você citou, lol. O código pode ser inútil para você, mas isso não quer dizer que seja para toda a comunidade tibiana. Não citando o fato deste script poder tornar-se uma base para futuros outros. E convenhamos que o nível de um código não é critério para seu julgamento. Se alguém encontrar uma utilidade para ele, é isso que importa. PS: Só recomendaria remover a varável sto do script, visto que não foi usada.
  16. zipter98

    Pokemon Boost

    Qual a base que você está usando?
  17. Ou, ao invés de colocar a condição acima em todas as funções de status negativos (com exceção de sleep), você pode, simplesmente: newStatusSyst.lua: No código da função doBuff2: Abaixo de: if ret.buff and ret.buff ~= "" then doBuff2(ret.id, ret.cd, ret.eff, ret.check, ret.buff, ret.first, (ret.attr and ret.attr or false)) end Coloque: local pkmns = {"Entei"} --Pokémons imunes a status negativos, tirando sleep. if not isSummon(ret.id) and isInArray(pkmns, getCreatureName(ret.id)) and ret.cond ~= "Sleep" then return true end
  18. Gostaria de informar que vários servidores de pokémon usam um método de alteração de storage para adicionar e remover outfits, ao invés do uso da função doPlayerAddAddons. Talvez seja este o problema. Se possível, poste seu outfits.xml.
  19. function onSay(cid, words, param) local t = param:explode(", ") local pid = getPlayerByName(t[1]) if isPlayer(pid) then doSetItemText(doPlayerAddItem(pid, 8761), t[2] or "Nothing.") end return true end
  20. local config = { name = "monster_name", --Nome do monstro. minDamage = 7000, --Dano mínimo para receber as recompensas. items = { prize = {itemid, count}, --{ID do item, quantidade} medal = xxx, --ID da medalha. }, storage = 91828, } function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and isMonster(cid) and getCreatureName(cid) == config.name and type == STATSCHANGE_HEALTHLOSS then local damage = getPlayerStorageValue(attacker, config.storage) < 1 and 0 or getPlayerStorageValue(attacker, config.storage) setPlayerStorageValue(attacker, config.storage, damage + value) end return true end function onDeath(cid, corpse, deathList) for _, pid in pairs(deathList) do local damage = getPlayerStorageValue(pid, config.storage) if damage >= config.minDamage then local item = doCreateItemEx(config.items.prize[1], config.items.prize[2]) doPlayerSendTextMessage(pid, 27, "For helping killing "..config.name..", you received a medal and "..config.items.prize[2].."x "..getItemNameById(config.items.prize[1])..".") doPlayerSendMailByName(getCreatureName(pid), item) doItemSetAttribute(doPlayerAddItem(pid, config.items.medal, 1), "description", "Medalha de honra ganha por "..getCreatureName(pid).." por ajudar a derrotar o "..config.name.." no dia "..os.date("%D")..".") setPlayerStorageValue(pid, config.storage, -1) end end db.executeQuery("UPDATE player_storage SET value = -1 WHERE key = "..config.storage) return true end
  21. O problema está nas corpses, não no sistema.
  22. Cara, você não está usando a PokéDex numa corpse. Está usando no asfalto.
  23. Ah, me lembrei de uma coisa. O número da outfit em configuration.lua deve ser o valor do Dat Editor subtraído por 351. PS: Certifique-se que está pegando o valor correto. Se não funcionar, você fez algo errado (ou pegou o valor errado).
  24. Eu perguntei se a outfit do Raichu/Shiny Raichu com fly funciona normalmente, não se o sistema está parcialmente funcionando.
  25. Troque: if not isCreature(item2.uid) then local name = getItemNameById(item2.itemid) if name:find("fainted") then name = doCorrectPokemonName(name:gsub("fainted ", "")) if isOutlanderPokemon(getCreatureName(item2.uid)) then return false end if pokes[poke].dex then if getPlayerStorageValue(cid, pokes[poke].dex) <= 0 then local exp = pokes[poke].level * rate doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked "..getCreatureName(item2.uid).." in your pokedex!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained "..exp.." experience points.") doSendMagicEffect(getThingPos(cid), 210) doPlayerAddExperience(cid, exp) setPlayerStorageValue(cid, pokes[poke].dex, 1) doShowPokedexRegistration(cid, name, getPlayerSlotItem(cid, 8)) else doShowPokedexRegistration(cid, name, getPlayerSlotItem(cid, 8)) end end end return true end por: if not isCreature(item2.uid) then print("Usou em item.") local name = getItemNameById(item2.itemid) print("Nome do item: "..name) if name:find("fainted") then name = doCorrectPokemonName(name:gsub("fainted ", "")) print("Nome do pokemon: "..name) if isOutlanderPokemon(getCreatureName(item2.uid)) then return false end if pokes[poke].dex then print("Esta na tabela.") if getPlayerStorageValue(cid, pokes[poke].dex) <= 0 then local exp = pokes[poke].level * rate doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked "..getCreatureName(item2.uid).." in your pokedex!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained "..exp.." experience points.") doSendMagicEffect(getThingPos(cid), 210) doPlayerAddExperience(cid, exp) setPlayerStorageValue(cid, pokes[poke].dex, 1) doShowPokedexRegistration(cid, name, getPlayerSlotItem(cid, 8)) else doShowPokedexRegistration(cid, name, getPlayerSlotItem(cid, 8)) end end end return true end E informe o que for imprimido no console.
  • Quem Está Navegando   0 membros estão online

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