• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Znote ACC Create account add 3500 rank on new player

isn't it better to do it on login?
something like this:
LUA:
function onLogin(player)
    local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
        db.query("UPDATE `player` SET `rank` = 3500 WHERE `id` = " .. (player:getId()))
    else
    -- rest of onLoginscript
 
hmm possible, just please direct me where should I add it to login.lua?
Post automatically merged:

I added it to login.lua but it doesn't add rank
Post automatically merged:

stupid question but, other script engine was altering my engine and something is wrong even if I delete the whole login. how is it possible
Post automatically merged:

however I need a script or how to convert znote acc because the server has been converted so that it does not use login.lua
 
Last edited:
Set default to 3500 in that field for that table in the database
SQL:
ALTER TABLE table_name ALTER COLUMN rank SET DEFAULT 3500;
And if you want to update ALL current players that have rank = 0 to 3500
SQL:
 UPDATE table_name SET rank = 3500 WHERE rank = 0
Change table_name to the name of the table obviously.
 
Set default to 3500 in that field for that table in the database
SQL:
ALTER TABLE table_name ALTER COLUMN rank SET DEFAULT 3500;
And if you want to update ALL current players that have rank = 0 to 3500
SQL:
 UPDATE table_name SET rank = 3500 WHERE rank = 0
Change table_name to the name of the table obviously.
thank you worked,
and tell me, can you make a script to give a player like red skull between x and y rankings? the skull itself without anything
 
Back
Top