Tudo que luanluciano93 postou
-
Action Erro
Tente trocar a função: getItemCap por getItemWeightById lembrando que este script é muito ruim, ele usa muitas actionId para coisas repetidas.
-
Talkaction - Reparar Soft Boots TFS 1.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
- Salve uma vida!
- [OTX3 8.60] STYLLER 2019
- [OTX3] Trade Offline / Auction System
- [OTX3 8.60] STYLLER 2019
- [OTX3 8.60] STYLLER 2019
-
(Resolvido)[TFS1.2] Summonar criatura em action
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
-
(Resolvido)[TFS1.2] Summonar criatura em action
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?
-
(Resolvido)[TFS1.2] Precisa de certa looktype para acessar
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
-
(Resolvido)[TFS1.2] Outfit Movement
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
-
[OTX3 8.60] STYLLER 2019
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.
- [TFS 1.3 10.98] ALUNIA 2020 - Styller Custom
-
[TFS 1.2] doSummonCreature e RewardBoss
Poste o script do /m e o seu
-
(Resolvido)Botão para Whatsapp
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.
-
Preciso de Ajuda Urgente
Crie um tópico no projeto do TFS e comente sobre o seu erro: https://github.com/otland/forgottenserver/issues/new
- [TFS 1.3 10.98] ALUNIA 2020 - Styller Custom
- [OTX3 8.60] STYLLER 2019
-
Preciso de Ajuda Urgente
Você esta usando o TFS atual e esta com esse erro? https://github.com/otland/forgottenserver
-
[TFS 1.2] Lucky Clover Amulet
- [TFS 1.2] Lucky Clover Amulet
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.- Função para verificar tipo de item: wieldPosition e weaponType
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.- [TFS 1.2] Função getCorpseOwner em Lua
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- [TFS 1.2] Bônus de Exp para quem estiver no Client 11
Teria que ter uma forma de identificar o uso do client próprio- [TFS 1.2] Bônus de Exp para quem estiver no Client 11
@penisagudo sim, mas seria com onKill em creaturescript - [TFS 1.2] Lucky Clover Amulet
Informação Importante
Confirmação de Termo