Jump to content

mogo

Members
  • Posts

    268
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by mogo

  1. Yes it is basically two lines of code..
  2. Rio, dude, i know that you are trying to learn, but that's not how you do it. You don't try to parkour when you can't walk yet. You'd better get a book on java and solve all problems written there before playing with l2j core
  3. Just 'cd' to the directory containing build.xml and do 'ant'
  4. @echo off title L2JTeon: Game Server Console :start echo Starting L2JTeon Game Server. echo Visit L2JTeon.servergame.com for updates. echo. REM ------------------------------------------------------------------------ REM #======================================================================# REM # You need to set here your JDK/JRE params in case of x64 bits System. # REM # Remove the "REM" after set PATH variable # REM # If you're not a x64 system user just leave # REM #======================================================================# REM set PATH="type here your path to java jdk/jre (including bin folder)" REM ------------------------------------------------------------------------ REM ------------------------------------- REM Default parameters for a basic server. java -Dfile.encoding=UTF-8 -Xms3072m -Xmx3072m -cp bsf.jar;bsh-engine.jar;bsh-2.0b5.jar;mmocore.jar;javolution.jar;c3p0-0.9.1.2.jar;mysql-connector-java-5.1.6-bin.jar;l2jteon.jar;jython.jar;jython-engine.jar;commons-logging-1.1.jar;java-engine.jar net.sf.l2j.gameserver.GameServer REM REM If you have a big server and lots of memory, you could experiment for example with REM java -server -Xmx1536m -Xms2048m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts REM ------------------------------------- if ERRORLEVEL 2 goto restart if ERRORLEVEL 1 goto error goto end :restart echo. echo Administrator Restarted ... echo. goto start :error echo. Try this one
  5. It's heap space. By default the JVM is only given 64mb of it, unless you 'give' more with command line arguments. Post your script that starts the server
  6. Close enough but it still would send only to you :>
  7. Not quite. You get a list of players currently in the world, so you have to iterate through all of them and send the play sound to each one. Hint: for (L2PcInstance tmpPlayer : L2World.getInstance().getAllPlayers().values() ) { // do something here }
  8. Broadcast the play sound packet to all online players. Hint: use getAllPlayers() method from L2World class
  9. Instead of the npcid, pass a whole l2npc object to it.
  10. You should get spanked for calling names, mister! :( Here's a screenshot making guide for you http://take-a-screenshot.org/ make sure you read the alt+PrtScn part carefully. Cheers!
  11. Is the Street Fight video any good? Have you finished Prince Of Persia? In other words .. alt+printScr next time!
  12. If you don't have a slightest understanding what you are doing.
  13. See a head doctor first. Cheers!
  14. Yes if someone with nice wallet can help the dev
  15. You may want to read up about mysql inner join.
  16. Ok you post a bunch of config values and you expect someone to code you a feature using them? Ok so i want someone to code me TheBestServer. Here is a config example: thebestserverenabled = true
  17. Can we see what you have already made? We'll tell you whats wrong with your code. If you want whole job to be done for you, the marketplace is above.
  18. The error message kinda says it all. State method takes no args, but you are calling it with two args
  19. Shall i remind the rule about posting simple strings or stupid configs?
  20. Ok, so basically this method should almost suit you private void onEventDieDropItem(L2Character killer) { if (killer == null) return; L2PcInstance pk = killer.getActingPlayer(); if(pk == null) return; List<L2ItemInstance> itemsToDrop = new FastList<L2ItemInstance>(); for (L2ItemInstance itemDrop : getInventory().getItems()) { // Don't drop if ( itemDrop.isShadowItem() || // Dont drop Shadow Items !itemDrop.isDropable() || itemDrop.getItemId() == 57 || // Adena itemDrop.getItem().getType2() == L2Item.TYPE2_QUEST || // Quest Items getPet() != null && getPet().getControlItemId() == itemDrop.getItemId() || // Control Item of active pet Arrays.binarySearch(Config.KARMA_LIST_NONDROPPABLE_ITEMS, itemDrop.getItemId()) >= 0 || // Item listed in the non droppable item list Arrays.binarySearch(Config.KARMA_LIST_NONDROPPABLE_PET_ITEMS, itemDrop.getItemId()) >= 0 // Item listed in the non droppable pet item list ) continue; // Don't drop if the item is not equiped if (!itemDrop.isEquipped()) continue; // Adding the item to the "must-drop" list itemsToDrop.add(itemDrop); } int chance = pk.isInParty() && pk.getParty() != null ? 100 - pk.getParty().getMemberCount() * 10 : 100; if (Rnd.get(100) < chance) { L2ItemInstance itemDrop = itemsToDrop.get(Rnd.get(itemsToDrop.size() - 1)); dropItem("EventDieDrop", itemDrop, killer, true); sendMessage("You drop " + itemDrop.getCount() + " " + itemDrop.getName()); } else { sendMessage("You haven't dropped anything this time."); } } You may want to edit it a bit for your needs though
  21. The doDie() method in L2PcInstance class is being executed when a player dies so you'll add your 'drop code' there. Can't go more into detail since i'm on my mobile now.
  22. Jeez leki start with the programming basics, not this quite specific example from Coyote. And remove the terrible piece of code from your sig
  23. Seriously stop that, it's not even funny.
  24. Yeah that's what he wants:
×
×
  • 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