Jump to content

Recommended Posts

Posted

Anyone Can help me to fix this issue?

 

Error:

workspace\trunk\gameserver\head-src\com\l2jfrozen\gameserver\model\entity\event\ZodiacMain.java:93: error: cannot find symbol
    [javac] 	    TextBuilder tb = new TextBuilder("");
    [javac] 	                         ^
    [javac]   symbol:   class TextBuilder
    [javac]   location: class ZodiacMain

 

All ZodiacMain.java Code:

 

package com.l2jfrozen.gameserver.model.entity.event;


import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.model.entity.Announcements;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;

/**
* @author Boorinio
*/
public class ZodiacMain
{
public static List<String> Ips = new ArrayList<String>();
public static boolean ZodiacRegisterActive;
public static int i, max;
public static int[] count =
{
0, 0, 0, 0
};
public static boolean voting;

public static void ZodiacIn()
{
	ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
	{
		@Override
		public void run()
		{
			startVoting();
		}
	}, 60 * 1000 * Config.INITIAL_START);
}

public static void startVoting()
{
	voting = true;
	for (L2PcInstance players : L2World.getInstance().getAllPlayers())
	{	
		showHtmlWindow(players);
	}
	Announcements.getInstance().announceToAll("You have 2 minutes to vote for the event you like!");
	waitSecs(60);
	Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
	waitSecs(60);
	voting = false;
	endit();

}

