Jump to content
  • 0

Interlude Vanganth and Dynamic IP


Question

Posted

Basically i need to setup a L2OFF server with a dynamic ip(this ip changes every time that the modem restarts)

I have a no-ip service,and vangath files ,so i use a noip of 15 letters (it can't containt more than 15 lettters on the dbo.server table)

Example serv67.ddns.net

So When Hauth Loads the server it says External IP "127.0.0.1" ,why not  serv67.ddns.net?

No problem i tried to log in the server but it get stucked on the server seleccion screen.

Both ports are open

 

 

1555.jpg

11 answers to this question

Recommended Posts

  • 0
Posted
14 hours ago, maxicroma said:

The Hauthd have a reload option ,there its some way to call this function every x time ?

 

Probably there is some way but this is much easier:

#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton
from threading import Thread

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name
hauthd = "C:\\l2\\auth\\hauthd.exe" # put correct path here!

class HauthdThread(Thread):
	def __init__(self):
		Thread.__init__(self)
		self.hauthdProcess = None
		self.doRun = True

	def run(self):
		while self.doRun:
			self.hauthdProcess = Popen([hauthd])
			self.hauthdProcess.wait()
			self.hauthdProcess = None

	def stop(self):
		self.doRun = False
		if self.hauthdProcess != None: self.hauthdProcess.kill()

	def restart(self):
		self.hauthdProcess.kill()

currentIp = None
ipUpdated = False
hauthdThread = None

try:
	while True:
		try:
			newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
			if newIp != currentIp:
				inet_aton(newIp) # check IP
				print >> stderr, "New IP address:", newIp
				currentIp = newIp
				isUpdated = False
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't get current IP address, will retry later"
			sleep(period)
			continue

		if isUpdated:
			sleep(period)
			continue

		try:
			popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
			popen.wait()
			isUpdated = True
			if hauthdThread == None:
				hauthdThread = HauthdThread()
				hauthdThread.start()
			else:
				hauthdThread.restart()
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't update IP address, will try later"

		sleep(period)
except:
	hauthdThread.stop()
	hauthdThread.join()
	raise

 

  • 0
Posted

LOL ... in the table place the actual ip of your dedicated.
And point the NO-IP to your dedicated, simple ip.

You do not need to put the ip of your DDNS or NO-IP in the settings, settling to point to pro IP enough.

So simple and they break the head with it!

  • 0
Posted (edited)
#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name

currentIp = None
ipUpdated = False

while True:
	try:
		newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
		if newIp != currentIp:
			inet_aton(newIp) # check IP
			print >> stderr, "New IP address:", newIp
			currentIp = newIp
			isUpdated = False
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't get current IP address, will retry later"
		sleep(period)
		continue

	if isUpdated:
		sleep(period)
		continue

	try:
		popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
		popen.wait()
		isUpdated = True
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't update IP address, will try later"

	sleep(period)

 

EDIT: You'll also need to restart hauthd somehow...

Edited by eressea
  • 0
Posted

Pase por el mismo problema con advext64 y te comento como funciona. Tu licencia se asocia a una direccion IP o dominio, ahi es cuando te registras en NO-IP, te dan un dominio gratuito y dentro de la pagina de NO-ip le asignas tu IP de ISP. (cualesmiip)... Esta misma ip la pones en el campo IP en dbo.server.  Ej

 

NO-IP:

hostname: l2xx.ddns.net

IP / TARGET: le pones el ip de tu isp  (cualesmiip).

 

En la base de datos, en IP pones tu ip de ISP tambien. 

  • 0
Posted
5 hours ago, eressea said:

#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name

currentIp = None
ipUpdated = False

while True:
	try:
		newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
		if newIp != currentIp:
			inet_aton(newIp) # check IP
			print >> stderr, "New IP address:", newIp
			currentIp = newIp
			isUpdated = False
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't get current IP address, will retry later"
		sleep(period)
		continue

	if isUpdated:
		sleep(period)
		continue

	try:
		popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
		popen.wait()
		isUpdated = True
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't update IP address, will try later"

	sleep(period)

 

EDIT: You'll also need to restart hauthd somehow...

The Hauthd have a reload option ,there its some way to call this function every x time ?

  • 0
Posted
13 hours ago, eressea said:

 

Probably there is some way but this is much easier:


#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton
from threading import Thread

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name
hauthd = "C:\\l2\\auth\\hauthd.exe" # put correct path here!

class HauthdThread(Thread):
	def __init__(self):
		Thread.__init__(self)
		self.hauthdProcess = None
		self.doRun = True

	def run(self):
		while self.doRun:
			self.hauthdProcess = Popen([hauthd])
			self.hauthdProcess.wait()
			self.hauthdProcess = None

	def stop(self):
		self.doRun = False
		if self.hauthdProcess != None: self.hauthdProcess.kill()

	def restart(self):
		self.hauthdProcess.kill()

currentIp = None
ipUpdated = False
hauthdThread = None

try:
	while True:
		try:
			newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
			if newIp != currentIp:
				inet_aton(newIp) # check IP
				print >> stderr, "New IP address:", newIp
				currentIp = newIp
				isUpdated = False
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't get current IP address, will retry later"
			sleep(period)
			continue

		if isUpdated:
			sleep(period)
			continue

		try:
			popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
			popen.wait()
			isUpdated = True
			if hauthdThread == None:
				hauthdThread = HauthdThread()
				hauthdThread.start()
			else:
				hauthdThread.restart()
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't update IP address, will try later"

		sleep(period)
except:
	hauthdThread.stop()
	hauthdThread.join()
	raise

 

Great how should i run this script ,(seriously ,have no idea )?

  • 0
Posted
4 hours ago, maxicroma said:

Great how should i run this script ,(seriously ,have no idea )?

 

Download and install Python 2.7 https://www.python.org/downloads/release/python-2715/ - use Windows x86-64 MSI installer.

Then just run the script as if it was normal application.

  • 0
Posted
3 hours ago, eressea said:

 

Download and install Python 2.7 https://www.python.org/downloads/release/python-2715/ - use Windows x86-64 MSI installer.

Then just run the script as if it was normal application.

Awesome its working ,thx you dude :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • ============================================================== VIKOS AUTOBOTS — live bots for Lineage 2 servers on Lucera2 Interlude and Classic ============================================================== An empty server loses players. Vikos Autobots fills the world with bots that act like real players: they farm, walk around towns, join clans, fight wars, go to raids, sieges, events and the Olympiad, trade and talk in chat. Installs on top of a Lucera2 build: one .ext.jar + the data/autobots folder + a config. Database tables are created automatically. WHAT THE BOTS DO • Farm zones by level along set routes; they do not steal mobs from players or other bots. Leave town through gatekeepers (custom ones and NPC bypasses too) and come back. • Some bots leave the farm to walk around town while others keep farming, so towns are not empty. They walk, talk to NPCs and sit down to rest (can be turned off for PvP servers). • After a server restart bots carry on where they were: same zone, same route, no mass teleport to town. • Class-based combat AI: fighters, archers, mages, healers, buffers, summoners. Auto parties, healers resurrect the dead. • Real fishing with core skills (cast, Pumping / Reeling, fish fight). Rod by grade, bait and fishing shots are handed out automatically; spots have stands, a bot limit, levels and time. • Gear by class and level, a separate Olympiad set and an "online time" set; custom skills by class and by online time (same idea as time gear). Random enchant, Life Stones, dyes, buffs. Shots, potions, arrows and scrolls restock on their own; bot items never reach the economy. • Clans and alliances with generated crests, clan wars, clan defense, PvP server mode. PvP zones (arena, Coliseum, custom): admin Send or a clock like TvT (14:00;16:00). • Raids and epics (Antharas, Valakas, Baium; more via XML), with a gathering in town or a direct teleport to the boss. Castle sieges, TvT / CTF / DM, Olympiad 1v1 and 3v3, Seven Signs. • Private stores (sell and buy), RU/EN chat, AI chat (Groq or any OpenAI-compatible API), bot replies go through your server chat filter (chatfilters.xml), player PMs forwarded to admin Telegram. • Admin panel: //autobots panel. Online schedule, own AI thread pool built for hundreds of bots online, one commented config and XML files checked at server start. INCLUDED: VIKOS AUTOBOTS CONFIGURATOR (Windows) • A single .exe with Java inside, nothing to install. • Works right on your VPS over SSH/SFTP: edit and save, the files go straight to the server; the old version goes to backup. • World map from server geodata, automatic route building by the core movement rules with checks. • Farm zones, towns, raids, sieges, TvT, PvP zones, fishing spots. • Editors with client icons: equipment (farm / online time / Olympiad), skills (regular and by online time), buffs, Life Stones, supplies, dyes. Finds config mistakes by itself. • Interlude and Classic, RU/EN interface, light and dark theme, F1 help. ============================================================== VIKOS AUTOBOTS — REAL SERVER LOAD Measured ============================================================== Interlude test server on Lucera2, a regular VPS: • 4 vCPU, 8 GB RAM, Debian 13 • Java 17 (Temurin), -Xmx5G • MariaDB -------------------------------------------------------------- RESULTS -------------------------------------------------------------- CPU is a one-minute average for the whole game server process: core, mobs and bots together. 400% = all 4 cores. Bots online Server CPU (of 400%) Share of VPS 1000 ~103% ~26% 1200 ~105% ~26% 1500 ~120-150% ~30-37% • An empty server without bots uses ~40% by itself, so 1000 bots add about one core. • The bot AI itself (all bots together) takes 10-15% of one core for 1000-1500 bots. • Memory is stable, no leaks: - after GC the heap stays at ~2.8-2.9 GB with 800, 1000 and 1200 bots — about the same as the server uses by itself, without bots; - the heap low point does not grow over time: memory does not pile up, it is freed on every garbage collection; - a full night with 1500 bots with no out-of-memory errors (OutOfMemory), the server never crashed; - with -Xmx5G there is more than 2 GB of headroom. • A full night with 1500 bots ran stable. Meanwhile the bots live a full life: farming along routes, walking around towns, fishing, clans, scheduled PvP zones, TvT/CTF, Olympiad and raids. -------------------------------------------------------------- SETTINGS USED FOR THESE NUMBERS -------------------------------------------------------------- • AutobotsIterationDelayMs = 500 A bot thinks twice per second: enough to act like a real player without wasting CPU. • AutobotsMaxBots = 1000-1500 • ai.properties: AiTaskActiveDelay = 500 AggroCheckInterval = 500 Most of the load comes not from the bot code but from the mobs around the bots: bots bring locations to life, and the mobs start checking whom to attack. With these values they check twice per second instead of four times. The load is almost halved, and you can't see the difference: a mob notices its target a fraction of a second later. • MariaDB: innodb_flush_log_at_trx_commit = 2 The database flushes its log to disk once per second instead of after every small query. With 1000+ bots there are many queries, and this removes most of the database load. A standard setting for game servers. • server.properties: AutoDestroyDroppedItemAfter = 120 Drops on the ground disappear after 2 minutes instead of 10. Bots kill a lot, and in 10 minutes tens of thousands of items piled up on the ground: extra memory, extra server work and database deletes. Two minutes is enough for players to pick up their own drops. Rule of thumb: a 4-core VPS handles 1000-1500 bots comfortably. For more, go for 6-8 cores. LICENSE • The license is bound to your VPS IP: the bots run only on the server with that IP. • Send the server IP when you buy. Price: 500$ Contact: Telegram @Vikos177 — https://t.me/Vikos177 Test the bots here: <DOWNLOAD LINK> https://drive.google.com/file/d/1xpOII2X2fsUWekDIJk7POTMWu7ICpHJo/view After purchase you are added to a private Telegram group for clients: news, updates and support. ==============================================================
    • 💻 Supercharge your workflow with Claude Pro & Cursor AI. Clean setups with full warranty included!
    • 📦 Running out of Google Drive space? Upgrade to 5TB + Gemini Pro instantly on your own email.
    • AHAHAHAHAH ? Send it proofs here. I just wanted to sell my stuff, but this crazy Ukrainian just stole my money, and he does this all the time to other people. 
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..