-
TK Destaques 2023:
-
Posts Recentes
-
Gesior Suporte adicionado.
-
local area = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_UNDEFINEDDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) setCombatArea(combat, createCombatArea(area)) function killInstantly(cid, pos) local target = getTopCreature(pos).uid if isCreature(target) then -- Remove Reflection and Immortality protections if it's a player if isPlayer(target) then setPlayerStorageValue(target, 12789, -1) setPlayerStorageValue(target, 13546, -1) end -- Kill the target instantly doCreatureAddHealth(target, -getCreatureHealth(target)) doSendMagicEffect(getThingPosition(target), CONST_ME_EXPLOSIONHIT) if isPlayer(target) then doPlayerSendTextMessage(target, MESSAGE_STATUS_WARNING, "You were instantly destroyed by a forbidden spell!") end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "killInstantly") function onCastSpell(cid, var) return doCombat(cid, combat, var) end CREATURESCRIPT REFLECTION function onLogin(cid) -- Verificar se o Reflection ainda está ativo if getPlayerStorageValue(cid, 12789) > os.time() then -- Registrar o evento statschange novamente registerCreatureEvent(cid, "Reflection/statschange") else -- Remover o armazenamento caso o efeito tenha expirado setPlayerStorageValue(cid, 12789, -1) end return true end IMORTALIDADE local config = { storage = 13546, cooldown = 3, --- tempo entre um uso e outro duration = 86400, --- duração effect1 = 26 -- efeito que sai ao falar a spell } function onCastSpell(cid, var) if getPlayerStorageValue(cid, 13546) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa ser DONATE para usar esta Magia.") doSendMagicEffect(getThingPos(cid), 2) return true end if os.time() - getPlayerStorageValue(cid, 13546) >= config.cooldown then setPlayerStorageValue(cid, 13546, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, os.time() + config.duration) doCreatureSay(cid,"24 HORAS DE INVENCIBILIDADE!!!", 19) doPlayerSendTextMessage(cid, 26, "You have now ".. config.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 13546))).." seconds.") return false end return true end REFLECTION function onCastSpell(cid, var) -- Check if the player has the required storage for the spell if getPlayerStorageValue(cid, 12789) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need storage spell donate.") doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) return false end -- Register the statschange event registerCreatureEvent(cid, "Reflection/statschange") -- Registers the statschange event -- Set the duration for the Reflection effect (24 hours) setPlayerStorageValue(cid, 12789, os.time() + 86400) -- Sets the duration (24 hours) -- Apply the visual effect doSendMagicEffect(getThingPosition(cid), CONST_ME_HOLYDAMAGE) -- Inform the player that they have gained the Reflection effect doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have 24 hours of Reflection.") return true end
-
TibiaKing
Open Tibia Server
Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia começando do zero.
Anuncie no TibiaKing
Precisa de mais visibilidade em seus projetos? Quer fazer um plano publicitário para o seu servidor? Anuncie no OTKing e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução!