Ir para conteúdo

Lurk

Membro
  • Registro em

  • Última visita

  1. ILex WilL reagiu a uma resposta no tópico: Countdown horário dos próximos eventos
  2. Lord Danilus reagiu a uma resposta no tópico: Spell que bloqueia o target do player
  3. IGlanot reagiu a uma resposta no tópico: Countdown horário dos próximos eventos
  4. Lurk reagiu a uma resposta no tópico: Remake Blood City 8.6
  5. Rogex Joyz reagiu a uma resposta no tópico: Clean Database by luanluciano93
  6. Lurk reagiu a uma resposta no tópico: Yutae - Cidade + Hunts
  7. Cat reagiu a uma resposta no tópico: Sistema de Medalhões! Solicite aqui!
  8. Lurk reagiu a uma resposta no tópico: Zombie Event [DIFERENCIADO]
  9. caraca tava esperando por isso, vlw demais man teria as paginas p znote?
  10. Lurk reagiu a uma resposta no tópico: Trade Offline V2.0
  11. Lurk reagiu a uma resposta no tópico: NPC Cassino
  12. Lurk reagiu a uma resposta no tópico: Ferumbras Ascendant [ENTRADA FULL]
  13. WooX reagiu a uma resposta no tópico: Spell que bloqueia o target do player
  14. WooX reagiu a uma resposta no tópico: [TFS 0.x] Função doPlayerTargetCreature
  15. Ackerzin reagiu a uma resposta no tópico: Spell que bloqueia o target do player
  16. @Doidodepeda @Doidodepeda só trocar a mensagem que aparece
  17. @Quatroqueijos poe isso no fim da sua lib function timeString(timeDiff,english) -- créditos: Killua local dateFormat = {} if english then dateFormat = { {"day", timeDiff / 60 / 60 / 24}, {"hour", timeDiff / 60 / 60 % 24}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } else dateFormat = { {"dia", timeDiff / 60 / 60 / 24}, {"hora", timeDiff / 60 / 60 % 24}, {"minuto", timeDiff / 60 % 60}, {"segundo", timeDiff % 60} } end local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' e ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end return table.concat(out) end
  18. diarmaint reagiu a uma resposta no tópico: Countdown horário dos próximos eventos
  19. @diarmaint assim local vocacoes = {1, 2 , 3, 4} -- vocacoes que podem ganhar essa skin function onUse(cid, item) if getPlayerStorageValue(cid, 11140) < 1 and isInArray(vocacoes, getPlayerVocation(cid)) then setPlayerStorageValue(cid, 11140, 1) doPlayerSendCancel(cid, "Voce já ganhou essa skin!.") doSendMagicEffect(getPlayerPosition(cid), 5) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você recebeu a skin!.") doRemoveItem(item.uid, 1) elseif getPlayerStorageValue(cid, 11140) == 1 then doPlayerSendCancel(cid, "Voce já tem essa skin.") else doPlayerSendCancel(cid, "Sua vocacao nao pode ganhar essa skin.") end return true end
  20. @Samuel Cstr lol ngm é obrigado a responder, isso aqui n eh trabalho de ngm n, n eh um forum cheio de profissional prontamente esperando suas duvidas p te responder de graça isso aqui é hobby, quem te ajuda ajuda pq quer, tirou tempo do dia p isso, compartilhou conhecimento de graça outra, pode te chocar mas pode ter gente que n sabe, todo dia entra gente nova no forum e gente da antiga vai embora, segue coma vida, esquece do tibia muita gente aqui é muito mal acostumado tipo vc
  21. @LeoTK eu sei como não afetar quem é da guild e quem esta em party mas não sei como aplicar o efeito com magia em área teria que criar uma condition customizada, talvez um membro mais experiente do fórum possa ajudar...
  22. Fiz essa spell a pedido de um usuário do fórum e logo depois outro usuário pediu uma versão onde o target do player afetado pela magia ficasse bloqueado por um tempo configurável, gostei da ideia e decidi postar em forma de tópico. Primeiro de tudo você vai precisar dessa função feita/disponibilizada pelo @WooX (não se esqueçam de passar no tópico dele e agradecer) Em data/spells.xml adicione <instant name="Cancel Enemy Target" words="Cancel Enemy Target" lvl="12" mana="20" range="3" blockwalls="1" needtarget="1" exhaustion="2000" needlearn="0" event="script" value="canceltargetlurk.lua"> <vocation id="1"/> <vocation id="2"/> </instant> em data/spells/scripts crie um arquivo chamado canceltargetlurk.lua e coloque isso dentro --[[ Made by Moira (Lurk on TibiaKing) NÃO REMOVA OS CRÉDITOS ]]-- local storage = 234512 -- tenha certeza de estar usando um numero que ainda não esteja em uso no seu servidor local tempo = 50 -- tempo em segundos para usar a magia novamente local tempo_block = 5 -- quanto tempo o player afetado pela magia vai ficar sem poder atacar OUTRO PLAYER local templo_cannot_be_blocked = 50 -- tempo em que o target vai ficar invuneravel a spell caso já tenha sido afetado por ela local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) function onCastSpell(cid, var) local target = getCreatureTarget(cid) if isPlayer(target) and getPlayerStorageValue(cid, storage) < os.time() and getPlayerStorageValue(target, 234514) < os.time() then doPlayerTargetCreature(target, target) setPlayerStorageValue(target, 234513, tempo_block + os.time()) setPlayerStorageValue(target, 234514, templo_cannot_be_blocked + os.time()) setPlayerStorageValue(cid, storage, tempo + os.time()) return doCombat(cid, combat, var) elseif getPlayerStorageValue(target, 234514) > os.time() then doPlayerSendCancel(cid, "This player has been affect by this spell recently, you must wait ".. getPlayerStorageValue(target, 234514) - os.time() .." to block his attacks again.") return false elseif getPlayerStorageValue(cid, storage) > os.time() then doPlayerSendCancel(cid, "You must wait ".. getPlayerStorageValue(cid, storage) - os.time() .." seconds to use this spell again.") else doPlayerSendCancel(cid, "You may only cast this spell on players.") end return false end agora em data/creaturescripts.xml adicione <event type="attack" name="lurkBlockTarget" event="script" value="canceltargetlurk.lua"/> em data/creaturescripts/scripts crie um arquivo chamado canceltargetlurk.lua e cole isso dentro --[[ Made by Moira (Lurk on TibiaKing) NÃO REMOVA OS CRÉDITOS ]]-- function onAttack(cid, target) if getPlayerStorageValue(cid, 234513) > os.time() and isPlayer(target) then return doPlayerSendCancel(cid, "You're under effect of the cancel target spell, you must wait".. getPlayerStorageValue(cid, 234513) - os.time() .." seconds to attack again.") and false end return true end por ultimo, abre o arquivo login.lua que está na pasta data/creaturescripts/scripts e adicione isso ANTES DO ULTIMO RETURN TRUE registerCreatureEvent(cid, "lurkBlockTarget") Se você quer só E SOMENTE SÓ cancelar o target do inimigo uma unica vez, basta utilizar essa versão da spell --[[ Made by Moira (Lurk on TibiaKing) NÃO REMOVA OS CRÉDITOS ]]-- local storage = 234512 -- tenha certeza de estar usando um numero que ainda não esteja em uso no seu servidor local tempo = 50 -- tempo em segundos para usar a magia novamente local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) function onCastSpell(cid, var) local target = getCreatureTarget(cid) if isPlayer(target) and getPlayerStorageValue(cid, storage) < os.time() then doPlayerTargetCreature(target, target) setPlayerStorageValue(cid, storage, tempo + os.time()) return doCombat(cid, combat, var) elseif getPlayerStorageValue(cid, storage) > os.time() then doPlayerSendCancel(cid, "You must wait ".. getPlayerStorageValue(cid, storage) - os.time() .." seconds to use this spell again.") else doPlayerSendCancel(cid, "You may only cast this spell on players.") end return false end Créditos: Eu pela spell e creaturescript @WooX pela criação da função se gostou, rep+ aqui e no post do @WooX pela função : p
  23. @diarmaint editei minha primeira resposta do tópico aqui, olha lá @RicK Sanchez @BangxD atualizem tb @leozincorsair atualizei dnv atualizado dnv, acessa aqui https://tibiaking.com/forums/topic/100214-spell-que-bloqueia-o-target-do-player/ @diarmaint @RicK Sanchez @BangxD
  24. se alguém quiser um exemplo do que da pra fazer com esse código, aqui uma magia que cancela o target do seu target
  25. @diarmaint cara acho que vc ta usando tfs 1.x, certo? esse código é p tfs 0.4 ou vc ta sem a função na source ou sei lá, testei aqui e funfou certinho, o do cara ali funfou tb
  26. @RicK Sanchez disponha
  27. atualiza aqui pfvr?
  28. @BangxD @RicK Sanchez acabei de testar aqui, em spells.xml troca por isso aqui <instant name="Cancel Enemy Target" words="Cancel Enemy Target" lvl="12" mana="20" range="3" blockwalls="1" needtarget="1" exhaustion="2000" needlearn="0" event="script" value="canceltarget.lua"> </instant>

Informação Importante

Confirmação de Termo