Ir para conteúdo

luanluciano93

Héroi
  • Registro em

  • Última visita

Tudo que luanluciano93 postou

  1. Tente trocar a função: getItemCap por getItemWeightById lembrando que este script é muito ruim, ele usa muitas actionId para coisas repetidas.
  2. function onSay(player, words, param) if player:getItemCount(10021) >= 1 then if player:removeMoney(20000) then if not player:removeItem(10021, 1) then player:sendCancelMessage("You don't have a worn soft boots to repair.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end player:addItem(2640, 1) player:sendTextMessage(MESSAGE_INFO_DESCR, "Your worn soft boots has been repaired!") player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW) else player:sendCancelMessage("You don't have 50000 gold coints to repair a worn soft boots.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end else player:sendCancelMessage("You don't have a worn soft boots to repair.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end return false end não testei
  3. luanluciano93 postou uma resposta no tópico em Portal
    ?
  4. https://github.com/luanluciano93/styller/commit/9176b89ee578da8a9e185f48ac311b63986041ae
  5. @Helliab se dá erro na do Natanael, você poste o erro no tópico dele.
  6. No download já tem ela compilada para windows.
  7. Com teleports Sim Pelo fórum tem alguns tutoriais sobre isto.
  8. function onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.itemid == 35082 then local position = player:getPosition() local summon = Game.createMonster("Fire Elemental", position, true) if not summon then player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) position:sendMagicEffect(CONST_ME_POFF) return false end player:say('The branch increased the fire.', TALKTYPE_MONSTER_SAY) item:remove() end return true end
  9. if player:getStorageValue(0) == 0 then Nao entendi essa condição ... Teria alguma condição ou apenas ele use o item e sumona o Fire Elemental e o item se transforma?
  10. local lookType = 567 function onStepIn(creature, item, position, fromPosition) if not creature:isPlayer() then return false end local playerOutfit = creature:getOutfit() if playerOutfit.lookType ~= lookType then creature:sendTextMessage(MESSAGE_INFO_DESCR, "Você não esta com o outfit correto.") creature:teleportTo(fromPosition, true) return false end return true end
  11. local config = { outfit = {lookType = 567, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}, -- Outfit time = 10 -- Tempo em segundos } function onStepIn(creature, item, position, fromPosition) if not creature:isPlayer() then return false end local condition = Condition(CONDITION_OUTFIT) condition:setTicks(config.time) condition:setOutfit(config.outfit) creature:addCondition(condition) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) return true end
  12. Update 29/10/2019 • Adicionado daily quest (prêmios ainda não configurados). • Ajustes nos eventos duca, battlefield e zombie. • Adicionado a função splitTrimmed (TFS). • Reajustado o save para cada 3 horas na função onTimer (retirado função onThink). • Reajuste na função withdrawMoney. • Reajstado vários scripts com funções antigas (compat.lua). • Fixado vários monstros (TFS). • Adicionado NPC que vende items por event coins. • Ajustes na pasta das quests. • Vários outros ajustes no mapa e no datapack.
  13. @braisvilela e @KiraConquest coloquei novamente o download no tópico com data, schema, dll e executável.
  14. Poste o script do /m e o seu
  15. Fez o cursinho gratuito de 10 min de HTML e já quer vir aqui tirar dinheiro dos leigos. Chegou a chamar um membro de burro em outro tópico só porque ele escreveu uma palavra em inglês errada. Você deve estar no lugar errado, aqui é um fórum onde o pessoal se ajuda e ninguém ganha nada em troca, então se não quer ajudar não atrapalhe. Já que você é tão gênio, produza conteúdo e poste.
  16. Crie um tópico no projeto do TFS e comente sobre o seu erro: https://github.com/otland/forgottenserver/issues/new
  17. @braisvilela pode baixar direto no github https://github.com/luanluciano93/alunia
  18. @adrianoXD esta no download, o nome do arquivo é schema.sql e tbem tem aqui https://github.com/luanluciano93/styller/blob/master/schema.sql
  19. Você esta usando o TFS atual e esta com esse erro? https://github.com/otland/forgottenserver
  20. Resultado sobre o que pesquisei ... Em data/events/scripts/monster.lua tem uma função que pelo que me parece gera o loot do monstro: function Monster:onDropLoot(corpse) if configManager.getNumber(configKeys.RATE_LOOT) == 0 then return end local player = Player(corpse:getCorpseOwner()) local mType = self:getType() if not player or player:getStamina() > 840 then local monsterLoot = mType:getLoot() for i = 1, #monsterLoot do local item = corpse:createLootItem(monsterLoot[i]) if not item then print('[Warning] DropLoot:', 'Could not add loot item to corpse.') end end if player then local text = ("Loot of %s: %s"):format(mType:getNameDescription(), corpse:getContentDescription()) local party = player:getParty() if party then party:broadcastPartyLoot(text) else player:sendTextMessage(MESSAGE_LOOT, text) end end else local text = ("Loot of %s: nothing (due to low stamina)"):format(mType:getNameDescription()) local party = player:getParty() if party then party:broadcastPartyLoot(text) else player:sendTextMessage(MESSAGE_LOOT, text) end end end Existe um parte nele que usa a função corpse:createLootItem(monsterLoot), ou seja a função createLootItem que esta em data/lib/core/container.lua: function Container.createLootItem(self, item) if self:getEmptySlots() == 0 then return true end local itemCount = 0 local randvalue = getLootRandom() if randvalue < item.chance then if ItemType(item.itemId):isStackable() then itemCount = randvalue % item.maxCount + 1 else itemCount = 1 end end if itemCount > 0 then local tmpItem = self:addItem(item.itemId, math.min(itemCount, 100)) if not tmpItem then return false end if tmpItem:isContainer() then for i = 1, #item.childLoot do if not tmpItem:createLootItem(item.childLoot[i]) then tmpItem:remove() return false end end end if item.subType ~= -1 then tmpItem:setAttribute(ITEM_ATTRIBUTE_CHARGES, item.subType) end if item.actionId ~= -1 then tmpItem:setActionId(item.actionId) end if item.text and item.text ~= "" then tmpItem:setText(item.text) end end return true end Você poderia usar esta linha: if randvalue < item.chance then Para aumentar a chance do item se tiver com o uso do amuleto.
  21. Apenas um exemplo, podendo usar este modelo com wieldPosition para verificar se o item é capacete, armadura, bota, calça, anel ou amuleto, ou usar weaponType para verificar se o item é sword, axe, club, distance, shield, wands, rods ou munição. local accepted_items = {2160} local function isItemAccepted(itemId) local item = getItemInfo(itemId) if isInArray(accepted_items, itemId) then return true elseif item.wieldPosition == 1 or item.wieldPosition == 2 or item.wieldPosition == 4 or item.wieldPosition == 7 or item.wieldPosition == 8 or item.wieldPosition == 9 then -- capacete, armadura, bota, calça, anel, amuleto return true elseif item.weaponType > 0 then -- sword, axe, club, distance , shield, wands, rods, ammunition return true end return false end E lembrando que os valores de wieldPosition são: CONST_SLOT_HEAD = 1 CONST_SLOT_NECKLACE = 2 CONST_SLOT_BACKPACK = 3 CONST_SLOT_ARMOR = 4 CONST_SLOT_RIGHT = 5 CONST_SLOT_LEFT = 6 CONST_SLOT_LEGS = 7 CONST_SLOT_FEET = 8 CONST_SLOT_RING = 9 CONST_SLOT_AMMO = 10 Estou postando isso porque precisei e não encontrei aqui.
  22. local corpse = Tile(target:getPosition()):getTopDownItem() if not corpse or not corpse:isContainer() then return false end if corpse:getType():isCorpse() and corpse:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == player:getId() then return true end
  23. Teria que ter uma forma de identificar o uso do client próprio
  24. @penisagudo sim, mas seria com onKill em creaturescript

Informação Importante

Confirmação de Termo