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

Login.lua dudes

manolete66

New Member
Joined
Jul 9, 2018
Messages
24
Reaction score
4
Hi guys, i cant find where are declarated this 2 functions.


CODE:
------------------------------------------------------------------------------------------------------------------------------------------------------------
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()
else
if loginStr ~= "" then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
end
loginStr = string.format('Your last visit was on %s.', os.date('%a %b %d %X %Y', player:getLastLoginSaved()))
end

player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
local playerId = player:getId()

player:initDailyRewardSystem() <--------- The first one
player:loadSpecialStorage() <--------- The second
---------------------------------------------------------------------------------------------------------------------------------------------------------------


I searched in luascript.cpp and in a lot of .h defined inside this one. If someone can instruct me his knowledge will be well recived.
Other question is what can i do to debug c/c++ code? Can i use prints without recompile all the code?
 
Solution
Great! VSCode is what I'm using too, searching is very easy.
First, open your server folder in VSCode (File > Open Folder [CTRL+K, CTRL+O]), then on the left side select Search icon
1587726622616.png

Now you can type something you want to search for. Here is an example
1587726695872.png

You can even press that little arrow next to search field, that will open Replace function. If you type something in search input and then in replace input and press that little button on the right of replace input, every file containing string from search input, will be replaced with string from replace input. There's more buttons if you want to search for more specific strings (like case sensitivity or even regular expressions).
You should get yourself some proper IDE and use it to search all the files for given string.
This isn't TFS 1.3, are you using some custom server sources?

You can use print in Lua, if you want to print in C++ then yes, you will have to recompile (use std::cout to print).
 
Im using Visual Studio Code as IDE but idk how to configure properly to search all the files for given string. Im using otxserver-new distribution by malucooo and is my first project to build a server. Some tips?
 
Great! VSCode is what I'm using too, searching is very easy.
First, open your server folder in VSCode (File > Open Folder [CTRL+K, CTRL+O]), then on the left side select Search icon
1587726622616.png

Now you can type something you want to search for. Here is an example
1587726695872.png

You can even press that little arrow next to search field, that will open Replace function. If you type something in search input and then in replace input and press that little button on the right of replace input, every file containing string from search input, will be replaced with string from replace input. There's more buttons if you want to search for more specific strings (like case sensitivity or even regular expressions).
 
Solution
Oh nice, thanks mate. I think that now search functions Will be easier than before.
Ill continue working in this project. Cheers
 
Back
Top