Jump to content
  • 0

Chatrang/allclassrace/onlinecommunity


Question

Posted (edited)

Hello everybody,

 

My name is MagicOz and I'm a new novice Admin.

 

In first, i'm sorry because my english is bad :/

 

 

1/ I would need your help for changed my channel trade rang (regionnal => world).

 

2/ Allow quite the races to acquire quite the classes in first class.

 

3/ Include the character online list in the page region in the community.

 

 

I use L2J High Five latest version !

 

One thank you early!

Edited by MagicOz

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

1) chathandlers/ChatTrade.java

There will be something like that:  && region == MapRegionTable.getMapRegion(player.getX(), player.getY())

Delete it. (you should delete final int region = MapRegionTable.getMapRegion(activeChar.getX(), activeChar.getY()); too since it's not used after you delete the first line)

 

2) I didn't understand, do you want players to change directly to the 3rd class or?

 

3) communitybbs/Manager/RegionBBSManager.java (note that this is aCis, i don't know what project/pack you are using)

Go to method showRegion() and add below all the content = content.replace this:

content = content.replace("%onlineplayers%", ""+L2World.getInstance().getPlayers().size());

 

Then go to your region html (should be data/html/CommunityBoard/region/castle.htm) and add where you want: Online players: %onlineplayers%

 

Edit: I just noticed you use l2j high five, however i can't be arsed changing paths etc, figure it out it's easy.

Edited by An4rchy
  • 0
Posted (edited)

1) I deleted well the line:

 

- if ((region == MapRegionManager.getInstance().getMapRegionLocId(player)) && !BlockList.isBlocked(player, activeChar) && (player.getInstanceId() == activeChar.getInstanceId()))

- int region = MapRegionManager.getInstance().getMapRegionLocId(activeChar);

- import com.l2jserver.gameserver.instancemanager.MapRegionManager;

 

And that works perfectly!

 

One thank you An4rchy !!! I note lines for those who have the same source as me.

 

2) I shall like that quite races have access to quite the classes of the game  dice their creation. That I may changed the first one classes without changed the appearance of races.

Ex : Elf => Dark Avenger, Human => Spellhowler, Kamael => Grand Khavatari, etc...

 

3) Here are my codes for the community region

 

Link : game\data\scripts\handlers\communityboard\regionboard.java

 

 

 

*
* Copyright © 2004-2016 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package handlers.communityboard;

import java.util.List;

import com.l2jserver.gameserver.cache.HtmCache;
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
import com.l2jserver.gameserver.handler.CommunityBoardHandler;
import com.l2jserver.gameserver.handler.IWriteBoardHandler;
import com.l2jserver.gameserver.instancemanager.CastleManager;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.entity.Castle;
import com.l2jserver.gameserver.util.Util;

/**
* Region board.
* @author Zoey76
*/
public class RegionBoard implements IWriteBoardHandler
{
// Region data
// @formatter:off
private static final int[] REGIONS = { 1049, 1052, 1053, 1057, 1060, 1059, 1248, 1247, 1056 };
// @formatter:on
private static final String[] COMMANDS =
{
"_bbsloc"
};

@Override
public String[] getCommunityBoardCommands()
{
return COMMANDS;
}

@Override
public boolean parseCommunityBoardCommand(String command, L2PcInstance activeChar)
{
if (command.equals("_bbsloc"))
{
CommunityBoardHandler.getInstance().addBypass(activeChar, "Region", command);

final String list = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/region_list.html");
final StringBuilder sb = new StringBuilder();
final List castles = CastleManager.getInstance().getCastles();
for (int i = 0; i < REGIONS.length; i++)
{
final Castle castle = castles.get(i);
final L2Clan clan = ClanTable.getInstance().getClan(castle.getOwnerId());
String link = list.replaceAll("%region_id%", String.valueOf(i));
link = link.replace("%region_name%", String.valueOf(REGIONS));
link = link.replace("%region_owning_clan%", (clan != null ? clan.getName() : "NPC"));
link = link.replace("%region_owning_clan_alliance%", ((clan != null) && (clan.getAllyName() != null) ? clan.getAllyName() : ""));
link = link.replace("%region_tax_rate%", String.valueOf(castle.getTaxRate() * 100) + "%");
sb.append(link);
}

String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/region.html");
html = html.replace("%region_list%", sb.toString());
CommunityBoardHandler.separateAndSend(html, activeChar);
}
else if (command.startsWith("_bbsloc;"))
{
CommunityBoardHandler.getInstance().addBypass(activeChar, "Region>", command);

final String id = command.replace("_bbsloc;", "");
if (!Util.isDigit(id))
{
LOG.warning(RegionBoard.class.getSimpleName() + ": Player " + activeChar + " sent and invalid region bypass " + command + "!");
return false;
}

// TODO: Implement.
}
return true;
}

@Override
public boolean writeCommunityBoardCommand(L2PcInstance activeChar, String arg1, String arg2, String arg3, String arg4, String arg5)
{
// TODO: Implement.
return false;
}
}

 

 

Link : game\data\html\communityboard\region.html

<html>
	<body>
		<br>
		<br>
		<table border="0" width="755">
			<tr>
				<td width="10">
				</td>
				<td width="600" align="left">
					<a action="bypass _bbsloc">&$381;</a> > <a action="bypass _bbshome">Local Community</a> > <a action="bypass _bbshome">Local Information</a>
				</td>
			</tr>
		</table>
		<center>
			<img src="L2UI.squareblank" width="1" height="10"><br>
			<table border="0" cellspacing="0" cellpadding="2" width="755" bgcolor="A7A19A">
				<tr>
					<td width="100" align="right">
						&$1790;
					</td>
					<td width="300" align="center">
						&$382;
					</td>
					<td width="240" align="center">
						&$590;
					</td>
					<td width="115" align="center">
						&$1608;
					</td>
				</tr>
			</table>
			<br>
			%region_list%
			<br>
		</center>
	</body>
