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

Wezza

lua nOOb
Joined
May 31, 2008
Messages
2,278
Reaction score
31
Having a small problem with LoginFake.

Error code;

Code:
[08/07/2014 04:53:12] Lua Script Error: [CreatureScript Interface]
[08/07/2014 04:53:12] data/creaturescripts/scripts/loginFake.lua:onLogin

[08/07/2014 04:53:12] data/creaturescripts/scripts/loginFake.lua:11: attempt to get length of a boolean value
[08/07/2014 04:53:12] stack traceback:
[08/07/2014 04:53:12]    data/creaturescripts/scripts/loginFake.lua:11: in function <data/creaturescripts/scripts/loginFake.lua:1>

Loginfake.lua
Code:
function onLogin(cid)
 
local onlineCheatPlayers = getFakeOnlinePlayers()
local maxFake = getConfigInfo('fakeAmmountPlayers')
local formula = getConfigInfo('fakePercent') * (#getOnlinePlayers() + #onlineCheatPlayers) * 0.01
 
    for i = 1, 4 do     
        if #onlineCheatPlayers >= formula or #onlineCheatPlayers >= maxFake then
            break
        else
            local player = getPotentialFakePlayers()[math.random(1, #getPotentialFakePlayers())]
            if isInTable(onlineCheatPlayers, player) == FALSE then
                addFakeOnlinePlayer(player)
                db.executeQuery("UPDATE players SET online = 1, lastlogin = " .. os.time() .. ", fake = 2 WHERE name = " .. db.escapeString(player))
            else
                debugPrint("Player already in table, check sql code.")
            end
        end
    end
    return true
end
 
Last edited:
I hope your server get banned and you don't win your kebab money from donations for doing this shit

@topic
It would be nice to you to at least try to learn basic Lua before trying to spoof data
 
One of these is nil (onlineCheatPlayers, formula, and maxFake).

Code:
if #onlineCheatPlayers >= formula or #onlineCheatPlayers >= maxFake then

Add this:

Code:
print(#onlineCheatPlayers)
print(formula)
print(maxFake)

Before that check, then you should be able to see which one is nil.
 
So, there's something wrong with the getConfigInfo function.
Have you checked the spelling of 'fakeAmmountPlayers'?
 
I added line

Code:
fakeAmmountPlayers
in config.lua, now another errors appears, have a look

Code:
[03/07/2014 18:34:00] Lua Script Error: [CreatureScript Interface]
[03/07/2014 18:34:00] data/creaturescripts/scripts/loginFake.lua:onLogin

[03/07/2014 18:34:00] data/creaturescripts/scripts/loginFake.lua:16: attempt to get length of a boolean value
[03/07/2014 18:34:00] stack traceback:
[03/07/2014 18:34:00]     data/creaturescripts/scripts/loginFake.lua:16: in function <data/creaturescripts/scripts/loginFake.lua:1>

this happens when I try to login.
 
I added fakeAmmountPlayers in config.lua, because there is a fakePercent in config.lua as well.. so the FakeAmmountPlayers was missing..
 
I was not rude either, I told you that I'm having fun as well :D

bump

bump
 
Last edited by a moderator:
@Evan


Code:
[08/07/2014 04:53:12] Lua Script Error: [CreatureScript Interface]
[08/07/2014 04:53:12] data/creaturescripts/scripts/loginFake.lua:onLogin

[08/07/2014 04:53:12] data/creaturescripts/scripts/loginFake.lua:11: attempt to get length of a boolean value
[08/07/2014 04:53:12] stack traceback:
[08/07/2014 04:53:12]     data/creaturescripts/scripts/loginFake.lua:11: in function <data/creaturescripts/scripts/loginFake.lua:1>
 
Last edited:
Back
Top