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

    • This update resaves 25_25 from the original (with sounds) (without the cave below) Some emitter fixes (removed waterfalls with high-poly meshes) The geodata is old, but it works Everything else is unchanged Download P.S. The effect files are taken from the high client for Interlude, so if you're experiencing critical skills, use the default ones for your Version.  
    • GX-Ext Which file of the svn files should i edit to make blow skills to have 100% chance so i can add the settings in the IlExt.ini? because when im changing it from the skilldata.txt it just helps
    • 我们感谢您的 反馈 并希望让服务变得更加 优秀! 如果您使用过我们的服务并愿意分享您的体验(任何体验——积极或建设性),请在Trustpilot上留下评价,并获得$1作为感谢。 链接: https://www.trustpilot.com/review/socnet.pro 如何获得奖励: 1. 前往Trustpilot并留下您的评价 2. 向我们发送发布确认截图,以及带有与评价用户名一致的授权账户截图。 3. 指定哪个商店应收到这 $1 奖励。根据商店不同,可能需要您的用户名/电子邮箱。 您的反馈帮助我们成长,并让项目对社区中的每一位成员变得更好。感谢您与我们同行! 条款: 此活动仅适用于一个唯一用户。不允许多账号行为。 项目有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快捷且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前的 促销和特别优惠列表 用于购买我们提供的产品与服务: 1. 您可在首次购买时使用优惠码:SOCNET(15% 折扣) 2. 获得 $1 商店余额或 10–20% 折扣——只需在我们网站注册后,按照模板填写您的用户名:“SEND ME BONUS, MY USERNAME IS...”并在我们的论坛主题中发布! 3. 首次启动 SMM 面板可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道以及 Stars 购买机器人中每周都有 Telegram Stars 抽奖! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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