• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help urgent rep++

rcb chief

New Member
Joined
Dec 23, 2008
Messages
53
Reaction score
0
I have this anti bot system by karpio. And it works good but if players are in trainers they can also get banned. I need that if players is in non-pvp zone he cannot get checked.

Hi is the part of the script where i think it should be added.
<talkaction words="/check" event="buffer"><![CDATA[
domodlib('check_system')
local t = string.explode(param, ",")
if(param == "") then
return doPlayerPopupFYI(cid, "Welcome in AntiBot Information.\nScript author: Karpio\nScript Version: 1.1\n\nMini tutorial:\n/check nick - if you want check player with name nick\n/check code - if someone check you\n\nYou can check next player "..((getPlayerStorageValue(cid, config.ptime) - os.time()) > 0 and "after "..czas(getPlayerStorageValue(cid, config.ptime) - os.time()) or "now")..".\nYou can be check "..((getPlayerStorageValue(cid, config.ttime) - os.time()) > 0 and "after "..czas(getPlayerStorageValue(cid, config.ttime) - os.time()) or "now")..".")
elseif(t[1] == "guild") then
if(not config.guild) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not use this function.")
elseif(not t[2]) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: Use it /check guild, on/off.")
elseif(t[2] == "on" and getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER) then
return antibotGuildChange(cid, "on")
elseif(t[2] == "off" and getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER) then
return antibotGuildChange(cid, "off")
else
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: Invalid param or you aren't leader.")
end
elseif(isNumber(param)) then
if(getPlayerStorageValue(cid, config.code) < 1) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: If you want check code, you must be checked by other player.")
elseif(getPlayerStorageValue(cid, config.code) ~= tonumber(param)) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: Invalid code.")
end
setPlayerStorageValue(cid, config.code, 0)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: Code is correct.")
return true
else
if(getPlayerByNameWildcard(param) == nil) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: Target not found.")
elseif(getPlayerByNameWildcard(param) == tonumber(cid)) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check yourself.")
elseif(getTileInfo(getCreaturePosition(cid)).protection) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check players if you are in protection zone.")
elseif(isNumber(config.lvl) and getPlayerLevel(cid) < config.lvl) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not use this system if your level is lover that "..config.lvl..".")
elseif(getTileInfo(getCreaturePosition(getPlayerByNameWildcard(param))).protection) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check this players, because "..(getPlayerSex(getPlayerByNameWildcard(param)) == 0 and "she" or "he").." is in protection zone.")
elseif(config.afk and getPlayerStorageValue(cid, config.afks) > 0) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check players if you are afk.")
elseif(config.afk and getPlayerStorageValue(getPlayerByNameWildcard(param), config.afks) > 0) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check this players, because "..(getPlayerSex(getPlayerByNameWildcard(param)) == 0 and "she" or "he").." is afk.")
elseif(getPlayerStorageValue(cid, config.ptime) > os.time()) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You must rest if you want check next player.")
elseif(getPlayerStorageValue(getPlayerByNameWildcard(param), config.ttime) > os.time()) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check this player.")
elseif((getTileInfo(getCreaturePosition(cid)).nologout or getTileInfo(getCreaturePosition(getPlayerByNameWildcard(param))).nologout) and config.nologout) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check this player.")
elseif(not antibotGuildCheck(cid, getPlayerByNameWildcard(param)) and config.guild) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check this player.")
elseif(getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(param))) > config.distance or config.distance == 0) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[AntiBot]: You can not check this player.")
end
check(cid, getPlayerByNameWildcard(param))
end]]>
</talkaction>

as you can see there is the part where it detects if the player is in protection zone.. now i need it also if its in a non-pvp area.

WILL REP WITH MY TWO ACCOUNTS!!!
 
Back
Top