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

Anti-Dynamic-IP[Globalevent] (Developers of TFS 0.2.11pl2 please READ)

zup

New Member
Joined
Mar 13, 2008
Messages
187
Reaction score
2
Ok, so my story is very simple. Im a simple guy what just loving tibia and playing at this game like 10 or 11 years don't remember (i was very young).. Now im 23, and one friend gived me a 6xAMD and Asus mother what supports 6x but question is not taking about hardware... Its about Internet..

Look im just a guy who love scripts and i runned OT 9.20, global map, Mystic Spirit distro 0.2.11pl2, all works fine, but little problem and i show how i solved she... And i have no idea how to make it better..

Problem: Dynamic IP, what can changing like 2~6 times per week(reconnecting get 3~5 seconds).
What happen: Players getting freeze(someone dies), and when player try login it shows only 'Character list' on client, and can't login.
Something interesting happen inside Server.. Session is disappearing but not 100%.. Need only restart server so how to do if im not in home? I ask because i was in hospital(1~2 months) and THANKS for this script, i managed my OT by my phone.... And i supported this all time.. php, lua and talking with players in CHAT what i did in hosp. but its not important.. Server just must shutdown at IP changed

How i solved:

globalevents.xml:
added string to initialize script:
Code:
<globalevent name="connection" interval="60000" script="connection.lua" />

Ok and script:
Code:
function onThink(interval, lastExecution)
local command = os.execute("ping -n 2 google.com")
		if (command == 1) then 
			if (saveData() == TRUE) then
			os.execute("taskkill /F /IM server.exe")
			end		
		end
return TRUE
end

That works nice, but i think its a not best way to make server a thing how to shutdown fast by IP changing and SAVE players and Houses...
Because this script as you see VERY simple but makes server lag cuz globalevents motor waiting respond from [ping]...


So question for developers:
Dear Talaturen and other good people, it is possible to mix something in otserv.cpp to make it better if IP changing??? Maybe not me interested!!

THANKS ALOT FOR ANSWERING...:rolleyes::rolleyes::rolleyes::rolleyes:




EDIT:
Oh i forgot... It can help if your server is got a ddos and globalevent cath that and save data and shut server down...







P.S. sorry for horrible English :)







EDIT:

AMAZING!! 33 views and not respond? Come on GUYS!!!!!!!!!!!!!!!!!
 
Last edited:
So your ip is changing?

Well..... Make a no-ip.com host name, and download DUC 3.0
DUC 3.0 link your host name to your dinamic ip, so i think you dont need to restart server.... :)

I think it should work.....

If i didnt understand, please tell it to me...
 
well look at my current project its "shine.hopto.org" where hopto.org its a part of no-ip.org service where i downloaded and setting up DUC 3.0

so dns is work but server can get global ip from shine.hopto.org ONLY when hes starting up and world initialized...
For example:
9:00 AM - server is starting with shine.hopto.org in "ip" = "shine.hopto.org" inside config.lua -> getting global ip: (214.23.164.34) - for example...
11:00 AM - server is still working and ip was changed to (44.124.202.45) - for example.
if i ping server from other PC i will see:
9:00 AM - ping shine.hopto.org :: ping 214.23.164.34 ~ 23 msec
11:00 AM - ping shine.hopto.org :: ping 44.124.202.45 ~ 23 msec

So DUC 3.0 works perfect.. Apache server works with ANY IP parameters, no need to RE-Initialize...
BUT Server "thinking" what he have 214.23.164.34 only :( (Just showing to players a character list and can't login to game :blink:
 
-- Connection Config
ip = "shine.hopto.org"
bindOnlyGlobalAddress = "no"


well bindOnlyGlobalAddress = no but i don't know what is mean??? and i don't know hows that work?
 
zup today this happened to me, i want to use your script, this really work?
and i have a question...

in this part:
os.execute("taskkill /F /IM server.exe")

i need change server.exe to name of my console?
and what is 'taskkill /f /im? is directory of your linux? cuz i use windows...


thanks alot, and good luck for we.. =D
 
Back
Top