Tudo que Mateus Robeerto postou
-
Botar EXP no codigo da source antes do numeros
void Creature::onGainExperience(double& gainExp, bool fromMonster, bool multiplied) { if(gainExp <= 0) return; if(master) { gainExp = gainExp / 2; master->onGainExperience(gainExp, fromMonster, multiplied); } else if(!multiplied) gainExp *= g_config.getDouble(ConfigManager::RATE_EXPERIENCE); int16_t color = g_config.getNumber(ConfigManager::EXPERIENCE_COLOR); if(color < 0) color = random_range(0, 255); std::stringstream ss; ss << "EXP: " << (uint64_t)gainExp; g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str()); } tentar ai.
-
Botar EXP no codigo da source antes do numeros
void Creature::onGainSharedExperience(double& gainExp, bool fromMonster, bool multiplied) { if(gainExp <= 0) return; if(master) { gainExp = gainExp / 2; master->onGainSharedExperience(gainExp, fromMonster, multiplied); } else if(!multiplied) gainExp *= g_config.getDouble(ConfigManager::RATE_EXPERIENCE); int16_t color = g_config.getNumber(ConfigManager::EXPERIENCE_COLOR); if(color < 0) color = random_range(0, 255); std::stringstream ss; ss << (uint64_t)gainExp; TextMessage msg; msg.addString("EXP: "); msg.addNumber((uint64_t)gainExp); msg.setColor(static_cast<uint8_t>(color)); g_game.addTextMessage(getPosition(), msg); }
-
Botar EXP no codigo da source antes do numeros
void Creature::onGainSharedExperience(double& gainExp, bool fromMonster, bool multiplied) { if(gainExp <= 0) return; if(master) { gainExp = gainExp / 2; master->onGainSharedExperience(gainExp, fromMonster, multiplied); } else if(!multiplied) gainExp *= g_config.getDouble(ConfigManager::RATE_EXPERIENCE); int16_t color = g_config.getNumber(ConfigManager::EXPERIENCE_COLOR); if(color < 0) color = random_range(0, 255); std::stringstream ss; ss << "EXP: " << (uint64_t)gainExp; g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str()); }
-
Rank monstro (Ainda nao foi solucionado]
local monsterRanks = { ['ASTRA'] = {0}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local monsterName = "ASTRA" if monsterRanks[monsterName] ~= nil then local str = getHighscoreString(monsterRanks[monsterName][1]) doShowTextDialog(cid, 6500, str) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Monstro não encontrado no ranking.") end return true end
-
Rank monstro (Ainda nao foi solucionado]
local monsterRanks = { ['ASTRA'] = {0}, } function onSay(cid, words, param) local monsterName = string.upper(param) if monsterRanks[monsterName] ~= nil then str = getHighscoreString((monsterRanks[monsterName][1])) else str = "Monstro não encontrado no ranking." end doShowTextDialog(cid, 6500, str) return TRUE end ???????
-
PEDIDO DE SPELL
poste o seu script aqui..
-
site tibia
Basta baixar a versão XAMPP 7.x ou o UniServer. Em seguida, você pode fazer o download de um Gesior ou Znote. Após colocar na pasta 'htdocs' e configurar o arquivo 'config.php' no seu servidor TFs, ele exibirá rankings, guildas, lojas, etc., de forma simples. 🤷♂️
-
(Resolvido)Alguem ai tem cliente 8.6 estendido ?
Você tem duas opções: pode usar o DLL para ter o client estendido ou, sem o DLL, fazer a alteração no client para ler o cliente estendido. Vou mandar os dois links... ddraw.dll SEM DLL.
-
[TFS 1.x] Crafting System
@priextix Você já adicionou as actions e creaturescripts que eu passei, certo? Agora você precisa ter adicionado aqui também, junto com global.lua... pronto. É só copiar a pasta do seu servidor (data/) e colar aqui. Depois, você deve adicionar no global.lua. craftsystem.lua function Player.isProfession(self, storage) if self:getStorageValue(storage) >= 1 then return true end end craftingProfessionsConfig = { [50501] = { skillName = "Blacksmithing", skillRecipes = { [1] = {item = 2400, skill = 10, storage = 101, mats = {{2554, 1}, {2120, 1}}, time = 5, difficulty = 20}, [2] = {item = 2432, skill = 15, storage = 102, mats = {{2148, 10}, {10608, 10}}, time = 5, difficulty = 20}, [3] = {item = 2178, skill = 20, storage = 103, mats = {{2177, 1}, {1295, 1}, {2146, 3}}, time = 5, difficulty = 40}, [4] = {item = 5944, skill = 20, storage = 104, mats = {{2177, 1}, {1295, 1}, {2150, 3}}, time = 5, difficulty = 40}, [5] = {item = 2363, skill = 25, storage = 105, mats = {{2177, 1}, {2177, 1}, {1295, 1}, {2798, 1}, {2788, 1}}, time = 5, difficulty = 50}, [6] = {item = 10092, skill = 30, storage = 106, mats = {{2677, 3}, {1685, 1}, {2013, 1}, {2015, 1}}, time = 5, difficulty = 60}, [7] = {item = 4864, skill = 35, storage = 107, mats = {{4850, 1}, {2913, 1}, {2144, 1}}, time = 5, difficulty = 40} }, message = "Crafting allows you to create anything from potions to bombs to weapons of the highest caliber. The materials used in crafting can be obtained through gathering and through drops in dungeons and the open world.\n\n" }, [50502] = { skillName = "Alchemy", skillRecipes = { --Based on Shinmaru/Soul4Soul Alchemy's System [1] = {item = 8474, skill = 10, storage = 201, mats = {{2007, 1}, {2795, 1}, {2760, 1}}, time = 5, difficulty = 20}, [2] = {item = 2152, skill = 15, storage = 202, mats = {{2148, 10}, {10608, 2}}, time = 5, difficulty = 20}, [3] = {item = 2178, skill = 20, storage = 203, mats = {{2177, 1}, {1295, 1}, {2146, 3}}, time = 5, difficulty = 40}, [4] = {item = 5944, skill = 20, storage = 204, mats = {{2177, 1}, {1295, 1}, {2150, 3}}, time = 5, difficulty = 40}, [5] = {item = 2363, skill = 25, storage = 205, mats = {{2177, 1}, {2177, 1}, {1295, 1}, {2798, 1}, {2788, 1}}, time = 5, difficulty = 50}, [6] = {item = 10092, skill = 30, storage = 206, mats = {{2677, 3}, {1685, 1}, {2013, 1}, {2015, 1}}, time = 5, difficulty = 60}, [7] = {item = 4864, skill = 35, storage = 207, mats = {{4850, 1}, {2913, 1}, {2144, 1}}, time = 5, difficulty = 40}, [8] = {item = 2276, skill = 40, storage = 208, mats = {{10558, 1}, {2260, 1}, {10554, 1}, {2151, 1}, {5951, 1}, {2265, 1}}, time = 5, difficulty = 40}, [9] = {item = 2160, skill = 45, storage = 209, mats = {{2152, 1}, {2145, 1}, {2146, 1}, {2800, 1}}, time = 5, difficulty = 30}, [10] = {item = 11201, skill = 45, storage = 210, mats = {{2759, 1}, {10565, 1}, {2803, 1}, {2692, 1}}, time = 5, difficulty = 40}, [11] = {item = 5892, skill = 5, storage = 211, mats = {{5468, 1}, {2393, 1}}, time = 5, difficulty = 50}, [12] = {item = 5887, skill = 5, storage = 212, mats = {{5468, 1}, {2487, 1}}, time = 5, difficulty = 50}, [13] = {item = 5888, skill = 5, storage = 213, mats = {{5468, 1}, {2462, 1}}, time = 5, difficulty = 50}, [14] = {item = 5889, skill = 5, storage = 214, mats = {{5468, 1}, {2516, 1}}, time = 5, difficulty = 50}, [15] = {item = 5891, skill = 10, storage = 215, mats = {{2195, 1}, {4265, 1}, {2151, 1}}, time = 5, difficulty = 40}, [16] = {item = 5884, skill = 10, storage = 216, mats = {{2498, 1}, {2498, 1}, {2913, 1}, {5865, 1}}, time = 5, difficulty = 40}, [17] = {item = 5885, skill = 10, storage = 217, mats = {{2475, 1}, {2475, 1}, {2475, 1}, {2475, 1}, {2015, 1}, {5865, 1}}, time = 5, difficulty = 40}, [18] = {item = 7439, skill = 60, storage = 218, mats = {{6558, 1}, {2007, 1}, {4993, 1}, {5480, 1}, {2796, 1}}, time = 5, difficulty = 30}, [19] = {item = 7440, skill = 60, storage = 219, mats = {{6558, 1}, {2007, 1}, {4992, 1}, {3955, 1}, {7250, 1}}, time = 5, difficulty = 30}, [20] = {item = 7443, skill = 60, storage = 220, mats = {{6558, 1}, {2007, 1}, {4994, 1}, {2193, 1}, {2031, 1}}, time = 5, difficulty = 30}, [21] = {item = 7140, skill = 65, storage = 221, mats = {{7141, 1}, {2015, 1}, {5014, 1}, {2235, 1}, {7439, 1}, {7440, 1}, {7443, 1}, {4845, 1}}, time = 5, difficulty = 60}, [22] = {item = 9971, skill = 70, storage = 222, mats = {{10552, 1}, {2157, 1}, {2159, 1}, {5906, 1}}, time = 5, difficulty = 50}, [23] = {item = 2284, skill = 75, storage = 223, mats = {{10523, 1}, {2260, 1}, {10554, 1}, {2151, 1}, {2273, 1}}, time = 5, difficulty = 30}, [24] = {item = 11387, skill = 80, storage = 224, mats = {{2805, 1}, {2798, 1}, {8582, 1}}, time = 5, difficulty = 70}, [25] = {item = 8980, skill = 90, storage = 225, mats = {{5941, 1}, {10559, 1}, {2194, 1}, {2377, 1}}, time = 5, difficulty = 80}, [26] = {item = 2184, skill = 90, storage = 226, mats = {{9942, 1}, {9941, 1}, {9980, 1}, {2445, 1}}, time = 5, difficulty = 80}, [27] = {item = 2352, skill = 90, storage = 227, mats = {{2177, 1}, {2160, 1}, {2544, 1}, {2544, 1}, {2802, 1}}, time = 5, difficulty = 80}, [28] = {item = 9969, skill = 100, storage = 228, mats = {{5741, 1}, {2229, 1}, {5669, 1}, {5809, 1}, {2143, 1}}, time = 5, difficulty = 90}, [29] = {item = 9006, skill = 110, storage = 229, mats = {{8859, 1}, {2289, 1}, {2807, 1}, {10556, 1}, {2545, 1}, {5879, 1}}, time = 5, difficulty = 100}, [30] = {item = 2348, skill = 120, storage = 230, mats = {{2153, 1}, {2154, 1}, {2155, 1}, {2156, 1}, {2158, 1}, {2260, 1}, {2260, 1}, {2600, 1}}, time = 5, difficulty = 100} }, message = "Crafting allows you to create ~" }, [50503] = { skillName = "Inscription", skillRecipes = { [1] = {item = 2400, skill = 10, storage = 301, mats = {{2554, 1}, {2120, 1}}, time = 5, difficulty = 20, attr = {attack = 10, defense = 10}}, [2] = {item = 2432, skill = 15, storage = 302, mats = {{2148, 10}, {10608, 10}}, time = 5, difficulty = 20}, [3] = {item = 2178, skill = 20, storage = 303, mats = {{2177, 1}, {1295, 1}, {2146, 3}}, time = 5, difficulty = 40}, [4] = {item = 5944, skill = 20, storage = 304, mats = {{2177, 1}, {1295, 1}, {2150, 3}}, time = 5, difficulty = 40}, [5] = {item = 2363, skill = 25, storage = 305, mats = {{2177, 1}, {2177, 1}, {1295, 1}, {2798, 1}, {2788, 1}}, time = 5, difficulty = 50}, [6] = {item = 10092, skill = 30, storage = 306, mats = {{2677, 3}, {1685, 1}, {2013, 1}, {2015, 1}}, time = 5, difficulty = 60}, [7] = {item = 4864, skill = 35, storage = 307, mats = {{4850, 1}, {2913, 1}, {2144, 1}}, time = 5, difficulty = 40} }, message = "Crafting allows you to create ~" }, [50504] = { skillName = "Tailoring", skillRecipes = { [1] = {item = 2400, skill = 10, storage = 401, mats = {{2554, 1}, {2120, 1}}, time = 5, difficulty = 20}, [2] = {item = 2432, skill = 15, storage = 402, mats = {{2148, 10}, {10608, 10}}, time = 5, difficulty = 20}, [3] = {item = 2178, skill = 20, storage = 403, mats = {{2177, 1}, {1295, 1}, {2146, 3}}, time = 5, difficulty = 40}, [4] = {item = 5944, skill = 20, storage = 404, mats = {{2177, 1}, {1295, 1}, {2150, 3}}, time = 5, difficulty = 40}, [5] = {item = 2363, skill = 25, storage = 405, mats = {{2177, 1}, {2177, 1}, {1295, 1}, {2798, 1}, {2788, 1}}, time = 5, difficulty = 50}, [6] = {item = 10092, skill = 30, storage = 406, mats = {{2677, 3}, {1685, 1}, {2013, 1}, {2015, 1}}, time = 5, difficulty = 60}, [7] = {item = 4864, skill = 35, storage = 407, mats = {{4850, 1}, {2913, 1}, {2144, 1}}, time = 5, difficulty = 40} }, message = "Crafting allows you to create ~" }, [50505] = { skillName = "Leatherworking", skillRecipes = { [1] = {item = 2400, skill = 10, storage = 501, mats = {{2554, 1}, {2120, 1}}, time = 5, difficulty = 20}, [2] = {item = 2432, skill = 15, storage = 502, mats = {{2148, 10}, {10608, 10}}, time = 5, difficulty = 20}, [3] = {item = 2178, skill = 20, storage = 503, mats = {{2177, 1}, {1295, 1}, {2146, 3}}, time = 5, difficulty = 40}, [4] = {item = 5944, skill = 20, storage = 504, mats = {{2177, 1}, {1295, 1}, {2150, 3}}, time = 5, difficulty = 40}, [5] = {item = 2363, skill = 25, storage = 505, mats = {{2177, 1}, {2177, 1}, {1295, 1}, {2798, 1}, {2788, 1}}, time = 5, difficulty = 50}, [6] = {item = 10092, skill = 30, storage = 506, mats = {{2677, 3}, {1685, 1}, {2013, 1}, {2015, 1}}, time = 5, difficulty = 60}, [7] = {item = 4864, skill = 35, storage = 507, mats = {{4850, 1}, {2913, 1}, {2144, 1}}, time = 5, difficulty = 40} }, message = "Crafting allows you to create ~" }, [50506] = { skillName = "Engineering", skillRecipes = { [1] = {item = 2400, skill = 10, storage = 601, mats = {{2554, 1}, {2120, 1}}, time = 5, difficulty = 20}, [2] = {item = 2432, skill = 15, storage = 602, mats = {{2148, 10}, {10608, 10}}, time = 5, difficulty = 20}, [3] = {item = 2178, skill = 20, storage = 603, mats = {{2177, 1}, {1295, 1}, {2146, 3}}, time = 5, difficulty = 40}, [4] = {item = 5944, skill = 20, storage = 604, mats = {{2177, 1}, {1295, 1}, {2150, 3}}, time = 5, difficulty = 40}, [5] = {item = 2363, skill = 25, storage = 605, mats = {{2177, 1}, {2177, 1}, {1295, 1}, {2798, 1}, {2788, 1}}, time = 5, difficulty = 50}, [6] = {item = 10092, skill = 30, storage = 606, mats = {{2677, 3}, {1685, 1}, {2013, 1}, {2015, 1}}, time = 5, difficulty = 60}, [7] = {item = 4864, skill = 35, storage = 607, mats = {{4850, 1}, {2913, 1}, {2144, 1}}, time = 5, difficulty = 40} }, message = "Crafting allows you to create ~" }, maxSkill = 200, baseRecipeStorage = 50500, extraData = {}, } --[CustomSkill]-- By: Athern function Player.getCustomSkill(self, storage) return self:getStorageValue(storage) end function Player.addCustomSkill(self, skillName, storage) local skillStorage = math.max(10, self:getStorageValue(storage)) local skillTries = math.max(0, self:getStorageValue(storage + 1)) self:setStorageValue(storage, skillStorage + 1) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You advanced to " .. string.lower(skillName) .. " level "..self:getCustomSkill(storage)..".") self:setStorageValue(storage + 1, 0) end function Player.addCustomSkillTry(self, skillName, storage) local skillStorage = math.max(10, self:getStorageValue(storage)) local skillTries = math.max(0, self:getStorageValue(storage + 1)) self:setStorageValue(storage + 1, skillTries + 1) if skillTries > math.floor(20 * math.pow(1.1, (skillStorage - 11)) / 10) then self:addCustomSkill(skillName, storage) end end function Player.getCustomSkillPercent(self, storage) local skillStorage = math.max(10, self:getStorageValue(storage)) local skillTries = math.max(0, self:getStorageValue(storage + 1)) local triesNeeded = math.floor(20 * math.pow(1.1, (skillStorage - 11)) / 10) local percent = math.floor(100 * (1 - skillTries / triesNeeded)) if percent > 1 and percent <= 100 then return percent else percent = 1 return percent end end --[/CustomSkill]-- Abra data/global.lua e cole na primeira linha. dofile("data/craftsystem.lua")
-
TFS 1.5 {8.6} Nekiro Downgrade com montarias e modal window apenas para OTClient.
That's strange... I compiled it and there were no errors at all. I'm using Windows.
-
Error script boss
tentou onDeath? local config = { NameBoss = "Boss Hits", rewardItem1 = {itemID = 8300, chance = 10}, -- 10% de chance de vim esse item rewardItem2 = {itemID = 8301, chance = 20}, -- 20% de chance de vim esse item rewardItem3 = {itemID = 8302, chance = 30}, -- 30% de chance de vim esse item rewardItem4 = {itemID = 8303, chance = 40}, -- 40% de chance de vim esse item effect = CONST_ME_MAGIC_RED } function onKill(cid, target) if isMonster(target) then local bossName = getCreatureName(target) print("Nome do Boss: " .. bossName) if bossName == config.NameBoss then local chanceToDropItem = math.random(1, 100) print("Chance de drop: " .. chanceToDropItem) local rewardItemID = nil if chanceToDropItem <= config.rewardItem1.chance then rewardItemID = config.rewardItem1.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance then rewardItemID = config.rewardItem2.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance + config.rewardItem3.chance then rewardItemID = config.rewardItem3.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance + config.rewardItem3.chance + config.rewardItem4.chance then rewardItemID = config.rewardItem4.itemID end if rewardItemID then doPlayerAddItemEx(cid, rewardItemID, 1) doSendMagicEffect(getCreaturePosition(cid), config.effect) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você recebeu um item raro como recompensa por derrotar o Boss!") print("Item dropado: " .. rewardItemID) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não recebeu nenhum item como recompensa por derrotar o Boss.") end else print("Boss não encontrado no banco de dados ou não é 'Boss Hits'.") end end end
-
Error script boss
local config = { NameBoss = "Boss Hits", rewardItem1 = {itemID = 8300, chance = 10}, -- 10% de chance de vim esse item rewardItem2 = {itemID = 8301, chance = 20}, -- 20% de chance de vim esse item rewardItem3 = {itemID = 8302, chance = 30}, -- 30% de chance de vim esse item rewardItem4 = {itemID = 8303, chance = 40}, -- 40% de chance de vim esse item effect = CONST_ME_MAGIC_RED } function onDeath(cid, corpse, deathList) local bossName = getCreatureName(cid) if bossName == config.NameBoss then local chanceToDropItem = math.random(1, 100) print("Chance de drop: " .. chanceToDropItem) local rewardItemID = nil if chanceToDropItem <= config.rewardItem1.chance then rewardItemID = config.rewardItem1.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance then rewardItemID = config.rewardItem2.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance + config.rewardItem3.chance then rewardItemID = config.rewardItem3.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance + config.rewardItem3.chance + config.rewardItem4.chance then rewardItemID = config.rewardItem4.itemID end if rewardItemID then doPlayerAddItemEx(deathList[1], rewardItemID, 1) doSendMagicEffect(getCreaturePosition(deathList[1]), config.effect) doPlayerSendTextMessage(deathList[1], MESSAGE_EVENT_DEFAULT, "Você recebeu um item raro como recompensa por derrotar o Boss!") print("Item dropado: " .. rewardItemID) else doPlayerSendTextMessage(deathList[1], MESSAGE_EVENT_DEFAULT, "Você não recebeu nenhum item como recompensa por derrotar o Boss.") end end end Deve registrar no monstro. Procure por esta linha </monster> antes do final e adicione. Por exemplo, assim aqui <script> <event name="Boss Hits"/> </script> </monster> ou aqui funçao onKill.. local config = { NameBoss = "Boss Hits", rewardItem1 = {itemID = 8300, chance = 10}, -- 10% de chance de vim esse item rewardItem2 = {itemID = 8301, chance = 20}, -- 20% de chance de vim esse item rewardItem3 = {itemID = 8302, chance = 30}, -- 30% de chance de vim esse item rewardItem4 = {itemID = 8303, chance = 40}, -- 40% de chance de vim esse item effect = CONST_ME_MAGIC_RED } function onKill(cid, target) if isMonster(target) then local bossName = getCreatureName(target) print("Nome do Boss: " .. bossName) if bossName == config.NameBoss then local chanceToDropItem = math.random(1, 100) print("Chance de drop: " .. chanceToDropItem) local rewardItemID = nil if chanceToDropItem <= config.rewardItem1.chance then rewardItemID = config.rewardItem1.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance then rewardItemID = config.rewardItem2.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance + config.rewardItem3.chance then rewardItemID = config.rewardItem3.itemID elseif chanceToDropItem <= config.rewardItem1.chance + config.rewardItem2.chance + config.rewardItem3.chance + config.rewardItem4.chance then rewardItemID = config.rewardItem4.itemID end if rewardItemID then doPlayerAddItemEx(cid, rewardItemID, 1) doSendMagicEffect(getCreaturePosition(cid), config.effect) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você recebeu um item raro como recompensa por derrotar o Boss!") print("Item dropado: " .. rewardItemID) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não recebeu nenhum item como recompensa por derrotar o Boss.") end else print("Boss não encontrado no banco de dados ou não é 'Boss Hits'.") end end end
-
Error script boss
function onKill(player, target) if isMonster(target) then local bossName = getCreatureName(target) print("Nome do Boss: " .. bossName) if bossName == "Boss Hits" then local chanceToDropItem = math.random(1, 100) print("Chance de drop: " .. chanceToDropItem) if chanceToDropItem <= 50 then local itemsToDrop = { 1234, 5678, 91011 } local randomItemID = itemsToDrop[math.random(1, #itemsToDrop)] local newItem = doCreateItem(randomItemID, 1) if newItem then doPlayerAddItem(player, newItem) doSendMagicEffect(getCreaturePosition(player), CONST_ME_MAGIC_RED) doPlayerSendTextMessage(player, MESSAGE_EVENT_DEFAULT, "Você recebeu um item raro como recompensa por derrotar o Boss!") print("Item dropado: " .. randomItemID) end else doPlayerSendTextMessage(player, MESSAGE_EVENT_DEFAULT, "Você não recebeu nenhum item como recompensa por derrotar o Boss.") end else print("Boss não encontrado no banco de dados ou não é 'Boss Hits'.") end end end Tirei a função isPlayer, mantendo apenas isMonster. Também adicionei um print para fins de depuração e ele será enviado para o seu console. Assim, será possível identificar onde está o erro. Isso ajudará a entender, e poderei corrigi-lo na próxima etapa. Por favor, faça o teste e me envie o console. O que for indicado no print sobre se foi encontrado ou não, etc
-
Error script boss
registrou no login.lua?
-
Error script boss
function onKill(player, target) if isPlayer(target) and isMonster(target) then local bossName = getCreatureName(target) local chanceToDropItem = math.random(1, 100) -- Gera um número aleatório entre 1 e 100 if bossName == "Boss Hits" then if chanceToDropItem <= 50 then -- 50% de chance de receber um item local itemsToDrop = { 1234, -- ID do primeiro item 5678, -- ID do segundo item 91011 -- ID do terceiro item, e assim por diante } local randomItemID = itemsToDrop[math.random(1, #itemsToDrop)] local newItem = doCreateItem(randomItemID, 1) if newItem then doPlayerAddItem(player, newItem) doPlayerSendTextMessage(player, MESSAGE_EVENT_DEFAULT, "Você recebeu um item raro como recompensa por derrotar o Boss!") end else doPlayerSendTextMessage(player, MESSAGE_EVENT_DEFAULT, "Você não recebeu nenhum item como recompensa por derrotar o Boss.") end end end end tentar!
-
Error script boss
Que diabos? Este script foi feito para o TFS 1.x, não para o TFS 0.4. Vamos verificar se o script foi feito para o TFS 1.x ou 0.4. Preste atenção aqui. TFS 1.X. local player = Player(cid) player:addItem(itemData.itemID, 1) TFS 0.4. doPlayerAddItem(cid, itemData.itemID, 1) o resto é quase igual. o script pronto aqui.. local config = { monster = {"Boss"}, -- nome dos monstros, separados por vírgulas. items = { {itemID = 9693, chance = 10}, -- item [1] -- 10% de chance {itemID = 9971, chance = 5}, -- item [2] -- 5% de chance -- Adicione o resto dos itens aqui }, effect = 27, -- efeito ao matar o monstro. } function onKill(cid, target) if isInArray(config.monster, getCreatureName(target)) then if isPlayer(target) then local droppedItem = false for _, itemData in ipairs(config.items) do if math.random(100) <= itemData.chance then doPlayerAddItem(cid, itemData.itemID, 1) droppedItem = true break -- Se um item cair, saia do loop. end end if droppedItem then doBroadcastMessage("O Boss morreu e você obteve um item!", MESSAGE_STATUS_WARNING) else doBroadcastMessage("O Boss morreu, mas você não obteve nenhum item.", MESSAGE_STATUS_WARNING) end doSendMagicEffect(getThingPos(cid), config.effect) end end return true end
-
ERRO AO COMPILAR TFS 1.5 10.98
TFS 1.5 para 10.98? Não existe. Eu só sei que existem as versões 1.4.2 e 1.4.3 para 10.98. No entanto, o TFS 1.5 é como veio a versão 12.97. Também sei sobre o TFS 1.5 que é uma modificação chamada Nekiro Drowngrage, que combina elementos das versões 7.72, 8.0 e 8.6.
-
Ajuda com storage
local config = { storage = 12348, bossName = "Wrath of Emperor", rewardItemID = 2400, rewardOutfitID = 128, rewardOutfitAddons = 3, effect = CONST_ME_BATS } local creatureevent = CreatureEvent("Wrath of Emperor") function creatureevent.onKill(creature, target) local bossName = config.bossName local storageValue = config.storage local player = Player(creature.uid) if target:getName() == bossName then if player:getStorageValue(storageValue) ~= 1 then player:setStorageValue(storageValue, 1) giveRewardToPlayer(player) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Parabéns! Você matou o boss Wrath of Emperor e recebeu sua recompensa automaticamente.") else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você já recebeu sua recompensa por matar o boss Wrath of Emperor.") end end return true end function giveRewardToPlayer(player) player:addOutfit(config.rewardOutfitID, config.rewardOutfitAddons) player:addItem(config.rewardItemID, 1) end creatureevent:register() Revscriptsys, algo assim que voce tava queria? tentar!
-
[TFS 1.x] Crafting System
Estou no trabalho, quando chegar em casa, vou resolver isso e envio aqui, sim. actions: craftsys.lua. function onUse(player, item, fromPosition, itemEx, toPosition) function capitalizar(str) return (str:gsub("(%l)(%w*)", function(a,b) return string.upper(a)..b end)) end local receitas = craftingProfessionsConfig[item.actionid].skillRecipes local modal = ModalWindow(item.actionid, ""..craftingProfessionsConfig[item.actionid].skillName..".", craftingProfessionsConfig[item.actionid].message) if item.itemid == 8046 and isInArray({50501, 50502, 50503, 50504, 50505, 50506}, item.actionid) then if getCreatureCondition(player, CONDITION_SPELLCOOLDOWN, 160) then return player:sendCancelMessage("Você já está fabricando, aguarde!.") end for i = 1, #receitas do modal:addChoice(i, capitalizar(getItemName(receitas[i].item))) end craftingProfessionsConfig.extraData[player:getId()] = { lastPos = Item(item.uid):getPosition() } if modal:getChoiceCount() ~= 0 then modal:addButton(1, "Criar") modal:setDefaultEnterButton(1) modal:addButton(2, "Cancelar") modal:setDefaultEscapeButton(2) modal:addButton(3, "Materiais") modal:sendToPlayer(player) end end return true end creaturescripts. crafting.lua function onModalWindow(player, modalWindowId, buttonId, choiceId) if not isInArray({50501, 50502, 50503, 50504, 50505, 50506}, modalWindowId) or buttonId == 2 then return false end local count = 0 local recipes = craftingProfessionsConfig[modalWindowId].skillRecipes if buttonId == 3 then local str = ""..capAll(getItemName(recipes[choiceId].item)).."\n Skill Needed: "..recipes[choiceId].skill.." - Point Cost: 1p\n\nMaterials:" for i = 1, #recipes[choiceId].mats do str = str.."\n- "..capAll(getItemName(recipes[choiceId].mats[i][1])).." ("..player:getItemCount(recipes[choiceId].mats[i][1]).."/"..recipes[choiceId].mats[i][2]..")" end if str ~= "" then player:showTextDialog(recipes[choiceId].item, str) end return true end for i = 1, #recipes[choiceId].mats do if player:getItemCount(recipes[choiceId].mats[i][1]) >= recipes[choiceId].mats[i][2] then count = count + 1 end end if count == #recipes[choiceId].mats then local craftCD = Condition(CONDITION_SPELLCOOLDOWN) craftCD:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) craftCD:setParameter(CONDITION_PARAM_SUBID, 160) craftCD:setParameter(CONDITION_PARAM_TICKS, recipes[choiceId].time * 1000) player:addCondition(craftCD) player:say("Crafting...", TALKTYPE_MONSTER_SAY) local itemPos = craftingProfessionsConfig.extraData[player:getId()].lastPos function sendAnimation(times) itemPos:sendMagicEffect(CONST_ME_BLOCKHIT) if times == 0 then return true end addEvent(sendAnimation, 1000, times - 1) end sendAnimation(recipes[choiceId].time) for i = 1, count do player:removeItem(recipes[choiceId].mats[i][1], recipes[choiceId].mats[i][2]) end addEvent(function(id) local player = Player(id) if player then local craftedItem = player:addItem(recipes[choiceId].item, 1) if craftedItem then player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "You've successfully crafted "..craftedItem:getArticle().." "..capAll(craftedItem:getName())..".") craftedItem:setAttribute(ITEM_ATTRIBUTE_NAME, "crafted "..craftedItem:getName()) player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_RED) if craftedItem:getType():getDescription() ~= "" then craftedItem:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, craftedItem:getType():getDescription().."\nCrafted by "..player:getName()..".") else craftedItem:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Crafted by "..player:getName()..".") end if craftedItem:getType():getAttack() > 0 and recipes[choiceId].attr ~= nil and recipes[choiceId].attr.attack ~= nil then craftedItem:setAttribute(ITEM_ATTRIBUTE_ATTACK, craftedItem:getType():getAttack() + recipes[choiceId].attr.attack) end if craftedItem:getType():getDefense() > 0 and recipes[choiceId].attr ~= nil and recipes[choiceId].attr.defense ~= nil then craftedItem:setAttribute(ITEM_ATTRIBUTE_DEFENSE, craftedItem:getType():getDefense() + recipes[choiceId].attr.defense) end if craftedItem:getType():getExtraDefense() > 0 and recipes[choiceId].attr ~= nil and recipes[choiceId].attr.extradefense ~= nil then craftedItem:setAttribute(ITEM_ATTRIBUTE_EXTRADEFENSE, craftedItem:getType():getExtraDefense() + recipes[choiceId].attr.extradefense) end if craftedItem:getType():getArmor() > 0 and recipes[choiceId].attr ~= nil and recipes[choiceId].attr.armor ~= nil then craftedItem:setAttribute(ITEM_ATTRIBUTE_ARMOR, craftedItem:getType():getArmor() + recipes[choiceId].attr.armor) end if craftedItem:getType():getHitChance() > 0 and recipes[choiceId].attr ~= nil and recipes[choiceId].attr.hitchance ~= nil then craftedItem:setAttribute(ITEM_ATTRIBUTE_HITCHANCE, craftedItem:getType():getHitChance() + recipes[choiceId].attr.hitchance) end if craftedItem:getType():getShootRange() > 0 and recipes[choiceId].attr ~= nil and recipes[choiceId].attr.shootrange ~= nil then craftedItem:setAttribute(ITEM_ATTRIBUTE_SHOOTRANGE, craftedItem:getType():getShootRange() + recipes[choiceId].attr.shootrange) end end end end, recipes[choiceId].time * 1000, player:getId()) else player:sendCancelMessage("You don't have all the materials to craft this item.") end return true end Pronto, removi a restrição de aprender + customSkills. Agora você pode clicar quando quiser, aproveitar e se divertir com o sistema. Realmente, o sistema está tão fluido. :)
-
[TFS 1.x] Crafting System
function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if itemEx.itemid == 8300 then local storageValue = player:getStorageValue(50501) if storageValue == -1 then player:setStorageValue(50501, 1) player:sendTextMessage(MESSAGE_INFO_DESCR, "Parabéns! Você aprendeu suas habilidades de cralfing e agora pode ir cralfing.") else player:sendTextMessage(MESSAGE_INFO_DESCR, "Você já aprendeu suas habilidades de cralfing.") end else player:sendCancelMessage("Você precisa clicar no item correto para aprender suas habilidades de cralfing.") end return true end Se você não quer aprender para poder fazer craft, eu posso remover e te enviar o script. É apenas CreatureScript mesmo.
- [TFS 1.3] Otg Server - 11x / Otcv8 / Otc Menah / 12.40 (BASE CLEAN)
-
(Resolvido)Anti mc pvp - sistema para prender quem mata usando mc
TAG XML. <event type="login" name="AntiMc" event="script" value="AntiMc.lua"/> LUA. function doKickPlayerIf(cid) if isPlayer(cid) then doRemoveCreature(cid) return true end return false end function onLogin(cid) local ips_permitidos = 3 -- configure aqui quantos jogadores podem logar com o mesmo ip local players = getPlayersOnline() local playerip = getPlayerIp(cid) local i = 0 for _,pid in ipairs(players) do if getPlayerIp(pid) == playerip then i = i + 1 end end if i > ips_permitidos then doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,'Seu IP foi detectado pelo Anti-MC. Voce sera kickado em 5 segundos.') mayNotMove(cid,true) addEvent(doKickPlayerIf,5000,cid) end return true end Quando for postar na próxima vez, não esqueça de incluir informações sobre o seu TFS e a versão, ok?
-
[TFS 1.x] Crafting System
Qual é o seu TFS? Posso criar um script para você, onde ao clicar no item, você aprende e ganha acesso à criafing
-
Ajuda Spells
tentar. local SKILL_NAME = "Quick Attack" function onTargetCreature_QuickAttack(cid, target) local cidPos, pos = getCreaturePosition(cid), getPositionAdjacent(cid, getCreaturePosition(target), false) if (pos) then doSendDistanceShoot(cidPos, pos, PROJECTILE_GRAVEL) doSendMagicEffect(cidPos, EFFECT_TELEPORT_FRAME) doTeleportThing(cid, pos, false) doSendMagicEffect(pos, EFFECT_TELEPORT_FRAME) end doSkillDamage(cid, target, SKILL_NAME) end local combat = createCombatObject() setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature_QuickAttack") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
-
[TFS 1.x] Crafting System
Você precisa criar um script para o NPC. Por exemplo, 'hi', 'Blacksmithing', 'yes'. Você recebe um storage e pode fazer criação normalmente. Ou você pode criar um script para o 'onUse', onde ao clicar no item, você recebe um storage e pode fazer a criação tambem. Se não quiser, basta remover essa linha. O problema já está resolvido if not player:isProfession(item.actionid) then return player:sendCancelMessage("You need to learn "..craftingProfessionsConfig[item.actionid].skillName.." before using this.") end