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

/m spawn player

beliar34

Member
Joined
Feb 28, 2012
Messages
307
Solutions
7
Reaction score
11
sup, i am looking for script that will auto log player and send him to god who is using this command,
something like "/m" creature spawn but for players (spawn player from database or spawn sample with random name)

TFS 0.3.x
 
Code:
int32_t LuaScriptInterface::luaLoadPlayer(lua_State* L)
{
    //loadPlayer(name)
    std::string name = popString(L);

    PlayerVector players = g_game.getPlayersByName(name);
    if(players.empty())
    {
        Player* player = new Player(name, NULL);
        player->useThing2();

        player->setID();
        if(!IOLoginData::getInstance()->loadPlayer(player, name, true))
        {
            lua_pushboolean(L, false);
        }
        if(!IOLoginData::getInstance()->loadPlayer(player, name))
        {
            lua_pushboolean(L, false);
        }
        if(!g_game.placeCreature(player, player->getLoginPosition()) && !g_game.placeCreature(player, player->getTemplePosition(), false, true))
        {
            lua_pushboolean(L, false);
        }
        player->setOperatingSystem(CLIENTOS_WINDOWS);
        player->setClientVersion(850);
        lua_pushboolean(L, true);
        //lua_pushboolean(L, connect(_player->getID(), CLIENTOS_WINDOWS, 850));
      
    }

    lua_pushboolean(L, false);
    return 1;
}
+ some changes in game.cpp, *.h files and player.cpp

Code:
function onSay(cid, words, param)
    do loadPlayer(Bezi)
    end
    return true
end

and dont work ? player dont log in no errors in console , compiled without errors, 0 logs in console when command use and i got this player in database any ideas?


Update : function works :)

Code:
function onSay(cid, words, param)
loadPlayer(param)
    return true
end


I am going to sleep now... i am looking now for script that will log in randomly x offline players from database i am weak at "db.executeQuery" etc so i cant do it by myself ;/
 
Last edited:
What the hell is the point of this?
Logging random players into the game?
Are you just trying to boost your online count without having to have x number of clients open?

Whatever your trying to do, it sounds fishy & I won't be a part of it.
 
What the hell is the point of this?
Logging random players into the game?
Are you just trying to boost your online count without having to have x number of clients open?

Whatever your trying to do, it sounds fishy & I won't be a part of it.
Yes, this is in spoofing intention. This thread should be instantly deleted, this is as it call "destructive behaviour".
 
Code:
function onSay(cid, words, param)
local resultId = db.storeQuery("SELECT `name` FROM `players` WHERE `online` = 0 AND `level` > 10")
local _lol = result.getDataString(lol, "name")
loadPlayer(_lol)
    return true
end

all done xd

Its not spoofing i am configuring auto bot players on war server ... i will cut them from online
 
Well, glad you got it figured out.
I am looking now for function that will set nonlogoutflag for "_lol" players for 60 minutes
tfs 0.3
or if connected from client :"666" dont disconnect ?
or if player got ip : 0.0.0.0 and if player dont have pz teleport him to random location
Code:
        local posx_tmp = math.random(1638,1662)
        local posy_tmp = math.random(1498,1524)
        local posz_tmp =
can you help me figure this out ? i am working in creaturescripts right now

:
Code:
function onStatsChange(cid, attacker, type, combat, value)
    if((type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and isPlayer(attacker) and isBot(cid)) then
        local guid = getPlayerGUID(cid)
        if(b_attackersLastSec[guid] == nil) then
            b_attackersLastSec[guid] = {}
        end
        if(b_attackersLastSec[guid][attacker] == nil) then
            b_attackersLastSec[guid][attacker] = 1
        end
    end
    return true
end

if i made this script 100% done i will make a tutorial DIY ;-)
 
I am looking now for function that will set nonlogoutflag for "_lol" players for 60 minutes
tfs 0.3
or if connected from client :"666" dont disconnect ?
or if player got ip : 0.0.0.0 and if player dont have pz teleport him to random location
Code:
        local posx_tmp = math.random(1638,1662)
        local posy_tmp = math.random(1498,1524)
        local posz_tmp =
can you help me figure this out ? i am working in creaturescripts right now

:
Code:
function onStatsChange(cid, attacker, type, combat, value)
    if((type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and isPlayer(attacker) and isBot(cid)) then
        local guid = getPlayerGUID(cid)
        if(b_attackersLastSec[guid] == nil) then
            b_attackersLastSec[guid] = {}
        end
        if(b_attackersLastSec[guid][attacker] == nil) then
            b_attackersLastSec[guid][attacker] = 1
        end
    end
    return true
end

if i made this script 100% done i will make a tutorial DIY ;-)
IMO easiest way in that case is to remove "afk" players by globalevent:
Lua:
function onThink(interval, lastExecution, thinkInterval)
   for _, pid in ipairs(getPlayersOnline()) do
       if getPlayerIdleTime(pid) > 15 * 1000 * 60 and not isBot(pid) then
           doRemoveCreature(pid, true)
       end
   end
   return true
end
or maybe this option:

Lua:
function onThink(interval, lastExecution, thinkInterval)
   for _, pid in ipairs(getPlayersOnline()) do
       if getPlayerIdleTime(pid) > 5 * 1000 * 60 and isBot(pid) then
           doPlayerResetIdleTime(pid)
       end
   end
   return true
end

#Edit
As I see you using Gesior Bots System. I was using this one aswell few years ago. Prepare yourself, you'll need to fix many things. But that system was great, I always had 500 players on start :D. Easy spoof + easy to make it not detectable :D
 
Last edited:
Back
Top