public static void showHtmlWindow(L2PcInstance activeChar)
{
    NpcHtmlMessage nhm = new NpcHtmlMessage(5);
    TextBuilder tb = new TextBuilder("");
    
    tb.append("<html><head><title>Zodiac Event Voting</title></head><body>");
    tb.append("<center>");
    tb.append("<td valign=\"top\"><font color=\"FF6600\">Vote for the event you want to play!</font>");
    tb.append("<br>");
    tb.append("<img src=\"SSQ_dungeon_T.SSQ_fire1_e013\" width=256 height=64>");
    tb.append("<br1>");
    tb.append("<img src=\"L2UI.SquareWhite\" width=194 height=1>");
    tb.append("<table bgcolor=333333 width=204>");
    tb.append("<tr>");
    tb.append("<td><center><button value=\"CaptureThem\" action=\"bypass -h CaptureThem\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
    tb.append("</tr>");
    tb.append("	<tr>");
    tb.append("<td><center><button value=\"Peloponnesian\" action=\"bypass -h PeloponnesianWar\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
    tb.append("</tr>");
    tb.append("<tr>");
    tb.append("<td><center><button value=\"CastleWars\" action=\"bypass -h CastleWars\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
    tb.append("</tr>");
    tb.append("<tr>");
    tb.append("<td><center><button value=\"ProtectTheLdr\" action=\"bypass -h ProtectTheLdr\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
    tb.append("</tr>");
    tb.append("</table>");
    tb.append("<font color=\"FF6600\">By Boorinio!</font>");
    tb.append("</center>");
    tb.append("</body></html>");
    nhm.setHtml(tb.toString());
    activeChar.sendPacket(nhm);
}
public static void showFinalWindow(L2PcInstance player)
  {

    NpcHtmlMessage nhm = new NpcHtmlMessage(5);
    TextBuilder tb = new TextBuilder("");
    
    tb.append("<html><title>Zodiac Event Engine</title><body>Current Votes:<br>");
    tb.append("Current Votes:<br><br>");
    tb.append("Peloponnesian War: "+count[0]+"<br>");
    tb.append("Capture Them: "+count[1]+"<br>");
    tb.append("Castle Wars: "+count[2]+"<br>");
    tb.append("Protect The Leader: "+count[3]+"<br><br>");
    tb.append("</body></html>");
    nhm.setHtml(tb.toString());
    player.sendPacket(nhm);
  }

public static void endit()
{
	max = 0;
	for (i = 0; i < 4; i++)
	{
		if (count[i] > max)
			max = i;
	}
	if (max == 0)
	{
		Announcements.getInstance().announceToAll("Peloponnesian Event has the most votes!");
		Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
		waitSecs(10);
		PeloponnesianWar.startevent();
	}
	else if (max == 1)
	{
		Announcements.getInstance().announceToAll("CaptureThem Event has the most votes!");
		Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
		waitSecs(10);
		CaptureThem.openRegistration();
	}
	else if (max == 2)
	{
		Announcements.getInstance().announceToAll("CastleWars Event has the most votes!");
		Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
		waitSecs(10);
		CastleWars.openRegi();
	}
	else if (max == 3)
	{
		Announcements.getInstance().announceToAll("ProtectTheLeader Event has the most votes!");
		Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
		waitSecs(10);
		ProtectTheLdr.startevent();
	}
	else
	{
		Announcements.getInstance().announceToAll("No votes event canceled!");
	}
	max = 0;
	for (i = 0; i < 4; i++)
	{
		count[i] = 0;
	}
	waitSecs(Config.BETWEEN_EVENTS * 60);
	startVoting();
}

public static boolean isEligible(L2PcInstance player, String ip)
{

	if (player.isinZodiac)
	{
		player.sendMessage("You are Already in Zodiac");
		return false;
	}
	if (!ZodiacRegisterActive)
	{
		player.sendMessage("Zodiac's Registrations are offline!");
		return false;
	}
	if (player.getLevel() < 76)
	{
		player.sendMessage("You are lower than 76 lvl");
		return false;
	}
	if (player.isInJail())
	{
		player.sendMessage("You are in jail...daah");
		return false;
	}
	if (player.isInOlympiadMode())
	{
		player.sendMessage("You are in olympiad mode");
		return false;
	}
	if (hasbots(ip) && Config.SAME_IP_ZODIAC)
	{
		player.sendMessage("You have already joinned with that ip");
		return false;
	}
	return true;
}

public static void waitSecs(int i)
{
	try
	{
		Thread.sleep(i * 1000);
	}
	catch (InterruptedException ie)
	{
		ie.printStackTrace();
	}
}

public static boolean hasbots(String ip)
{
	if (Ips.contains(ip))
	{
		return true;
	}
	else
		return false;
}

}

Posted

@hvp17:

 

You make it wrong. What you have to do:

 

package com.l2jfrozen.gameserver.model.entity.event;

 

 

-import java.io.File; --- DELETE

import java.util.ArrayList;

import java.util.List;

 

+import javolution.text.TextBuilder; --- ADD

 

import com.l2jfrozen.Config;

import com.l2jfrozen.gameserver.model.entity.Announcements;

import com.l2jfrozen.gameserver.thread.ThreadPoolManager;

import com.l2jfrozen.gameserver.model.L2World;

import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;

import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;

Posted

@hvp17:

 

You make it wrong. What you have to do:

 

package com.l2jfrozen.gameserver.model.entity.event;

 

 

-import java.io.File; --- DELETE

import java.util.ArrayList;

import java.util.List;

 

+import javolution.text.TextBuilder; --- ADD

 

import com.l2jfrozen.Config;

import com.l2jfrozen.gameserver.model.entity.Announcements;

import com.l2jfrozen.gameserver.thread.ThreadPoolManager;

import com.l2jfrozen.gameserver.model.L2World;

import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;

import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;

correct

 

Any other events will be added to this engine?

 

P.S. In V4 should be a config to set up how much time to give to register for event. ;)

Yeah there are 2 more interesting events coming though are difficult to code so it might take some time and yeah i will probably add this config

Posted

@Boorinio

 

Anyway there is a bug in Peloponessian wars:

 

When Teams are ported in Arenas or Leaders of both teams are teleported in FinalMatch - it wait 30sec (then chekwhowon is started) - and Checkwhowon Make the both sides Winners and all get the reward - it dont wait untill one char dies in finalmatch and it donw wait untill ppl die in arenas.

 

- I expect problem in checkwhowon method.

- Probably you have forgotten for making some method in L2PCinstance that end death ppl from event.[

 

- Tested in L2jfrozen pack/i]

 

 

Suggestions:

 

Please check the color fix - when event quit you use setColorName. It could make a trouble in case of many high rates who use PVP color system ;)

Also it could be good to make in all events smth like: IF registred _player count = NULL dont start event.

 

I dont wanna be detailist :-)

