-
Total de itens
2553 -
Registro em
-
Última visita
-
Dias Ganhos
72
Tudo que zipter98 postou
-
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 -
poketibia [Encerrado] Teria como trocar o catch system?
tópico respondeu ao Aztech de zipter98 em Tópicos Sem Resposta
OK. Como vou dormir agora, amanhã (ou quando possível) eu corrijo o sistema. -
poketibia [Encerrado] Teria como trocar o catch system?
tópico respondeu ao Aztech de zipter98 em Tópicos Sem Resposta
Como imaginei. Se possível, poste o arquivo catch system.lua, de data/lib. -
poketibia [Encerrado] Teria como trocar o catch system?
tópico respondeu ao Aztech de zipter98 em Tópicos Sem Resposta
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 -
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)
-
poketibia [Encerrado] Teria como trocar o catch system?
tópico respondeu ao Aztech de zipter98 em Tópicos Sem Resposta
Tem sim. Poderia postar seu catch.lua, de data/actions/scripts? -
tfs 0.3.6 [Encerrado] Player Não poder falar em Determinado Channel!
tópico respondeu ao Luga03 de zipter98 em Tópicos Sem Resposta
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; -
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
-
Show OFF -- Primeiro monstro (hue br)
tópico respondeu ao Gabrieltxu de zipter98 em Exposições (Show Off)
você é um gênio do spriting -
script Como usar essa msm função pra local chat
pergunta respondeu ao gmstrikker de zipter98 em Scripts
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 -
script Como usar essa msm função pra local chat
pergunta respondeu ao gmstrikker de zipter98 em Scripts
doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_RN, 20) -
Coloca o "Blastoise" da tabela em letra minúscula (blastoise).
-
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
-
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.
-
script Como usar essa msm função pra local chat
pergunta respondeu ao gmstrikker de zipter98 em Scripts
doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing')) -
^ 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.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.