Jump to content

Question

Posted

Hello maxcheaters . Today i made an instanced npc who can change your name color  . All works good but , after restart , color returns to the original.

 

Exemple : My name color is White ~> changing color to blue ~> restart ~> again white.

 

Thanks in advice .

 

Here is the npc :

 

package com.src.gameserver.model.actor.instance;

import javolution.text.TextBuilder;

import com.src.gameserver.network.serverpackets.ExShowScreenMessage;
import com.src.gameserver.network.serverpackets.MagicSkillUser;
import com.src.gameserver.network.serverpackets.NpcHtmlMessage;
import com.src.gameserver.network.serverpackets.SocialAction;
import com.src.gameserver.templates.chars.L2NpcTemplate;
import com.src.gameserver.network.serverpackets.UserInfo;


public class L2NpcColorInstance extends L2NpcInstance
{
public String filename;

public L2NpcColorInstance(int objectId, L2NpcTemplate template)
{
	super(objectId, template);
}

@Override
public void onBypassFeedback(L2PcInstance player, String command)
{
	if(player == null || player.getLastFolkNPC() == null || player.getLastFolkNPC().getObjectId() != this.getObjectId())
	{
		return;
	}

	if(command.startsWith("name_verde"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x009900);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_albastru"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0xff5555);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_mov"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0xBF00FF);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_galben"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x00ffff);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_rosu"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x4444FF);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_portocaliu"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x0099ff);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_lime"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x55ff55);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_gri"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x665566);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_cyan"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0xffff00);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.broadcastUserInfo();
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
}

private static void displayCongrats(L2PcInstance player)
{
	player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
	player.broadcastPacket(new MagicSkillUser(player, player, 2024, 1, 1, 0));
	player.sendPacket(new ExShowScreenMessage("Your name color have changed !", 4000, 0x02, true));
}

@Override
public void showChatWindow(L2PcInstance player, int val)
{
	filename = (getHtmlPath(getNpcId(), val));
	NpcHtmlMessage msg = new NpcHtmlMessage(this.getObjectId());
	msg.setHtml(NpcWindow(player));
	msg.replace("%objectId%", String.valueOf(this.getObjectId()));
	player.sendPacket(msg);
}

private String NpcWindow(L2PcInstance player)
{
	TextBuilder tb = new TextBuilder();
		tb.append("<html>");
		tb.append("<title>Title Color Manager</title>");
		tb.append("<body>");
		tb.append("<center><img src=\"L2UI_CH3.herotower_deco\" width=258 height=32></center>");
		tb.append("<br><br>");
		tb.append("<center>");
		tb.append("Do you want change your title color?<br>");
		tb.append("You can change it for <font color=\"00FFFF\">1</font> <font color=\"LEVEL\">Festival Adena</font>.");
		tb.append("<br> ");
		tb.append("<font color=\"FFFF00\">Select</font> one color from the list below :<br>");
		tb.append("<table width=\"240\" height=\"80\" border=\"0\" bgcolor=\"444444\">");
		tb.append("<tr>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_verde\"><font color=\"009900\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_albastru\"><font color=\"0099ff\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_mov\"><font color=\"BF00FF\">Select</font></a></td>");
		tb.append("</tr>");
		tb.append("<tr>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_galben\"><font color=\"ffff00\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_rosu\"><font color=\"ff0000\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_portocaliu\"><font color=\"FF8000\">Select</font></a></td>");
		tb.append("</tr>");
		tb.append("<tr>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_lime\"><font color=\"80FF80\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_gry\"><font color=\"AAAAAA\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_cyan\"><font color=\"00FFFF\">Select</font></a></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<br><br><center><img src=\"L2UI_CH3.herotower_deco\" width=258 height=32></center><br>");
		tb.append("	<br><br>");
		tb.append("</center>");
		tb.append("</body></html>");
		return tb.toString();
}
}

13 answers to this question

Recommended Posts

  • 0
Posted

Do it like a quest, save the color st.set("color","verde"); and check it on enterworld. I think is the easiest way.

  • 0
Posted

Do it like a quest, save the color st.set("color","verde"); and check it on enterworld. I think is the easiest way.

 

I want it as a Npc Instanced . But thank you , if you have any other idea just tell me :D

  • 0
Posted

O.o...  doing as I said your npc function syle won't change... it's only to use a quest method to save data... anyway another method is to add one field in characters table and check it on enterworld, but is more difficult than the other way.

  • 0
Posted

you can create a new column on characters table , for example column color, when a player changes his color , this column change to the color's code.And when players enter the game( clientpackets / Enterworld.java ) , the system checks his color :)

  • 0
Posted

you can create a new column on characters table , for example column color, when a player changes his color , this column change to the color's code.And when players enter the game( clientpackets / Enterworld.java ) , the system checks his color :)

 

 

I know how to add a column , but can you tell me how i can update that column when an player changes his name color and how to check his color in enterworld ?

  • 0
Posted

I know how to add a column , but can you tell me how i can update that column when an player changes his name color and how to check his color in enterworld ?

Look how pvpkills column works. One thing to know is that when you "set" the column , you don't need to create a new sql connection , just the method ( Ex. setUniqueColor(0xFFFF) ).

 

  • 0
Posted

@author

something like that?

 

Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(revision 252)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -374,8 +374,8 @@

	// Character Character SQL String Definitions:
	private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
-	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=?,pccafe_points=?,prime_points=? WHERE charId=?";
-	private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createDate,language,pccafe_points,prime_points FROM characters WHERE charId=?";
+	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=?,pccafe_points=?,prime_points=?,name_color=? WHERE charId=?";
+	private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createDate,language,pccafe_points,prime_point,name_color FROM characters WHERE charId=?";

	// Character Teleport Bookmark:
	private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)";
@@ -387,6 +387,7 @@
	private FastList<L2Effect> cancelbuffs = new FastList<L2Effect>();
	public boolean isoncanceltask = false;
	private long prime_points; 
+	private String name_color;

	public FastList<L2Effect> getcancelbuffs()
	{
@@ -8023,6 +8024,7 @@
				// Language
				player.setLang(rset.getString("language"));
				player.setprime_points(rset.getLong("prime_points")); 
+				player.setName_color(rset.getString("name_color"));

				// Retrieve the name and ID of the other characters assigned to this account.
				PreparedStatement stmt = con.prepareStatement("SELECT charId, char_name FROM characters WHERE account_name=? AND charId<>?");
@@ -8491,7 +8493,8 @@
			statement.setString(52, getLang());
			statement.setInt(53, getPcBangPoints());
			statement.setLong(54,getprime_points()); 
-			statement.setInt(55, getObjectId());
+			statement.setString(55,getName_color()); 
+			statement.setInt(56, getObjectId());

			statement.execute();
			statement.close();
@@ -8540,6 +8543,16 @@
		}
	}

+	public String getName_color() 
+	{ 
+		return name_color; 
+    } 
+	
+	public void setName_color(String NameColor) 
+    { 
+		name_color = NameColor; 
+    }
+	
	public long getprime_points() 
	{ 
		return prime_points; 


Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java	(revision 210)
+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -325,6 +325,62 @@
				activeChar.updateVitalityPoints(points, false, true);
		}