Posted

@Boorinio

 

Anyway there is a bug in Peloponessian wars:

 

When Teams are ported in Arenas or Leaders of both teams are teleported in FinalMatch - it wait 30sec (then chekwhowon is started) - and Checkwhowon Make the both sides Winners and all get the reward - it dont wait untill one char dies in finalmatch and it donw wait untill ppl die in arenas.

 

- I expect problem in checkwhowon method.

- Probably you have forgotten for making some method in L2PCinstance that end death ppl from event.[

 

- Tested in L2jfrozen pack/i]

 

 

Suggestions:

 

Please check the color fix - when event quit you use setColorName. It could make a trouble in case of many high rates who use PVP color system ;)

Also it could be good to make in all events smth like: IF registred _player count = NULL dont start event.

 

I dont wanna be detailist :-)

No you are right most of them will be done i just need some time to do it :P

Posted

No problem ;-) I will try to help you in free time.

 

In CaptureThem event:

 

In this event you are in Coliseum and all gates are closed - when player dies he is respawned in "pre-room" that is closed so he cant join fights again - his game is over for that moment.

 

In this case i sugestose to edit:

 

public static void StartEvent()

        {

DoorTable.getInstance().getDoor(24190001).closeMe();

DoorTable.getInstance().getDoor(24190002).closeMe(); --> DoorTable.getInstance().getDoor(24190002).openMe();

DoorTable.getInstance().getDoor(24190003).closeMe(); --> DoorTable.getInstance().getDoor(24190003).openMe();

DoorTable.getInstance().getDoor(24190004).closeMe();

 

Or even delete:

public static void StartEvent()

        {

DoorTable.getInstance().getDoor(24190001).closeMe();

- DoorTable.getInstance().getDoor(24190002).closeMe();

- DoorTable.getInstance().getDoor(24190003).closeMe();

DoorTable.getInstance().getDoor(24190004).closeMe();

 

                    flags.deleteMe();

             

            }

DoorTable.getInstance().getDoor(24190001).openMe();

- DoorTable.getInstance().getDoor(24190001).openMe();

- DoorTable.getInstance().getDoor(24190002).openMe();

DoorTable.getInstance().getDoor(24190004).openMe();

 

 

So death players will be able to join the fight after death again.

Posted

No problem ;-) I will try to help you in free time.

 

In CaptureThem event:

 

In this event you are in Coliseum and all gates are closed - when player dies he is respawned in "pre-room" that is closed so he cant join fights again - his game is over for that moment.

 

In this case i sugestose to edit:

 

public static void StartEvent()

        {

DoorTable.getInstance().getDoor(24190001).closeMe();

DoorTable.getInstance().getDoor(24190002).closeMe(); --> DoorTable.getInstance().getDoor(24190002).openMe();

DoorTable.getInstance().getDoor(24190003).closeMe(); --> DoorTable.getInstance().getDoor(24190003).openMe();

DoorTable.getInstance().getDoor(24190004).closeMe();

 

Or even delete:

public static void StartEvent()

        {

DoorTable.getInstance().getDoor(24190001).closeMe();

- DoorTable.getInstance().getDoor(24190002).closeMe();

- DoorTable.getInstance().getDoor(24190003).closeMe();

DoorTable.getInstance().getDoor(24190004).closeMe();

 

                    flags.deleteMe();

             

            }

DoorTable.getInstance().getDoor(24190001).openMe();

- DoorTable.getInstance().getDoor(24190001).openMe();

- DoorTable.getInstance().getDoor(24190002).openMe();

DoorTable.getInstance().getDoor(24190004).openMe();

 

 

So death players will be able to join the fight after death again.

You are talking about CaptureThem right? if yes then when the players are ressed they are ported inside the coliseum again, except if you missed the code...:P

Posted

Yes, my mistake overlooked code for revive srry ;)

Btw i saw you have masterio Custom pvp implemented also - is it able to use "killer" or some other method use instead of pk.ZodiacPoints ++; ?

 

Thx ;)

Posted

