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:
Ok and script:
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...
EDIT:
P.S. sorry for horrible English
EDIT:
AMAZING!! 33 views and not respond? Come on GUYS!!!!!!!!!!!!!!!!!
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...
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: