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

Anti-Idle

Ward_214

Pro PvP
Joined
Dec 11, 2008
Messages
297
Reaction score
0
My anti-idle isnt working.... this is what I have in config.php

Code:
 -- Limits
idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
expireReportsAfterReads = 1
playerQueryDeepness = 2
maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0

But it never kicks, can someone help?

And also I need an !aol script... the one I have doesn't work it just errors with the message "You don't have enough money" I've tried a lot of different ones. Im running TFS 0.3.6
 
use this one :)
-- Limits
idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
expireReportsAfterReads = 1
playerQueryDeepness = 2
maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0
post your config.lua here and yor idle.lua script please
 
Ohh, Okay.. sorry I will use quote xD

-- The Forgotten Server Config

-- Account manager
accountManager = true
namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 1105
newPlayerSpawnPosY = 989
newPlayerSpawnPosZ = 7
newPlayerTownId = 0
newPlayerLevel = 20
newPlayerMagicLevel = 5
generateAccountNumber = false

-- Unjustified kills
redSkullLength = 30 * 24 * 60 * 60
blackSkullLength = 45 * 24 * 60 * 60
dailyFragsToRedSkull = 7
weeklyFragsToRedSkull = 15
monthlyFragsToRedSkull = 30
dailyFragsToBlackSkull = dailyFragsToRedSkull
weeklyFragsToBlackSkull = weeklyFragsToRedSkull
monthlyFragsToBlackSkull = monthlyFragsToRedSkull
dailyFragsToBanishment = dailyFragsToRedSkull
weeklyFragsToBanishment = weeklyFragsToRedSkull
monthlyFragsToBanishment = monthlyFragsToRedSkull
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 100
useBlackSkull = true
useFragHandler = true
advancedFragList = false

-- Banishments
notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 7 * 24 * 60 * 60
killsBanLength = 7 * 24 * 60 * 60
finalBanLength = 30 * 24 * 60 * 60
ipBanishmentLength = 1 * 24 * 60 * 60
broadcastBanishments = true
maxViolationCommentSize = 200
violationNameReportActionType = 2
autoBanishUnknownBytes = false

-- Battle
worldType = "pvp"
protectionLevel = 100
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 30 * 1000
huntingDuration = 2 * 1000
criticalHitChance = 10
criticalHitMultiplier = 1.5
displayCriticalHitNotify = false
removeWeaponAmmunition = false
removeWeaponCharges = false
removeRuneCharges = true
whiteSkullTime = 5 * 30 * 1000
noDamageToSameLookfeet = false
showHealingDamage = false
showHealingDamageForMonsters = false
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = false
oldConditionAccuracy = false
loginProtectionPeriod = 10 * 1000
deathLostPercent = 10
stairhopDelay = 1 * 1000
pushCreatureDelay = 2 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true

-- Connection config
worldId = 0
ip = "lemonserver.no-ip.org"
bindOnlyConfiguredIpAddress = false
loginPort = 7171
gamePort = 7172
adminPort = 7171
statusPort = 7171
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = 1000
motd = "Welcome to the Lemon Server!"
displayOnOrOffAtCharlist = false
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Lemon"
loginMessage = "Welcome to Lemon!"
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = true
forceSlowConnectionsToDisconnect = false
loginOnlyWithLoginServer = false
premiumPlayerSkipWaitList = false

-- Database
sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = "xxxxxx"
sqlDatabase = "xxxxx"
sqlFile = "forgottenserver.s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"

-- Deathlist
deathListEnabled = true
deathListRequiredTime = 1 * 60 * 1000
deathAssistCount = 19
maxDeathRecords = 5

-- Guilds
ingameGuildManagement = true
levelToFormGuild = 8
premiumDaysToFormGuild = 0
guildNameMinLength = 4
guildNameMaxLength = 20

-- Highscores
highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 60

-- Houses
buyableAndSellableHouses = true
houseNeedPremium = true
bedsRequirePremium = true
levelToBuyHouse = 80
housesPerAccount = 1
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 5000
houseRentPeriod = "true"
houseCleanOld = 0
guildHalls = true

-- Item usage
timeBetweenActions = 200
timeBetweenExActions = 1000
hotkeyAimbotEnabled = true

-- Map
mapName = "theend"
mapAuthor = "Komic"
randomizeTiles = true
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = "-1"

-- Process
defaultPriority = "high"
niceLevel = 5
coresUsed = "-1"

-- Startup
optimizeDatabaseAtStartup = true
removePremiumOnInit = true
confirmOutdatedVersion = false

