Jump to content

Recommended Posts

Posted


  • This is tutorial about running greenhope l2j server pack on linux machine.
    After following this tutorial you will have dedicated Lineage 2 C5 server.
     
    1. collecting tools
    2. installing software
    3. seting up network
    4. services
    5. accounts
    6. preparing for starting server
    7. last things
    8. security
    think that you have two machines: a server and your PC with a game connected by network.
    1. First collect all necessary tools.
    A linux distro, choose what you want:
    RedHat Fedora Core -
http://fedora.redhat.com
OpenSuse Linux - http://www.opensuse.org
Mandriva - http://www.mandriva.com
and others...
if you want more look at: http://distrowatch.com
I think u are able to install linux, if not there are a lot of guides how to do this.
Sugest visit above links for appropriate distribution.
phpmyadmin - http://www.phpmyadmin.net
greenhope server pack - How to make a C3 server in 5 minutes !!!
heh a windows system for unpack server pack (exe)
i think it could be usefull : Total Commander http://www.ghisler.com (yes for windows)
2. Select software what we need to install (during linux installation)
Almost programs or tools are included in linux distribution.
TIP: these packages will be installed when you choose Server type setup.
- httpd - aka Apache - its a web server, (not necessary but very usefull)
- mysqld - MySQL server - you really need it
- webmin - very usefull tool - with it you can manage your server remotely throw web page
- iptables - if you have some hack problems - this is very good firewall
- sshd - you can control ypur machine remotely but only in shell
- mc - check this it should be installed - its like old norton commander
Please dont install X-Window system, nor K desktop env. or gnome
3. So we have working linux operating system
After booting your system u will see:
 
localhost login: (type here 'root')
password : (write pass what you enter during installation)
 
now we have prompt:
[root@localhost:~]#_
during installation you should configure your network cards so check the connection:
write this:
ping google.com [enter]
 
if you have message : network is not unreachable - you dont have properly configured it.
but check your connection with your PC :
ping (your ip here) [enter]
 
 
you should see something like this
 
  • ping (your ip here) [enter]

 

you should see something like this

 

PING 10.1.9.9 (10.1.9.9) 56(84) bytes of data.

64 bytes from 10.1.9.9: icmp_seq=0 ttl=128 time=0.408 ms

64 bytes from 10.1.9.9: icmp_seq=1 ttl=128 time=0.584 ms

64 bytes from 10.1.9.9: icmp_seq=2 ttl=128 time=0.398 ms

64 bytes from 10.1.9.9: icmp_seq=3 ttl=128 time=0.764 ms

64 bytes from 10.1.9.9: icmp_seq=4 ttl=128 time=0.416 ms

 

now pres CTRL+C

 

--- 10.1.9.9 ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 4001ms

rtt min/avg/max/mdev = 0.398/0.514/0.764/0.142 ms, pipe 2

 

4. setup your services

in fedora type setup and choose services (or somethig simmilar)

and check this servises: httpd, iptables, mysqld, network, sshd, vsftpd (or sth. else), and if you installed webmin

press OK and exit.in suse its tool named yast, and in madrake its drakconf

use that tool what you have.

5. adding users.

default we have one account what we can use its root, but its not very security.

So we create a special account for our server,

in promt write:

adduser l2jserver

passwd l2jserver

 

now type it two times.

Why creating a user for server? If someone could hack our server, (i think in java it is not possible) take a control of our server (not only l2j but whole machine) but what can do if server only have rights to connecting players, operating and using database?

Now we have our user with will run server.

