Jump to content
  • 0

Chatrang/allclassrace/onlinecommunity


MagicOz

Question

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
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

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
Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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 :-[

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.



×
×
  • Create New...