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

CreatureEvent No more crash by magebomb

this works? i tested it and still the magebombs log on all at same time perfectly fine like the scripts AND code dont work, i have both of them..
 
Lua:
  local config = {
        seconds = 2,            -- in seconds
        onlyWithSameIP = "yes"  -- will work for all players ("no"), or only check player with same IP? ("yes")
}

--DONT MODIFY
config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP)

local m_lastLogin, m_lastIP = 0, 0

function onLogin(cid)
        local timeNow, playerIP = os.time(), getPlayerIp(cid)
        if(m_lastLogin + config.seconds >= timeNow and
                (config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then
                        
                doAddIpBanishment(playerIP, 2419200)
                return FALSE
        end

        m_lastIP = playerIP
        m_lastLogin = timeNow
        return TRUE
end

Try this, It ipbans the player for 24 days.
 
@Sizaro

what is when i reconect in 2 seconds?? i take a ban??
i need a script when player login to second account...
use script from comend ./mc go to make this script!plz!
 
ok 2h work with google.pl and i wrote amator anty mc and magebomb
who want code send me priv or gg: 6120117
 
[01/09/2009 14:10:25] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login2.lua)


i need of creatureevent for version 8.50 tfs 0.3.4 plz...
 
Hello!
I have a question. My destribution is Aries 0.4.0 and i haven´t the folder creatureevents.

Is there a chance to do it without this folder?

If there is someone write me it, please.

Thanks!

Sorry for my bad english
 
PHP:
local config = {
        seconds = 2,            -- in seconds
        onlyWithSameIP = "yes" -- will work for all players ("no"), or only check player with same IP? ("yes")
}
 
--DONT MODIFY
config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP)
 
local m_lastLogin, m_lastIP = 0, 0
 
function onLogin(cid)
        local timeNow, playerIP = os.time(), getPlayerIp(cid)
        if(m_lastLogin + config.seconds >= timeNow and
                (config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then
 
                doAddIpBanishment(playerIP, 2419200)
                return FALSE
        end
 
        m_lastIP = playerIP
        m_lastLogin = timeNow
        return TRUE
end


You can modify this script to make it more manageable, you can edit easy.so that when you enter more than 3 characters in the MC this banned?
 
Read the script...

It bans you if there is more then "x" connections to the server in 2 seconds (seconds = 2,)
Only with the same IP. Doesn't check all players.
 
For 0.2:
Code:
local config = {
        seconds = 2,		-- in seconds
        onlyWithSameIP = TRUE	-- will work for all players (FALSE), or only check player with same IP? (TRUE)
}

local m_lastLogin, m_lastIP = 0, 0

function onLogin(cid)
        local timeNow, playerIP = os.time(), getIPByPlayerName(getPlayerName(cid))
        if(m_lastLogin + config.seconds >= timeNow and
                (config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then
                return FALSE
        end

        m_lastIP = playerIP
        m_lastLogin = timeNow
        return TRUE
end

I have this script and I do not know how he is to work, but my point here is that one could only 2 ip chary log ... it somehow possible to convert?
 
[12/1/2014 20:51:29] [Error - CreatureScript Interface]
[12/1/2014 20:51:29] data/creaturescripts/scripts/protection.lua:eek:nLogin
[12/1/2014 20:51:29] Description:
[12/1/2014 20:51:29] data/creaturescripts/scripts/protection.lua:13: attempt to perform arithmetic on global 'seconds' (a nil value)
[12/1/2014 20:51:29] stack traceback:
[12/1/2014 20:51:29] data/creaturescripts/scripts/protection.lua:13: in function <data/creaturescripts/scripts/protection.lua:11>
[12/1/2014 20:51:29] Mayuya has logged out.
[12/1/2014 20:54:37] Mage Test has logged in.

Stays saying connecting to game world on client end, but shows the above server side.

How to define the seconds?
 
Back
Top