Postado Novembro 3, 2020 4 anos Este é um post popular. Loot Channel para TFS 1.X Liberando mais alguns conteúdos para vocês. Dessa vez o loot channel para tfs 1.x. Crie um arquivo chamado loot.lua na pasta chatchannels/scripts contendo isso local STORAGEVALUE_LOOT = 8914 function onSpeak(player, type, message) return false end function onJoin(player) player:setStorageValue(STORAGEVALUE_LOOT, 1) return true end function onLeave(player) player:setStorageValue(STORAGEVALUE_LOOT, 0) return true end Agora em chatchannels.xml adicione a tag <channel id="11" name="Loot" script="loot.lua" /> Em events/scripts, abra o arquivo monster.lua e você provavelmente irá encontra-lo assim 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_INFO_DESCR, 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_INFO_DESCR, text) end end end Altere para esse local STORAGEVALUE_LOOT = 8914 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 de %s: %s"):format(mType:getNameDescription(), corpse:getContentDescription()) local party = player:getParty() if party then party:broadcastPartyLoot(text) else if player:getStorageValue(STORAGEVALUE_LOOT) == 1 then sendChannelMessage(11, TALKTYPE_CHANNEL_O, text) else player:sendTextMessage(MESSAGE_INFO_DESCR, text) end end end else local text = ("Loot de %s: nada (devivo a baixa stamina)"):format(mType:getNameDescription()) local party = player:getParty() if party then party:broadcastPartyLoot(text) else if player:getStorageValue(STORAGEVALUE_LOOT) == 1 then sendChannelMessage(11, TALKTYPE_CHANNEL_O, text) else player:sendTextMessage(MESSAGE_INFO_DESCR, text) end end end end Pronto, adicionado o Loot Channel! Créditos: 100% meu Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
Postado Março 10, 2021 4 anos Em 03/11/2020 em 18:43, Breno Alves disse: Loot Channel para TFS 1.X Liberando mais alguns conteúdos para vocês. Dessa vez o loot channel para tfs 1.x. Crie um arquivo chamado loot.lua na pasta chatchannels/scripts contendo isso local STORAGEVALUE_LOOT = 8914 function onSpeak(player, type, message) return false end function onJoin(player) player:setStorageValue(STORAGEVALUE_LOOT, 1) return true end function onLeave(player) player:setStorageValue(STORAGEVALUE_LOOT, 0) return true end Agora em chatchannels.xml adicione a tag <channel id="11" name="Loot" script="loot.lua" /> Em events/scripts, abra o arquivo monster.lua e você provavelmente irá encontra-lo assim 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_INFO_DESCR, 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_INFO_DESCR, text) end end end Altere para esse local STORAGEVALUE_LOOT = 8914 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 de %s: %s"):format(mType:getNameDescription(), corpse:getContentDescription()) local party = player:getParty() if party then party:broadcastPartyLoot(text) else if player:getStorageValue(STORAGEVALUE_LOOT) == 1 then sendChannelMessage(11, TALKTYPE_CHANNEL_O, text) else player:sendTextMessage(MESSAGE_INFO_DESCR, text) end end end else local text = ("Loot de %s: nada (devivo a baixa stamina)"):format(mType:getNameDescription()) local party = player:getParty() if party then party:broadcastPartyLoot(text) else if player:getStorageValue(STORAGEVALUE_LOOT) == 1 then sendChannelMessage(11, TALKTYPE_CHANNEL_O, text) else player:sendTextMessage(MESSAGE_INFO_DESCR, text) end end end end Pronto, adicionado o Loot Channel! Créditos: 100% meu Parabéns pelo conteudo, se funcionar certinho vou postar aqui a versão pra funcionar perfeitamente com Reward Boss para versões 12+ Testei o sistema mas ficou 1 chat Loot para todos jogadores kkkkkk, acredito que só vai funcionar no server save corretamente por causa da storage correto?? mesmo dando reload nao resolveu. Editado Março 10, 2021 4 anos por Johncore att (veja o histórico de edições)
Postado Março 10, 2021 4 anos Autor 10 horas atrás, Johncore disse: Parabéns pelo conteudo, se funcionar certinho vou postar aqui a versão pra funcionar perfeitamente com Reward Boss para versões 12+ Testei o sistema mas ficou 1 chat Loot para todos jogadores kkkkkk, acredito que só vai funcionar no server save corretamente por causa da storage correto?? mesmo dando reload nao resolveu. Não entendi... poderia explicar melhor? Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
Postado Março 11, 2021 4 anos 14 horas atrás, Breno Alves disse: Não entendi... poderia explicar melhor? Instalei o seu sistema, porém o Chat Loot de vez de abrir um individual por jogador, ficou todo mundo logando no chat Loot e aparece o Loot de todos jogadores. o loot de geral no mesmo chat kkkk Editado Março 11, 2021 4 anos por Johncore att (veja o histórico de edições)
Postado Dezembro 30, 2021 3 anos SCRIPT NÃO FUNCIONAL! Não testei, mas olhei o código e, como o amigo acima comentou, todos as mensagens de loot vão para o chat que é aberto à todos, não é individual. Com as funções atuais não consegui pensar em uma solução. STYLLER OT 2022
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.