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.

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
Reply to this topic...

×   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

    • From Salvation onwards I think you need a patched nwindow.dll that allows such modifications, try to see if you get what you need here: https://drive.google.com/drive/u/1/folders/1LLbQFGf8KlR-O0Iv5umfF-pwZgrDh9bd
    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
    • small update: dc robe set sold   wts adena 1kk = 1.5$ 
  • Topics

×
×
  • Create New...