Solutions
-
Mateus Robeerto's post in (Resolvido)Reset Look Database was marked as the answerOk, fácil então... Procure essa linha
function Player:onLook(thing, position, distance) É só prosseguir com cuidado, ok?
function Player:onLook(thing, position, distance) local description = 'You see ' if thing:isItem() then if thing.actionid == 5640 then description = description .. 'a honeyflower patch.' elseif thing.actionid == 5641 then description = description .. 'a banana palm.' else description = description .. thing:getDescription(distance) end local itemType = thing:getType() if (itemType and itemType:getImbuingSlots() > 0) then local imbuingSlots = "Imbuements: (" for i = 1, itemType:getImbuingSlots() do local specialAttr = thing:getSpecialAttribute(i) local time = 0 if (thing:getSpecialAttribute(i+3)) then time = getTime(thing:getSpecialAttribute(i+3)) end if (specialAttr) then if (i ~= itemType:getImbuingSlots()) then imbuingSlots = imbuingSlots.. "" ..specialAttr.." " ..time..", " else imbuingSlots = imbuingSlots.. "" ..specialAttr.." " ..time..")." end else if (i ~= itemType:getImbuingSlots()) then imbuingSlots = imbuingSlots.. "Empty Slot, " else imbuingSlots = imbuingSlots.. "Empty Slot)." end end end description = string.gsub(description, "It weighs", imbuingSlots.. "\nIt weighs") end --[[-- KD look if thing:isCreature() and thing:isPlayer() then description = string.format("%s\n [PVP Kills: %d] \n [PVP Deaths: %d] \n", description, math.max(0, thing:getStorageValue(167912)), math.max(0, thing:getStorageValue(167913))) end end--]] --[[-- MARRY if LOOK_MARRIAGE_DESCR and thing:isCreature() then if thing:isPlayer() then description = description .. self:getMarriageDescription(thing) end end--]] elseif thing:isPlayer() then local playerGuid = thing:getGuid() local query = db.storeQuery("SELECT `resets` FROM `players` WHERE `id` = " .. playerGuid) if query then local playerDescription = result.getDataString(query, "resets") description = string.format("%s\n[ Resets: %s ]", description, playerDescription) print(string.format("[Player ID: %s] Resets: %s", playerGuid, playerDescription)) else print(string.format("[Player ID: %s] Falha na consulta ao banco de dados", playerGuid)) end else description = description .. thing:getDescription(distance) end -- KD look if thing:isCreature() and thing:isPlayer() then description = string.format("%s\n [PVP Kills: %d] \n [PVP Deaths: %d] \n", description, math.max(0, thing:getStorageValue(167912)), math.max(0, thing:getStorageValue(167913))) end -- MARRY if LOOK_MARRIAGE_DESCR and thing:isCreature() then if thing:isPlayer() then description = description .. self:getMarriageDescription(thing) end end if self:getGroup():getAccess() then if thing:isItem() then description = string.format('%s\nItem ID: %d', description, thing.itemid) local actionId = thing.actionid if actionId ~= 0 then description = string.format('%s, Action ID: %d', description, actionId) end local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID) if uniqueId > 0 and uniqueId < 65536 then description = string.format('%s, Unique ID: %d', description, uniqueId) end description = description .. '.' local itemType = thing:getType() local transformEquipId = itemType:getTransformEquipId() local transformDeEquipId = itemType:getTransformDeEquipId() if transformEquipId ~= 0 then description = string.format('%s\nTransforms to: %d (onEquip)', description, transformEquipId) elseif transformDeEquipId ~= 0 then description = string.format('%s\nTransforms to: %d (onDeEquip)', description, transformDeEquipId) end local decayId = itemType:getDecayId() if decayId ~= -1 then description = string.format('%s\nDecays to: %d', description, decayId) end elseif thing:isCreature() then local title = getTitle(thing.uid) if title then description = description .. title .. " of Relembra." end local str = '%s\nHealth: %d / %d' if thing:getMaxMana() > 0 then str = string.format('%s, Mana: %d / %d', str, thing:getMana(), thing:getMaxMana()) end description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. '.' end local position = thing:getPosition() description = string.format( '%s\nPosition: %d, %d, %d', description, position.x, position.y, position.z ) if thing:isCreature() and thing:isPlayer() then description = string.format('%s\nIP: %s.', description, Game.convertIpToString(thing:getIp())) end end self:sendTextMessage(MESSAGE_INFO_DESCR, description) end
-
Mateus Robeerto's post in AJUDA COM O SITE PLEASE was marked as the answerTente executar o SQL no seu banco de dados. Se não funcionar, você terá que importar outro banco de dados. NUNCA DELETE ESSES TIPOS DE SAMPLE E ADMINISTRADOR DO GESIOR, apenas altere a senha e a conta. Pronto.
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `comment`, `create_ip`, `create_date`, `hide_char`) VALUES (1, 'Account Manager', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0), (2, 'Rook Sample', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0), (3, 'Sorcerer Sample', 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0), (4, 'Druid Sample', 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0), (5, 'Paladin Sample', 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0), (6, 'Knight Sample', 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0);
-
Mateus Robeerto's post in (Resolvido)-=[TFS]=- 0.4 8.60 NPC PROMOTION COM MOEDA VIP 11192 SÓ PODE COMPRA PROMOTION SE TIVER 100 MOEDAS VIP was marked as the answerlocal 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", "promote", "promo"}, msg) then selfSay("You need to have 100 VIP COINS and be at 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("Congratulations, you've been promoted!", cid) else selfSay("You do not have enough VIP COINS to be promoted.", cid) end else selfSay("Sorry, you need to be at level " .. level .. " or above to be promoted!", cid) end else selfSay("Sorry, you cannot receive promotion.", cid) end talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Mateus Robeerto's post in (Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [CREATURESCRIPT] VIP Days Não Funciona Alguem Pode me Ajuda was marked as the answerfunction onLogin(cid) local storageKeys = { 13545, } local alreadyReceived = true for _, storageKey in ipairs(storageKeys) do if getCreatureStorage(cid, storageKey) ~= 1 then alreadyReceived = false break end end if not alreadyReceived then for _, storageKey in ipairs(storageKeys) do if getCreatureStorage(cid, storageKey) ~= 1 then doCreatureSetStorage(cid, storageKey, 1) end end local days = 2 addVipDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu " .. days .. " dias de VIP.") end return true end
-
Mateus Robeerto's post in (Resolvido)System DAMAGE was marked as the answerlocal config = { effectonuse = 14, levelsdamage = 100, storagedamage = 14335 } function onUse(cid, item, frompos, item2, topos) local currentDamage = getPlayerStorageValue(cid, config.storagedamage) or 0 if currentDamage < config.levelsdamage then local newDamage = currentDamage + 1 doRemoveItem(item.uid, 1) doSendMagicEffect(topos, config.effectonuse) setPlayerStorageValue(cid, config.storagedamage, newDamage) local message = string.format("Seu damage foi aumentado para [%d/100].", newDamage) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, message) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já atingiu o nível máximo de damage.\nParabéns!!!!") return false end local damage = getPlayerStorageValue(cid, config.storagedamage) or 0 local calculatedDamage = damage * 2.5 -- Fórmula para calcular o damage baseado no valor storage. local finalMessage = string.format('Seu damage atual é: %d', calculatedDamage) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, finalMessage) return true end Se o tópico estiver resolvido, por favor, marque como resolvido e crie outro tópico para suas dúvidas/ajuda, etc. Isso ajuda a evitar scams, já que muitos usuários estão procurando pelo sistema necessário. Pode ficar confuso aqui. É melhor marcar como resolvido e criar outro tópico apenas para suas dúvidas.
-
Mateus Robeerto's post in (Resolvido)Adicionar (CHANCE) no script was marked as the answerlocal levels = { [-1] = {itemid = 6541, chance = 10}, [10] = {itemid = 6542, chance = 20}, [20] = {itemid = 6543, chance = 5}, [30] = {itemid = 6544, chance = 30}, [40] = {itemid = 6545, chance = 80}, } local config = { storage = 19333, chance = 1, --- chance de achar um item ou não k = 1, --- constante de level.. quanto maior, mais fácil é upar. (a fórmula é level ao quadrado dividido pela constante) experience = 19334 } local terra = {11787} function getDrops(cid) local drops = {} for i = -1, getPlayerStorageValue(cid, config.storage) do if levels[i] then local item = levels[i].itemid local chance = levels[i].chance if config.chance >= math.random(1, 100) then -- Ajustado para um intervalo de 1 a 100 if math.random(1, 100) <= chance then table.insert(drops, item) end end end end return drops end function onUse(cid, item, fromPosition, itemEx, toPosition) local drops = {} if isInArray(terra, itemEx.itemid) then drops = getDrops(cid) doPlayerSetStorageValue(cid, config.experience, getPlayerStorageValue(cid, config.experience) + 1) local experience = getPlayerStorageValue(cid, config.experience) if experience >= (8 + (getPlayerStorageValue(cid, config.storage) ^ 2)) / config.k then doPlayerSetStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) + 1) doPlayerSendTextMessage(cid, 27, "Parabens, voce subiu de nivel! Seu nivel atual e " .. getPlayerStorageValue(cid, config.storage) .. ".") if getPlayerStorageValue(cid, config.storage) == 100 then doPlayerSendTextMessage(cid, 20, "[MINING] --> Por alcancar o nivel " .. getPlayerStorageValue(cid, config.storage) .. " voce foi premiado com o capacete de mineracao.") doPlayerAddItem(cid, 7497, 1, true) end end if config.chance >= math.random(1, 150) then if #drops >= 1 then local item = drops[math.random(1, #drops)] doPlayerSendTextMessage(cid, 27, "[MINING] --> Voce encontrou um(a) " .. getItemNameById(item) .. ".") doSendAnimatedText(toPosition, "Sucesso", 210) doPlayerAddItem(cid, item, 1, true) end doSendMagicEffect(toPosition, 3) else doSendAnimatedText(toPosition, "Tack", 215) doSendMagicEffect(toPosition, 2) return true end elseif itemEx.itemid == item.itemid then doPlayerSendTextMessage(cid, 27, "[MINING] --> Seu nivel na mineracao e: [" .. getPlayerStorageValue(cid, config.storage) .. "].") else return false end return true end
-
Mateus Robeerto's post in (Resolvido)Trocar varios items por 1 por avalanva was marked as the answerBoa tarde! Fiz um script melhor e bem simples. É possível entender o script, Segue o GIF para ver como ele funciona e foi testado no tfs 0.4, tudo certo. Divirta-se
function onUse(cid, item, frompos, item2, topos) local playerLocation = getCreaturePosition(cid) local itemData = { {itemId = 2400, x = 722, y = 658, z = 7}, {itemId = 2401, x = 722, y = 657, z = 7}, {itemId = 2376, x = 724, y = 658, z = 7} -- Adicione mais itens para combinação aqui } local newItemId = 2406 -- ID do novo item após a combinação local newItemPosition = {x = 724, y = 657, z = 7} -- Posição para o novo item local foundItems = {} local hasAllItems = true for _, data in ipairs(itemData) do local tileItem = getTileItemById({x = data.x, y = data.y, z = data.z}, data.itemId) if tileItem.uid > 0 then table.insert(foundItems, tileItem.uid) else hasAllItems = false break end end if hasAllItems then for _, uid in ipairs(foundItems) do if not doRemoveItem(uid, 1) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Erro ao remover um dos itens necessários.") return false end end local newItem = doCreateItem(newItemId, 1, newItemPosition) if newItem ~= LUA_ERROR then doSendMagicEffect(newItemPosition, 39) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Erro ao criar o novo item.") return false end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você não possui todos os itens necessários para a combinação.") return false end return true end
@deza
20231130_150112.mp4 -
Mateus Robeerto's post in (Resolvido)Adicionar para ganhar damage_percent no script reset was marked as the answerhttps://tibiaking.com/forums/topic/111239-reset-system-otx-2/?tab=comments#comment-573049
-
Mateus Robeerto's post in (Resolvido)[SQLite] -=[TFS]=- [GLOBALEVENTS] 0.4 8.60 NÃO APARECE NO CONSOLE BROADCAST OS RESETS SÓ APARECE PLAYER LVL RESET [-1] E O PLAYER TEM 68 RESETS E MESMO ASSIM NAO APARECE was marked as the answerlocal maxPlayers = 5 function onThink(interval, lastExecution) local t, ret = {}, "TOP " .. math.min(maxPlayers, getWorldCreatures(0)) .. " Rank Level e Reset (LIVE):\n" for _, cid in ipairs(getPlayersOnline()) do table.insert(t, {cid, getPlayerLevel(cid), getPlayerStorageValue(cid, 54676)}) end table.sort(t, function(a, b) return a[2] > b[2] end) for i = 1, math.min(#t, maxPlayers) do ret = ret .. "\n" .. i .. " - " .. getCreatureName(t[i][1]) .. ": Level: [" .. t[i][2] .. "] - Reset: [" .. t[i][3] .. "]" end print(ret) end
-
Mateus Robeerto's post in (Resolvido)Alguem ai tem cliente 8.6 estendido ? was marked as the answerVocê 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.
-
Mateus Robeerto's post in (Resolvido)Anti mc pvp - sistema para prender quem mata usando mc was marked as the answerTAG 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?
-
Mateus Robeerto's post in É possivel retirar sprites do tibia 12x? was marked as the answerÉ possível sim, mas não se preocupe, está aqui pronto para usar. Os sprites são do 13x que foi downgrage para o 8.6 e ainda estão junto com os items.otb e XML. Fique à vontade para usar, aproveite. Na verdade, peguei o link do cara lá da Otland.
https://mega.nz/folder/5FQEnT4R#pAbmAAhpBhmcP1jaVkXm8Q
Você precisa usar o programa ObjectBuilder na versão mais recente, ele está disponível aqui também.
https://github.com/punkice3407/ObjectBuilder/releases/tag/v0.5.5
Espero ter ajudado. Não se esqueça de marcar como solução e deixar uma reputação positiva. Tenha um bom dia!
-
Mateus Robeerto's post in (Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 Combat Weapon was marked as the answerlocal combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_PHYSICALDAMAG) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_FIREDAMAGE) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_ICEDAMAGE) setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) setCombatParam(combat5, COMBAT_PARAM_EFFECT, CONST_ME_POISONDAMAGE) setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat6 = createCombatObject() setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat6, COMBAT_PARAM_EFFECT, CONST_ME_DEATHDAMAGE) setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat7 = createCombatObject() setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat7, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYDAMAGE) setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat8 = createCombatObject() setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) setCombatParam(combat8, COMBAT_PARAM_EFFECT, CONST_ME_DROWNDAMAGE) setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat9 = createCombatObject() setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) setCombatParam(combat9, COMBAT_PARAM_EFFECT, CONST_ME_LIFEDRAIN) setCombatParam(combat9, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat10 = createCombatObject() setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat10, COMBAT_PARAM_EFFECT, CONST_ME_MANADRAIN) setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local area = createCombatArea({ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0} }) setCombatArea(combat1, area) setCombatArea(combat2, area) setCombatArea(combat3, area) setCombatArea(combat4, area) setCombatArea(combat5, area) setCombatArea(combat6, area) setCombatArea(combat7, area) setCombatArea(combat8, area) setCombatArea(combat9, area) setCombatArea(combat10, area) function onUseWeapon(cid, var) local randomCombat = math.random(1, 10) if randomCombat == 1 then return doCombat(cid, combat1, var) elseif randomCombat == 2 then return doCombat(cid, combat2, var) elseif randomCombat == 3 then return doCombat(cid, combat3, var) elseif randomCombat == 4 then return doCombat(cid, combat4, var) elseif randomCombat == 5 then return doCombat(cid, combat5, var) elseif randomCombat == 6 then return doCombat(cid, combat6, var) elseif randomCombat == 7 then return doCombat(cid, combat7, var) elseif randomCombat == 8 then return doCombat(cid, combat8, var) elseif randomCombat == 9 then return doCombat(cid, combat9, var) else return doCombat(cid, combat10, var) end end
-
Mateus Robeerto's post in (Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 Combat Weapon was marked as the answerlocal combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_PHYSICALDAMAG) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_FIREDAMAGE) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_ICEDAMAGE) setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) setCombatParam(combat5, COMBAT_PARAM_EFFECT, CONST_ME_POISONDAMAGE) setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat6 = createCombatObject() setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat6, COMBAT_PARAM_EFFECT, CONST_ME_DEATHDAMAGE) setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat7 = createCombatObject() setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat7, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYDAMAGE) setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat8 = createCombatObject() setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) setCombatParam(combat8, COMBAT_PARAM_EFFECT, CONST_ME_DROWNDAMAGE) setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat9 = createCombatObject() setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) setCombatParam(combat9, COMBAT_PARAM_EFFECT, CONST_ME_LIFEDRAIN) setCombatParam(combat9, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local combat10 = createCombatObject() setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat10, COMBAT_PARAM_EFFECT, CONST_ME_MANADRAIN) setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -5.0, -1000000000, -5.0, -1000000000) local area = createCombatArea({ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0} }) setCombatArea(combat1, area) setCombatArea(combat2, area) setCombatArea(combat3, area) setCombatArea(combat4, area) setCombatArea(combat5, area) setCombatArea(combat6, area) setCombatArea(combat7, area) setCombatArea(combat8, area) setCombatArea(combat9, area) setCombatArea(combat10, area) function onUseWeapon(cid, var) local randomCombat = math.random(1, 10) if randomCombat == 1 then return doCombat(cid, combat1, var) elseif randomCombat == 2 then return doCombat(cid, combat2, var) elseif randomCombat == 3 then return doCombat(cid, combat3, var) elseif randomCombat == 4 then return doCombat(cid, combat4, var) elseif randomCombat == 5 then return doCombat(cid, combat5, var) elseif randomCombat == 6 then return doCombat(cid, combat6, var) elseif randomCombat == 7 then return doCombat(cid, combat7, var) elseif randomCombat == 8 then return doCombat(cid, combat8, var) elseif randomCombat == 9 then return doCombat(cid, combat9, var) else return doCombat(cid, combat10, var) end end
-
Mateus Robeerto's post in (Resolvido)Como colocar exhausted em actions e talkactions? was marked as the answer1:
local cooldown = 10 -- Cooldown in seconds local lastSearchTime = {} local sellTable = { [2498] = 40000, [2475] = 6000, [2491] = 5000, [7402] = 5000, [2462] = 4000, [2663] = 500, [2458] = 35, [2459] = 30, [2645] = 400000, [2195] = 40000, [2472] = 100000, [2492] = 60000, [2466] = 30000, [2487] = 20000, [2476] = 5000, [2656] = 15000, [2500] = 2500, [2463] = 400, [2465] = 200, [2464] = 100, [2470] = 80000, [2488] = 15000, [2477] = 6000, [2647] = 500, [2487] = 100, [2514] = 80000, [2520] = 40000, [2534] = 25000, [2536] = 8000, [2537] = 4000, [2519] = 5000, [2528] = 4000, [2515] = 200, [2518] = 1500, [2525] = 100, [2390] = 150000, [2408] = 100000, [2400] = 90000, [2393] = 10000, [2407] = 6000, [2396] = 4000, [2392] = 3000, [2409] = 1500, [2383] = 800, [2377] = 400, [2413] = 70, [2406] = 30, [2376] = 25, [2414] = 10000, [2431] = 90000, [2427] = 7500, [2432] = 10000, [2430] = 2000, [2387] = 200, [2381] = 200, [2378] = 100, [2388] = 20, [2391] = 6000, [2421] = 90000, [2436] = 1000, [2434] = 2000, [2423] = 200, [2417] = 60, [2398] = 30, } function on_search_container(cid, uid) local currentTime = os.time() local lastTime = lastSearchTime[cid] or 0 if currentTime - lastTime < cooldown then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait before searching again.") return end lastSearchTime[cid] = currentTime local size = getContainerCap(uid) for slot = (size - 1), 0, -1 do local item = getContainerItem(uid, slot) if item.uid > 0 then if sellTable[item.itemid] then doPlayerAddMoney(cid, sellTable[item.itemid]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sold ".. getItemNameById(item.itemid) .." for ".. sellTable[item.itemid] .." gold.") doRemoveItem(item.uid, 1) elseif isContainer(item.uid) then on_search_container(cid, item.uid) end end end end function onSay(cid, words, param, channel) on_search_container(cid, getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).uid) return true end 2:
local cooldown = 5 local lastPurchaseTime = {} function onSay(cid, words, param) local currentTime = os.time() local lastTime = lastPurchaseTime[cid] or 0 if currentTime - lastTime < cooldown then doCreatureSay(cid, "Please wait before making another purchase.", TALKTYPE_ORANGE_1) return true end lastPurchaseTime[cid] = currentTime local cost = 20 if doPlayerRemoveMoney(cid, cost) == true then local bp = doPlayerAddItem(cid, 1988, 1) doSendMagicEffect(getCreaturePosition(cid), 13) doCreatureSay(cid, "You bought a backpack.", TALKTYPE_ORANGE_1) else doCreatureSay(cid, "You don't have enough money.", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end Sobre cooldown e exaust, é a mesma coisa. Mas você pode usar normalmente.
-
Mateus Robeerto's post in (Resolvido)Como colocar exhausted em actions e talkactions? was marked as the answer1:
local cooldown = 10 -- Cooldown in seconds local lastSearchTime = {} local sellTable = { [2498] = 40000, [2475] = 6000, [2491] = 5000, [7402] = 5000, [2462] = 4000, [2663] = 500, [2458] = 35, [2459] = 30, [2645] = 400000, [2195] = 40000, [2472] = 100000, [2492] = 60000, [2466] = 30000, [2487] = 20000, [2476] = 5000, [2656] = 15000, [2500] = 2500, [2463] = 400, [2465] = 200, [2464] = 100, [2470] = 80000, [2488] = 15000, [2477] = 6000, [2647] = 500, [2487] = 100, [2514] = 80000, [2520] = 40000, [2534] = 25000, [2536] = 8000, [2537] = 4000, [2519] = 5000, [2528] = 4000, [2515] = 200, [2518] = 1500, [2525] = 100, [2390] = 150000, [2408] = 100000, [2400] = 90000, [2393] = 10000, [2407] = 6000, [2396] = 4000, [2392] = 3000, [2409] = 1500, [2383] = 800, [2377] = 400, [2413] = 70, [2406] = 30, [2376] = 25, [2414] = 10000, [2431] = 90000, [2427] = 7500, [2432] = 10000, [2430] = 2000, [2387] = 200, [2381] = 200, [2378] = 100, [2388] = 20, [2391] = 6000, [2421] = 90000, [2436] = 1000, [2434] = 2000, [2423] = 200, [2417] = 60, [2398] = 30, } function on_search_container(cid, uid) local currentTime = os.time() local lastTime = lastSearchTime[cid] or 0 if currentTime - lastTime < cooldown then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait before searching again.") return end lastSearchTime[cid] = currentTime local size = getContainerCap(uid) for slot = (size - 1), 0, -1 do local item = getContainerItem(uid, slot) if item.uid > 0 then if sellTable[item.itemid] then doPlayerAddMoney(cid, sellTable[item.itemid]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sold ".. getItemNameById(item.itemid) .." for ".. sellTable[item.itemid] .." gold.") doRemoveItem(item.uid, 1) elseif isContainer(item.uid) then on_search_container(cid, item.uid) end end end end function onSay(cid, words, param, channel) on_search_container(cid, getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).uid) return true end 2:
local cooldown = 5 local lastPurchaseTime = {} function onSay(cid, words, param) local currentTime = os.time() local lastTime = lastPurchaseTime[cid] or 0 if currentTime - lastTime < cooldown then doCreatureSay(cid, "Please wait before making another purchase.", TALKTYPE_ORANGE_1) return true end lastPurchaseTime[cid] = currentTime local cost = 20 if doPlayerRemoveMoney(cid, cost) == true then local bp = doPlayerAddItem(cid, 1988, 1) doSendMagicEffect(getCreaturePosition(cid), 13) doCreatureSay(cid, "You bought a backpack.", TALKTYPE_ORANGE_1) else doCreatureSay(cid, "You don't have enough money.", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end Sobre cooldown e exaust, é a mesma coisa. Mas você pode usar normalmente.
-
Mateus Robeerto's post in (Resolvido)Bug PVP Zone. was marked as the answerplayer:cpp
procure esta linha
void Player::onTarget(Creature* target) { Adicione abaixo.
// Fix avoid pz in pvp zones. if (target && target->getZone() == ZONE_HARDCORE) { return; }
-
Mateus Robeerto's post in (Resolvido)Mod Otc V8 was marked as the answerAcabei de testar esse mod.. Gostei demais.. Você tem que adicionar seu nick do GM e vai aparecer em cima "ADMINISTRADOR", ou dá para colocar VIP.. e outros nomes que você quiser
alterar o nome etc simples
local playerTitles = {["GM Vortex"] = {title = "[Administrator]", color = "red"}}
-
Mateus Robeerto's post in (Resolvido)Dúvida sobre meu Compilador. was marked as the answerMeu caro, eu compilo manualmente as libs e boost_1_60_0. Compilei em diversos TFS 1.5, incluindo Nekiro e TFS 1.5 13x, OTX 13x, tudo tranquilo, sem erros. Tente fazer isso aí, deve funcionar para você também
https://tibiaking.com/forums/topic/74079-tutorial-como-compilar-tfs-v12-com-msvc-2015/
-
Mateus Robeerto's post in (Resolvido)REVSCRIPT TFS 1.5 was marked as the answerO problema já está resolvido! Estive tentando resolver essa função por mais de 3 meses, mas finalmente consegui ontem, através da source!!
Eu sei que há pessoas interessadas nessa função de 'dano mágico em %'. Vou verificar com a pessoa que me passou os códigos pela source se ela me autoriza a compartilhá-los com vocês.