-
Total de itens
2553 -
Registro em
-
Última visita
-
Dias Ganhos
73
Tudo que zipter98 postou
-
Seria sim, mas não programo no OTClient. No entanto, li um pouco do código da barra de magias de lá e pensei que a modificação que fiz em cooldown bar.lua a alteraria. Você testou o sistema depois da última atualização?
- 167 respostas
-
- mega stone
- megevolution
-
(e 1 mais)
Tags:
-
EDIT: Já editei aquele meu primeiro comentário com o código corrigido.
-
Desculpe, é a pressa para ir jantar. Código corrigido. E sim (podem ser mais jogadores, basta configurar a quantidade equivalente de posições).
-
-
C++, por ser bem mais complicado e muito mais útil. Lua você aprende em pouco tempo lendo tutoriais na internet. Depois, é só prática.
-
Tag: <talkaction words="!abrir;!quest" event="script" value="nome_do_arquivo.lua"/> Código: local config = { players = { {x = 1056, y = 1056, z = 7}, --Posições para onde os jogadores serão teleportados. {x = 1055, y = 1056, z = 7}, {x = 1054, y = 1056, z = 7}, }, storage = {91812, 91813}, } function onSay(cid, words) if words == "!abrir" then if getPlayerGroupId(cid) ~= 6 then return false elseif getGlobalStorageValue(config.storage[1]) > -1 then return doPlayerSendCancel(cid, "The quest is already open.") end setGlobalStorageValue(config.storage[1], 1) broadcastMessage("The quest was open! Waiting for "..#config.players.." players...") elseif words == "!quest" then if getGlobalStorageValue(config.storage[1]) < 1 then return doPlayerSendCancel(cid, "The quest isn't open.") end local message, newStorage, count = getCreatureName(cid).." was registered in the quest!", 0, 0 for i = 0, #config.players - 1 do count = count + 1 newStorage = config.storage[2] + i if getGlobalStorageValue(newStorage) == getPlayerGUID(cid) then return doPlayerSendCancel(cid, "You are already registered in the quest.") elseif getGlobalStorageValue(newStorage) == -1 then break end end setGlobalStorageValue(newStorage, getPlayerGUID(cid)) doPlayerSendTextMessage(cid, 27, "You were registered in the quest.") if count == #config.players then local startQuest, p = true, {} for i = 0, #config.players - 1 do local pid = getPlayerByName(getPlayerNameByGUID(getGlobalStorageValue(config.storage[2] + i))) if not isPlayer(pid) then if startQuest then startQuest = false end setGlobalStorageValue(config.storage[2] + i, -1) else p[#p + 1] = pid end end if startQuest then for i = 1, #p do doPlayerSendTextMessage(p[i], MESSAGE_STATUS_CONSOLE_ORANGE, "Good luck at the quest! ^^") doTeleportThing(p[i], config.players[i]) end for i = 0, #config.players - 1 do setGlobalStorageValue(config.storage[2] + i, -1) end setGlobalStorageValue(config.storage[1], -1) message = message.." It has started now, with "..#p.." players!" end end broadcastMessage(message) end return true end
-
[Resolvido] ajuda com magia unown e air vortex
pergunta respondeu ao clebao666 de zipter98 em Resolvidos
É, basicamente. Não que isso vá influenciar em muita coisa, já que os Unowns servirão basicamente para o Unown Rush (ou outra utilidade que você possa achar para eles). -
[Resolvido] ajuda com magia unown e air vortex
pergunta respondeu ao clebao666 de zipter98 em Resolvidos
Ah, é com level mesmo. Você se importaria se os Unowns fossem "balanceados" de acordo com o Unown Legion? Porque, se não, vai ser bem chato arrumar essa spell. PS: Se ajustados como mencionei, o nick deles, aura e status serão os mesmos do Unown Legion. -
[Encerrado] [Pedido Spell] Pxg , Mamaragan
tópico respondeu ao Fuuin Fake de zipter98 em Tópicos Sem Resposta
Cara, não dá para se basear muito por este vídeo, mas enfim: elseif spell == "Mamaragan" then local effect = 207 --Efeito. local areas = {rock1, rock2, rock3, rock4, rock5} --Áreas, em ordem de execução, da spell (de areas.lua). for i = 0, #areas do addEvent(function() doMoveInArea2(cid, effect, areas[i + 1], ELECTRICDAMAGE, min, max, spell) end, i * 300) end PS: Coloquei como padrão as áreas de execução do Power Wave, que achei bem semelhante. -
[Resolvido] ajuda com magia unown e air vortex
pergunta respondeu ao clebao666 de zipter98 em Resolvidos
Deve ser a base que você está usando (escrevi estes códigos para PDA, sem level nos pokémons). Entretanto, se ela for a mesma, peço que poste aqui o código da função adjustStatus (data/lib, level system.lua). -
[Encerrado] [Pedido Spell] Pxg , Mamaragan
tópico respondeu ao Fuuin Fake de zipter98 em Tópicos Sem Resposta
Ajudaria mais se você gravasse um vídeo ou fizesse uma gif da spell. -
pedido Apenas X vocation id pode atacar X monstro
pergunta respondeu ao AdilsonHacker de zipter98 em Scripts
Tags: <event type="statschange" name="guardaStatsChange" event="script" value="guarda.lua"/> <event type="target" name="guardaTarget" event="script" value="guarda.lua"/> Em login.lua: registerCreatureEvent(cid, "guardaStatsChange") registerCreatureEvent(cid, "guardaTarget") No xml do monstro: <script> <event name="guardaStatsChange"/> <event name="guardaTarget"/> </script> -
Recomendo ler o terceiro parágrafo do tópico.
- 167 respostas
-
- mega stone
- megevolution
-
(e 1 mais)
Tags:
-
pedido Apenas X vocation id pode atacar X monstro
pergunta respondeu ao AdilsonHacker de zipter98 em Scripts
Como ficaram as tags e o registro em login.lua? -
Troque: min = 5 + getPokemonLevel(cid) + (table.f / 100 * movetype * specialoffenseRate) por: min = 5 + getPokemonLevel(cid) + ((table and table.f or 0) / 100 * movetype * specialoffenseRate)
- 167 respostas
-
- mega stone
- megevolution
-
(e 1 mais)
Tags:
-
pedido Apenas X vocation id pode atacar X monstro
pergunta respondeu ao AdilsonHacker de zipter98 em Scripts
OK, tenta assim: local config = { name = "xxx", --nome do monstro vocId = xxx, --vocation id } function onTarget(cid, target) if isMonster(cid) and isPlayer(target) then if getPlayerVocation(target) ~= config.vocId then return false end elseif isPlayer(cid) and isMonster(target) then if getCreatureName(target) == config.name and getPlayerVocation(cid) ~= config.vocId then return doPlayerSendCancel(cid, "você não pode atacar esta criatura.") and false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isMonster(attacker) and isPlayer(cid) then if getPlayerVocation(cid) ~= config.vocId then return false end elseif isPlayer(attacker) and isMonster(cid) then if getCreatureName(cid) == config.name and getPlayerVocation(attacker) ~= config.vocId then return doPlayerSendCancel(attacker, "você não pode atacar esta criatura.") and false end end return true end -
pedido Apenas X vocation id pode atacar X monstro
pergunta respondeu ao AdilsonHacker de zipter98 em Scripts
E o monstro, ele foca apenas os jogadores com a vocation id configurada? -
Ops, esqueci uma informação específica no segundo passo de instalação do sistema (doUpdateMoves). Editado.
- 167 respostas
-
- mega stone
- megevolution
-
(e 1 mais)
Tags:
-
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.
- 167 respostas
-
- mega stone
- megevolution
-
(e 1 mais)
Tags:
-
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.
-
pedido Apenas X vocation id pode atacar X monstro
pergunta respondeu ao AdilsonHacker de zipter98 em Scripts
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. -
[Resolvido] ajuda com magia unown e air vortex
pergunta respondeu ao clebao666 de zipter98 em Resolvidos
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. -
pedido Apenas X vocation id pode atacar X monstro
pergunta respondeu ao AdilsonHacker de zipter98 em Scripts
Foi mal, é o sono. Códigos corrigidos. -
pedido Apenas X vocation id pode atacar X monstro
pergunta respondeu ao AdilsonHacker de zipter98 em Scripts
Ops, corrigido. -
poketibia Colocar gender no Look.lua
tópico respondeu ao Developer Berg de zipter98 em Lixeira Pública
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?
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
