-
Total de itens
2553 -
Registro em
-
Última visita
-
Dias Ganhos
73
Tudo que zipter98 postou
-
Ah sim, pensei nisso enquanto escrevia o código, mas parece que esqueci de colocar em prática. Corrigido.
-
[Resolvido] [Pedido] Comando que checa caughts
pergunta respondeu ao FlamesAdmin de zipter98 em Resolvidos
Tópico movido para dúvidas / pedidos resolvidos. -
Erro da distro corrigido.
-
[Resolvido] [Pedido] Comando que checa caughts
pergunta respondeu ao FlamesAdmin de zipter98 em Resolvidos
editado com correção do antigo registro de catches do PDA -
[Resolvido] [Pedido] Comando que checa caughts
pergunta respondeu ao FlamesAdmin de zipter98 em Resolvidos
Troque a função getCatchList de catch system.lua por essa: function getCatchList(cid) local ret = {} for name, info in pairs(newpokedex) do if type(getPlayerStorageValue(cid, info.storage)) == "string" and getPlayerStorageValue(cid, info.storage):find("catch,") then ret[#ret + 1] = name end end return ret end -
9 dias desde o último comentário
-
local catch_config = { --[[ [catch_count] = { --[quantidade_de_catch] = { prize_item = { {itemid = xxx, count = xxx}, --{itemid = ID_do_item, count = quantidade} {itemid = xxx, count = xxx}, --{itemid = ID_do_item, count = quantidade} --etc }, outfit = xxx --Se ganhar outfit, coloque a storage dela (de outfits.xml). Caso contrário, coloque false. }, ]]-- [30] = { --[quantidade_de_catch] = { prize_item = { {itemid = 11639, count = 1}, --{itemid = ID_do_item, count = quantidade} }, outfit = false --Se ganhar outfit, coloque a storage dela (de outfits.xml). Caso contrário, coloque false. }, [100] = { --[quantidade_de_catch] = { prize_item = { {itemid = 11641, count = 1}, --{itemid = ID_do_item, count = quantidade} {itemid = 2160, count = 20}, --{itemid = ID_do_item, count = quantidade} --etc }, outfit = 49101 --Se ganhar outfit, coloque a storage dela (de outfits.xml). Caso contrário, coloque false. }, } local CATCH_STORAGE = 8382 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg:lower(), "mission") or msgcontains(msg:lower(), "help") then local count, catch, need_catch = #getCatchList(cid) for catch_count, info in pairs(catch_config) do if getPlayerStorageValue(cid, CATCH_STORAGE + catch_count) < 1 then if need_catch then if catch_count < need_catch then need_catch = catch_count end else need_catch = catch_count end end end if not need_catch then return selfSay("You have completed all my quests.") elseif count < need_catch then return selfSay("You need catch "..need_catch.." different pokemons to complete my next task. [Left: "..need_catch - count.." catches]") end catch = catch_config[need_catch] selfSay("Congratulations, take your prizes!") for i = 1, #catch.prize_item do doPlayerAddItem(cid, catch.prize_item.itemid, catch.prize_item.count) end setPlayerStorageValue(cid, CATCH_STORAGE + need_catch, 1) if catch.outfit then setPlayerStorageValue(cid, catch.outfit, 1) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Troque: if(param.count < 5) then param.count = param.count + 1 addEvent(spellCallback, math.random(1000, 3000), param) end por: if(param.count < 5) then param.count = param.count + 1 addEvent(function() if not isCreature(param.cid) then return true end spellCallback(param) end, math.random(1000, 3000)) end
-
Sim. Use este código, ao invés do que disponibilizei no tópico: local megaEvoClans = { --[mega_stone_id] = {"clan_name", "clan_name", etc}, [91912] = {"Volcanic", "Wingeon"}, [91913] = {"Seavell"}, --etc, } if megaEvoClans[isMega] then if not isInArray(megaEvoClans[isMega], getPlayerClanName(cid)) then return doPlayerSendCancel(cid, "You can't mega evolve this pokemon.") end end
- 167 respostas
-
- mega stone
- megevolution
-
(e 1 mais)
Tags:
-
if(Player* player = static_cast<Player*>(creature)) { if(player->getVocationId() == VOCATION_ID && !hasCondition(CONDITION_INFIGHT)) // Troque VOCATION_ID pela vocação do Obito. fpp.clearSight = false; }
-
^ um getSpectators ou loop iterando as coordenadas da posição superior esquerda e inferior direita da área seria mais prático (principalmente o primeiro método, que também é o mais fácil). Mas w/e, globalstorage também funciona.
-
Como estou em semana de provas, é meio difícil ter tempo para scriptear. Entretanto: -Erro da talkaction: corrigirei quando possível. -Erro ao matar o dono do castelo: corrigido. -Tile: já enviei (é o moveevent).
-
Este erro que você citou não aconteceu comigo, mas w/e. E sim. Basta colocar isso: setPlayerStorageValue(cid, 9181, os.time() + 5) Acima de: doAddCondition(cid, invisibility) E para bloquear o uso de spells, você tem duas opções: fazê-lo diretamente nas sources ou em Lua mesmo, adicionando a seguinte condição abaixo do callback onCastSpell de outras magias: if getPlayerStorageValue(cid, 9181) > os.time() then return doPlayerSendCancel(cid, "Wait "..getPlayerStorageValue(cid, 9181) - os.time().." second(s) to use this spell again.") end
-
@narutomaniacos O efeito de risco não é algo proposital do código. Muito provavelmente é algum problema do seu servidor. Se preferir, pode deixar sem efeito configurado para que os riscos simulem um vulto do jogador. @Animal Pak Se a próxima posição de teleporte do jogador não for andável, o código vai rodar toda a tabela a procura de uma posição viável. Se não encontrá-la (o que significa que esta seria a 4ª posição - logo, a última), o efeito da spell acaba. Testei a magia algumas vezes e, em todas, ela funcionou perfeitamente.
-
Qual foi o efeito que você configurou? O de sangue ou o de riscos pretos?
-
Qual seria o segundo efeito? Desculpe, sou meio lerdo.
-
Se possível, teste essa magia novamente, entretanto a observe em outro personagem que não seja o usuário da magia. Apesar de nunca ter visto em prática as condições que usei, se não me engano o jogador fica invisível apenas para outras criaturas. PS: Certifique-se de ter atualizado o código. Há alguns minutos eu fiz umas pequenas modificações nele.
-
Ops, corrigido.
-
Fiz bem corrido aqui, talvez não funcione. local config = { effect = xxx, --Efeito. interval = 500 --Intervalo, em milésimos de segundo, entre os teleportes. } local combat, invisibility, outfit = createCombatObject(), createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_INVISIBLE), createConditionObject(CONDITION_INVISIBLE, -1, false) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) function getDamage(cid, level, magic) return -(level * 5 + magic * 12), -(level * 5 + magic * 12 + 55) end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getDamage") function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 2 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function doSpellTeleport(cid, target, positions, original_position) if not isPlayer(cid) then return true elseif #positions < 1 or not isCreature(target) then doTeleportThing(cid, original_position) doRemoveCondition(cid, CONDITION_INVISIBLE) doRemoveCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) doPlayerSetNoMove(cid, false) return true end local index = math.random(#positions) local toPos = positions[index] if not isWalkable(toPos) then repeat table.remove(positions, index) index = math.random(#positions) toPos = positions[index] if #positions < 1 then doTeleportThing(cid, original_position) doRemoveCondition(cid, CONDITION_INVISIBLE) doRemoveCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) doPlayerSetNoMove(cid, false) return true end until isWalkable(toPos) end doTeleportThing(cid, toPos) doSendMagicEffect(getThingPos(cid), config.effect) doCombat(cid, combat, numberToVariant(target)) table.remove(positions, index) addEvent(doSpellTeleport, config.interval, cid, target, positions, original_position) end function onCastSpell(cid, var) local target = variantToNumber(var) if not isCreature(target) then return doPlayerSendCancel(cid, "You need a target.") end local pos = getThingPos(target) local posis = { {x = pos.x + 1, y = pos.y + 1, z = pos.z}, {x = pos.x + 1, y = pos.y - 1, z = pos.z}, {x = pos.x - 1, y = pos.y + 1, z = pos.z}, {x = pos.x - 1, y = pos.y - 1, z = pos.z} } doAddCondition(cid, invisibility) doAddCondition(cid, outfit) doPlayerSetNoMove(cid, true) doSpellTeleport(cid, target, posis, getThingPos(cid)) return true end
-
edit: já encontrei outra maneira, não precisa mais da outfit que mencionei
-
Quais seriam as posições de teleporte do usuário da magia? Seriam SQMs relativos aos pontos cardeais do alvo? Um vídeo ou GIF ajudaria, caso essa spell já exista.
-
Ah sim, agora que li o código do Bruno e vi o método utilizado. Neste caso, a correção que postei definitivamente não vai funcionar.
-
Simplesmente dê um CTRL + C no erro da distro e poste aqui, lol.
-
Troque: player:setStorageValue(LABIRINTO.STORAGE_TIME, LABIRINTO.TIME_NPC) por: player:setStorageValue(LABIRINTO.STORAGE_TIME, os.time() + LABIRINTO.TIME_NPC)
-
pedido Item que so pode usar depois de 2 dias
pergunta respondeu ao williamserravalle de zipter98 em Scripts
function convertTime(time) local t_table = {} t_table.days = math.floor(time / 86400) time = time - (t_table.days * 86400) t_table.hours = math.floor(time / 3600) time = time - (t_table.hours * 3600) t_table.minutes = math.floor(time / 60) t_table.seconds = time - (t_table.minutes * 60) return t_table end local level = 1 local nivel = 10000 local exaustConfig = { exaustTime = 259200, -- tempo em segundos para o exaust strTime = 135204 -- storage para controlar o exaust } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) <= nivel then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "voce precisa ser level ".. nivel .." para poder usar esse item.") doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180) return doSendMagicEffect(fromPosition, CONST_ME_POFF) end if getPlayerStorageValue(cid, exaustConfig.strTime) > os.time() then local time_model = "%d dia(s), %d hora(s), %d minuto(s) e %d segundo(s)." local timeLeft = convertTime(getPlayerStorageValue(cid, exaustConfig.strTime) - os.time()) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Vc so pode usar esse item daqui a ' ..time_model:format(timeLeft.days, timeLeft.hours, timeLeft.minutes, timeLeft.seconds)) return false end doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Congratz!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_BLUE) doSendAnimatedText(getPlayerPosition(cid), "LevelUp!", 18) setPlayerStorageValue(cid, exaustConfig.strTime, os.time() + exaustConfig.exaustTime) return doPlayerAddLevel(cid, level) end
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