Yes, my mistake overlooked code for revive srry ;)

Btw i saw you have masterio Custom pvp implemented also - is it able to use "killer" or some other method use instead of pk.ZodiacPoints ++; ?

 

Thx ;)

well yeah pk is how the killer is named in L2jHellas i don't know it is named in l2jfrozen( probably killer) also yeah more events are underway!

Posted

OK i fixed pk method and works perfectly now...

 

 

Anyway i have problem with Revive method - If plyaer dies during Capture Them it spawn him as it has died in normally action (like it is not in event) my code is and i dont have any error in compile/code:

 

public void doRevive()
{
	super.doRevive();
	updateEffectIcons();
	sendPacket(new EtcStatusUpdate(this));
	_reviveRequested = 0;
	_revivePower = 0;
			if (CastleWars.CastleWarsRunning)
				{
				if (CastleWars.isattacker(this))
					{

						teleToLocation(CastleWars.attackersx, CastleWars.attackersy, CastleWars.attackersz);
					}
					if (CastleWars.isdefender(this))
					{

						teleToLocation(CastleWars.defendersx, CastleWars.defendersy, CastleWars.defendersz);
					}
		}	 

	if(isInParty() && getParty().isInDimensionalRift())
	{
		if(!DimensionalRiftManager.getInstance().checkIfInPeaceZone(getX(), getY(), getZ()))
		{
			getParty().getDimensionalRift().memberRessurected(this);
		}
	if(isinZodiac && CaptureThem.CaptureThemRunning)
			    {
					getStatus().setCurrentHp(getMaxHp());
					getStatus().setCurrentMp(getMaxMp());
					getStatus().setCurrentCp(getMaxCp());
					teleToLocation(149722, 46700, -3413);
			    }
	if(isinZodiac && ProtectTheLdr.ProtectisRunning)
			{
				getStatus().setCurrentHp(getMaxHp());
				getStatus().setCurrentMp(getMaxMp());
				getStatus().setCurrentCp(getMaxCp());
				if(ProtectTheLdr._Team1.contains(this))
				{
					teleToLocation(ProtectTheLdr.team1x, ProtectTheLdr.team1y, ProtectTheLdr.team1z);
				}
				if(ProtectTheLdr._Team2.contains(this))
				{
					teleToLocation(ProtectTheLdr.team2x, ProtectTheLdr.team2y, ProtectTheLdr.team2z);
				}
			}
	}

	if((_inEventTvT && TvT.is_started() && Config.TVT_REVIVE_RECOVERY) || (_inEventCTF && CTF.is_started() && Config.CTF_REVIVE_RECOVERY) || (_inEventDM && DM.is_started() && Config.DM_REVIVE_RECOVERY))
	{
		getStatus().setCurrentHp(getMaxHp());
		getStatus().setCurrentMp(getMaxMp());
		getStatus().setCurrentCp(getMaxCp());
	}
}

 

Could you give me advise?

Posted

OK i fixed pk method and works perfectly now...

 

 

Anyway i have problem with Revive method - If plyaer dies during Capture Them it spawn him as it has died in normally action (like it is not in event) my code is and i dont have any error in compile/code:

 