-- Spells
formulaLevel = 5.0
formulaMagic = 1.0
bufferMutedOnSpellFailure = false
spellNameInsteadOfWords = false
emoteSpells = true

-- Outfits
allowChangeOutfit = true
allowChangeColors = true
allowChangeAddons = true
disableOutfitsForPrivilegedPlayers = false
addonsOnlyPremium = false

-- Miscellaneous
dataDirectory = "data/"
bankSystem = true
displaySkillLevelOnAdvance = false
promptExceptionTracerErrorBox = true
separateViplistPerCharacter = false
maximumDoorLevel = 5000
maxMessageBuffer = 4

-- Saving-related
-- useHouseDataStorage usage may be found at README.
saveGlobalStorage = true
useHouseDataStorage = false
storePlayerDirection = false

-- Loot
checkCorpseOwner = true
monsterLootMessage = 3
monsterLootMessageType = 25

-- Ghost mode
ghostModeInvisibleEffect = false
ghostModeSpellEffects = true

-- Limits
idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
expireReportsAfterReads = 1
playerQueryDeepness = 2
maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0

-- Premium-related
freePremium = true
premiumForPromotion = true

-- Blessings
blessingOnlyPremium = true
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8

-- Rates
experienceStages = true
rateExperience = 50.0
rateSkill = 60
rateMagic = 40
rateLoot = 3
rateSpawn = 1

-- Monster rates
rateMonsterHealth = 1.0
rateMonsterMana = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0

-- Stamina
rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 12
staminaRatingLimitTop = 41 * 60
staminaRatingLimitBottom = 14 * 60
rateStaminaAboveNormal = 1.5
rateStaminaUnderNormal = 0.5
staminaThresholdOnlyPremium = true

-- Party
experienceShareRadiusX = 30
experienceShareRadiusY = 30
experienceShareRadiusZ = 1
experienceShareLevelDifference = 2 / 3
extraPartyExperienceLimit = 20
extraPartyExperiencePercent = 5
experienceShareActivity = 2 * 60 * 1000

-- Global save
globalSaveEnabled = false
globalSaveHour = 8
shutdownAtGlobalSave = true
cleanMapAtGlobalSave = false

-- Spawns
deSpawnRange = 2
deSpawnRadius = 50

-- Summons
maxPlayerSummons = 2
teleportAllSummons = false
teleportPlayerSummons = false

-- Status
ownerName = "beerabbit5"
ownerEmail = "[email protected]"
url = "otland.net"
location = "Europe"
displayGamemastersWithOnlineCommand = false

-- Logs
adminLogsEnabled = false
displayPlayersLogging = true
prefixChannelLogs = ""
runFile = ""
outLogName = ""
errorLogName = ""
truncateLogsOnStartup = false
 
idle.lua:

local config = {
idleWarning = getConfigValue('idleWarningTime'),
idleKick = getConfigValue('idleKickTime')
}

function onThink(cid, interval)
if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or
getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then
return true
end

local idleTime = getPlayerIdleTime(cid) + interval
doPlayerSetIdleTime(cid, idleTime)
if(config.idleKick > 0 and idleTime > config.idleKick) then
doRemoveCreature(cid)
elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then
local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes"
if(config.idleKick > 0) then
message = message .. ", you will be disconnected in "
local diff = math.ceil((config.idleWarning - config.idleKick) / 60000)
if(diff > 1) then
message = message .. diff .. " minutes"
else
message = message .. "one minute"
end

message = message .. " if you are still idle"
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
end

return true
end
 
I have this one...u must have the same error that i have, do u get any error in console?
Code:
local config = {
        idleWarning = getConfigValue('idleWarningTime'),
        idleKick = getConfigValue('idleKickTime')
}

function onThink(cid, interval)
        if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or
                getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then
                return true
        end

        local idleTime = getPlayerIdleTime(cid) + interval
        doPlayerSetIdleTime(cid, idleTime)
        if(config.idleKick > 0 and idleTime > config.idleKick) then
                doRemoveCreature(cid)
        elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then
                local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes"
                if(config.idleKick > 0) then
                        message = message .. ", you will be disconnected in "
                        local diff = math.ceil((config.idleWarning - config.idleKick) / 60000)
                        if(diff > 1) then
                                message = message .. diff .. " minutes"
                        else
                                message = message .. "one minute"
                        end

                        message = message .. " if you are still idle"
                end

                doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
        end

        return true
end
 
Back
Top