Tudo que MatCollier postou
-
Pago - Edição Client 11
Boa tarde. Gostaria de aprender (isso mesmo, quero ser ensinado, não quero que faça por mim) a editar o Client 11, e pago para quem me ensinar (valor negociável). Utilizo atualmente o cliente 11.44.5516 (com sprites até 12.15.8706). Coisas que quero aprender: 1 - Editar o nome dos itens no market (no meu os itens estão sem nome no market, mas já vi alguns clientes 11 onde a pessoa foi lá e editou isso pra que os nomes aparecessem, então sei que é possível); 2 - Adicionar novas sprites ao cliente (adicionar sprites de itens posteriores à versão 12.15, pra que eu possa constantemente atualizar meu cliente sem depender de que outra pessoa o faça e poste); 3 - Remover a mensagem pop-up do Battleeye ao abrir o Client. São coisas que, acredito eu, devem ser relativamente simples, mas que não encontrei em lugar algum tutoriais sobre como fazer, e preciso deste conhecimento para tocar meu servidor com mais liberdade. Grato.
-
[TFS 1.2] Lucky Clover Amulet
@underewarr Aparentemente faz sentido o que tas dizendo, mas duvido muito que eu consiga fazer sozinho. Vou tentando aqui!
-
[TFS 1.2] Frags durante War
Preciso de ajuda. Não sei exatamente o que aconteceu, antes o meu War System funcionava normalmente (os players não fragavam ao matar jogadores da guilda inimiga). Fui testar hoje, e ao começar a atacar um jogador da guild inimiga (com a guerra ativa), eu peguei Skull. Ao matar, peguei frag. Se matar 5x, pego red. Alguém sabe por favor me dizer onde é definido essa função pra que quando se está em war não frague ao atacar/matar jogadores da guilda inimiga? E também a correção, se possível. Agradeço muito. PS: Descobri o erro, mas não a solução... Testei uma source antiga e confirmei 100% que o problema é na source, pois com a antiga está ok o sistema... Acredito que o problema seja no player.cpp, nessa função "isInWar" (ela sempre retorna false, mesmo que os times estejam em war):
-
[TFS 1.2] Lucky Clover Amulet
@luanluciano93 Primeiro, meu monster.lua nos scripts de events era só isso: Aí adicionei essas 2 funções que tu mandou abaixo. Mas não mudou nada. Troquei a parte que diz ITEMID pelo ID do Lucky Clover Amulet (11393), e tentei colocar um número altíssimo ali em amuletchance, mas não mudou a taxa de drop dos itens.
-
[TFS 1.2] Lucky Clover Amulet
@luanluciano93 Entende muito mano! Mas como eu faço pra puxar a storage do player que ta com o amuleto por aí, tu sabe? Porque acho que esse self é o "container", corpo do monstro. E aí eu colocaria essa parte if randvalue < item.chance then Dentro de um if, que seria caso a storage == -1, fica esse normal, caso a storage == 1 (usando o amuleto), fica: if randvalue < item.chance * 1.05 then Que seria a item.chance aumentada em 5%. É isso?
-
[TFS 1.2] Lucky Clover Amulet
@CowBoysFHell Mano, sinceramente acho que tem muita coisa errada aí. Eu precisei mudar a posição de uns 10 ends pra parar de dar erro na distro, e mesmo assim não acontecia nada. Com o movements a storage é setada, ele manda a msg "TESTE". Mas essa parte do script em player.lua aí, não ta funcionando.
-
[TFS 1.2] Lucky Clover Amulet
@underewarr Estava sim, mas já desde a primeira vez eu fui reescrevendo e indentando ele direitinho, então não é esse o problema atual.
-
[TFS 1.2] Lucky Clover Amulet
@underewarr Mudou nada, msm erro dizendo que falta um end pro while antes de function
-
[TFS 1.2] Lucky Clover Amulet
@underewarr Removi, o erro agora é esse: Só que o end do while tá certo ali... Não sei se é porque tem uma função dentro do while, aparentemente ele manda fechar o while antes de começar a função Tá assim até agora: if getPlayerStorageValue(cid, stor) >= 0 then local stor = 12345 -- storage -- Apply rarity chance to corpse contents find_loot_Container(corpse:getPosition()) -- Print loot list to Server Log if owner then local loot_msg = "[Lucky] Loot of " .. self:getNameDescription() .. ": " .. corpse:getContentDescription() if owner:getParty() then owner:getParty():broadcastLoot(loot_msg) owner:getParty():broadcastChannelLoot(loot_msg) else owner:sendTextMessage(MESSAGE_INFO_DESCR, loot_msg) -- Loot channel un-used on my server. -- owner:channelSay(nil, TALKTYPE_CHANNEL_O, loot_msg, 10) end end else local loot_msg = "Loot of " .. self:getNameDescription() .. ": nothing (due to low stamina)" if owner:getParty() then owner:getParty():broadcastLoot(loot_msg) owner:getParty():broadcastChannelLoot(loot_msg) else owner:sendTextMessage(MESSAGE_INFO_DESCR, loot_msg) end function MonsterType.createLootItem(self, lootBlock, modifier) local lootTable = {} local itemCount = 0 local randvalue = math.random(0, 10000*10) / (configManager.getNumber(configKeys.RATE_LOOT) * modifier); if randvalue < lootBlock.chance then if (ItemType(lootBlock.itemId):isStackable()) then itemCount = randvalue % lootBlock.maxCount + 1; else itemCount = 1; while (itemCount > 0) do local n = math.min(itemCount, 100) itemCount = itemCount - n local item = Game.createItem(lootBlock.itemId, n) if item then if lootBlock.subType ~= -1 then item:transform(lootBlock.itemId, lootBlock.subType) end if lootBlock.actionId ~= -1 then item:setActionId(lootBlock.actionId) end if lootBlock.text and lootBlock.text ~= "" then item:setAttribute(ITEM_ATTRIBUTE_TEXT, lootBlock.text) end table.insert(lootTable, item) end return #lootTable == 0 and nil or lootTable function MonsterType.createLootContainer(self, parent, lootBlock, modifier) if #lootBlock.childLoot == 0 then return true for _, v in pairs(lootBlock.childLoot) do if parent:getSize() < parent:getCapacity() then local itemList = self:createLootItem(v, modifier) if itemList then for _, item in ipairs(itemList) do if item:isContainer() then local lootContainer = self:createLootContainer(item, v, modifier) if lootContainer then parent:addItemEx(item) end else parent:addItem(item, 1) end end end end return #parent > 0 end return true end end end end end end end
-
[TFS 1.2] Lucky Clover Amulet
-
[TFS 1.2] Lucky Clover Amulet
@underewarr No caso assim: math.random(0, 5000) Certo? Vou testar com ele em 100% primeiro pra ver.
-
[TFS 1.2] Lucky Clover Amulet
@underewarr Boa. Como eu devo modificar naquele randvalue pra ele aumentar a chance de loot em 5%? Exemplo: Se o monstro tem 10000 de chance de dropar um item, ele vai ter 10500 de chance de dropar esse mesmo item caso o player esteja com o colar.
-
[TFS 1.2] Lucky Clover Amulet
@underewarr Uma dúvida: No player lua, eu vou colocar o script dentro do onGainExperience? No caso depois do return exp, antes do end? Ou depois do end? Ta assim aqui: -- Outras coisas antes function Player:onGainExperience(source, exp, rawExp) ... --script inteiro do onGainExperience ... return exp end function Player:onLoseExperience(exp) return exp end function Player:onGainSkillTries(skill, tries) if APPLY_SKILL_MULTIPLIER == false then return tries end if skill == SKILL_MAGLEVEL then return tries * configManager.getNumber(configKeys.RATE_MAGIC) end return tries * configManager.getNumber(configKeys.RATE_SKILL) end
-
[TFS 1.2] Lucky Clover Amulet
@underewarr Vou testar agora e aviso se der certo!
-
[TFS 1.2] Função getCorpseOwner em Lua
@luanluciano93 Como sempre salvando!
-
[TFS 1.2] Lucky Clover Amulet
E ai pessoal do TK! Ando tentando fazer umas paradas diferentes/inovadoras pro meu server recentemente, e entre elas está o uso do Lucky Clover Amulet. Gostaria de saber se é possível fazer um script que faça com que, quando o player matar um monstro tendo este colar equipado, ele tenha uma chance de loot aumentada em, digamos, 10%. Agradeço antecipadamente qualquer ajuda ou esclarecimento que puderem dar.
- Auto Loot Sytem for TFS 1.3 + revscripts
-
[TFS 1.2] Função getCorpseOwner em Lua
Boa noite pessoal do TK. Gostaria de saber se é possível utilizar uma função "getCorpseOwner(corpse)" que me retorne o dono do corpo. A questão é que quero usar essa função numa action. basicamente ao dar use num corpo com aquela actionId específica ele vai executar, entre outras coisas, essa função que retorna o nome ou id do dono do corpo. Eu vi que essa função já existe na source (está sendo utilizada em actions.cpp), mas gostaria de usar ela em lua, e aqui não funciona, não sei se tenho que declarar ela em algum lugar primeiro...
- Auto Loot Sytem for TFS 1.3 + revscripts
- Auto Loot Sytem for TFS 1.3 + revscripts
- Auto Loot Sytem for TFS 1.3 + revscripts
-
TFS [1.2] Market Clientes 10 e 11
@penisagudo o 10 funciona perfeitamente. Infelizmente aí não tem um cliente 11 com as sprites do 12, eu precisaria mudar minha source inteira (e junto com ela, muitos arquivos do ot) pra usar o cliente 12 mesmo.
-
Cliente 11 atualizado novas sprites 12 funcionando
@JZDJ Irmão, o cliente é ótimo, porém ele tem o bug dos itens aparecerem sem nome no Market (não é o item.otb, é o client, porque usando client 11.49 ou 11.44 com sprites até o 11.90, ou até mesmo o client 12, funciona normal). Saberia como resolver esse problema do market sem os nomes? Rep+ de qualquer forma
-
[TFS 1.2/Gesior] Comando para pegar name da database
Estou tentando ajeitar o script de war system com talkactions que encontrei por aqui. No entanto, tenho um problema. A seguinte parte do código não funciona: local enemyName, tmp = "", db.storeQuery("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if tmp ~= false then enemyName = result.getDataString(tmp, "name") result.free(tmp) end Ele retorna tmp como false, mas não retorna o enemyname. Ja tentei de tudo, nada deu certo. Preciso que ele pegue o nome da guild inimiga pro script funcionar direito com o sistema que está no site. Se eu colocar tmp == false ele dá o seguinte erro na distro: Lua Script Error: [TalkAction Interface] data/talkactions/scripts/gwarabsolute.lua:onSay data/talkactions/scripts/gwarabsolute.lua:138: attempt to concatenate local 'enemyName' (a boolean value) stack traceback: [C]: in function '__concat' data/talkactions/scripts/gwarabsolute.lua:138: in function <data/talkactions/scripts/gwarabsolute.lua:1> O código completo: function onSay(cid, words, param) local player = Player(cid) local guild = getPlayerGuildId(cid) if(guild == nil) then player:sendCancelMessage("You need to be in a guild in order to execute this talkaction.") return false end local guild = getPlayerGuildId(cid) if not guild or (player:getGuildLevel() < 3) then player:sendCancelMessage("You cannot execute this talkaction.") return false end local t = string.explode(param, ",") if(not t[2]) then player:sendChannelMessage("", "Not enough param(s).", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local enemy = getGuildId(t[2]) if(not enemy) then player:sendChannelMessage("", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end if(enemy == guild) then player:sendChannelMessage("", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local enemyName, tmp = "", db.storeQuery("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if tmp ~= false then enemyName = result.getDataString(tmp, "name") result.free(tmp) end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild1` = " .. enemy .. " AND `guild2` = " .. guild if(t[1] == "cancel") then query = "`guild1` = " .. guild .. " AND `guild2` = " .. enemy end tmp = db.storeQuery("SELECT `id`, `started`, `ended`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp == false) then player:sendChannelMessage("", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end if(t[1] == "accept") then local _tmp = db.storeQuery("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = result.getDataInt(_tmp, "balance") < result.getDataInt(tmp, "payment") result.free(_tmp) if(state) then player:sendChannelMessage("", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. result.getDataInt(tmp, "payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`ended` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`ended` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`started` = " .. os.time() .. ", `ended` = " .. (result.getDataInt(tmp, "ended") > 0 and (os.time() + ((result.getDataInt(tmp, "started") - result.getDataInt(tmp, "ended")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return false end if(t[1] == "invite") then local str = "" tmp = db.storeQuery("SELECT `guild1`, `status` FROM `guild_wars` WHERE `guild1` IN (" .. guild .. "," .. enemy .. ") AND `guild2` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp ~= false) then if(result.getDataInt(tmp, "status") == 0) then if(result.getDataInt(tmp, "guild1") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end result.free(tmp) end if(str ~= "") then player:sendChannelMessage("", str, TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.floor(payment)+1000 tmp = db.storeQuery("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = result.getDataInt(tmp, "balance") < payment result.free(tmp) if(state) then player:sendChannelMessage("", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild1`, `guild2`, `started`, `ended`, `fraglimit`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ");") db.asyncQuery('INSERT INTO `guild_wars` (`name1`, `name2`) VALUES (' .. db.escapeString(getPlayerGuildName(cid)) .. ', ' .. db.escapeString(enemyName) .. ')') broadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return false end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.storeQuery("SELECT `id` FROM `guild_wars` WHERE `guild1` = " .. guild .. " AND `guild2` = " .. enemy .. " AND `status` = " .. status) if(tmp ~= false) then local query = "UPDATE `guild_wars` SET `ended` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return false end if(status == 4) then player:sendChannelMessage("", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end tmp = db.storeQuery("SELECT `id`, `ended` FROM `guild_wars` WHERE `guild1` = " .. enemy .. " AND `guild2` = " .. guild .. " AND `status` = 1") if(tmp ~= false) then if(result.getDataInt(tmp, "ended") > 0) then result.free(tmp) player:sendChannelMessage("", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local query = "UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return false end player:sendChannelMessage("", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end
-
TFS [1.2] Market Clientes 10 e 11
Não sei ao certo se deveria usar aqui o Prefixo Infraestrutura ou Programação, mas enfim... No meu servidor, eu uso a source do malucoo e disponibilizo para os jogadores 2 opções de clientes, o 10.00 outdated com sprites até o 12.03, e o 11.44 com sprites até o 12.03. Tudo funciona perfeitamente, exceto uma coisa: O market. É possível utilizá-lo, no entanto ele aparece com bugs (diferentes para o cliente 10 e o 11). No cliente 10, nenhum item aparece nas listas de Armaduras, Shields, etc... No entanto se eu digitar o nome do item em search, ele aparece perfeitamente normal. Seguem imagens: No cliente 11 o problema é exatamente o oposto. Consigo ver as imagens dos itens, porém os nomes não aparecem, e ao digitar no search, nada aparece. Além disso, há um problema extra, no cliente 11, os "creature products" se encontram junto às armaduras (como se fossem armors). Imagens: Esses são os problemas mais estranhos que já enfrentei até agora. Agradeço muito se alguém conseguir me auxiliar com eles. Versões exatas: