B1ggBoss
Legendary Member-
Posts
494 -
Credits
0 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by B1ggBoss
-
Strange Error in GS console
B1ggBoss replied to fokys's question in Request Server Development Help [L2J]
serverpack, chronicle, revision... -
[HELP] Lagging NPC's and all html text
B1ggBoss replied to djtrex's question in Request Server Development Help [L2J]
locked then -
enough, i wont dekarma you guys cuz is a waste of time. Locked
-
Problem in L2J Please help!!
B1ggBoss replied to leonscottkennedy's question in Request Server Development Help [L2J]
those scripts perform connections to database example Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); // Do stuff... } catch(Exception e) { } and, at the end they dont close the database like this: finally { L2DatabaseFactory.close(con); } or like this finally { try { if(con != null) con.close(); } catch(Exception e) {} } -
Problem in L2J Please help!!
B1ggBoss replied to leonscottkennedy's question in Request Server Development Help [L2J]
then probably the have unclosed database connections -
Blame/off topic is not allowed in this section, you may create a topic at Off Topic board. If this continues, im locking the topic
-
[Question] NPoly zone question
B1ggBoss replied to [DEV]DjSt3rios's question in Request Server Development Help [L2J]
Npoly creates a zone by joining the vertices you put in the xml files. minZ and maxZ determines the height of the zone. I guess you wanna increase the zone size, for what you should increase the x,y vertices pair -
[HELP] Lagging NPC's and all html text
B1ggBoss replied to djtrex's question in Request Server Development Help [L2J]
are you using default configs? -
Problem in L2J Please help!!
B1ggBoss replied to leonscottkennedy's question in Request Server Development Help [L2J]
usually, a personal computer isnt enough to run a l2jserver, moreover if you run any l2 client in such computer as well. A probe of that is that local network should have 0 ping and is exhasuted enough to have a 5 ms delay -
Folow this: - This link will teach you how to download the source code and how to compile it: http://maxcheaters.com/forum/index.php?topic=81843.0 - This link will teach you how to apply patches like the one i posted above: http://www.l2jserver.com/wiki/Apply_a_Patch
-
Index: java/com/l2jserver/gameserver/model/olympiad/Olympiad.java =================================================================== --- java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (revision 4868) +++ java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (working copy) @@ -578,8 +578,7 @@ Announcements.getInstance().announceToAll(sm); Calendar currentTime = Calendar.getInstance(); - currentTime.add(Calendar.MONTH, 1); - currentTime.set(Calendar.DAY_OF_MONTH, 1); + currentTime.add(Calendar.WEEK_OF_YEAR, 2); currentTime.set(Calendar.AM_PM, Calendar.AM); currentTime.set(Calendar.HOUR, 12); currentTime.set(Calendar.MINUTE, 0);
-
http://maxcheaters.com/forum/index.php?topic=220125.0 to Dev Help [EN]
-
How to enchant a players skills?
B1ggBoss replied to paulchro's question in Request Server Development Help [L2J]
wrong section, locked until move -
drop [Interlude] Help !
B1ggBoss replied to RealspeedVIP's question in Request Server Development Help [L2J]
try editing it in database while server is off -
[How To]Clan Popping out message
B1ggBoss replied to iHeadshoT's question in Request Server Development Help [L2J]
for last revision l2jserver trunk Clan message w/o community board core Index: java/com/l2jserver/gameserver/model/L2Clan.java =================================================================== --- java/com/l2jserver/gameserver/model/L2Clan.java (revision 4874) +++ java/com/l2jserver/gameserver/model/L2Clan.java (working copy) @@ -51,6 +51,7 @@ import com.l2jserver.gameserver.network.serverpackets.ExSubPledgeSkillAdd; import com.l2jserver.gameserver.network.serverpackets.ItemList; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.PledgeReceiveSubPledgeCreated; import com.l2jserver.gameserver.network.serverpackets.PledgeShowInfoUpdate; import com.l2jserver.gameserver.network.serverpackets.PledgeShowMemberListAll; @@ -174,6 +175,8 @@ private boolean _noticeEnabled = false; private static final int MAX_NOTICE_LENGTH = 8192; + private String _clanMessage; // Non community board message + /** * Called if a clan is referenced only by id. * In this case all other data needs to be fetched from db @@ -772,7 +775,7 @@ try { con = L2DatabaseFactory.getInstance().getConnection(); - statement = con.prepareStatement("UPDATE clan_data SET leader_id=?,ally_id=?,ally_name=?,reputation_score=?,ally_penalty_expiry_time=?,ally_penalty_type=?,char_penalty_expiry_time=?,dissolving_expiry_time=? WHERE clan_id=?"); + statement = con.prepareStatement("UPDATE clan_data SET leader_id=?,ally_id=?,ally_name=?,reputation_score=?,ally_penalty_expiry_time=?,ally_penalty_type=?,char_penalty_expiry_time=?,dissolving_expiry_time=?, clan_message=? WHERE clan_id=?"); statement.setInt(1, getLeaderId()); statement.setInt(2, getAllyId()); statement.setString(3, getAllyName()); @@ -781,7 +784,8 @@ statement.setInt(6, getAllyPenaltyType()); statement.setLong(7, getCharPenaltyExpiryTime()); statement.setLong(8, getDissolvingExpiryTime()); - statement.setInt(9, getClanId()); + statement.setString(9, getClanMessage()); + statement.setInt(10, getClanId()); statement.execute(); if (Config.DEBUG) _log.fine("New clan leader saved in db: " + getClanId()); @@ -900,7 +904,7 @@ L2ClanMember member; con = L2DatabaseFactory.getInstance().getConnection(); - PreparedStatement statement = con.prepareStatement("SELECT clan_name,clan_level,hasCastle,ally_id,ally_name,leader_id,crest_id,crest_large_id,ally_crest_id,reputation_score,auction_bid_at,ally_penalty_expiry_time,ally_penalty_type,char_penalty_expiry_time,dissolving_expiry_time FROM clan_data where clan_id=?"); + PreparedStatement statement = con.prepareStatement("SELECT clan_name,clan_level,hasCastle,ally_id,ally_name,leader_id,crest_id,crest_large_id,ally_crest_id,reputation_score,auction_bid_at,ally_penalty_expiry_time,ally_penalty_type,char_penalty_expiry_time,dissolving_expiry_time,clan_message FROM clan_data where clan_id=?"); statement.setInt(1, getClanId()); ResultSet clanData = statement.executeQuery(); @@ -930,6 +934,8 @@ setReputationScore(clanData.getInt("reputation_score"), false); setAuctionBiddedAt(clanData.getInt("auction_bid_at"), false); + setMessage(clanData.getString("clan_message")); + int leaderId = (clanData.getInt("leader_id")); PreparedStatement statement2 = con.prepareStatement("SELECT char_name,level,classid,charId,title,power_grade,subpledge,apprentice,sponsor,sex,race FROM characters WHERE clanid=?"); @@ -2835,4 +2841,45 @@ } } } + + public String getClanMessage() + { + return _clanMessage; + } + + public void setMessage(final String message) + { + _clanMessage = message; + } + + public void sendEditWindow(final L2PcInstance leader) + { + try + { + NpcHtmlMessage msg = new NpcHtmlMessage(5); + msg.setFile(null, "data/html/changeclanmsg.htm"); + msg.replace("%defaultText%", getClanMessage() != null && !getClanMessage().isEmpty()? + getClanMessage() : ""); + leader.sendPacket(msg); + } + catch(NullPointerException npe) + { + _log.warning("L2Clan: Could not find the edit clan message html! : data/html/changeclanmsg.htm"); + } + } + + public void sendClanMessage(final L2PcInstance member) + { + try + { + NpcHtmlMessage msg = new NpcHtmlMessage(5); + msg.setFile(null, "data/html/clanmessage.htm"); + msg.replace("%message%", getClanMessage()); + member.sendPacket(msg); + } + catch(NullPointerException npe) + { + _log.warning("L2Clan: Could not find the clan message html!: data/html/clanmessage.htm"); + } + } } Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 4874) +++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -195,6 +195,10 @@ { activeChar.sendPacket(new PledgeSkillList(activeChar.getClan())); + final String clanMessage = activeChar.getClan().getClanMessage(); + if(clanMessage != null && !clanMessage.isEmpty()) + activeChar.getClan().sendClanMessage(activeChar); + notifyClanMembers(activeChar); notifySponsorOrApprentice(activeChar); Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java (revision 4874) +++ java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) @@ -27,6 +27,7 @@ import com.l2jserver.gameserver.handler.IAdminCommandHandler; import com.l2jserver.gameserver.handler.IBypassHandler; import com.l2jserver.gameserver.model.L2CharPosition; +import com.l2jserver.gameserver.model.L2Clan; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.L2Npc; @@ -241,6 +242,33 @@ Hero.getInstance().showHeroDiary(player, heroclass, heroid, heropage); } } + else if(_command.startsWith("editClanNotice")) + { + if(!activeChar.isClanLeader()) + { + activeChar.sendMessage("You must be a clan leader to change such text!"); + return; + } + String msg = _command.substring(15); + if(msg.length() > 100) + { + activeChar.sendMessage("The text cannot be over 100 characters lenght"); + activeChar.getClan().sendEditWindow(activeChar); + return; + } + final L2Clan clan = activeChar.getClan(); + clan.setMessage(msg); + if(msg != null && !msg.isEmpty()) // Update notice for online members + { + for(L2PcInstance mem : clan.getOnlineMembers(0)) + { + if(mem != null) + clan.sendClanMessage(mem); + } + } + } else { final IBypassHandler handler = BypassHandler.getInstance().getBypassHandler(_command); DP Index: data/html/changeclanmsg.htm =================================================================== --- data/html/changeclanmsg.htm (revision 0) +++ data/html/changeclanmsg.htm (revision 0) @@ -0,0 +1,23 @@ +<html> +<title>Clan Message Editor</title> +<body> +Here you will be able to edit your clan's MOTD. Enter the text in the <font color=LEVEL>above box</font> and press <font color=LEVEL>"Set Text"</font> +<br> +<center> +Current Message +<br> +<font color="2E9AFE"> +%defaultText% +</font> +<br><br> +<center> +<font color="FF0000">NOTE: If you enter an empty text, no page will pop up for clan members.</font> +<br> +MAX: 100 characters +<br> +<MultiEdit var="textbox" width=240 height=100> +<br> +<a action="bypass -h editClanNotice $textbox">Set Text</a> +</center> +</body> +</html> \ No newline at end of file Index: data/html/clanmessage.htm =================================================================== --- data/html/clanmessage.htm (revision 0) +++ data/html/clanmessage.htm (revision 0) @@ -0,0 +1,8 @@ +<html> +<title>Clan Message</title> +<center> +Here is the message of your clan: +<br> +%message% +</body> +</html> \ No newline at end of file Index: data/scripts/handlers/voicedcommandhandlers/ClanMessage.java =================================================================== --- data/scripts/handlers/voicedcommandhandlers/ClanMessage.java (revision 0) +++ data/scripts/handlers/voicedcommandhandlers/ClanMessage.java (revision 0) @@ -0,0 +1,31 @@ +/** + * + */ +package handlers.voicedcommandhandlers; + +import com.l2jserver.gameserver.handler.IVoicedCommandHandler; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +/** + * @author BiggBoss + */ +public final class ClanMessage implements IVoicedCommandHandler +{ + private final String[] CMD = {"editClanMessage"}; + + @Override + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params) + { + if(!activeChar.isClanLeader()) + return false; + + activeChar.getClan().sendEditWindow(activeChar); + return true; + } + + @Override + public String[] getVoicedCommandList() + { + return CMD; + } +} Index: data/scripts/handlers/MasterHandler.java =================================================================== --- data/scripts/handlers/MasterHandler.java (revision 8319) +++ data/scripts/handlers/MasterHandler.java (working copy) @@ -243,6 +243,7 @@ import handlers.usercommandhandlers.Time; import handlers.voicedcommandhandlers.Banking; import handlers.voicedcommandhandlers.ChatAdmin; +import handlers.voicedcommandhandlers.ClanMessage; import handlers.voicedcommandhandlers.Debug; import handlers.voicedcommandhandlers.Lang; import handlers.voicedcommandhandlers.TvTVoicedInfo; @@ -552,6 +553,7 @@ VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Lang()); if (Config.L2JMOD_DEBUG_VOICE_COMMAND) VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Debug()); + VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new ClanMessage()); _log.config("Loaded " + VoicedCommandHandler.getInstance().size() + " VoicedHandlers"); } Index: dist/sql/server/clan_data.sql =================================================================== --- dist/sql/server/clan_data.sql (revision 8319) +++ dist/sql/server/clan_data.sql (working copy) @@ -15,6 +15,7 @@ `ally_penalty_type` DECIMAL( 1 ) NOT NULL DEFAULT 0, `char_penalty_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0', `dissolving_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0', + `clan_message` varchar(100), -- 100 = text lenght PRIMARY KEY (`clan_id`), KEY `leader_id` (`leader_id`), KEY `ally_id` (`ally_id`) -
-
yes, 192.168.1.1 is a reserver address and will never be attached to any computer connected to the local network
-
to open ports just: Go to your local network management ( http://192.168.0.1 or http://192.168.1.1 ) It will ask for an username and a password Then, look for the port forwarding setting. If you are using a router, you must open the ports for your lan ip (which is the form of 192.168.x.x ). Open ports 2106 and 7777, both TCP and UDP. If gameserver and loginserver are in different machines, open 9014 as well. Now, save settings Reset your modem/router Once your modem/router is back to life, check your external ip (it could change due the restart) and place in the proper config files
-
Request get character name
B1ggBoss replied to Meikis's question in Request Server Development Help [L2J]
character.getName() ? -
how can i define the sex of a player? on Java
B1ggBoss replied to xdem's question in Request Server Development Help [L2J]
-
Posting in twitter and then announce in l2j or announce in l2j and then posting in twitter?
-
[help] NPC auto attack
B1ggBoss replied to [DEV]DjSt3rios's question in Request Server Development Help [L2J]
1) My code cannot throw such errors about cast exceptions since im not using any other object to be casted to L2PcInstance than the original one 2) You wrotte double checks of the same thing (like team2 member) 3) So, as i understand from your code, the guards should attack those players inside castle zone which are from different faction than the castle owner? -
Cutom Enchant System
B1ggBoss replied to DaPhreack's question in Request Server Development Help [L2J]
what about explain us it -
[help] NPC auto attack
B1ggBoss replied to [DEV]DjSt3rios's question in Request Server Development Help [L2J]
i did not understand much well what you explain, but sounds a crappy code. All you have to do is replace the 1000 pvps check by the character faction and the zone faction owner. If they are different, attack -
question solved, topic closed