Galera ajuda aki com esse sistema de antibot feito pelo oneshot ele está funcionando 100% porem tem um bug não está banindo os players apenas kicka teria como alguem arrumar pra min meu servidor é 8.60
aki está o script:
creaturescripts
local config = {
duration = 11 * 60,
delay = 14,
storage = {77661, 77662},
message = "[sistema Anti-Cheater] Responda %s através do comando !r. Exemplo: !r 214. Você tem (%s) para responder corretamente, caso contrário será banido",
bantime = 24 * 60 * 60
}
local function r(cid)
if not isCreature(cid) then
return
end
if key == -1 then
return
end
local t = getCreatureStorage(cid, config.storage[1])
local key = getCreatureStorage(cid, config.storage[2])
if os.time() > t then
doCreatureSetStorage(cid, config.storage[1], -1)
doCreatureSetStorage(cid, config.storage[2], -1)
doAddPlayerBanishment(getPlayerGUID(cid), 3, (os.time() + (24 * 60 * 60)), 12, 2, "[sISTEMA ANTI-BOT]")
doBroadcastMessage("[sistema Anti-Cheater] O jogador ".. getCreatureName(cid) .." foi banido por uso de cheater.")
doRemoveCreature(cid)
return
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", (t - os.time()))))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", (t - os.time()))))
addEvent(r, config.delay * 1000, cid)
end
function onLogin(cid)
local t = getCreatureStorage(cid, config.storage[1])
local key = getCreatureStorage(cid, config.storage[2])
if key == -1 then
return true
end
if os.time() > t then
doCreatureSetStorage(cid, config.storage[1], os.time() + config.duration)
addEvent(r, config.delay * 1000, cid)
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", (t - os.time()))))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", (t - os.time()))))
addEvent(r, config.delay * 1000, cid)
return true
end
globalevents:
local config = {
duration = 11 * 60,
delay = 14,
storage = {77661, 77662},
message = "[sistema Anti-Cheater Responda %s através do comando !r. Exemplo: !r 214. Você tem (%s) para responder corretamente, caso contrário será banido",
bantime = 24 * 60 * 60
}
local function r(cid)
if not isCreature(cid) then
return
end
local t = getCreatureStorage(cid, config.storage[1])
local key = getCreatureStorage(cid, config.storage[2])
if key == -1 then
return
end
if os.time() > t then
doCreatureSetStorage(cid, config.storage[1], -1)
doCreatureSetStorage(cid, config.storage[2], -1)
doAddPlayerBanishment(getPlayerGUID(cid), 3, (os.time() + (24 * 60 * 60)), 12, 2, "[sISTEMA ANTI-BOT]")
doBroadcastMessage("[sistema Anti-Cheater] O jogador ".. getCreatureName(cid) .." foi banido por uso de bot.")
doRemoveCreature(cid)
return
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", (t - os.time()))))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", (t - os.time()))))
addEvent(r, config.delay * 1000, cid)
end
function onThink(interval)
for _, cid in ipairs(getPlayersOnline()) do
local key = math.random(1000000, 9999999)
if getPlayerAccess(cid) >= 2 or getPlayerAccountManager(cid) ~= MANAGER_NONE then
return true
end
doCreatureSetStorage(cid, config.storage[1], os.time() + config.duration)
doCreatureSetStorage(cid, config.storage[2], key)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", config.duration)))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", config.duration)))
addEvent(r, config.delay * 1000, cid)
end
return true
end
talkactions:
local config = {
storage = {77661, 77662}
}
function onSay(cid, words, param, channel)
param = tonumber(param) or ""
local key = getCreatureStorage(cid, config.storage[2])
if key == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não está sendo abordado")
return true
end
if param == "" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Digite uma chave de verificação válida.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite uma chave de verificação válida.")
return true
end
if param ~= key then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Resposta incorreta. Digite !r ".. key ..". Caso contrário, você será banido.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Resposta incorreta. Digite !r ".. key ..". Caso contrário, você será banido.")
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Resposta correta. Abordagem desativada.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Resposta correta. Abordagem desativada.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, '[sistema Anti-Cheater] Pergunta respondida corretamene,abordagem desativada.')
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[sistema Anti-Cheater] Pergunta respondida corretamene,abordagem desativada.")
doCreatureSetStorage(cid, config.storage[1], -1)
doCreatureSetStorage(cid, config.storage[2], -1)
return true
end
eu tenhu esse script aki e ele bani perfeitamente teria como alguem pegar a função dele de banir e modificar no script do oneshot pra min ?
function onThink(interval, lastExecution)
for x=1,#getOnlinePlayers() do
if getPlayerAccess(getCreatureByName(getOnlinePlayers()[x])) < 4 and (not isPlayerPzLocked(getCreatureByName(getOnlinePlayers()[x]))) and getOnlinePlayers()[x] ~= "Account Manager" then
if getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564) == -1 then
local numero = math.random(0,999999)
doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, '[sistema Anti-Cheater] Responda: '..numero..'. através do comando !r. Exemplo: !r214. Você tem (00:11:00) para responder corretamente,caso contrário será banido.')
doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_CONSOLE_BLUE, '[sistema Anti-Cheater] Responda: '..numero..'. através do comando !r. Exemplo: !r214. Você tem (00:11:00) para responder corretamente,caso contrário será banido.')
setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564,numero)
elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == -1 then
setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,1)
doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Último aviso. Confirme seu número gerado pelo sistema anti-bot pelo comando !r ou você será banido.')
doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_CONSOLE_BLUE, 'Último aviso. Confirme seu número gerado pelo sistema anti-bot pelo comando !r ou você será banido.')
elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == 1 then
doAddAccountBanishment(getAccountIdByName(getOnlinePlayers()[x]))
setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,-1)
doRemoveCreature(getCreatureByName(getOnlinePlayers()[x]))
end
end
end
return TRUE
end
agradeço a quem puder me ajudar e claro quem ajudar será gratificado com REP +
Pergunta
KennyConrad 5
Galera ajuda aki com esse sistema de antibot feito pelo oneshot ele está funcionando 100% porem tem um bug não está banindo os players apenas kicka teria como alguem arrumar pra min meu servidor é 8.60
aki está o script:
creaturescripts
local config = { duration = 11 * 60, delay = 14, storage = {77661, 77662}, message = "[sistema Anti-Cheater] Responda %s através do comando !r. Exemplo: !r 214. Você tem (%s) para responder corretamente, caso contrário será banido", bantime = 24 * 60 * 60 } local function r(cid) if not isCreature(cid) then return end if key == -1 then return end local t = getCreatureStorage(cid, config.storage[1]) local key = getCreatureStorage(cid, config.storage[2]) if os.time() > t then doCreatureSetStorage(cid, config.storage[1], -1) doCreatureSetStorage(cid, config.storage[2], -1) doAddPlayerBanishment(getPlayerGUID(cid), 3, (os.time() + (24 * 60 * 60)), 12, 2, "[sISTEMA ANTI-BOT]") doBroadcastMessage("[sistema Anti-Cheater] O jogador ".. getCreatureName(cid) .." foi banido por uso de cheater.") doRemoveCreature(cid) return end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", (t - os.time())))) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", (t - os.time())))) addEvent(r, config.delay * 1000, cid) end function onLogin(cid) local t = getCreatureStorage(cid, config.storage[1]) local key = getCreatureStorage(cid, config.storage[2]) if key == -1 then return true end if os.time() > t then doCreatureSetStorage(cid, config.storage[1], os.time() + config.duration) addEvent(r, config.delay * 1000, cid) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", (t - os.time())))) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", (t - os.time())))) addEvent(r, config.delay * 1000, cid) return true endglobalevents:
local config = { duration = 11 * 60, delay = 14, storage = {77661, 77662}, message = "[sistema Anti-Cheater Responda %s através do comando !r. Exemplo: !r 214. Você tem (%s) para responder corretamente, caso contrário será banido", bantime = 24 * 60 * 60 } local function r(cid) if not isCreature(cid) then return end local t = getCreatureStorage(cid, config.storage[1]) local key = getCreatureStorage(cid, config.storage[2]) if key == -1 then return end if os.time() > t then doCreatureSetStorage(cid, config.storage[1], -1) doCreatureSetStorage(cid, config.storage[2], -1) doAddPlayerBanishment(getPlayerGUID(cid), 3, (os.time() + (24 * 60 * 60)), 12, 2, "[sISTEMA ANTI-BOT]") doBroadcastMessage("[sistema Anti-Cheater] O jogador ".. getCreatureName(cid) .." foi banido por uso de bot.") doRemoveCreature(cid) return end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", (t - os.time())))) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", (t - os.time())))) addEvent(r, config.delay * 1000, cid) end function onThink(interval) for _, cid in ipairs(getPlayersOnline()) do local key = math.random(1000000, 9999999) if getPlayerAccess(cid) >= 2 or getPlayerAccountManager(cid) ~= MANAGER_NONE then return true end doCreatureSetStorage(cid, config.storage[1], os.time() + config.duration) doCreatureSetStorage(cid, config.storage[2], key) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.message:format(key, os.date("00:%M:%S", config.duration))) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message:format(key, os.date("00:%M:%S", config.duration))) addEvent(r, config.delay * 1000, cid) end return true endtalkactions:
local config = { storage = {77661, 77662} } function onSay(cid, words, param, channel) param = tonumber(param) or "" local key = getCreatureStorage(cid, config.storage[2]) if key == -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não está sendo abordado") return true end if param == "" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Digite uma chave de verificação válida.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite uma chave de verificação válida.") return true end if param ~= key then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Resposta incorreta. Digite !r ".. key ..". Caso contrário, você será banido.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Resposta incorreta. Digite !r ".. key ..". Caso contrário, você será banido.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Resposta correta. Abordagem desativada.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Resposta correta. Abordagem desativada.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, '[sistema Anti-Cheater] Pergunta respondida corretamene,abordagem desativada.') doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[sistema Anti-Cheater] Pergunta respondida corretamene,abordagem desativada.") doCreatureSetStorage(cid, config.storage[1], -1) doCreatureSetStorage(cid, config.storage[2], -1) return true endeu tenhu esse script aki e ele bani perfeitamente teria como alguem pegar a função dele de banir e modificar no script do oneshot pra min ?
agradeço a quem puder me ajudar e claro quem ajudar será gratificado com REP +
galera alguem ajuda ai por favor
poxa galera niguen pode me ajudar ?
Editado por KennyxDLink para o comentário
https://xtibia.com/forum/topic/201390-ajuda-com-sistema-anti-bot-feito-pelo-oneshot-n%C3%A3o-est%C3%A1-banindo/Compartilhar em outros sites
6 respostass a esta questão
Posts Recomendados