• 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!

Lua Skipping Potar's antibot script with an item?

bury

Active Member
Joined
Jul 27, 2008
Messages
421
Solutions
7
Reaction score
25
Hello!

I'm using TFS 0.4 and this item would skip the antibot system for x hours.

I'm using the potar's Antibot script that works perfect on my rev.

On lib.lua:

AB_SYSTEM_BASE = 77000 -- this storage must be free, from 77000 to 77006 --done

idk if skipping any storage of this could be possible.

Thanks!
 
Solution
change this
Lua:
if isPlayer(cid) and value3 >= os.time() and getPlayerLevel(cid) >= AB_SYSTEM_CHECK_LVL and AB_SYSTEM_get(cid,AB_SYSTEM_IGNOREUSERS) <= 0 and AB_SYSTEM_get(cid,AB_SYSTEM_CAN_USE_TALKACTION) <= 0 then
to this
Lua:
local skip_checks = getPlayerStorageValue(cid, 45001)
if isPlayer(cid) and value3 >= os.time() and getPlayerLevel(cid) >= AB_SYSTEM_CHECK_LVL and AB_SYSTEM_get(cid,AB_SYSTEM_IGNOREUSERS) <= 0 and AB_SYSTEM_get(cid,AB_SYSTEM_CAN_USE_TALKACTION) <= 0 and skip_checks < os.time() then

and use this for the item in actions.xml
Lua:
local storage = 45001
local ignore_timer_seconds = 60 * 60 * 24 -- 24 hours.

function onUse(cid, item, fromPosition, itemEx, toPosition)
    setPlayerStorageValue(cid, 45001, os.time() +...
change this
Lua:
if isPlayer(cid) and value3 >= os.time() and getPlayerLevel(cid) >= AB_SYSTEM_CHECK_LVL and AB_SYSTEM_get(cid,AB_SYSTEM_IGNOREUSERS) <= 0 and AB_SYSTEM_get(cid,AB_SYSTEM_CAN_USE_TALKACTION) <= 0 then
to this
Lua:
local skip_checks = getPlayerStorageValue(cid, 45001)
if isPlayer(cid) and value3 >= os.time() and getPlayerLevel(cid) >= AB_SYSTEM_CHECK_LVL and AB_SYSTEM_get(cid,AB_SYSTEM_IGNOREUSERS) <= 0 and AB_SYSTEM_get(cid,AB_SYSTEM_CAN_USE_TALKACTION) <= 0 and skip_checks < os.time() then

and use this for the item in actions.xml
Lua:
local storage = 45001
local ignore_timer_seconds = 60 * 60 * 24 -- 24 hours.

function onUse(cid, item, fromPosition, itemEx, toPosition)
    setPlayerStorageValue(cid, 45001, os.time() + ignore_timer_seconds)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will be ignored by the antibot system initial check for an additional " .. ignore_timer_seconds .. " seconds.")
    return true
end
 
Solution
Back
Top