Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 03/31/24 em todas áreas

  1. Tile que upa skill | TFS 0.4 REV 3996

    Mateus Robeerto e um outro reagiu a L3K0T por uma resposta no tópico

    2 pontos
    function onStepIn(creature, item, position, fromPosition) local skillToTrain = SKILL_SWORD -- Substitua SKILL_SWORD pela habilidade que você deseja treinar local minSkill = 10 -- Substitua 10 pelo valor mínimo da habilidade para começar a treinar local gainChance = 50 -- Chance de ganhar skill, em porcentagem local requiredItemID = 1234 -- Substitua 1234 pelo ID do item necessário para treinar if creature:isPlayer() then local player = creature:getPlayer() -- Verifica se o jogador está equipado com o item necessário if player:getSlotItem(CONST_SLOT_RIGHT) and player:getSlotItem(CONST_SLOT_RIGHT):getId() == requiredItemID then local skillLevel = player:getSkillLevel(skillToTrain) if skillLevel >= minSkill then -- Verifica se o jogador ganha skill if math.random(100) <= gainChance then player:addSkillTries(skillToTrain, 1) player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você ganhou experiência em " .. getSkillName(skillToTrain) .. ".") else player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você não ganhou experiência em " .. getSkillName(skillToTrain) .. ".") end else player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você não tem a habilidade necessária para treinar aqui.") end else player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você precisa estar equipado com o item necessário para treinar aqui.") end end return true end Ou pra cada vocação function onStepIn(creature, item, position, fromPosition) if creature:isPlayer() then local player = creature:getPlayer() local vocation = player:getVocation():getId() -- Defina as habilidades correspondentes para cada vocação local skillsToTrain = { [VOCATION_NONE] = {SKILL_SWORD, SKILL_SHIELD}, -- Vocação sem classe [VOCATION_KNIGHT] = {SKILL_SWORD, SKILL_SHIELD}, -- Cavaleiro [VOCATION_PALADIN] = {SKILL_DISTANCE}, -- Paladino [VOCATION_SORCERER] = {SKILL_MAGLEVEL}, -- Sorcerer [VOCATION_DRUID] = {SKILL_MAGLEVEL}, -- Druida [VOCATION_MASTER_SORCERER] = {SKILL_MAGLEVEL}, -- Mestre dos Sorcerer [VOCATION_ELDER_DRUID] = {SKILL_MAGLEVEL} -- Mestre dos Druid } local minSkill = 10 -- Substitua 10 pelo valor mínimo da habilidade para começar a treinar local gainChance = 50 -- Chance de ganhar skill, em porcentagem local requiredItemID = 1234 -- Substitua 1234 pelo ID do item necessário para treinar if skillsToTrain[vocation] then for _, skillToTrain in ipairs(skillsToTrain[vocation]) do local skillLevel = player:getSkillLevel(skillToTrain) if skillLevel >= minSkill then -- Verifica se o jogador está equipado com o item necessário if player:getSlotItem(CONST_SLOT_RIGHT) and player:getSlotItem(CONST_SLOT_RIGHT):getId() == requiredItemID then -- Verifica se o jogador ganha skill if math.random(100) <= gainChance then player:addSkillTries(skillToTrain, 1) player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você ganhou experiência em " .. getSkillName(skillToTrain) .. ".") else player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você não ganhou experiência em " .. getSkillName(skillToTrain) .. ".") end else player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você precisa estar equipado com o item necessário para treinar aqui.") end else player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Você não tem a habilidade necessária para treinar aqui.") end end else player:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Esta vocação não pode treinar aqui.") end end return true end
  2. Wodbo Ragnarok Estágio: ABERTO Temos 63 Vocações disponíveis: Goku, Vegeta, Piccolo, C17, Gohan, Trunks, Cell, Freeza, Majin Boo, Broly, C18, Uub, Goten, Chibi Trunks, Cooler, Dende, Tsuful, Bardock, Kuririn, Pan, Kaio, Videl, Janemba, Tenshinhan, Jenk, Raditz, C16, Turles, Bulma, Shenron, Vegetto, Tapion, Kame, King Vegeta, Kagome, Zaiko, Chilled, Bills, Wiss, Goku God, Bills Evolution, Yamcha, Evolution Freeza, C13, Xicor, C20, Paikuhan, Mr Satan, C8, Divindade Cooler, Frost, Vados, Dabura, Goku Jr, Gogeta, Hitto, Champa, Botamo, Dark Goku, Chi-Chi, Caba, Minako e Zamasu. Transformações, técnicas e habilidades exclusivas para cada vocação. Upe se divertindo pelo mapa, aprenda técnicas e transformações exclusivas escondidas pelo mapa. Mapa Mapa exclusivo que terá atualizações periódicas Áreas até o momento: Earth, Sand City, M2, Tsufur, Zelta, Planeta Vegeta, Old Namek, Lude, Premia, Boar's Island, Ruudo, City 17, Boss City, Gardia, Bills Island, Mordor, Kanasa, Arabian City, Ice Kong City, Flasher City, Vehemence City, Stream City, Kazhel, Divindade City, Dabura Island, Frozen Island, Doragon City, Monaka Island e Planet Namek Sistemas Sistema de Reborn: Entre o Lv200~Lv1000 você poderá buscar as 7 esferas do dragão para poder fazer seu Reborn, fazendo ficar mais forte e com novas transformações. Sistema de Reset: Quanto mais resets tiver, mais forte seu personagem será. Sistema de Guilds: Crie ou entre em uma guild e divirta-se com seus amigos Sistema de Raridade: Os itens podem ser dropados com raridade dividida em 4 tipos, sendo elas: Normal, Uncommon, Rare e Legendary. Cada raridade deixa o item muito melhor em comparação com a raridade anterior. Sistema de Qualidade: Os itens podem ser dropados em 3 qualidades: Human, Warrior Z e Divine. Cada qualidade irá adicionar atributos ao personagem (ataque, defesa, armor, velocidade de ataque e etc) e com porcentagens de bônus dependendo da qualidade dropada. Sistema de Aprimoramento: Você pode aumentar o poder de sua arma, deixando ela +1, +2, +3, +4... e assim ficando mais forte com o tempo Sistema de Skin: Um sistema de skin onde você poderá customizar certas skins, dando uma personalidade única para seu personagem Sistema de Cooldown: As spells possuem cooldown, abrindo um leque quase que infinito de combos que podem ser feitos, mudando completamente as estratégias de combate Sistema de Forja: Melhor seus itens de qualidade (Comum > Uncommon > Rare > Legendary) Sistema de Mineração: Minere e colete materiais para melhorar seus itens Sistema de Lvl Limite: Os jogadores possuem limite de level até o 1000, porém uma quest de level 1000 poderá ser feita e desbloquear seu potencial! Sistema de Skills Diferentes: As skills atualmente são; Aura Power, Martial Arts, Exotic Weapon, Light Weapon, Heavy Weapon, Ki Control, Protect e Agility. Aura Power: A aura power é a skill responsável por seu dano em técnicas, suas curas e demais efeitos diretamente ligados a suas técnicas. Martial Arts: Martial Arts engloba seu condicionamento físico. Quanto maior sua Martial Arts forem, mais rápido você irá bater, além de que também vai aumentar sua chance de critico e de dano critico de seus ataques no geral. Exotic Weapon: A skill de Exotic Weapon é usada para armas que não se encaixa em um padrão conhecido (espada, machado e etc). As Exotic Weapon é como uma arma que não deveria existir, mas que por algum motivo ela foi feita. São extremamente difíceis de serem conseguidas esse tipo de armamento. Light Weapon: Light Weapon é a skill utilizada em armas leves e rápidas, que não possuem muito poder de ataque, mas compensa na velocidade de ataque concedida. Geralmente são armas que se podem usar uma em cada mão. Heavy Weapon: Essa skill é para armas pesadas e que são lentas de certa forma, mas o poder de ataque é um dos maiores entre as outras armas que existem. Ki Control: A skill de Ki Control é responsável por auxiliar seu uso com cajados, ki blast e armas que são de longo alcance. Protect: Sua defesa bem resumidamente. Ter um Protect bom que dizer que você irá tomar menos dano de alvos inimigos, de armadilhas e demais efeitos nocivos. Agility: Sua Agility é a skill responsável por aumentar sua evasão de golpes no geral, futuramente também irá aumentar sua velocidade de movimento. Quests Temos várias Quests disponíveis e várias outras em desenvolvimento Jogo utiliza base de DBO old e algumas inspirações de outros DBO conhecidos! Venha se divertir com seus amigos e criar novas amizades!!! OBS: De acordo que eu for atualizando o projeto, também irei atualizar esse post! Itens com Raridades Nova Área do Karin Entrada da Capsule Corp Skills Reborn https://discord.gg/P6hfwTbguB
  3. Isso?? local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) function damage(cid, level, maglevel, targetPosition) local min = 1000000000 local max = 1000000000 return -min, -max, getDirectionTo(targetPosition) -- Retorna também a direção para o alvo end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "damage") function onCastSpell(cid, var) local target = variantToPosition(var) local targetCreature = getTopCreature(target).uid local direction = getDirectionTo(getCreaturePosition(targetCreature)) local newVar = createCombatArea(getAreaAround(target, 1, 1)) -- Define a área de ataque em torno do alvo setCombatArea(combat, newVar) return doCombat(cid, combat, var), direction end -- Função auxiliar para obter a direção para uma posição alvo function getDirectionTo(targetPosition) local creaturePosition = getCreaturePosition(cid) local dx = targetPosition.x - creaturePosition.x local dy = targetPosition.y - creaturePosition.y if math.abs(dx) > math.abs(dy) then if dx > 0 then return DIRECTION_EAST else return DIRECTION_WEST end else if dy > 0 then return DIRECTION_SOUTH else return DIRECTION_NORTH end end end
  4. TFS 0.4 Jogadores não logam

    Doria Louro reagiu a L3K0T por uma resposta no tópico

    1 ponto
    Meio q pausa o console, parece tipo aquele negócio de segundo plano, tente ver na propriedade do console algo que bloqueia ao minimizar saca?
  5. (Resolvido)Reset Look Database

    L3K0T reagiu a Mateus Robeerto por uma resposta no tópico

    1 ponto
    Ok, 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
  6. <vocation id="2" name="Mage" <vocation id="3" name="Paladin" <vocation id="4" name="Knight" <vocation id="6" name="[VIP] Mage" <vocation id="7" name="[VIP] Paladin" <vocation id="8" name="[VIP] Knight" QUERO QUE O SCRIPT FUNCIONE QUANDO USA GEMA NO JOGO E QUANDO DESLOGA E LOGA FICA COM EFEITO. creatuescript .logingema.lua function onLogin(cid) setPlayerStorageValue(cid, 47112120, 2) local voc = getPlayerVocation(cid) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0 then sendGemEffect(cid, gems.storage[voc], gems.interval[voc]) end return TRUE end creaturescript .logout.lua function onLogout(cid) setPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)],0) return TRUE end creaturescript.xml <event type="logout" name="PlayerLogout" script="logout.lua"/> <event type="login" name="gema" event="script" value="logingema.lua"/> data/lib .gems function onUse(cid, item, fromPosition, itemEx, toPosition) gem = gems.id[getPlayerVocation(cid)] if item.itemid == gem then doUseGem(cid, item, getPlayerVocation(cid)) end return TRUE end data/lib/ .pivi function doUseGem(cid, item) local voc = getPlayerVocation(cid) local interval = gems.interval[voc] if item.itemid ~= gems.id[voc] or getPlayerStorageValue(cid, gems.storage[voc]) > 0 then return FALSE end setPlayerStorageValue(cid, gems.storage[voc], 1) sendGemEffect(cid, gems.storage[voc], gems.interval[voc]) doRemoveItem(item.uid, 1) return TRUE end function sendGemEffect(cid, storage, interval) local pos = getThingPos(cid) local voc = getPlayerVocation(cid) local color = 1 if voc == 1 then color = gemMsg.colorDruid[math.random(1,#gemMsg.colorElderDruid)] elseif voc == 2 then color = gemMsg.colorSorcerer[math.random(1,#gemMsg.colorMasterSorcerer)] elseif voc == 3 then color = gemMsg.colorPaladin[math.random(1,#gemMsg.colorRoyalPaladin)] elseif voc == 4 then color = gemMsg.colorKnight[math.random(1,#gemMsg.colorEliteKnight)] end doSendAnimatedText(pos, gemMsg.rnd[math.random(1,#gemMsg.rnd)], color) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) >= 1 then addEvent(sendGemEffect, interval, cid, storage, interval) end end function doRemoveGemEffect(cid) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) < 1 then return FALSE end setPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)], 0) return TRUE end function doRemoveAllGemEffect(cid) for i = 1, table.maxn(gms.storage) do setPlayerStorageValue(cid, gems.storage[i], 0) end return TRUE function isGemActivated(cid) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0 then return TRUE end return FALSE end data/lib .pivi_const gems = { id = {2156, 2155, 2158, 2154, 2156, 2155, 2158, 2154}, storage = {5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008}, interval = {750, 750, 750, 750, 750, 750, 750, 750}, -- Intervalo dos efeitos } gemMsg = { rnd = {"´ . ,", ". ´ ,", "` . ,", ", ` ."}, colorDruid = {180,180}, colorSorcerer = {30,215}, colorPaladin = {251,10}, colorKnight = {204,212}, colorElderDruid = {180,180}, colorMasterSorcerer = {30,215}, colorRoyalPaladin = {251,10}, colorEliteKnight = {204,212} } action/script .gems local config = { minLevel = 200, -- Level mínimo para adquirir a gema. } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) >= config.minLevel then gem = gems.id[getPlayerVocation(cid)] if item.itemid == gem then doUseGem(cid, item, getPlayerVocation(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você adquiriu uma gema espíritual.") doSendMagicEffect(getCreaturePosition(cid), 65) end else doPlayerSendCancel(cid, "Voc\ê precisa ser level "..config.minLevel.." para adquirir a gema esp\íritual.") end return TRUE end action.xml <action itemid="2156" script="gems.lua" /> <action itemid="2155" script="gems.lua" /> <action itemid="2154" script="gems.lua" /> <action itemid="2158" script="gems.lua" />
  7. Em vez de contar a exp quando a pessoa morrer e depois novamente quando logar, usando 3 storages pra isso, acredito que seria melhor anotar o level na morte e simplesmente o npc conferir se o level atual é menor que o anterior salvo. Ainda dá pra melhorar algumas coisas, mas isso aqui funcionou pra mim: creaturescripts.xml: <event type="preparedeath" name="Exp_P" event="script" value="exp_buy.lua"/> login.lua: registerCreatureEvent(cid, "Exp_P") exp_buy.lua function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) setPlayerStorageValue(cid, 135215, getPlayerExperience(cid)) return true end e nos npcs, expbuy.lua: 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 local config = { itemid = 9020, count = 300, past_level = getPlayerStorageValue(cid, 135215) } if isInArray({"recover", "recuperar", "exp", "experience"}, string.lower(msg)) then npcHandler:say("Do you wish to recover the lost experience after your death for "..config.count.." "..getItemNameById(config.itemid).."? {yes}", cid) talkState[talkUser] = 1 elseif (msgcontains(string.lower(msg), 'yes') and talkState[talkUser] == 1) then if config.past_level ~= -1 and getPlayerLevel(cid) < config.past_level then if doPlayerRemoveItem(cid, config.itemid, config.count) then doPlayerAddExperience(cid, getExperienceForLevel(config.past_level) - getExperienceForLevel(getPlayerLevel(cid))) npcHandler:say("Thank you! Here is your experience.", cid) setPlayerStorageValue(cid, 135215, -1) else npcHandler:say("Sorry, you don't have enough "..getItemNameById(config.itemid).."!", cid) talkState[talkUser] = 0 end else npcHandler:say("Sorry, you have not died or have already recovered your lost experience!", cid) talkState[talkUser] = 0 end elseif string.lower(msg) == "no" then npcHandler:say("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo