-
Posts
386 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Joκκєrino
-
About name Color.
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
Can you tell me how ? -
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(); } }
-
[HELP] NPC Problem
Joκκєrino replied to Sweetyass's question in Request Server Development Help [L2J]
You shouldn't add in java . Just in mysql with class L2Donate and any id . INSERT INTO `npc` VALUES ('55555', 12077, 'Wolf', 0, '', 0, 'Monster.pet_wolf', '13.00', '11.50', '15', 'male', 'L2Donate', 40, '195', '164', '3.95', '1.21', '40', '43', '30', '21', '20', '25', '0', '0', '9', '19', '3', '17', '282', '0', '333', '0', '0', '0', '26', '137', NULL, '0', 0, '0', 'LAST_HIT'); Just try fix it if you get some errors . -
Hello maxcheaters . I want to know if i can change the announcements "form" from : "Announcements : Event started . You have 3 ... " to "[TVT/CTF/BW...] Event Started ..... " and color from navy to green or other colors . Thanks in advice .
-
[Share][WEB-BASED] Vote System
Joκκєrino replied to Pauler's topic in Server Development Discussion [L2J]
For me doesn't works . When i vote , after loading time it says i didn't voted . -
Problem with a bug.
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
it's not about kicking him , just close his connection ( lineage 2 screen ). -
Problem with a bug.
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
Buddy , i already finished problem with bug , now i just want to kick last leader after changing leader -
Hello community . As you know , there is a bug on L2jFrozen . If admin set to color clan leader title , you can make all players of this clan to have the same title by changing the clan leader . Exemple : I am Leader . I have green color and then i change clan leader . After changing i'm not leader but i have green title color . My friend gonna give my clan back and then he will have green title color too as me , but he's not clan leader . I tryied fix it and i successed. L2jFrozen Code // Apply color settings to clan leader when entering if (activeChar.getClan() != null && activeChar.isClanLeader() && Config.CLAN_LEADER_COLOR_ENABLED && activeChar.getClan().getLevel() >= Config.CLAN_LEADER_COLOR_CLAN_LEVEL) { if (Config.CLAN_LEADER_COLORED == 1) activeChar.getAppearance().setNameColor(Config.CLAN_LEADER_COLOR); else activeChar.getAppearance().setTitleColor(Config.CLAN_LEADER_COLOR); } MY EDIT ADDED . if(activeChar.getClan() != null ) if(!activeChar.isClanLeader()) activeChar.getAppearance().setTitleColor(Config.CLAN_NOLEADER_COLOR); But that's not really good , cuz player must restart to change his title color from "green"(Config.CLAN_LEADER_COLOR) to "white"Config.CLAN_NOLEADER_COLOR). Can you tell me how i can kill connection ? In moment when clan leader is changed , last clan leader to be kicked , not actually . Sorry for my english ... :D But i hope you understand what i'm writing
-
Nice info . Probably i will give chance . Good luck with server !
-
Another problem .
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
It's about if you are mage , there must send " Cong......Master of Dark Magic " and if you're fighter , there must send " Cong ... Invincible knight of holy " Can you edit it ? -
Why this code doesn't work ? ( it works in eclipse , without error , but no effect in game ) . if (newChar.isWearingMagicArmor()) { newChar.setTitle(Config.ADD_CHAR_TITLE_M); newChar.getAppearance().setNameColor(244, 14, 203); newChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n !"); } else { newChar.setTitle(Config.ADD_CHAR_TITLE_F); newChar.getAppearance().setNameColor(26, 135, 205); newChar.sendMessage("Congratulations , you are born to be a Invincible Knight of Holy . \n !"); } I've added it in CharacterCreation.java
-
Java Editor Error
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
Thx , now it works . Request close . -
Java Editor Error
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
There is only a problem and already i told you . 2 months ago when I tryied to wrote in eclipse activeChar , and when i pressed ctrl + space I get a list with what to complete , something like "activeChar.setHero (1)" . Now , when i write activeChar and i press ctrl + space i take error with red in left part "activeChar cannot be resolved to a type". Why? I need some help . This is the problem , Tryskell . Sorry for my english , but u will understand . -
Java Editor Error
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
I know , but nothing works for me . Anyone ? -
Java Editor Error
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
There isn't any tutorial about l2j . /:) I want add some libraries but i can't find them . -
Java Editor Error
Joκκєrino replied to Joκκєrino's question in Request Server Development Help [L2J]
Now when i try write activeChar. and then press " CTRL + SPACE " I GET THIS : activeChar cannot be resolved to a type . Anyone can help me ? -
I had some problems . But now i it works : 1. I think you must add import com.l2jserver.gameserver.Announcements; 2. There is an error : Announcements.getInstance().announceToAll("Congratulations," + +activeChar.getName() + " successful enchanted " + item.getItem() + " + " + Config.ENCHANT_ANNOUNCE); You must cut this + . Nice share !
-
[Help]How to remove l2j infos from chat??
Joκκєrino replied to Necro's question in Request Server Development Help [L2J]
Java/Com/L2jserver/gameserver/network/clientpackets/enterworld.java -activeChar.sendMessage(getText("VGhpcyBzZXJ2ZXIgdXNlcyBMMkosIGEgcHJvamVjdCBmb3-VuZGVkIGJ5IEwyQ2hlZg==\n")); - -activeChar.sendMessage(getText("YW5kIGRldmVsb3BlZCBieSB0aGUgTDJKIERldiBUZWFtIGF0IGwyanNlcnZlci5jb20=\n")); - - if (Config.DISPLAY_SERVER_VERSION) - { - if (Config.SERVER_VERSION != null) - -activeChar.sendMessage(getText("TDJKIFNlcnZlciBWZXJzaW9uOg==")+" "+Config.SERVER_VERSION); - - if (Config.DATAPACK_VERSION != null) - -activeChar.sendMessage(getText("TDJKIERhdGFwYWNrIFZlcnNpb246")+" "+Config.DATAPACK_VERSION); - } - -activeChar.sendMessage(getText("Q29weXJpZ2h0IDIwMDQtMjAxMQ==\n")); -
Can you tell me why i take this error ?
-
Hello guys . I don't know if i posted good , right here , but i wanna ask you something , cuz i search a lot of time , and i don't find it . Anyone can tell me where i can find this style for buffer or what pack use it ? Thank you so much , sorry for my english if is wrong . Ah , to be clear , The "hand" move back and foward . Thank you .
-
/agree , is not working ... OS : Windows7(32) 6.1 (Build: 7601) CPU : GenuineIntel Intel® Core i3 CPU 550 @ 3.20GHz @ 3200 MHz 3959MB RAM Video : NVIDIA GeForce GTS 450 (6089) PosCode : ########### General protection fault! History: GFxFlashObj::GFxFlashObj[0] <- GFxUIManager::Load[0] <- GFxFlashWnd::InitFlash[0] <- GFxFlashWnd::ShowWindow[0] <- UGFxUIScript::execShowWindow[0] <- UObject::ProcessEvent[0] <- (LogInMenu Transient.LogInMenu, Function Interface.LogInMenu.OnEvent)[0] <- GFxUIManager::ExecuteUIEvent[0] <- ID:5630, param:[0] <- ExecuteUIEvent[0] <- UILoginState::OnEnter[0] <- UIGameStateManager::SetState[0] <- NConsoleWnd::Initialize[0] <- NConsoleWnd::Init[0] <- UGameEngine::InitConsole[0] <- UGameEngine::Init[0] <- InitEngine[0]
-
« on: Yesterday at 11:09:44 PM » , now is today and is 19:28.
-
Can you tell us when server will be on ? because is 7'18'' :).