Troca essa linha
doAddPlayerBanishment(getPlayerGUID(cid), 3, (os.time() + (24 * 60 * 60)), 12, 2, "[sISTEMA ANTI-BOT]")
Por essa
doAddAccountBanishment(getAccountIdByName(getOnlinePlayers()[x]))
No creaturescript e no globalevent.
Abraços.
Por KennyConrad, 14 de dez. de 2012 em Scripts
Troca essa linha
doAddPlayerBanishment(getPlayerGUID(cid), 3, (os.time() + (24 * 60 * 60)), 12, 2, "[sISTEMA ANTI-BOT]")
Por essa
doAddAccountBanishment(getAccountIdByName(getOnlinePlayers()[x]))
No creaturescript e no globalevent.
Abraços.
info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...

+ vai funcionar ? porque essa tag ai ta pra checar o player x e no seu sistema não foi feito por player x etc.
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

+ vai funcionar ? porque essa tag ai ta pra checar o player x e no seu sistema não foi feito por player x etc.
Melhor se faze o que Oneshot diz, não duvide dele kk.
info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...

é não funcionou o player apenas foi kickado. como eu disse acho que tem que fazer uma mudança nessa tag pra checar o player do seu script.
doAddAccountBanishment(getAccountIdByName(getCreatureName(cid)))
info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...

ae agora funcionou está banindo REP + mais oneshot axei um outro bug no seu sistema quando o player ta sendo abordado ai ele desloga e loga ele continua sendo abordado até ai tudo bem ai o player responde o sistema com o codico certo ai aparece a mensagem que tá certo e abordagem desativada etc. ai alguns segundos depois o player é banido e isso so acontece caso o player deslogar e responder se ele responder sem deslogar ele não é banido.
info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...
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 Dezembro 14 por KennyxD