+		if(activeChar.getName_color().equals("verde"))
+		{
+			activeChar.getAppearance().setNameColor(0x009900);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		
+		if(activeChar.getName_color().equals("albastru"))
+		{
+			activeChar.getAppearance().setNameColor(0xff5555);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		if(activeChar.getName_color().equals("mov"))
+		{
+			activeChar.getAppearance().setNameColor(0xBF00FF);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		if(activeChar.getName_color().equals("galben"))
+		{
+			activeChar.getAppearance().setNameColor(0x00ffff);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		if(activeChar.getName_color().equals("rosu"))
+		{
+			activeChar.getAppearance().setNameColor(0x4444FF);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		if(activeChar.getName_color().equals("portocaliu"))
+		{
+			activeChar.getAppearance().setNameColor(0x0099ff);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		if(activeChar.getName_color().equals("lime"))
+		{
+			activeChar.getAppearance().setNameColor(0x55ff55);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		if(activeChar.getName_color().equals("gri"))
+		{
+			activeChar.getAppearance().setNameColor(0x665566);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		if(activeChar.getName_color().equals("cyan"))
+		{
+			activeChar.getAppearance().setNameColor(0xffff00);
+			activeChar.updateNameTitleColor();
+			activeChar.broadcastUserInfo();
+		}
+		
		activeChar.checkRecoBonusTask();

		activeChar.broadcastUserInfo();




package com.src.gameserver.model.actor.instance;

import javolution.text.TextBuilder;

import com.src.gameserver.network.serverpackets.ExShowScreenMessage;
import com.src.gameserver.network.serverpackets.MagicSkillUser;
import com.src.gameserver.network.serverpackets.NpcHtmlMessage;
import com.src.gameserver.network.serverpackets.SocialAction;
import com.src.gameserver.templates.chars.L2NpcTemplate;
import com.src.gameserver.network.serverpackets.UserInfo;


public class L2NpcColorInstance extends L2NpcInstance
{
public String filename;

public L2NpcColorInstance(int objectId, L2NpcTemplate template)
{
	super(objectId, template);
}

@Override
public void onBypassFeedback(L2PcInstance player, String command)
{
	if(player == null || player.getLastFolkNPC() == null || player.getLastFolkNPC().getObjectId() != this.getObjectId())
	{
		return;
	}

	if(command.startsWith("name_verde"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x009900);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("verde");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_albastru"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0xff5555);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("albastru");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_mov"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0xBF00FF);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("mov");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_galben"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x00ffff);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("galben");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}

	if(command.startsWith("name_rosu"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x4444FF);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("rosu");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_portocaliu"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x0099ff);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("portocaliu");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_lime"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x55ff55);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("lime");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_gri"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0x665566);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.updateNameTitleColor();
			player.broadcastUserInfo();
			player.setName_color("gri");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
	if(command.startsWith("name_cyan"))
	{
		if(player.getInventory().getInventoryItemCount(5556, 0) >= 1)
		{	player.getAppearance().setNameColor(0xffff00);
			player.getInventory().destroyItemByItemId("Name Change Item", 5556, 1, player, null);
			displayCongrats(player);
			player.broadcastUserInfo();
			player.setName_color("cyan");
		}
		else
		{
			player.sendMessage("You don't have enough items.");
		}
	}
}

private static void displayCongrats(L2PcInstance player)
{
	player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
	player.broadcastPacket(new MagicSkillUser(player, player, 2024, 1, 1, 0));
	player.sendPacket(new ExShowScreenMessage("Your name color have changed !", 4000, 0x02, true));
}

@Override
public void showChatWindow(L2PcInstance player, int val)
{
	filename = (getHtmlPath(getNpcId(), val));
	NpcHtmlMessage msg = new NpcHtmlMessage(this.getObjectId());
	msg.setHtml(NpcWindow(player));
	msg.replace("%objectId%", String.valueOf(this.getObjectId()));
	player.sendPacket(msg);
}

private String NpcWindow(L2PcInstance player)
{
	TextBuilder tb = new TextBuilder();
		tb.append("<html>");
		tb.append("<title>Title Color Manager</title>");
		tb.append("<body>");
		tb.append("<center><img src=\"L2UI_CH3.herotower_deco\" width=258 height=32></center>");
		tb.append("<br><br>");
		tb.append("<center>");
		tb.append("Do you want change your title color?<br>");
		tb.append("You can change it for <font color=\"00FFFF\">1</font> <font color=\"LEVEL\">Festival Adena</font>.");
		tb.append("<br> ");
		tb.append("<font color=\"FFFF00\">Select</font> one color from the list below :<br>");
		tb.append("<table width=\"240\" height=\"80\" border=\"0\" bgcolor=\"444444\">");
		tb.append("<tr>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_verde\"><font color=\"009900\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_albastru\"><font color=\"0099ff\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_mov\"><font color=\"BF00FF\">Select</font></a></td>");
		tb.append("</tr>");
		tb.append("<tr>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_galben\"><font color=\"ffff00\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_rosu\"><font color=\"ff0000\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_portocaliu\"><font color=\"FF8000\">Select</font></a></td>");
		tb.append("</tr>");
		tb.append("<tr>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_lime\"><font color=\"80FF80\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_gry\"><font color=\"AAAAAA\">Select</font></a></td>");
		tb.append("<br>");
		tb.append("<td align=center><a action=\"bypass -h npc_%objectId%_name_cyan\"><font color=\"00FFFF\">Select</font></a></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<br><br><center><img src=\"L2UI_CH3.herotower_deco\" width=258 height=32></center><br>");
		tb.append("	<br><br>");
		tb.append("</center>");
		tb.append("</body></html>");
		return tb.toString();
}
}

  • 0
Posted

Simply create a new method named setNameColor with a second parameter "boolean save", and make a db connection on it as ^Wyatt did.

 

setNameColor(int, boolean)

 

The existing setNameColor will return the new method, with parameter boolean set to false.

Guest
This topic is now closed to further replies.


  • Posts

    • When you say bots allowed, it means we are allowed to use adrenaline ?
    • https://l2mayhem.ru/   The Mayhem Server is designed for players who want to enjoy the game without unnecessary stress or steep barriers. We focus on a comfortable gaming experience: the mechanics are adapted so that even newcomers can get up to speed quickly, while veterans will be happy to return to the beloved universe. On the server, character progression and content difficulty are well balanced: your character develops steadily, without the need to spend huge amounts of time on repetitive tasks. For players’ convenience, we’ve implemented autofarm - it lets you complete daily tasks efficiently. Moreover, bots are officially allowed on the server: they help automate routine actions, so you can focus on the most exciting parts of the game - sieges, PvP, clan wars, and crafting. The server’s atmosphere is friendly: the active community is always ready to offer advice, and the administration ensures order and fairness. Whether you’re looking for a relaxed leveling and world‑exploration experience or want to take part in intense events, everyone can find their own pace and playstyle here. Right now, the server features new activities: we’ve added new instances and locations with unique mechanics and rewards, as well as rare items that can only be obtained in these zones. This is a great chance to get powerful gear and stand out among other players.   Rates: - Grind: EXP/SP x3 (Raid Bosses: x3). - Loot: Drop/Spoil/Adena x3; Raid/Epic Raid drops x3. - Quests: All rewards x1.   Gameplay: - Accounts are created automatically. - Mammons is located in the Town of Giran. - Each character has access to the unlimited Auto Farm function. - Mass party functions activated by the party leader. - A pre-installed shortcut panel is provided for each new character. - The full list of chat commands is available on the Community Board. - Players have a x25 weight limit and an increased inventory capacity. - All buffs, dances, and songs last for 2 hours. - Spawn protection lasts 10 seconds after teleporting. - Treasure Chests have been removed from spawns. - Cursed Weapons have been removed from drops. - Common items can no longer be purchased or obtained as drops. - Mobs and Raid Bosses no longer use Cancel skill. - Equipment up to the Dynasty can be purchased with adena. - Shots up to S grade and consumables are available in the Community Board. - Offline shops are supported: simply set up a shop and type the .offline command in chat. - No drop penalty on Raid Bosses unless the player is over 5 levels higher than the boss; otherwise, the drop chance is reduced. - Mana Potions restore 1500 MP and have a 10‑second reuse time. Newbie Mana Potions restore 500 MP. - The Vitality, Nevit, and Recommendations systems have been disabled. - The store now offers a lower buy price for player‑sold items. - NPC Victor visits Town of Giran on Wednesdays and Saturdays for gear/doll upgrades and elemental exchange. - Once you hit level 40, every mob can drop one of three medals: Bronze, Silver, or Gold.   Premium: - +35% to EXP/SP, Adena, Seal Stones, Element Stones, and Epaulette drops. - Buffs, dances, and songs last 3 hours. - With Premium, players can get 3‑hour buffs by purchasing them from other players.   Enchanting: - The chance to successfully enchant gear is 65%. Safe enchantment is up to +3; the maximum enchant level is +20. - Elemental Stones: 50% chance. Elemental Crystals: 30% chance.   Skills: - Auto‑learn all skills and Forgotten Skills. - 30 buff slots, 12 Dance/Song slots. - Subclass max level raised to 85.   Quests: - 25 000 Adena is required to obtain the 1st class; 250 000 Adena for the 2nd class; 10 000 000 Adena for the 3rd class. - The subclass quest is not required. - The Freya quest is not required. - The Hard Freya quest is not required. - Access to Frintezza is granted only after completing the quest or upon having the purchased quest item. - Access to Baium is granted only after completing the quest or upon having the purchased quest item. - Access to Antharas is granted only after completing the quest or upon having the purchased quest item. - Access to Valakas is granted only after completing the quest or upon having the purchased quest item. - Hellbound progression is at level 1.   Olympiad: - Olympiads are held monthly. - Enchantment limit is +6. - Starting Olympiad requires 6 characters. - You need 15 battles to receive a reward. - Only non‑class battles are available.   Sieges/Territory Wars: - Flags are returned to their owners at the start of each Territory War, which occurs every 2 weeks. - A clan’s maximum number of captured flags in TW is 3.   Raid Bosses/Epic Bosses/Instance Features: - RB status is available on the Community Board. - Freya - 6-27 chars to enter. - Hard Freya - 6-27 chars to enter. - Frintezza - 6-45 chars to enter. - Ultra Daytime Zaken - 6-9 chars to enter. - Daytime Zaken - 6-9 chars to enter. - Nightly Zaken - 6-450 chars to enter. - Tiat - 9-45 chars to enter. - Beleth - 9 chars to enter. - Day/night restrictions for all Zaken instances have been removed. - Level‑limited zones: Ant Nest (levels 1–45), Sea of Spores (levels 1–56), Core (levels 1–56). - Almost all Raid Bosses listed in the Community Board drop an Enchanting Box with a 100% chance. - New Raid Bosses and their jewelry have been added. Teleport to these bosses via NPC Mirelle in Town of Giran. - New Instances: dolls, timed epic jewelry, and upgrade item for cloaks, bracelets, and accessories. Enter via NPC Ancient Portal in Town of Giran; 6-9 chars to enter.
    • Estou procurando cloacks do classic adaptadas para cliente interlude.
    • 10 Raid Bosses. PvP every 3 hours. Zero donations.   Welcome to L2 Empire. Interlude. x1000. Pure PvP. No donation shop. Not even "cosmetics only". Nothing. Everything in this game drops, gets farmed, or gets taken from someone else. Before we open the gates, we want real players to try to break it.   ⚔️ WHAT'S WAITING FOR YOU - Level 80 from the start, gear from the Starter Voucher, free buffs - Soulshots, spiritshots and potions: free, forever - 10 Raid Bosses on a fixed schedule, 4 arenas, everyone around them flagged - PvP Zone every 3 hours, Team vs Team, 1v1 Tournament, Olympiad, Sieges - Revenge: someone killed you? Get him within 10 minutes for double coins - Solo Dungeon, Player Market, weekly rankings, Hall of Fame - Our own anti cheat. One client per PC. Bots get nothing but a ban.   📡 A DISCORD CONNECTED TO THE GAME Our Discord is not just a chat. It lives with the server: - Live Raid Boss board: which boss is up, where, and when the next one comes - Every event on a countdown, shown in YOUR own time zone - Kill streaks, raid kills and weekly rankings posted live from the game - Link your character and get your PvP rank as a Discord role - The weekly PvP King, crowned on Discord - Your own stats with one command - Support tickets in English, Greek, Spanish and Portuguese - Development updates and sneak peeks before anyone else   🛠️ WHY WE NEED YOU The server is still being built, and we won't pretend otherwise. We want the bugs found now, not on launch night. We want clan leaders to tell us what their clan needs. We want to hear what you always hated on other servers, so it's not here.   🎖️ WHAT YOU GET Every tester gets an exclusive Beta Hero armor skin, forever. Keep the stats of your own armor, wear the look nobody else can ever get. You'll be the ones everyone recognizes as the first of L2 Empire.   👉 JOIN US: https://discord.gg/kQjk9md7fX Testers are picked on the Discord. See you in Giran. L2 Empire Stuck in a wall or somewhere after a bug? Now you can fix it yourself. 1. Log out of the game 2. Go to **l2empire.com** · **My Account** and log in 3. Press **Back to Giran** next to your character Next time you log in, you are in Giran. One time every 30 minutes. Not after logging out in a fight, flagged, in an event, the Dungeon or the PvP farm. 🇬🇷 Κόλλησες κάπου ή σε έπιασε bug; Βγες από το παιχνίδι, πήγαινε στο l2empire.com · My Account και πάτα **Back to Giran**. Μία φορά κάθε 30 λεπτά. 🇪🇸 ¿Atascado o un bug? Sal del juego, entra en l2empire.com · My Account y pulsa **Back to Giran**. Una vez cada 30 minutos. 🇧🇷 Travou em algum lugar ou deu bug? Saia do jogo, entre em l2empire.com · My Account e clique em **Back to Giran**. Uma vez a cada 30 minutos.
  • 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..