public void doRevive()
{
	super.doRevive();
	updateEffectIcons();
	sendPacket(new EtcStatusUpdate(this));
	_reviveRequested = 0;
	_revivePower = 0;
			if (CastleWars.CastleWarsRunning)
				{
				if (CastleWars.isattacker(this))
					{

						teleToLocation(CastleWars.attackersx, CastleWars.attackersy, CastleWars.attackersz);
					}
					if (CastleWars.isdefender(this))
					{

						teleToLocation(CastleWars.defendersx, CastleWars.defendersy, CastleWars.defendersz);
					}
		}	 

	if(isInParty() && getParty().isInDimensionalRift())
	{
		if(!DimensionalRiftManager.getInstance().checkIfInPeaceZone(getX(), getY(), getZ()))
		{
			getParty().getDimensionalRift().memberRessurected(this);
		}
	if(isinZodiac && CaptureThem.CaptureThemRunning)
			    {
					getStatus().setCurrentHp(getMaxHp());
					getStatus().setCurrentMp(getMaxMp());
					getStatus().setCurrentCp(getMaxCp());
					teleToLocation(149722, 46700, -3413);
			    }
	if(isinZodiac && ProtectTheLdr.ProtectisRunning)
			{
				getStatus().setCurrentHp(getMaxHp());
				getStatus().setCurrentMp(getMaxMp());
				getStatus().setCurrentCp(getMaxCp());
				if(ProtectTheLdr._Team1.contains(this))
				{
					teleToLocation(ProtectTheLdr.team1x, ProtectTheLdr.team1y, ProtectTheLdr.team1z);
				}
				if(ProtectTheLdr._Team2.contains(this))
				{
					teleToLocation(ProtectTheLdr.team2x, ProtectTheLdr.team2y, ProtectTheLdr.team2z);
				}
			}
	}

	if((_inEventTvT && TvT.is_started() && Config.TVT_REVIVE_RECOVERY) || (_inEventCTF && CTF.is_started() && Config.CTF_REVIVE_RECOVERY) || (_inEventDM && DM.is_started() && Config.DM_REVIVE_RECOVERY))
	{
		getStatus().setCurrentHp(getMaxHp());
		getStatus().setCurrentMp(getMaxMp());
		getStatus().setCurrentCp(getMaxCp());
	}
}

 

Could you give me advise?

i didn't get what you mean :P

 

Topic updated new link V4 zodiac engine +1 event

Posted

What i mean...so in different words - when player dies in Capture Them event it is spawned on pre room (primary closed by doors) of coliseum - I have implemented all codes (doRevive is actualized too). I haven´t time to test if it works in CastleWars (respawning on defenders / attackers spot), so i will test it too.

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

    • Hello, MaxCheaters community,   We are pleased to officially announce the development of our new Lineage II project: MightyProject MightyProject will be an Interlude Mastered server, developed on a modern game engine and technical foundation while preserving the gameplay, atmosphere, and identity that made Interlude one of the most memorable chronicles of Lineage II. Our objective is not to transform Interlude into something unrecognizable. We aim to modernize and improve the overall experience while remaining faithful to the original spirit and scope of the chronicle. Our Vision MightyProject will feature: Authentic Interlude-oriented gameplay supported by a modern engine. Retail quests, carefully simplified to provide a smoother and more enjoyable progression experience. Reworked classes and skills, focused on improving balance and strengthening class identity without departing from Interlude gameplay. A refined progression system that respects players’ time without removing the sense of achievement. Original development decisions rather than copied features, systems, concepts, or branding from other projects. We are not interested in creating another server filled with random features simply because they are currently popular. Every system introduced into MightyProject must have a clear purpose and fit naturally within the overall Interlude experience. A Serious and Familiar Team Many people within the community are already familiar with us and understand the level of commitment we bring to our projects. We know that trust cannot be built through promises alone. It must be earned through consistent development, professional management, transparency, and long-term support. MightyProject is being approached as a serious and sustainable project—not as a temporary server or a quick attempt to follow current market trends. Our ambition is to help revive the European Lineage II private-server community and contribute to a healthier market where players have more than one or two serious projects to choose from. We believe there is still room for a professionally developed European-based server that respects the identity of Interlude while offering the stability, presentation, and quality expected from a modern project. Partnership Opportunities We are open to discussions with serious investors and professional partners who understand the vision and long-term potential of MightyProject.   Investment partnerships will not alter the project’s established gameplay identity. Core decisions concerning balance, progression, and game design will remain under the responsibility of the development team.   Potential partners may contribute in areas such as: Marketing and media strategy Public relations and advertising Community growth Customer support Operational and promotional activities Every partnership will be discussed professionally, with clearly defined responsibilities, expectations, and boundaries. MightyProject is being created with one clear objective: to deliver a modern, polished, and sustainable Interlude experience without losing the character of the original game. More information regarding development progress, features, testing phases, media content, and the official roadmap will be shared as the project moves forward. Thank you to everyone who has supported us, worked with us, or followed our previous activities within the community. This is only the beginning. MightyProject
  • 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..