Joκκєrino Posted June 25, 2012 Posted June 25, 2012 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(); } }
0 Rizlaaa Posted June 25, 2012 Posted June 25, 2012 If you want to hold the color after the restart , you must save the data somewhere ( in Database ).
0 ^Wyatt Posted June 25, 2012 Posted June 25, 2012 Do it like a quest, save the color st.set("color","verde"); and check it on enterworld. I think is the easiest way.
0 Joκκєrino Posted June 25, 2012 Author Posted June 25, 2012 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 ^Wyatt Posted June 25, 2012 Posted June 25, 2012 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 Rizlaaa Posted June 25, 2012 Posted June 25, 2012 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 Joκκєrino Posted June 25, 2012 Author Posted June 25, 2012 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 Rizlaaa Posted June 25, 2012 Posted June 25, 2012 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 ^Wyatt Posted June 25, 2012 Posted June 25, 2012 @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 Tryskell Posted June 25, 2012 Posted June 25, 2012 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.
0 Joκκєrino Posted June 25, 2012 Author Posted June 25, 2012 Now it works . If someone is interested how i corected it , just tell me.
0 KruMix Posted June 25, 2012 Posted June 25, 2012 Now it works . If someone is interested how i corected it , just tell me. Why don't post here?
Question
Joκκєrino
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 :
13 answers to this question
Recommended Posts