Jump to content

B1ggBoss

Legendary Member
  • Posts

    494
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by B1ggBoss

  1. look for com.l2jserver.gameserver.model.actor.appearance.ColorNameManager.java and replace it for: /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jserver.gameserver.model.actor.appearance; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Set; import com.l2jserver.L2DatabaseFactory; import javolution.util.FastMap; /** * @author BiggBoss */ public class ColorNameManager { private static FastMap<Integer, String> _pvpColor = new FastMap<Integer, String>(); private static FastMap<Integer, String> _pkColor = new FastMap<Integer, String>(); private ColorNameManager() { } public static ColorNameManager getInstance() { return SingletonHolder._cne; } /** * Will load all pvp count with their respective color at server start up * Also will set up the higher pvp/pk count rank for future purposes */ public void loadValues() { Connection con = null; try { _pvpColor.put(0, "FFFFFF"); _pkColor.put(0, "FFFFFF"); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement pvpStatement = con.prepareStatement("SELECT * FROM pvp_color_nick WHERE type = ?"); pvpStatement.setString(1, "pvp"); ResultSet pvpRset = pvpStatement.executeQuery(); while(pvpRset.next()) { _pvpColor.put(pvpRset.getInt("pvppk_count"), pvpRset.getString("color")); } pvpRset.close(); pvpStatement.close(); PreparedStatement pkStatement = con.prepareStatement("SELECT * FROM pvp_color_nick WHERE type = ?"); pkStatement.setString(1, "pk"); ResultSet pkRset = pkStatement.executeQuery(); while(pkRset.next()) { _pkColor.put(pkRset.getInt("pvppk_count"), pkRset.getString("color")); } pkRset.close(); pkStatement.close(); } catch(SQLException sqle) { sqle.printStackTrace(); } finally { try { if(con != null) con.close(); } catch(Exception e) { e.printStackTrace(); } } System.out.println("ColorNameManager: Loaded " + _pvpColor.size() + " colors for pvp kills!"); System.out.println("ColorNameManager: Loaded " + _pkColor.size() + " colors for pk kills!"); } /** * Returns a string-representative with the color of the rank * @param kills * @param forPvp * @return a String containing the Hexadecimal color */ public String getColor(int kills, boolean forPvp) { String color = ""; if(forPvp) color = _pvpColor.get(getValueBefore(kills, _pvpColor.keySet())); else color = _pkColor.get(getValueBefore(kills, _pkColor.keySet())); return color; } /** * Will return the value just before the given value contained * in the provided Set of integers * @param value * @param set * @return the value just before the provided one */ private static int getValueBefore(int value, Set<Integer> set) { int counter = 0; for(int i : set) { if(i > counter && value > i) counter = i; } return counter; } static class SingletonHolder { static ColorNameManager _cne = new ColorNameManager(); } }
  2. He is getting a message that makes the code stop before reach the code you are talking about
  3. Its quite strange, cuz all recipes are done in the same way. If you cannot see s80 recipes in the recipe list, its because or isnt L2EtcItemType.RECIPE or isnt contained in the L2RecipeList class. Check in database that those recipes has recipe as type and that those recipes are also added into data/recipes.xml
  4. the only way to change the npc color server-side is by sending the proper information from the server to the client (which means, packet sending). if it didnt work for you, maybe is only avaliable with client mod
  5. AbstractNpcInfo.NpcInfo contains a writeD call for the npc title color: writeD(0x00); // Title color 0=client default So, you may add a new int field to L2Npc where you can store the title color (0 by default) and instead write writeD(0x00) just write, for example, writeD(npc.getTitleColor()); where getTitleColor() would return such new int field
  6. Weapons Allowed ¶ Usage: <set name="weaponsAllowed" val="Value"/> java/com/l2jserver/gameserver/templates/item/L2WeaponType.java enum ID Value Name Description NONE 1 2 Shield SWORD 2 4 Sword BLUNT 3 8 Blunt DAGGER 4 16 Dagger BOW 5 32 Bow POLE 6 64 Pole ETC 7 128 Etc FIST 8 256 Fist DUAL 9 512 Dual Sword DUALFIST 10 1024 Dual Fist BIGSWORD 11 2048 Big Sword Two Handed Swords PET 12 4096 Pet ROD 13 8192 Rod BIGBLUNT 14 16384 Big Blunt Two handed blunt ANCIENT_SWORD 15 32768 Ancient CROSSBOW 16 65536 Crossbow RAPIER 17 131072 Rapier DUAL_DAGGER 18 262144 Dual Dagger SOME COMBINATIONS EXAMPLES Value Weapons Included 12 sword/blunt 524 dual/sword/blunt 1280 fist/dualfist 2052 sword/bigsword 2060 sword/bigsword/blunt 2580 sword/bigsword/dagger/dual 65568 bow/crossbow 16392 blunt/bigblunt 18432 bigsword/bigblunt 18444 sword/bigsword/blunt/bigblunt 18956 dual/sword/bigsword/blunt/bigblunt 51212 ancient/sword/bigsword/blunt/bigblunt 149516 rapier/sword/bigsword/blunt/bigblunt 163840 ancient/rapier 262160 dagger/dualdagger http://trac.l2jdp.com/wiki/XML
  7. basic i/o. More file to read/write (even smaller) takes more time = uneeded cpu usage. BTW, as you said, you just read few lines, which means you have no idea how the event configuration works. why talk w/o know =) ? The configuration is splitted into 7 sub-menus, each one independient from each other. You can change just a single parameter or the whole event configuration in game. The change will take effect in server inmediatly and it will be saved down to the file at server shutdown. So, as you see, increase the number of files just have 1 consequence: Decrease the engine performance
  8. i see you didnt read it completly, np :) but also saw that you didnt know how to read what you read. If the event vote system is enabled, the event hours for which each event is planified are ignored and vice-versa btw isnt bad writted, what i mean with a little messy is the classes organization
  9. No idea if client support such characters. Maybe the client has his own keyworks to pop up such character (keywords that i dont know) Did you tried with the ASCII character keyset to get them?
  10. are you talking about forum profile or l2 java servers & clients?
  11. This diff contains a Event Engine: An engine capable to execute datapack-sided scripts to run a event. Those dp-side script will extends, inherit and override when needed basic methods needed for most kind of events, so it makes you able to make an event just in the same way as a quest. All events are fully configurable ingame, with a full of tools admin panel (Data can be saved manually, but is unneeded, it will be saved automatically at server shut down). The engine supports events with many event rounds and teams (All you have to do is add them ingame) It also contains a vote system, ppl will be able to vote which event will be the next one comming up (Can be disabled of course) The code is very young (i just tested all administration side and the event i translated (TvT, which can be found at data/scripts/events/Team_vs_Team/)). I mostly share for those who wanna help me on testing the engine. All ppl who test it can tell me what it lacks, what does not work and what throw catched exceptions or errors. I dont recommend to use it in any live server for now. Code side, the code is a little messy (will reorganize and go to the optimisation side when ill sure 100% that the engine is working fine) Is coded for l2jserver, last revision of gracia epilogue branch http://www.mediafire.com/?5514r3dwq7v3qjh
  12. Did you removed the // from this line: //ThreadPoolManager.getInstance().scheduleGeneral(new UnSpawn(TempSpwan), 90000); ?
  13. Try this: Index: src/main/java/com/l2jfree/gameserver/handler/itemhandlers/SummonItems.java =================================================================== --- src/main/java/com/l2jfree/gameserver/handler/itemhandlers/SummonItems.java (revision 8804) +++ src/main/java/com/l2jfree/gameserver/handler/itemhandlers/SummonItems.java (working copy) @@ -18,6 +18,7 @@ import com.l2jfree.gameserver.ThreadPoolManager; import com.l2jfree.gameserver.datatables.NpcTable; import com.l2jfree.gameserver.datatables.SummonItemsData; +import com.l2jfree.gameserver.datatables.SpawnTable; import com.l2jfree.gameserver.handler.IItemHandler; import com.l2jfree.gameserver.idfactory.IdFactory; import com.l2jfree.gameserver.instancemanager.ClanHallManager; @@ -134,6 +135,8 @@ spawn.setLocx(activeChar.getX()); spawn.setLocy(activeChar.getY()); spawn.setLocz(activeChar.getZ()); + UnSpawn unSpawn = new UnSpawn(spawn); + ThreadPoolManager.getInstance().scheduleGeneral(unSpawn, 600000); L2World.getInstance().storeObject(spawn.spawnOne(true)); activeChar.destroyItem("Summon", item.getObjectId(), 1, null, false); activeChar.sendMessage("Created " + npcTemplate.getName() + " at x: " + spawn.getLocx() + " y: " + spawn.getLocy() + " z: " + spawn.getLocz()); @@ -285,6 +288,23 @@ petSummon.broadcastStatusUpdate(); } } + + private class UnSummon implements Runnable + { + private L2Spawn spawn; + + private UnSummon(L2Spawn spawn) + { + this.spawn = spawn; + } + + @Override + public void run() + { + SpawnTable.getInstance().deleteSpawn(spawn, false); + spawn.getLastSpawn().deleteMe(); + } + } @Override public int[] getItemIds()
  14. http://www.maxcheaters.com/forum/index.php?topic=176317.0 To Dev help [EN]
  15. i said to use the method getLastSpawn() for TempSpawn (L2Spawn). L2Npc myNpc = TempSpawn.getLastSpawn(); ThreadPoolManager.getInstance().scheduleGeneral(new UnSpawn(myNpc), 600000);
  16. use TempSpawn.getLastSpawn() instead yourNpc (Of course you have to add the UnSpawn class to the code)
  17. then you may schedule it in the SummonItems class (itemhandlers)
  18. Few things before locked: rCrit is critical rate and is the number which appear in the char window (visual) cAtk is the critical attack power (the damge of a critical attack). Isnt visual locked
×
×
  • 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