Ir para conteúdo

Muvuka

Artesão
  • Total de itens

    110
  • Registro em

  • Última visita

Tudo que Muvuka postou

  1. call over flow aparece no console
  2. 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
  3. TO COM PROBLEMA SOUL SYSTEM ELE SÓ CAPTURA SOUL DA CRITURA PRA ATIVA NA ARMA ELE NÃO ATIVA A AURA ESSE É O PROBLEMA QUE ELE NÃO ATIVA AURA!? Soul System.xml Action.lua Auras.lua Creaturescript.lua Soul.lua
  4. 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
  5. https://chatgpt.com/c/66e762f9-41fc-800c-ba26-843399a2864d https://chatgpt.com/c/66e762f9-41fc-800c-ba26-843399a2864d
  6. [PROGRAMAÇÃO] [Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb. Para TFS 0.3.6 Tibia 8.60 Me Ajuda Por Favor
  7. -=[TFS - 0.3.6 - 8.60]=- COMO FAÇO PRA CTRL + Z E CTRL + J QUANDO REPORTA CRIA ARQUIVO LOG NA PASTA LOGS "LOG PLAYERS SERVE PRA CTRL + J" "E LOG CTRL + Z SERVE PRA REPORT BUGS"
  8. 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>
  9. 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
  10. rnd = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."}, efeito sai bugado sai assim rnd = "´ . ,", ". Ã ,", "` . ,", ", ´ ."
  11. [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>
  12. Holograma eu queria tutorial script gema igual fox world com uma unica gema ID: 2156 QUE FUNCIONE PRA TODAS AS VOCAÇÃO QUE USA 1 MAGIA QUE MATA PLAYER NA HORA E O EFEITO DA GEMA rnd = {"´ . ,", ". ´ ,", "` . ,", ", ` ."}, MULTICOLOR @Holograma
  13. <event type="statschange" name="ImmortalMonster"/> </monster> eu adicionei antes do </monster> e não pego
  14. 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
  15. 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
  16. 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
  17. 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.
  18. 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
  19. [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; }
  20. Não consegui acha id channel npcs @Holograma cryingdamson 0.3.6 (8.60) V8.2 Source.rar
  21. -=[TFS]=- 0.3.6 - 8.60 - NPC Promotion ta Dando Erro no Console e Não Salva Vocação Fica de Primeira Com a Vocação Depois Quando Desloga e Loga Some local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local vocation = { [2] = 6, [3] = 7, [4] = 8 } 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 = cid msg = string.lower(msg) local level = 717217 if isInArray({"promotion", "promot", "promo"}, msg) then selfSay('Voce precisa ter 100 [VIP COINS] e estar no level 717217!', cid) talkState[talkUser] = 1 elseif msg == "yes" and talkState[talkUser] == 1 then local playerVocation = getPlayerVocation(cid) if vocation[playerVocation] then if getPlayerLevel(cid) >= level then if getPlayerItemCount(cid, 11192) >= 100 then doPlayerRemoveItem(cid, 11192, 100) local newVocationId = vocation[playerVocation] doPlayerSetVocation(cid, newVocationId) doSendMagicEffect(getPlayerPosition(cid), 12) selfSay("Parabens, voce foi promovido!", cid) else selfSay("Voce nao tem 100 [VIP COINS] suficientes para ser promovido.", cid) end else selfSay("Desculpe, voce precisa estar no level " .. level .. " ou acima para ser promovido!", cid) end else selfSay("Desculpe, voce não pode receber promocao.", cid) end talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) data/npc/scripts/promotion.lua:15: in function <data/npc/scripts/promotion.lua:15> [20/07/2024 08:57:34] [Error - Npc interface] [20/07/2024 08:57:34] data/npc/scripts/promotion.lua:onThink [20/07/2024 08:57:34] Description: [20/07/2024 08:57:34] (luaGetNpcDistanceTo) Thing not found [20/07/2024 08:57:34] [Error - Npc interface] [20/07/2024 08:57:35] data/npc/scripts/promotion.lua:onThink [20/07/2024 08:57:35] Description: [20/07/2024 08:57:35] (luaGetCreatureName) Creature not found [20/07/2024 08:57:35] [Error - Npc interface] [20/07/2024 08:57:35] data/npc/scripts/promotion.lua:onThink [20/07/2024 08:57:35] Description: [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:301: bad argument #3 to 'gsub' (string/function/table expected) [20/07/2024 08:57:35] stack traceback: [20/07/2024 08:57:35] [C]: in function 'gsub' [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:301: in function 'parseMessage' [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:538: in function 'onWalkAway' [20/07/2024 08:57:35] data/npc/lib/npcsystem/npchandler.lua:473: in function 'onThink' [20/07/2024 08:57:35] data/npc/scripts/promotion.lua:15: in function <data/npc/scripts/promotion.lua:15>
  22. -=[TFS]=- 0.3.6 - 8.60 - Alguém Sabe o ID do Channel NPCs @Holograma
  23. <talkaction words="!guildrank" event="script" value="guildrank.lua"/> TA DANDO ESSE ERRO OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: no such column: guild_id (SELECT level, guild_id FROM players WHERE guild_id > 0 AND level > 10 ORDER BY level DESC) function onSay(cid, words, param) local guilds = {} local guild_rank = {} -- Seleciona o level e a guild de cada jogador com guild e com level maior que 10, ordenados pelo level local query = db.getResult("SELECT level, guild_id FROM players WHERE guild_id > 0 AND level > 10 ORDER BY level DESC") -- Caso nenhum jogador seja selecionado, retorna verdadeiro if query:getID() == -1 then return true end repeat local level = query:getDataInt("level") local guild_id = query:getDataInt("guild_id") -- Cria uma tabela dentro da tabela guilds para cada guilda if not guilds[guild_id] then guilds[guild_id] = {level = level, members = 1} -- Se a tabela já existir e o número de membros for menor que 10, soma o level e +1 ao número de membros elseif guilds[guild_id].members < 10 then guilds[guild_id].level = guilds[guild_id].level + level guilds[guild_id].members = guilds[guild_id].members + 1 end -- Termina se não existirem mais resultados until not query:next() query:free() -- Passa os resultados obtidos para a tabela guild_rank, para ordená-la com table.sort for i, k in pairs(guilds) do table.insert(guild_rank, {id = i, level = k.level}) end -- Ordena a tabela guild_rank de acordo com a soma dos levels table.sort(guild_rank, function(a, b) return a.level > b.level end) local i = 0 local str = ' Guild Rank\n' -- Crie uma string com o nome das guildas em um ranking for _, info in pairs(guild_rank) do i = i + 1 str = str .. i .. ' - '.. getGuildNameById(info.id) .. ' - ' .. info.level .. '\n' if i == 10 then break end end -- Se algum erro ocorrer e o ranking não tiver informações, manda a mensagem "No Guild Information..." local ret = str ~= ' Guild Rank\n' and str or "No guild information to be displayed." doPlayerPopupFYI(cid, ret) return true end
  24. bool Player::canWalkthrough(const Creature* creature) const { if(creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if(!player) return false; if((((g_game.getWorldType() == WORLD_TYPE_NO_PVP && player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess())) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); }
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...