</html>

What line do I owe changed?

 

Again, thank you early.

Edited by MagicOz
  • 0
Posted

Define better what is "quite" because there is no meaning in english in the way you use it. Do you mean "all" ?

 

You have to rework entirely class system if that's the case, cause atm classes are bound by race, and it's defined by the structure itself of the datafile.

  • 0
Posted

OK.

I think that it is too much complicated for my skills.

I thought about an alternative solution.

But for it, it is necessary to me to know if it is possible.

 

Instead of re-coding all the classes and the races, I would want to make so that all subclass then to acquire certifs in main class player and so that they can entry to Olympiad.

And what all the class can be acquired there subclass.

 

Do you think that it is possible?

 

Thank you in advance :-[

  • 0
Posted (edited)

OK.

I think that it is too much complicated for my skills.

I thought about an alternative solution.

But for it, it is necessary to me to know if it is possible.

 

Instead of re-coding all the classes and the races, I would want to make so that all subclass then to acquire certifs in main class player and so that they can entry to Olympiad.

And what all the class can be acquired there subclass.

 

Do you think that it is possible?

 

Thank you in advance :-[

 

Even if it's possible, subclasses are limited to lvl 75, so people using main class will get a huge advantage.

 

And I doubt it will work, you need to rework Olympiads system to handle class differently (drop subclass check to allow subclassed ppl to register, register the player on this class, and how about heroes ? You will base heroes on subclassed too ? What happen if one dude register and gains points on all his subclasses ? Which to use to calculate hero ?).

Edited by Tryskell
  • 0
Posted

Even if it's possible, subclasses are limited to lvl 75, so people using main class will get a huge advantage.

 

On my server subclass is lvl 85. Thank for option in L2J ;)

 

And I doubt it will work, you need to rework Olympiads system to handle class differently (drop subclass check to allow subclassed ppl to register, register the player on this class, and how about heroes ? You will base heroes on subclassed too ? What happen if one dude register and gains points on all his subclasses ? Which to use to calculate hero ?).

 

 

For the heroes, I shall like that the winning class takes gains points and status of heroin but that it is not shared on all the classes of one character.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • ⭐⭐⭐⭐⭐L2Lusty 50x [Essence - High Five] Start 08 February⭐⭐⭐⭐⭐  L2Lusty Essence - High Five 50x Website: https://l2lusty.online/ Starts on 08/02/2025 16:00 London Time Rates: XP 50X, Adena 20X, Spoil 20X, Drop 20X, Max enchant +16 with 50% normal and 60% blessed, Chaos Event whit 3x Lcoins Drop 24h Website:  https://l2lusty.online/
    • Hi, I inviting you to join L2Einhovant server, lets give them chanse. It's x1 Classic with some bonus futures, no duals box, no wipes, buffs stores and etc. Grow up by litle steps together with the server population.   🔥 Why L2Einhovant? ✅ Authentic Classic Gameplay – No dual box, all classes inportant, no auto farm. ✅ Hardcore x1 Rates – A true test of your gameplay skill, level up stages. ✅ Active Community & Fair Administration – A server built for passionate players. ✅ Long-Term Stability – Grow your character in a world that lasts.   Gather your allies, sharpen your weapons, and prepare for an unforgettable journey. Join to our comunity now and prepare for start.   Open beta: 1th February. Grand opening: 7th February, 20:00 UTC+2.   🔗 Discord: https://discord.gg/zfKd4tU9N2
    • ElmoreLab Harbor - Eternal C1 x1: ✅ https://harbor.elmorelab.com ElmoreLab Harbor - Eternal C1 x1 - is an exclusive server of the Eternal C1 chronicles from the top project ElmoreLab Harbor.   A unique server of its kind, on which everyone will have maximum pleasure, such as oldschool players who dream of nostalgia and to feel the warmest and classic C1 chronicles, as well as experienced players who are tired of thousands unbalanced servers of late chronicles. Due to the professional corrections of the balance system and the HONEST gameplay system - on this server, EVERY player will feel like in their own, warm and cozy Harbor C1. Let's return to the origins of L2 - back to 2004 in C1! ❤️   ⭐ Server characteristics:   STRICTLY 1 window, NO BOXES Bans for RMT and bots/cheats No donations with benefits Unique and high-quality PTS-build from Master Toma Professional corrections and full class-balance Reworked economy and closed all abuses Improved animations and all aspects of the game Exclusive HD-client with high-quality textures Experienced administration and management Fixed all bugs, geodata, exploits and holes Maximum sociality due to the 1-box system Discovering, exploring and researching Big online International server Nostalgia and oldschool-feelings   Rates: x1 Server start: 14.02.2025   The server is at the final stages of development and preparation for release. Information on the server will be updated, soon the patchnotes and changes/edits will be posted. Don't miss the legendary and epic experience on the best server in the last 20 years! ❤️ Join our C1-forum with a lot of information about server and active discussions.   ⭐ Website: https://harbor.elmorelab.com   ✅ Forum: https://forum-harbor.elmorelab.com   💥 Telegram: https://t.me/l2harbor https://t.me/l2harbor_chat   ⚡ Discord: https://discord.gg/harborelmorelab
    • yeah ok, if you say what is fuctional 100% i can't say something different 😛  but if someone find hard to compile it or get vs and all that things i have here one more simple way here to put overlay in your own server or to change your window name with few money.
  • Topics

×
×
  • Create New...