Ir para conteúdo

Gustavots

Membro
  • Registro em

  • Última visita

  1. Me chama no discord. passo a correção: leo_j.c
  2. ALGUEM CONSEGUIU RESOLVER O ERROR? TA APARECENDO QUANDO VOU FINALIZAR A CRIAÇÃO DE CONTAS, E APARECEU TAMBEM NO FINAL DO INSTALL DO MYAACv0.8.16 Esta página não está funcionando 128.69.55.223 não consegue atender a esta solicitação no momento. HTTP ERROR 500
  3. É na pasta source/trunk, no arquivo Makefile. Dependendo da sua source, você encontrará algo assim: #-- Talvez seja necessário alterar o caminho de 'libtcmalloc_minimal' para o caminho correto para sua distribuição --# #-- Para Ubuntu 20 em WSL2 o caminho é /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4 --# LDFLAGS = /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4 \ -llua5.1 -lxml2 -lboost_thread \ -lboost_system -lboost_filesystem -lgmp \ -lmysqlclient -lboost_regex -lcrypto \ -lsqlite3 -g Eu fiz a alteração do caminho de /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4 para /usr/lib/libtcmalloc_minimal.so.4 e funcionou! Para confirmar se a biblioteca ainda existe após os processos de compilação, vá para o diretório /usr/lib/ e verifique.
  4. Na compilação, encrypt é limitado; ela apenas aceita imagens, spr e dat, e talvez o init. Caso tente compilar outros tipos de arquivos, podem ocorrer erros desse tipo. Continue realizando testes necessários ate sumir o error.
  5. Odranoel S.S reagiu a uma resposta no tópico: [Talkaction] Ban por Comando
  6. Odranoel S.S reagiu a uma resposta no tópico: Global Effect
  7. --[[> ODRANOEL S.S <]]-- function onSay(cid, words, param, channel) local params = string.explode(param, " ") if #params < 2 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use o comando da seguinte forma: !efeito 1, Sua Mensagem") return true end local effect = tonumber(params[1]) local message = table.concat(params, " ", 2) for _, pid in ipairs(getPlayersOnline()) do addEvent(sendEffectToPlayer, math.random(0, 200), pid, effect, message) end return true end function sendEffectToPlayer(pid, effect, message) if isPlayer(pid) then local position = getCreaturePosition(pid) for i = 1, 30 do doSendDistanceShoot(position, {x = position.x + math.random(-7, 7), y = position.y + math.random(-5, 5), z = position.z}, effect) end doCreatureSay(pid, message, TALKTYPE_ORANGE_1) end end
  8. Mais organizado e com um salve de registro em logs: function onSay(cid, words, param, channel) local t = string.explode(param, ",") if #t < 3 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite /ban nome, dias, motivo.") return true end local name, days, motivo = t[1], tonumber(t[2]), t[3] local acc = getAccountIdByName(name) if acc ~= 0 then local tempo = days * 24 * 3600 local target = getCreatureByName(name) if target then doAddAccountBanishment(acc, target, os.time() + tempo, 5, 2, "Você foi banido por " .. motivo .. ", por " .. tempo .. " segundos.", 0) doBroadcastMessage("O jogador " .. getCreatureName(target) .. " foi banido por " .. getCreatureName(cid) .. ". Motivo: " .. motivo .. ".", 25) addEvent(doRemoveCreature, 3 * 1000, target, true) -- Registro no arquivo de log local bansFile = "data/logs/bans.txt" local playerName = getCreatureName(cid) local currentTime = os.date("%Y-%m-%d %H:%M:%S") local file = io.open(bansFile, "a") if file then file:write(currentTime .. " - " .. playerName .. " baniu " .. name .. " por " .. days .. " dias. Motivo: " .. motivo .. "\n") file:close() else print("Erro ao abrir o arquivo de log de bans.") end return true else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jogador não encontrado.") return true end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jogador não encontrado.") return true end end Creditos: Odranoel
  9. qual base voce diz que tem que esta sem source?
  10. function onSay(cid, words, param, channel) if getPlayerStorageValue(cid, 13501) < 0 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você precisa ser VIP para usar este comando.') and true end if hasCondition(cid, CONDITION_INFIGHT) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Desculpe, você está em batalha.") end local house = getHouseByPlayerGUID(getPlayerGUID(cid)) if house then doTeleportThing(cid, getHouseEntry(house)) return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você foi teleportado para sua casa!") else local town = getPlayerTown(cid) local templePosition = getTownTemplePosition(town) doTeleportThing(cid, templePosition) return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você não tem uma casa e foi teleportado para o templo.") end end TFS 0.4
  11. alguem conseguiu pra tfs 0.4? corrija: Enfim, vi que ia ser difícil alguém disponibilizar, já que já faz muito tempo que estão querendo... conseguir editar uma base que encontrei. Boa utilização! <talkaction words="/cast;!cast" event="script" value="cast.lua"/> function onSay(cid, words, param, channel) local tmp = param:explode(" ") if not tmp[1] then return doShowTextDialog(cid, 6579, "[Parâmetros necessários]\n[Parameters needed]\n\n----------------\n [Cast System Parameters]:\n\n!cast on\n!cast off\n!cast pass\n!cast ban\n!cast unban\n!cast bans\n!cast mute\n!cast unmute\n!cast mutes\n!cast viewers\n!cast status\n!cast update") end local castActivated = getPlayerStorageValue(cid, 5521) -- Verifica se o cast já foi ativado local passwordSet = getPlayerStorageValue(cid, 5522) -- Verifica se a senha já foi definida if tmp[1] == "on" then if castActivated == 1 then -- Mensagem de cast já ativado doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O cast já está ativado. The cast is already activated.") else -- Inicia a transmissão doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "A transmissão foi iniciada. Cast has started.") doPlayerSetCastState(cid, true) doPlayerSave(cid) local rates = getPlayerRates(cid) doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(cid, rates[SKILL__LEVEL]) + 0.5) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você habilitou o seu cast e está obtendo +5% de experiência em monstros. You have enabled your cast stream and are getting +5% monsters experience.") setPlayerStorageValue(cid, 5521, 1) -- Define a storage value como 1 para indicar que o cast foi ativado end elseif getPlayerCast(cid).status == false then return doPlayerSendCancel(cid, "Your cast has to be running for this action.") elseif tmp[1] == "off" then -- Verifica se o jogador está na zona de proteção if hasCondition(cid, CONDITION_INFIGHT) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você não pode usar esse comando quando estiver em uma batalha. You cannot use this command when in battle.") end -- Encerra a transmissão doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has ended.") doPlayerSetCastState(cid, false) doPlayerSave(cid) setPlayerStorageValue(cid, 5521, -1) -- Define a storage value como 0 para indicar que o cast foi desativado addEvent(doRemoveCreature, 1, cid) elseif isInArray({"pass", "password", "p"}, tmp[1]) then local rates = getPlayerRates(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você adicionou uma senha ao seu cast. Utilize-o sem senha para ganhar um bônus de +5% de experiência ao derrotar monstros.") if passwordSet == 1 then return doShowTextDialog(cid, 6579, "Você já definiu uma senha:\n" .. tmp[2].. "\n\nYou have already set a password:\n" .. tmp[2]) end if not tmp[2] then return doShowTextDialog(cid, 6579, "Você precisa definir uma senha, exemplo: !cast password warzone23\n\nYou need to set a password,\nexample: !cast password warzone23") end local password = table.concat(tmp, " ", 2) getPlayerCast(cid, password) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Senha definida com sucesso. Password set successfully: " .. tmp[2]) doPlayerSetRate(cid, SKILL__LEVEL, getExperienceStage(cid, rates[SKILL__LEVEL]) - 0.1) setPlayerStorageValue(cid, 5522, 1) -- Define a storage value como 1 para indicar que a senha foi definida elseif isInArray({"desc", "description", "d"}, tmp[1]) then local d = param:gsub(tmp[1]..(tmp[2] and " " or ""), "") if not d or d:len() == 0 then return doPlayerSendCancel(cid, "You need to specify a description.") end if d:len() > 50 then return doPlayerSendCancel(cid, "The description is too long. (Max.: 50 letters)") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast description was set to: ") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, d) doPlayerSetCastDescription(cid, d) elseif tmp[1] == "ban" then if not tmp[2] then return doPlayerSendCancel(cid, "Specify a spectator that you want to ban.") end if doPlayerAddCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been banned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be banned.") end elseif tmp[1] == "unban" then if not tmp[2] then return doPlayerSendCancel(cid, "Specify the person you want to unban.") end if doPlayerRemoveCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unbanned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unbanned.") end elseif param == "bans" then local t = getCastBans(cid) local text = "Cast Bans:\n\n" for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end if text == "Cast Bans:\n\n" then text = text .. "No bans." end doShowTextDialog(cid, 5958, text) elseif tmp[1] == "mute" then if not tmp[2] then return doPlayerSendCancel(cid, "Specify a spectator that you want to mute.") end if doPlayerAddCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been muted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be muted.") end elseif tmp[1] == "unmute" then if not tmp[2] then return doPlayerSendCancel(cid, "Specify the person you want to unmute.") end if doPlayerRemoveCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unmuted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unmuted.") end elseif param == "mutes" then local t = getCastMutes(cid) local text = "Cast Mutes:\n\n" for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end if text == "Cast Bans:\n\n" then text = text .. "No mutes." end doShowTextDialog(cid, 5958, text) elseif param == "viewers" then local t = getCastViewers(cid) local text, count = "Cast Viewers:\n#Viewers: |COUNT|\n\n", 0 for _, v in pairs(t) do count = count + 1 text = text .. "*" .. v.name .."\n" end if text == "Cast Viewers:\n#Viewers: |COUNT|\n\n" then text = "Cast Viewers:\n\nNo viewers." end text = text:gsub("|COUNT|", count) doShowTextDialog(cid, 5958, text) elseif param == "status" then local t, c = getCastViewers(cid), getPlayerCast(cid) local count = 0 for _, v in pairs(t) do count = count + 1 end doShowTextDialog(cid, 5958, "Cast Status:\n\n*Viewers:\n " .. count .. "\n*Description:\n "..(c.description == "" and "Not set" or c.description).."\n*Password:\n " .. (c.password == "" and "Not set" or "Set - '"..c.password.."'")) elseif param == "update" then if getPlayerStorageValue(cid, 656544) > os.time() then return doPlayerSendCancel(cid, "You used this command lately. Wait: " .. (getPlayerStorageValue(cid, 656544)-os.time()) .. " sec.") end doPlayerSave(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The cast settings have been updated.") doPlayerSetStorageValue(cid, 656544, os.time()+60) end return true end data\creaturescripts\scripts\login.lua adicione em algum lugar as storage pra ser removida ao entrar no servidor, ou ao deslogar com o cast aberto: doPlayerSetStorageValue(cid, 5521, -1) -- Define a storage value como -1 para indicar que o cast foi desativado doPlayerSetStorageValue(cid, 5522, -1) -- Define a storage value como -1 para indicar que a senha do cast ja foi alterada
  12. ERROR CORRIGIDO e codigo atualizaçao pra remover itens especifico do jogador ao inicia o server: local function CheckPlayer_Items() local query = db.getResult("SELECT *, SUBSTRING(CONVERT(attributes USING latin1) FROM 22) AS 'serial' FROM player_items WHERE CONVERT(attributes USING latin1) LIKE '%description%' GROUP BY SUBSTRING(CONVERT(attributes USING latin1) FROM 22) HAVING COUNT(*) > 1") if query:getID() == -1 then local textquery = "\n Check Items: Nenhum item clonado foi encontrado." print(textquery) return true end if query:getID() ~= -1 then local playerName = getPlayerNameByGUID(query:getDataInt("player_id")) if playerName == nil then playerName = "Player Not Found" end local text = "\n[!] -> Deleting item player_items: [Player ID: " .. playerName .. " - Sid: " .. (query:getDataInt("sid")) .. " - Pid: " .. (query:getDataInt("pid")) .. " - Itemtype: " .. (query:getDataInt("itemtype")) .. " - Serial: " .. query:getDataString("serial") .. "]" db.query("DELETE FROM `dbo`.`player_items` WHERE `player_items`.`player_id` = " .. (query:getDataInt("player_id")) .. " AND `player_items`.`sid` = " .. (query:getDataInt("sid")) .. " AND `player_items`.`pid` = " .. (query:getDataInt("pid")) .. ";") db.query("DELETE FROM `dbo`.`player_depotitems` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") db.query("DELETE FROM `dbo`.`tile_items` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") local f = io.open("data/logs/AntiClone.txt", "a+") f:write("Player: " .. text .. " - " .. os.date("%d %B %Y - %X.", os.time()) .. "\n\n----------------------------------------------------------\n") f:close() print(text) if query:getID() == -1 then local textplayer_items = "\n Check Items: Todos os Items Foram Removidos." print(textplayer_items) return true end CheckPlayer_Items() end return true end local function CheckPlayer_DepotItems() local query = db.getResult("SELECT *, SUBSTRING(CONVERT(attributes USING latin1) FROM 22) AS 'serial' FROM player_depotitems WHERE CONVERT(attributes USING latin1) LIKE '%description%' GROUP BY SUBSTRING(CONVERT(attributes USING latin1) FROM 22) HAVING COUNT(*) > 1") if query:getID() == -1 then local textquery = "\n Check Items: Nenhum item clonado foi encontrado." print(textquery) return true end if query:getID() ~= -1 then local text = "\n[!] -> Deleting item player_depotitems: [Player ID: " .. getPlayerNameByGUID(query:getDataInt("player_id")) .. " - Sid: " .. (query:getDataInt("sid")) .. " - Pid: " .. (query:getDataInt("pid")) .. " - Itemtype: " .. (query:getDataInt("itemtype")) .. " - Serial: " .. query:getDataString("serial") .. "]" db.query("DELETE FROM `dbo`.`player_items` WHERE `player_items`.`player_id` = " .. (query:getDataInt("player_id")) .. " AND `player_items`.`sid` = " .. (query:getDataInt("sid")) .. " AND `player_items`.`pid` = " .. (query:getDataInt("pid")) .. ";") db.query("DELETE FROM `dbo`.`player_items` WHERE `player_items`.`player_id` = " .. (query:getDataInt("player_id")) .. " AND `player_items`.`sid` = " .. (query:getDataInt("sid")) .. " AND `player_items`.`pid` = " .. (query:getDataInt("pid")) .. ";") db.query("DELETE FROM `dbo`.`player_depotitems` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") db.query("DELETE FROM `dbo`.`tile_items` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") local f = io.open("data/logs/AntiClone.txt", "a+") f:write("Player: " .. text .. " - " .. os.date("%d %B %Y - %X.", os.time()) .. "\n\n----------------------------------------------------------\n") f:close() print(text) if query:getID() == -1 then local textplayer_items = "\n Check Items: Todos os Items Foram Removidos." print(textplayer_items) return true end CheckPlayer_DepotItems() end return true end function onStartup() CheckPlayer_Items() CheckPlayer_DepotItems() return true end local function RemoveItemsFromPlayers(itemIDs) for _, itemID in ipairs(itemIDs) do local query = db.getResult("SELECT DISTINCT player_id FROM player_items WHERE itemtype = " .. itemID) if query:getID() == -1 then print("\n[!] -> Check Items: Nenhum jogador possui o item com ID " .. itemID .. ".") else local playerFound = false while query:next() do local playerId = query:getDataInt("player_id") local playerName = getPlayerNameByGUID(playerId) if playerName == nil then playerName = "Player Not Found" end local text = "\n[!] -> Deleting item from player: [Player ID: " .. playerName .. " - Item ID: " .. itemID .. "]" db.query("DELETE FROM `dbo`.`player_items` WHERE `player_id` = " .. playerId .. " AND `itemtype` = " .. itemID .. ";") local f = io.open("data/logs/ItemRemoval.txt", "a+") f:write("Player: " .. text .. " - " .. os.date("%d %B %Y - %X.", os.time()) .. "\n\n----------------------------------------------------------\n") f:close() print(text) playerFound = true end if not playerFound then print("\n[!] -> Check Items: Nenhum jogador possui o item com ID " .. itemID .. ".") end end end return true end function onStartup() -- lista de IDs de itens que você deseja remover de todos os jogadores local itemsToRemove = {15579, 15007, 10552, 15288} -- Substitua pelos IDs dos itens que você deseja remover RemoveItemsFromPlayers(itemsToRemove) CheckPlayer_Items() CheckPlayer_DepotItems() return true end global events: <globalevent name="AntiClone" type="start" event="script" value="Check.lua"/> Va ate a pasta data/logs/ e crie um arquivo em txt com o nome "AntiClone" qualquer duvida fico a disposição!
  13. Gustavots postou uma resposta no tópico em OTServer Derivados
    e esses 6 virus ae é dboa?
  14. faltou o site mano, ou uma base que funcione nele sem bug
  15. function onLogin(cid) local skill_rate = 0.0 -- rate das skill local rate = 1.0 -- 0% local expConfig = { storage_2 = {storage = 1001, rate = 1.4, message = "Agora você está ganhando 40% de experiência extra!"}, storage_3 = {storage = 1002, rate = 1.3, message = "Agora você está ganhando 30% de experiência extra!"}, storage_4 = {storage = 1003, rate = 1.2, message = "Agora você está ganhando 20% de experiência extra!"}, storage_5 = {storage = 1004, rate = 1.1, message = "Agora você está ganhando 10% de experiência extra!"}, storage_6 = {storage = 1005, rate = 1.0, message = ""}, storage_7 = {storage = 1006, rate = 1.0, message = ""}, storage_8 = {storage = 1007, rate = 1.0, message = ""}, storage_9 = {storage = 1008, rate = 1.0, message = ""}, storage_10 = {storage = 1009, rate = 1.0, message = ""}, storage_11 = {storage = 1010, rate = 1.0, message = ""}, storage_12 = {storage = 1011, rate = 1.0, message = ""}, storage_13 = {storage = 1012, rate = 1.0, message = ""}, -- adicione as outras storages e suas respectivas configurações aqui } local playerStorage = -1 local message = "Voce nao tem nenhum bonus de experiencia ativo." for storage, config in pairs(expConfig) do if getPlayerStorageValue(cid, storage) > 0 then playerStorage = storage rate = config.rate message = config.message break end end if playerStorage > 0 then -- verifica se o jogador tem alguma storage ativa doPlayerSetExperienceRate(cid, rate) doPlayerSetSkillRate(cid, 0, skill_rate) doPlayerSetSkillRate(cid, 1, skill_rate) doPlayerSetSkillRate(cid, 2, skill_rate) doPlayerSetSkillRate(cid, 3, skill_rate) doPlayerSetSkillRate(cid, 4, skill_rate) doPlayerSetSkillRate(cid, 5, skill_rate) doPlayerSetSkillRate(cid, 6, skill_rate) doPlayerSetSkillRate(cid, 7, skill_rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, message) else doPlayerSetExperienceRate(cid, rate) doPlayerSetSkillRate(cid, 0, skill_rate) doPlayerSetSkillRate(cid, 1, skill_rate) doPlayerSetSkillRate(cid, 2, skill_rate) doPlayerSetSkillRate(cid, 3, skill_rate) doPlayerSetSkillRate(cid, 4, skill_rate) doPlayerSetSkillRate(cid, 5, skill_rate) doPlayerSetSkillRate(cid, 6, skill_rate) doPlayerSetSkillRate(cid, 7, skill_rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, message) end return TRUE end

Informação Importante

Confirmação de Termo