greenhope created some install scripts for win32 platform (studying greenhope's bat files can learn a lot), so some ppls dont know what to do step by step, so we need to create a special user in MySQL database.

let's go:

 

mysql --user=root mysql

 

if it will return access denied write this:

mysql --user=root mysql -p

 

and type your root password

now we are in mysql command shell

type this

 

GRANT ALL PRIVILEGES ON *.* TO 'l2jserver'@'localhost' [enter]

IDENTIFIED BY 'your_password_for_this user' WITH GRANT OPTION; [enter]

exit [enter]

 

6.

so we are prepared for running server, but we need java runtime enviroment.

You can download it from java.sun.com - need linux version of course.

please download files named jre-1_5_0_05-linux-i586.bin

now if you download this in your windows PC you can upload this file using Total Commander

choose FTP and type IP of server and as accoun name type l2jserver and your very secret password.

and send this file.

Now we install java.

as root (if we are root we see in prompt '#')

we can connect to server using putty terminal. http://www.chiark.greenend.org.uk/~s.../download.html

now after login run mc (just type mc in promt)

using UP and DOWN arrow and Enter navigate to place where you uploaded java installer.

press enter when you find this file, after that you will se two options, select one : INSTALL

after some time you can check if java is installed.

just type java, maybe you will need relogin.

So almost all things are done.

Very easy operation unpack greenhope's server pack, and pack it again with Total Commander using tar, and again (this tar) pack it with gzip.

u should have file simmlar server.xxx.tar.gz !

Uplad this file with TC or any other FTP client. An unpack it with mc.

After unpacking it (in directory eg. /opt ) u will have a identical directory structure like on windows.

We are interested in directory : l2j

 

Thx :)!

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

    • package custom.events.RandomZoneEvent; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.ScheduledFuture; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.commons.time.SchedulingPattern; import org.l2jmobius.commons.time.TimeUtil; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.managers.ZoneManager; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Event; import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.model.zone.type.RandomZone; import org.l2jmobius.gameserver.util.Broadcast; /** * Random Zone Event - Activates one random PvP zone temporarily. No modifica la clase de la zona: usa flags PvP en runtime. * @author Juan */ public class RandomZoneEvent extends Event { private static final String CONFIG_FILE = "data/scripts/custom/events/RandomZoneEvent/config.xml"; private static int EVENT_DURATION_MINUTES = 15; private static boolean _isActive = false; private ScheduledFuture<?> _eventTask = null; private final List<ZoneType> _availableZones = new ArrayList<>(); private ZoneType _activeZone = null; public RandomZoneEvent() { loadConfig(); loadZones(); registerZoneListeners(); } /** * Registra listeners a TODAS LAS ZONAS random */ private void registerZoneListeners() { for (ZoneType zone : _availableZones) { addEnterZoneId(zone.getId()); addExitZoneId(zone.getId()); LOGGER.info("[RandomZoneEvent] Registered listener for zone: " + zone.getName()); } } private void loadConfig() { new IXmlReader() { @Override public void load() { parseDatapackFile(CONFIG_FILE); } @Override public void parseDocument(Document doc, File file) { forEach(doc, "event", eventNode -> { final StatSet att = new StatSet(parseAttributes(eventNode)); final String name = att.getString("name"); for (Node node = eventNode.getFirstChild(); node != null; node = node.getNextSibling()) { if ("schedule".equals(node.getNodeName())) { final StatSet attributes = new StatSet(parseAttributes(node)); final String pattern = attributes.getString("pattern"); final SchedulingPattern schedulingPattern = new SchedulingPattern(pattern); final StatSet params = new StatSet(); params.set("Name", name); params.set("SchedulingPattern", pattern); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer("Schedule_" + name, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Event " + name + " scheduled at " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } }); } }.load(); } private void loadZones() { for (ZoneType zone : ZoneManager.getInstance().getAllZones(RandomZone.class)) { if ((zone.getName() != null) && zone.getName().toLowerCase().startsWith("random_zone")) { _availableZones.add(zone); LOGGER.info("[RandomZoneEvent] Loaded zone: " + zone.getName() + " (id=" + zone.getId() + ")"); } } LOGGER.info("[RandomZoneEvent] Total random zones loaded: " + _availableZones.size()); } @Override public void onTimerEvent(String event, StatSet params, Npc npc, Player player) { if (event.startsWith("Schedule_")) { eventStart(null); final SchedulingPattern schedulingPattern = new SchedulingPattern(params.getString("SchedulingPattern")); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer(event, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Rescheduled for " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } @Override public boolean eventStart(Player eventMaker) { if (_isActive) { if (eventMaker != null) { eventMaker.sendMessage("RandomZoneEvent already active."); } return false; } if (_availableZones.isEmpty()) { Broadcast.toAllOnlinePlayers("[RandomZoneEvent] No zones configured."); return false; } _isActive = true; Broadcast.toAllOnlinePlayers("⚔️ Random Zone Event has started!"); _eventTask = ThreadPool.schedule(this::activateRandomZone, 5_000); return true; } private void activateRandomZone() { _activeZone = _availableZones.get(new Random().nextInt(_availableZones.size())); _activeZone.setEnabled(true); Broadcast.toAllOnlinePlayers("🔥 Random Zone Event: " + _activeZone.getName() + " is now PvP for " + EVENT_DURATION_MINUTES + " minutes!"); _eventTask = ThreadPool.schedule(this::eventStop, EVENT_DURATION_MINUTES * 60 * 1000L); } @Override public boolean eventStop() { if (!_isActive) { return false; } _isActive = false; if (_eventTask != null) { _eventTask.cancel(true); _eventTask = null; } if (_activeZone != null) { _activeZone.setEnabled(false); Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended. " + _activeZone.getName() + " is back to normal."); _activeZone = null; } else { Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended."); } return true; } @Override public void onEnterZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, true); if (creature.isPlayer()) { creature.sendMessage("Esta zona está en modo PvP temporalmente."); } } } @Override public void onExitZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, false); if (creature.isPlayer()) { creature.sendMessage("Abandonaste la zona PvP temporal."); } } } @Override public boolean eventBypass(Player player, String bypass) { return true; } @Override public String onEvent(String event, Npc npc, Player player) { return super.onEvent(event, npc, player); } @Override public String onFirstTalk(Npc npc, Player player) { return null; } public static void main(String[] args) { new RandomZoneEvent(); } } i have this but its not working
    • ZonePvPSpawnBossRadio=0 ZonePvPSpawnBossBarakiel=0 at the Customs.ini in L2Server folder. Im prety sure this is it because i had the same problem with you in cruma 1 floor for example and i couldn't fix it but i fixed it finally by changing these 2 lines
    • Siege Reward Start PM Msg Rework Config root BossDieAnnounce and BossDieSound in the L24Team.properties and Config.java files for global raid boss death notifications and sounds. Adds a new reward_list table to the DB.sql file to track castle rewards. Improves character creation logic for thread safety and validation. Adds extensive state checks to the RequestEnchantItem method to prevent enchantments during inappropriate player states. Fixed auto-attack animation bug (there was no attack animation, only damage animation) Clean Code Other fixes I forgot to list! Java 14 Fixed issue where deleting a character would prevent it from leaving the screen or being removed, or even after a delete CD (it would only exit when re-logging in or creating a new character). Added Premium System from the other C2 project (Needs testing and improvement). Added the "Improved" Community Board (incomplete).
    • Use only middleman this guy scammer old discord goddardshop   
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock