-
Total de itens
89 -
Registro em
-
Última visita
Tudo que Muvuka postou
-
local UPGRADE_ITEM_ID = 5902 -- The upgrade item, in this case, the "scary blue eye" local LIFE_LEECH_INCREMENT = 1 -- Percentage to be added to Life Leech local MANA_LEECH_INCREMENT = 1 -- Percentage to be added to Mana Leech local MAX_LEECH_PERCENT = 100 -- Maximum limit for Life Leech and Mana Leech local FIXED_DAMAGE = 100000000000 -- Fixed damage to be dealt function onUse(cid, item, fromPosition, itemEx, toPosition) -- Check if the player is valid if not isPlayer(cid) then return false end -- Get the weapon the player is holding (left or right hand) local weapon = getPlayerSlotItem(cid, CONST_SLOT_LEFT) if weapon.itemid == 0 then weapon = getPlayerSlotItem(cid, CONST_SLOT_RIGHT) end -- Check if the player is holding a weapon if weapon.itemid == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You need to be holding a weapon to upgrade it.") return false end -- Get the current Life Leech and Mana Leech values (if they exist) local currentLifeLeech = tonumber(getItemAttribute(weapon.uid, "lifeLeech")) or 0 local currentManaLeech = tonumber(getItemAttribute(weapon.uid, "manaLeech")) or 0 -- Accumulate new leech values, limited by the maximum local newLifeLeech = math.min(currentLifeLeech + LIFE_LEECH_INCREMENT, MAX_LEECH_PERCENT) local newManaLeech = math.min(currentManaLeech + MANA_LEECH_INCREMENT, MAX_LEECH_PERCENT) -- Apply the new Life Leech and Mana Leech values to the weapon doItemSetAttribute(weapon.uid, "lifeLeech", newLifeLeech) doItemSetAttribute(weapon.uid, "manaLeech", newManaLeech) -- Modify the weapon's description to show the new leech values local description = getItemAttribute(weapon.uid, "description") or "" description = "This weapon now has " .. newLifeLeech .. "% Life Leech and " .. newManaLeech .. "% Mana Leech. The maximum is 100%." doItemSetAttribute(weapon.uid, "description", description) -- Send a message to the player informing about the upgrade doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your weapon has been upgraded! It now has " .. newLifeLeech .. "% Life Leech and " .. newManaLeech .. "% Mana Leech. The maximum is 100%.") -- Display animated text "+Leech!!!" in green (color 35) local position = getCreaturePosition(cid) doSendAnimatedText(position, "+Leech!!!", 35) -- The line that removed the upgrade item has been removed to allow infinite use -- doRemoveItem(item.uid, 1) -- REMOVED -- Combat logic: damage with the weapon local target = getCreatureTarget(cid) if isCreature(target) then -- Check if the weapon has reached the limit for Life Leech and Mana Leech if newLifeLeech == MAX_LEECH_PERCENT and newManaLeech == MAX_LEECH_PERCENT then -- Fixed damage from the weapon local damage = FIXED_DAMAGE -- Apply the damage to the target doTargetCombatHealth(cid, target, COMBAT_UNDEFINEDDAMAGE, -damage, -damage, CONST_ME_EXPLOSIONHIT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You dealt " .. damage .. " damage with your weapon!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "Your weapon has not reached the limit to deal damage.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You do not have a valid target to attack.") end return true end
-
TFS 0.3.6 8.60 EU FIZ ESSE CODIGO POREM ELE SÓ ATACA CRITURA SE USA ITEM 5902 ESSE ITEM É FEITO PRA APRIMORA O ITEM EU QUERO QUE NAO DEPENDA 5902 PRA TRANSFERI DANO A CRITURA MAIS SIM O APRIMORAMENTO DO ITEM MAX_LEEECH_PERCENT local UPGRADE_ITEM_ID = 5902 -- O item de aprimoramento, neste caso, o "olho azul assustador" local LIFE_LEECH_INCREMENT = 10 -- Porcentagem a ser adicionada ao Life Leech a cada uso local MANA_LEECH_INCREMENT = 10 -- Porcentagem a ser adicionada ao Mana Leech a cada uso local MAX_LEECH_PERCENT = 100 -- Limite máximo para Life Leech e Mana Leech local BASE_DAMAGE = 100000000000 -- Dano base da arma local STORAGE_KEY = 10000 -- Chave de armazenamento para o nível de aprimoramento function onUse(cid, item, fromPosition, itemEx, toPosition) -- Verifica se o jogador é válido if not isPlayer(cid) then return false end -- Obtém a arma que o jogador está segurando (mão esquerda ou direita) local weapon = getPlayerSlotItem(cid, CONST_SLOT_LEFT) if weapon.itemid == 0 then weapon = getPlayerSlotItem(cid, CONST_SLOT_RIGHT) end -- Verifica se o jogador está segurando uma arma if weapon.itemid == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "Você precisa estar segurando uma arma para aprimorá-la.") return false end -- Obtém os valores atuais de Life Leech e Mana Leech (se existirem) local currentLifeLeech = tonumber(getItemAttribute(weapon.uid, "lifeLeech")) or 0 local currentManaLeech = tonumber(getItemAttribute(weapon.uid, "manaLeech")) or 0 -- Acumula novos valores de leech, limitados pelo máximo local newLifeLeech = math.min(currentLifeLeech + LIFE_LEECH_INCREMENT, MAX_LEECH_PERCENT) local newManaLeech = math.min(currentManaLeech + MANA_LEECH_INCREMENT, MAX_LEECH_PERCENT) -- Aplica os novos valores de Life Leech e Mana Leech à arma doItemSetAttribute(weapon.uid, "lifeLeech", newLifeLeech) doItemSetAttribute(weapon.uid, "manaLeech", newManaLeech) -- Modifica a descrição da arma para exibir os novos valores de leech local description = getItemAttribute(weapon.uid, "description") or "" description = "Esta arma agora tem " .. newLifeLeech .. "% de Life Leech e " .. newManaLeech .. "% de Mana Leech. O máximo é 100%." doItemSetAttribute(weapon.uid, "description", description) -- Envia uma mensagem para o jogador informando sobre o aprimoramento doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sua arma foi aprimorada! Agora tem " .. newLifeLeech .. "% de Life Leech e " .. newManaLeech .. "% de Mana Leech. O máximo é 100%.") -- Exibe um texto animado "+Leech!!!" em verde (cor 35) local position = getCreaturePosition(cid) doSendAnimatedText(position, "+Leech!!!", 35) -- Remove o item de aprimoramento (olho azul assustador) doRemoveItem(item.uid, 1) -- Armazena o novo nível de aprimoramento da arma setPlayerStorageValue(cid, STORAGE_KEY, newLifeLeech) -- Obtém o alvo atual do jogador local target = getCreatureTarget(cid) -- Verifica se há um alvo válido if isCreature(target) then -- Calcula o dano proporcional ao nível de aprimoramento da arma local damage = (newLifeLeech / 100) * BASE_DAMAGE -- Dano proporcional ao nível de leech doTargetCombatHealth(cid, target, COMBAT_UNDEFINEDDAMAGE, -damage, -damage, CONST_ME_HITAREA) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você realizou um ataque poderoso com sua arma aprimorada! Causou " .. damage .. " de dano.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "Você não tem um alvo válido para atacar.") end return true end
-
local UPGRADE_ITEM_ID = 5902 -- The upgrade item, e.g., "spooky blue eye" local LIFE_LEECH_INCREMENT = 1 -- Percentage to be added to Life Leech local MANA_LEECH_INCREMENT = 1 -- Percentage to be added to Mana Leech local MAX_LEECH_PERCENT = 100 -- Maximum limit for Life Leech and Mana Leech local FIXED_DAMAGE = 100000000000 -- Fixed damage that will be dealt to both the creature and the player function onUse(cid, item, fromPosition, itemEx, toPosition) -- Check if the player is valid if not isPlayer(cid) then return false end -- Get the weapon the player is holding (left or right hand) local weapon = getPlayerSlotItem(cid, CONST_SLOT_LEFT) if weapon.itemid == 0 then weapon = getPlayerSlotItem(cid, CONST_SLOT_RIGHT) end -- Check if the player is holding a weapon if weapon.itemid == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You need to be holding a weapon to upgrade it.") return false end -- Get current values of Life Leech and Mana Leech (if any) local currentLifeLeech = tonumber(getItemAttribute(weapon.uid, "lifeLeech")) or 0 local currentManaLeech = tonumber(getItemAttribute(weapon.uid, "manaLeech")) or 0 -- Accumulate new leech values local newLifeLeech = math.min(currentLifeLeech + LIFE_LEECH_INCREMENT, MAX_LEECH_PERCENT) local newManaLeech = math.min(currentManaLeech + MANA_LEECH_INCREMENT, MAX_LEECH_PERCENT) -- Apply new Life Leech and Mana Leech values to the weapon doItemSetAttribute(weapon.uid, "lifeLeech", newLifeLeech) doItemSetAttribute(weapon.uid, "manaLeech", newManaLeech) -- Modify the weapon description to show the new leech values local description = getItemAttribute(weapon.uid, "description") or "" description = "This weapon now has " .. newLifeLeech .. "% Life Leech and " .. newManaLeech .. "% Mana Leech." doItemSetAttribute(weapon.uid, "description", description) -- Messages and effects doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your weapon has been upgraded! It now has " .. newLifeLeech .. "% Life Leech and " .. newManaLeech .. "% Mana Leech.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREATTACK) -- Show animated text local position = getCreaturePosition(cid) -- Define the position for animated text doSendAnimatedText(position, "+Leech", 35) -- Display animated text with color 35 (green) -- Remove the upgrade item doRemoveItem(item.uid, 1) -- Combat logic: use all mana local maxMana = getCreatureMaxMana(cid) -- Check if the player has enough mana if getCreatureMana(cid) >= maxMana then local target = getCreatureTarget(cid) -- Get the target of the creature if isCreature(target) then -- Deal fixed damage to the target creature doTargetCombatHealth(cid, target, COMBAT_UNDEFINEDDAMAGE, -FIXED_DAMAGE, -FIXED_DAMAGE, CONST_ME_SOUND_WHITE) -- Reduce the target's mana by the fixed damage amount (with a cap) local targetMana = getCreatureMana(target) local newTargetMana = math.max(0, targetMana - FIXED_DAMAGE) -- Ensure mana doesn't go below 0 doCreatureAddMana(target, -newTargetMana) -- Reduce the player's mana doCreatureAddMana(cid, -maxMana) -- Send a message about the attack doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You used all your mana to attack! Damage dealt: " .. FIXED_DAMAGE .. " to your target, and drained " .. newTargetMana .. " mana from the target.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You do not have a valid target to attack.") end else -- Message if there is not enough mana doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You do not have enough mana to perform the attack!") end return true end
-
call over flow aparece no console
-
POREM DA CONFLITO COM ATK BOOST local lvlcrit = 48913 -- storage para criticos normais local lvlcritDanger = 48904 -- storage para criticos perigosos local multiplier = 1.5 -- multiplicador de dano function onCombat(cid, target) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local criticalDangerChance = getPlayerStorageValue(cid, lvlcritDanger) or 0 local chance = math.random(1, 1000) -- Mantém um intervalo razoável -- Verifica se a chance de crítico BOOSTER é atingida if chance <= (criticalChance * 1) then local damage = 1000000000 -- Valor do dano crítico BOOSTER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "+DANGER!", 35) doSendMagicEffect(getCreaturePosition(cid), 54) return true end -- Verifica se a chance de crítico DANGER é atingida if chance <= (criticalDangerChance * 2) then local damage = 100000000000 -- Valor do dano crítico DANGER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "FATALITY!", 190) doSendMagicEffect(getCreaturePosition(cid), 52) return true end end return true end local UPGRADE_ITEM_ID = 5902 -- The upgrade item, e.g., "spooky blue eye" local LIFE_LEECH_INCREMENT = 1 -- Percentage to be added to Life Leech local MANA_LEECH_INCREMENT = 1 -- Percentage to be added to Mana Leech local MAX_LEECH_PERCENT = 100 -- Maximum limit for Life Leech and Mana Leech local LEACH_WEAPON_STORAGE = 47892 -- Replace with the real storage ID of the leech weapon local FIXED_DAMAGE = 100000000000 -- Fixed damage that will be dealt to the creature local EFFECT_ON_USE = 23 -- Visual effect to be applied (adjust as necessary) function onUse(cid, item, fromPosition, itemEx, toPosition) -- Check if the player is valid if not isPlayer(cid) then return false end -- Get the weapon the player is holding (left or right hand) local weapon = getPlayerSlotItem(cid, CONST_SLOT_LEFT) if weapon.itemid == 0 then weapon = getPlayerSlotItem(cid, CONST_SLOT_RIGHT) end -- Check if the player is holding a weapon if weapon.itemid == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You need to be holding a weapon to upgrade it.") return false end -- Get current values of Life Leech and Mana Leech (if any) local currentLifeLeech = tonumber(getItemAttribute(weapon.uid, "lifeLeech")) or 0 local currentManaLeech = tonumber(getItemAttribute(weapon.uid, "manaLeech")) or 0 -- Accumulate new leech values local newLifeLeech = math.min(currentLifeLeech + LIFE_LEECH_INCREMENT, MAX_LEECH_PERCENT) local newManaLeech = math.min(currentManaLeech + MANA_LEECH_INCREMENT, MAX_LEECH_PERCENT) -- Apply new Life Leech and Mana Leech values to the weapon doItemSetAttribute(weapon.uid, "lifeLeech", newLifeLeech) doItemSetAttribute(weapon.uid, "manaLeech", newManaLeech) -- Modify the weapon description to show the new leech values local description = getItemAttribute(weapon.uid, "description") or "" description = "This weapon now has " .. newLifeLeech .. "% Life Leech and " .. newManaLeech .. "% Mana Leech." doItemSetAttribute(weapon.uid, "description", description) -- Messages and effects doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your weapon has been upgraded! It now has " .. newLifeLeech .. "% Life Leech and " .. newManaLeech .. "% Mana Leech.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREATTACK) -- Show animated text local position = getCreaturePosition(cid) -- Define the position for animated text doSendAnimatedText(position, "+Leech", 35) -- Display animated text with color 35 (green) -- Remove the upgrade item doRemoveItem(item.uid, 1) -- Combat logic: use all mana local maxMana = getCreatureMaxMana(cid) -- Check if the player has enough mana if getCreatureMana(cid) >= maxMana then -- Deal fixed damage to the creature local target = getCreatureTarget(cid) -- Get the target of the creature if isCreature(target) then -- Deal fixed damage to the creature doTargetCombatHealth(cid, target, COMBAT_UNDEFINEDDAMAGE, -FIXED_DAMAGE, -FIXED_DAMAGE, CONST_ME_SOUND_WHITE) -- Reduce the target's mana by the fixed damage amount local targetMana = getCreatureMana(target) local newTargetMana = math.max(0, targetMana - FIXED_DAMAGE) -- Ensure mana doesn't go below 0 doCreatureAddMana(target, -newTargetMana) -- Reduce the player's mana doCreatureAddMana(cid, -maxMana) -- Send a message about the attack doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You used all your mana to attack! Damage dealt: " .. FIXED_DAMAGE .. " and drained " .. newTargetMana .. " mana from the target.") -- Apply effect to the target doSendMagicEffect(getCreaturePosition(target), EFFECT_ON_USE) -- Apply effect to the target else doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You do not have a valid target to attack.") end else -- Message if there is not enough mana doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You do not have enough mana to perform the attack!") end return true end local LEACH_WEAPON_STORAGE = 47892 -- Storage for the leech weapon local FIXED_DAMAGE = 100000000000 -- A reasonable damage value local LEECH_PERCENT = 100 -- 10% leech for life and mana local MAX_LEECH = 100 -- Max 50% leech to avoid overpowering -- Function to calculate and apply leech local function applyLeech(cid, target, damage) -- Check if target is a valid creature and if player has leech ability if not isCreature(target) or getPlayerStorageValue(cid, LEACH_WEAPON_STORAGE) <= 0 then return end -- Ensure the damage value is reasonable if damage <= 0 then return end -- Calculate the leech amounts local lifeLeech = math.floor(damage * math.min(LEECH_PERCENT, MAX_LEECH) / 100) local manaLeech = math.floor(damage * math.min(LEECH_PERCENT, MAX_LEECH) / 100) -- Apply leech to player's health and mana doCreatureAddHealth(cid, lifeLeech) doCreatureAddMana(cid, manaLeech) -- Send effect and feedback to the player doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You leeched " .. lifeLeech .. " health and " .. manaLeech .. " mana.") end -- Hook into the combat system (use this function in combat scripts) function onCombat(cid, target) -- Apply a fixed damage value local fixedDamage = FIXED_DAMAGE -- Deal fixed damage to the target (adjust this as needed) doTargetCombatHealth(cid, target, COMBAT_UNDEFINEDDAMAGE, -fixedDamage, -fixedDamage, CONST_ME_FIREATTACK) -- Apply leech based on the fixed damage dealt applyLeech(cid, target, fixedDamage) return true end
-
Não funciona. -- kills.lua function onSay(cid, words, param) if not isPlayer(cid) then return false end -- Verifica o número de mortes injustificadas no banco de dados local playerGUID = getPlayerGUID(cid) local resultId = db.storeQuery("SELECT unjustified_frags FROM players WHERE id = " .. playerGUID) if resultId ~= false then -- Recupera os frags injustificados local unjustifiedKillsDay = result.getDataInt(resultId, "unjustified_frags_day") local unjustifiedKillsWeek = result.getDataInt(resultId, "unjustified_frags_week") local unjustifiedKillsMonth = result.getDataInt(resultId, "unjustified_frags_month") -- Configuração de quantos frags são necessários para obter red skull ou ban local dailyFragLimit = getConfigValue("dailyFragLimit") local weeklyFragLimit = getConfigValue("weeklyFragLimit") local monthlyFragLimit = getConfigValue("monthlyFragLimit") -- Envia as informações ao jogador doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tem " .. unjustifiedKillsDay .. " mortes injustificadas nas últimas 24 horas.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tem " .. unjustifiedKillsWeek .. " mortes injustificadas nos últimos 7 dias.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tem " .. unjustifiedKillsMonth .. " mortes injustificadas nos últimos 30 dias.") -- Informar se está perto de obter red skull ou ban if unjustifiedKillsDay >= dailyFragLimit or unjustifiedKillsWeek >= weeklyFragLimit or unjustifiedKillsMonth >= monthlyFragLimit then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Cuidado! Você está próximo de obter uma Red Skull ou ser banido!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ainda está seguro, mas continue atento às suas mortes injustificadas.") end result.free(resultId) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não foi possível recuperar suas mortes injustificadas.") end return true end
-
local COIN_ID = 6535 -- DexSoft Coin ID local COIN_AMOUNT = 1 -- Amount of DexSoft Coins the player will need to revive local MAGIC_EFFECT_TELEPORT = 65 -- Effect that will appear when the player is teleported local PLAYER_REBORN_POSITION_X = 66541 local PLAYER_REBORN_POSITION_Y = 66542 local PLAYER_REBORN_POSITION_Z = 66543 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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, 'revive') then selfSay('You need ' .. COIN_AMOUNT .. ' DexSoft Coin(s) to resurrect at the location where you recently died.', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerItemCount(cid, COIN_ID) >= COIN_AMOUNT then doPlayerRemoveItem(cid, COIN_ID, COIN_AMOUNT) if teleportPlayerToPositionReborn(cid) then doTeleportThing(cid, {x = PLAYER_REBORN_POSITION_X, y = PLAYER_REBORN_POSITION_Y, z = PLAYER_REBORN_POSITION_Z}) doSendMagicEffect(getCreaturePosition(cid), MAGIC_EFFECT_TELEPORT) selfSay('Ok, you have been resurrected.', cid) end else selfSay('Sorry, but you do not have enough DexSoft Coins.', cid) end talkState[talkUser] = 0 elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then talkState[talkUser] = 0 selfSay('Ok, goodbye.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) function teleportPlayerToPositionReborn(cid) local playerRebornPositionX = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_X) local playerRebornPositionY = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_Y) local playerRebornPositionZ = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_Z) if playerRebornPositionX == -1 or playerRebornPositionY == -1 or playerRebornPositionZ == -1 then selfSay('You have not died yet.', cid) return false end doTeleportThing(cid, {x = playerRebornPositionX, y = playerRebornPositionY, z = playerRebornPositionZ}) return true end [13/09/2024 14:16:35] [Error - Npc interface] [13/09/2024 14:16:35] data/npc/scripts/reviver.lua:onThink [13/09/2024 14:16:35] Description: [13/09/2024 14:16:35] (luaGetCreatureName) Creature not found [13/09/2024 14:16:35] [Error - Npc interface] [13/09/2024 14:16:35] data/npc/scripts/reviver.lua:onThink [13/09/2024 14:16:35] Description: [13/09/2024 14:16:35] data/npc/lib/npcsystem/npchandler.lua:301: bad argument #3 to 'gsub' (string/function/table expected) [13/09/2024 14:16:35] stack traceback: [13/09/2024 14:16:35] [C]: in function 'gsub' [13/09/2024 14:16:35] data/npc/lib/npcsystem/npchandler.lua:301: in function 'parseMessage' [13/09/2024 14:16:35] data/npc/lib/npcsystem/npchandler.lua:538: in function 'onWalkAway' [13/09/2024 14:16:35] data/npc/lib/npcsystem/npchandler.lua:473: in function 'onThink' [13/09/2024 14:16:35] data/npc/scripts/reviver.lua:26: in function <data/npc/scripts/reviver.lua:25>
-
eu queria uma spells que solta a magia com gema id 2156 que mata player e monstro na hora 1 one hit kill magia em area grande funcionaria assim a spell ficava com efeito desse dai código efeito gema igual fox world quando desse use na gema ai se usava o spell e o efeito seria removido e se poderia usar gema de novo pra todas vocação pra esse id 2156
-
rnd = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."}, efeito sai bugado sai assim rnd = "´ . ,", ". Ã ,", "` . ,", ", ´ ."
-
[05/09/2024 19:04:49] [Error - Action Interface] [05/09/2024 19:04:49] data/actions/scripts/gems.lua:onUse [05/09/2024 19:04:49] Description: [05/09/2024 19:04:49] data/actions/scripts/gems.lua:5: attempt to index global 'gems' (a nil value) [05/09/2024 19:04:49] stack traceback: [05/09/2024 19:04:49] data/actions/scripts/gems.lua:5: in function <data/actions/scripts/gems.lua:3>
-
function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then local targetPosition = getCreaturePosition(target) if targetPosition then doSendAnimatedText(targetPosition, "[OWNED!]", 35) end end return true end -=[TFS - 0.3.6 - 8.60]=- Não aparece owned! quando mata o player
-
local config = { loginMessage = getConfigValue('loginMessage') } function onLogin(cid) local loginmsg = "[Seja Bem Vindo(a).] Fiquem Ligado Nas Features e Nos Eventos de SEG-SEG Feriado Fim de Semana em Breve Mais Updat no Servidor. [WhatsApp Main Contact Server]: Link: bit.ly/3UaRZcB - [WhatsApp/root]: +55 (11) 91230-8360 - Link: bit.ly/3Zc0KFn - [WhatsApp Pra Player]: Link: bit.ly/3WcOZ2c" doCreatureSay(getCreatureByName(getCreatureName(cid)), loginmsg, TALKTYPE_PRIVATE, false, cid) local loginmsg = "[Seja Bem Vindo(a).] Se quizer ajudar a manter o server on faça uma doação https://vakinha.bio/2298926 - Chave Aleatoria PicPay: c9058b4d-93f5-47fe-bd91-5c2d82ba1893 Pelo Numero Tel-Comercial: +5511912308360 CPF: 389.429.678-09 E-Mail: po-ca@hotmail.com QR-CODE: https://bit.ly/41tCUoF" doCreatureSay(getCreatureByName(getCreatureName(cid)), loginmsg, TALKTYPE_PRIVATE, false, cid) local loginmsg = "[Warning + Aviso] O-Administrador Nunca Pedira Seu 'Login/Senha/Recovery-Key/E-Mail' - Ou Algo Mais do Jogo Por Favor Não Compartilhe Nada Pessoal Com Ninguem Evite Coloca Mesmo Login e Senha do Outro Servidor Nesse Pra Pessoas Mal Intecionadas Não te Hackia Caso Esqueça ou Perca Login e Senha Manda um E-Mail Pra Central po-ca@hotmail.com" doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, loginmsg) local loginmsg = " Boost [O Atributo Selecionado Foi]: (Loot + 100%) Com um Bônus de: (Rate + 100%) O Bônus do Monstro Foi Loot, Então o Monstro Terá Melhor Drop de Loot e EXP." doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, loginmsg) local loginmsg = "[DexSoft-CASTLE]: A Guild que dominar o Castle24Hs e o Castle48Hs recebe 50%~100% a mais de EXP!." doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, loginmsg) local loginmsg = " Digite !bless Para Comprar e Não Perde - XP/Skills/Itens. Com a Bless Voce Não Perde Nada É Como Se Fosse o Segundo -AOL- Custa 80k." doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, loginmsg) local loginmsg = "[Guild] Ultilize o comando !glist e veja as guilds do OTserv e !glist + nome da guild para ver os players." doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, loginmsg) local loginmsg = " Multi-Client or Magebomb is not allowed." doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, loginmsg) local loginmsg = "[DexSoft-Pagamento-PayPal]: Ajude a Manter Servidor Online, Ganhe SET Donate e Acessdo Donate Itens -=[FULL DNT]=- Spell: imortalidade Tudo Donate Fazendo PIX R$100,00 Para: CPF: 389.429.678-09" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, loginmsg) local loginmsg = "[É Proibido Usar Tibia Multi Client Nesse Servidor]" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, loginmsg) local maxaccbyip = 1 local accm = {} local pbi = getPlayersByIp(getPlayerIp(cid)) function antiTumb(cid) for _,player in ipairs(pbi) do if getCreatureName(player) == "Account Manager" then table.insert(accm, player) end end if #accm > maxaccbyip then print("Foi ultrapassado o limite maximo de contas online com o seguinte ip "..convertIntToIP(getPlayerIp(cid)).."\npor motivos de seguranca todos os accounts managers com esse ip foram kickados\nAnti-Nuker System 2.0") for _,player in ipairs(accm) do doRemoveCreature(player) end end return true end addEvent(antiTumb, 10, cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Exp_Recovery") registerCreatureEvent(cid, "Player_Aura") registerCreatureEvent(cid, "Exp_L") registerCreatureEvent(cid, "owned") registerCreatureEvent(cid, "WarKill") registerCreatureEvent(cid, "WarAttack") registerCreatureEvent(cid, "WarKill") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "Infriendlyfire") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Criticalbob") if getPlayerStorageValue(cid, 48904) == -1 then setPlayerStorageValue(cid, 48904, 0) end registerCreatureEvent(cid, "Baú Maluko") registerCreatureEvent(cid, "ReflectDodge") registerCreatureEvent(cid, "CheckFim") registerCreatureEvent(cid, "EffectOutLogin3") registerCreatureEvent(cid, "OutfitEffect3") registerCreatureEvent(cid, "EffectOutLogin2") registerCreatureEvent(cid, "OutfitEffect2") registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") registerCreatureEvent(cid, "ReflectDodgeroot") doPlayerOpenChannel(cid, 5) doPlayerOpenChannel(cid, 9) doPlayerOpenChannel(cid, 6) doPlayerOpenChannel(cid, 13) doPlayerOpenChannel(cid, 11) doPlayerOpenChannel(cid, 15) doPlayerOpenChannel(cid, 12) registerCreatureEvent(cid, "[EXP] Statue") registerCreatureEvent(cid, "PlayersSummonsCannotDamagePlayer") registerCreatureEvent(cid, "ReflectStone") registerCreatureEvent(cid, "critical") if getPlayerStorageValue(cid, 48913) == -1 then setPlayerStorageValue(cid, 48913, 0) end registerCreatureEvent(cid, "MultipleExp") registerCreatureEvent(cid, "killer") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "CheckVip") registerCreatureEvent(cid, "YouDead") registerCreatureEvent(cid, "DeathPlayer") registerCreatureEvent(cid, "playerDeathChannelLogin") registerCreatureEvent(cid, "Exp_P") registerCreatureEvent(cid, "fullmh") registerCreatureEvent(cid, "MarketLogin") registerCreatureEvent(cid, "Medo") registerCreatureEvent(cid, "ReflectPower") registerCreatureEvent(cid, "CheckBless") registerCreatureEvent(cid, "ReflectDodge") registerCreatureEvent(cid, "HitCritical") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "onPrepareDeath2") registerCreatureEvent(cid, "Vipitemdnt") registerCreatureEvent(cid, "Critical") if getPlayerStorageValue(cid, 48904) == -1 then setPlayerStorageValue(cid, 48904, 0) end registerCreatureEvent(cid, "InfiniteBless") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "reflect") if getPlayerStorageValue(cid, 48903) == -1 then setPlayerStorageValue(cid, 48903, 0) end registerCreatureEvent(cid, "ReflectStone") registerCreatureEvent(cid, "castAttack") registerCreatureEvent(cid, "castHits") registerCreatureEvent(cid, "castLogout") registerCreatureEvent(cid, "checkvip") registerCreatureEvent(cid, "Vipitem") registerCreatureEvent(cid, "Start Skills") registerCreatureEvent(cid, "Vip1") registerCreatureEvent(cid, "ADDV") registerCreatureEvent(cid, "Vip2") registerCreatureEvent(cid, "Tafeioip") registerCreatureEvent(cid, "HeadshotCritical") registerCreatureEvent(cid, "Tafeio") registerCreatureEvent(cid, "Bone") registerCreatureEvent(cid, "VipL") registerCreatureEvent(cid, "VipLog") registerCreatureEvent(cid, "LoginVIP") registerCreatureEvent(cid, "Vipsystem") registerCreatureEvent(cid, "Vipsystem1") registerCreatureEvent(cid, "ProtectLevel") registerCreatureEvent(cid, "lol") registerCreatureEvent(cid, "ExpVipP") registerCreatureEvent(cid, "LOL") registerCreatureEvent(cid, "onPrepareDeath3") registerCreatureEvent(cid, "Anti-Push") registerCreatureEvent(cid, "killer") registerCreatureEvent(cid, "onlinebonus") registerCreatureEvent(cid, "ResetLook") registerCreatureEvent(cid, "Castle") registerCreatureEvent(cid, "castAttack") registerCreatureEvent(cid, "fraglook") registerCreatureEvent(cid, "castHits") registerCreatureEvent(cid, "castLogout") setPlayerStorageValue(cid, 1111, -1) registerCreatureEvent(cid, "antiparalyze") registerCreatureEvent(cid, "miss") registerCreatureEvent(cid, "vocEfeito") registerCreatureEvent(cid, "Tepao") registerCreatureEvent(cid, "PlayerReborn") registerCreatureEvent(cid, "vocEfeito") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "vipacc") registerCreatureEvent(cid, "ZombieAttack") registerCreatureEvent(cid, "efeitodnt") registerCreatureEvent(cid, "addReset") registerCreatureEvent(cid, "AnunciarM") registerCreatureEvent(cid, "Mortes") registerCreatureEvent(cid, "Heart") registerCreatureEvent(cid, "WeaponPar") registerCreatureEvent(cid, "firstmessage") registerCreatureEvent(cid, "fist") registerCreatureEvent(cid, "Amulet Inf") registerCreatureEvent(cid, "Reward") registerCreatureEvent(cid, "CheckVip") registerCreatureEvent(cid, "HeartDrop") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "KillBoss") registerCreatureEvent(cid, "ExpVip") registerCreatureEvent(cid, "look") registerCreatureEvent(cid, "fragslook") registerCreatureEvent(cid, "Arabe") registerCreatureEvent(cid, "MutePlayer") registerCreatureEvent(cid, "TopEffect") registerCreatureEvent(cid, "showKD") registerCreatureEvent(cid, "Playeradvance") registerCreatureEvent(cid, "DeathSystem") registerCreatureEvent(cid, "vipeffects") registerCreatureEvent(cid, "anunciarmorte") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "DodgeSystem") if getPlayerStorageValue(cid, 98798644) == -1 then setPlayerStorageValue(cid, 98798644, 0) end registerCreatureEvent(cid, "owned") registerCreatureEvent(cid, "invencible") if getPlayerStorageValue(cid, 3482101) ~= 0 then setPlayerStorageValue(cid, 3482101, 0) end registerCreatureEvent(cid, "Rankfrags") registerCreatureEvent(cid, "FirstItems") registerCreatureEvent(cid, "Aurea") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "DodgeSystem") if getPlayerStorageValue(cid, 123455678) == -1 then setPlayerStorageValue(cid, 123455678, 0) end registerCreatureEvent(cid, "SkullAmulet") registerCreatureEvent(cid, "DeathList") registerCreatureEvent(cid, "Aurea") registerCreatureEvent(cid, "MonsterMK") registerCreatureEvent(cid, "avisarServer") registerCreatureEvent(cid, "AntiNuker") registerCreatureEvent(cid, "onPrepareDeathinifi") registerCreatureEvent(cid, "Efeitoup") registerCreatureEvent(cid, "MorteAnunciada") registerCreatureEvent(cid, "DeathSystem") registerCreatureEvent(cid, "AntiMC") registerCreatureEvent(cid, "Antimagebombb") registerCreatureEvent(cid, "FragReward") registerCreatureEvent(cid, "pvpsystem") registerCreatureEvent(cid, "savePlayer") registerCreatureEvent(cid, "savePlayer_L") registerCreatureEvent(cid, "Monster") registerCreatureEvent(cid, "forever amulet") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "KillTOPLevel") setFrags(cid) local loginstorage = getPlayerStorageValue(cid, 9999) setPlayerStorageValue(cid, 9999, loginstorage + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "It is yours " .. loginstorage + 1 .. " login to ots") -- Verificar se é primeira vez que loga, pois ao usar storage ele ja começa com -1, -- Então vamos zera-lo para que sua Reputação comece do 0. if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena registerCreatureEvent(cid, "Rankfrags") setFrags(cid) if getPlayerStorageValue(cid, 39722) < 1 then setPlayerStorageValue(cid, 39722, 1) end if getPlayerStorageValue(cid, 12036) == -1 then setPlayerStorageValue(cid, 12036, 1) end return true end
-
Me Ajuda Por Favor [TFS - 0.3.6 - 8.60] Monstro Imortal Não Toma Dano de Nada Nem Por Magia e Arma Que Mata na Hora Essa Não Funciona local percent = 100 -- Set this to 0 to make the monster immortal local monster = "Rotworm" function onStatsChange(cid, attacker, type, combat, value) if (type == STATSCHANGE_HEALTHLOSS) and isCreature(cid) and getCreatureName(cid) == monster then -- Prevent health loss value = 100 doTargetCombatHealth(attacker, cid, combat, -value, 255) doSendAnimatedText(getCreaturePos(cid), "Immortal", TEXTCOLOR_RED) return false end return true end @Holograma
-
Como Funciona em cada 12 12 horas o console do distro é limpo clean log? por que abri esse topico eu eprcebi conforme vai se passando as horas online server fica lag por causa do log do distro eu queria um sistema que limpasse log do distro sem precisa click clean log fosse automático em 12 horas.
-
EU QUERIA QUE QUANDO MATASSE PLAYER APARECESSE HEADSHOT! local chance_percent = 100 -- Chance percent for critical hit local extra_damage_percent = 1000 -- Extra Damage Percent function onLogin(cid) registerCreatureEvent(cid, "HeadshotCritical") return true end function onStatsChange(cid, attacker, type, combat, value) if type ~= STATSCHANGE_HEALTHLOSS then return true end if isPlayer(attacker) and getPlayerStorageValue(cid, 71257) < 1 then if math.random(100) <= chance_percent then local dmg = value * (extra_damage_percent / 100) setPlayerStorageValue(cid, 71257, 1) doTargetCombatHealth(attacker, cid, combat, -dmg, -dmg, 255) setPlayerStorageValue(cid, 71257, -1) doCreatureSay(cid, "HEADSHOT!", TALKTYPE_MONSTER) return false end end return true end
-
[C++] -=[TFS]=- 0.3.6 - 8.60 - PROBLEMA ENCONTRADO FOI NO PLAYER.CPP O ITEM AGORA CAI SLOT DO PLAYER NÃO CAI MAIS NO CHÃO AQUI ESTA PROBLEMA O ITEM CAI NO SLOT DO PLAYER ELE AGRUPA ITENS EMPILHA AUTOMATICAMENTE MAIS SÓ NO SLOT ELE NAO EMPILHA NA BACKPACK Cylinder* Player::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t& flags) { if (index == 0 /* drop to capacity window */ || index == INDEX_WHEREEVER) { *destItem = NULL; const Item* item = thing->getItem(); if (!item) return this; // Tentar encontrar um slot apropriado no inventário for (int32_t i = SLOT_FIRST; i < SLOT_LAST; ++i) { if (!inventory[i]) { if (__queryAdd(i, item, item->getItemCount(), 0) == RET_NOERROR) { index = i; return this; } } else if (inventory[i] != tradeItem) { if (Item* inventoryItem = inventory[i]) { // Tentar empilhar itens if (inventoryItem->getID() == item->getID() && inventoryItem->isStackable() && inventoryItem->getItemCount() < 100) { *destItem = inventoryItem; index = i; return this; } } } } // Tentar adicionar aos containers do inventário std::list<std::pair<Container*, int32_t> > deepList; for (int32_t i = SLOT_FIRST; i < SLOT_LAST; ++i) { if (inventory[i] == tradeItem) continue; if (Container* container = dynamic_cast<Container*>(inventory[i])) { if (container->__queryAdd(-1, item, item->getItemCount(), 0) == RET_NOERROR) { index = INDEX_WHEREEVER; *destItem = NULL; return container; } deepList.push_back(std::make_pair(container, 0)); } } // Verificar mais profundamente nos containers int32_t deepness = g_config.getNumber(ConfigManager::PLAYER_DEEPNESS); for (std::list<std::pair<Container*, int32_t> >::iterator dit = deepList.begin(); dit != deepList.end(); ++dit) { Container* c = (*dit).first; if (!c || c->empty()) continue; int32_t level = (*dit).second; for (ItemList::const_iterator it = c->getItems(); it != c->getEnd(); ++it) { if ((*it) == tradeItem) continue; if (Container* subContainer = dynamic_cast<Container*>(*it)) { if (subContainer->__queryAdd(-1, item, item->getItemCount(), 0) == RET_NOERROR) { index = INDEX_WHEREEVER; *destItem = NULL; return subContainer; } if (deepness < 0 || level < deepness) deepList.push_back(std::make_pair(subContainer, (level + 1))); } } } // Se não encontrou lugar adequado, retorna this return this; } Thing* destThing = __getThing(index); if (destThing) *destItem = destThing->getItem(); if (Cylinder* subCylinder = dynamic_cast<Cylinder*>(destThing)) { index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } return this; }
-
Não consegui acha id channel npcs @Holograma cryingdamson 0.3.6 (8.60) V8.2 Source.rar
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.