Jump to content

Katara512

Members
  • Posts

    91
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Everything posted by Katara512

  1. thats an example of the onDieInside method its handwritten idk if anything needs adaptation @Override public void onDieInside(final Creature character) { if (character instanceof Player && _isReviveEnabled) { final Player activeChar = character.getActingPlayer(); ThreadPool.getInstance().scheduleGeneral(new Runnable() { @Override public void run() { activeChar.sendPacket(new ExShowScreenMessage("Respawn in " + _reviveDelay + " seconds", 5000)); activeChar.doRevive(); final Location loc = getLoc(); // getLoc() fetches your zone respawn points from zone.xml activeChar.teleToLocation(loc.getX(), loc.getY(), loc.getZ(), true); } }, _reviveDelay * 1000); } }
  2. //return false; public boolean test() { int x = 1; if (x == 1) { System.out.println("works!!!"); return true; } return false; } //return; public void testReturn() { if (test()) { System.out.println("our value is True"); return; } else { System.out.println("our value is False"); return; } } first code block will return false as a default value however if the condition is true then will return true. second bock which uses return will return undefined or void 0. both cases are called falsy. Although if you just want to exit a method it doesnt matter which keyword you'r going to use since both have the same result.
  3. for (PlayerInstance players : getKnownList().getKnownPlayers().values()) players.sendMessage("Everyone in the zone has been flagged."); //edit PlayerInstance to your project's mother class could be Player, L2PcInstance idk //thats the most effective way to iterate through players in zone
  4. the check should be placed inside the RequestUnEquipItem packet
  5. try to download the latest which is 8.0.25 https://mvnrepository.com/artifact/mysql/mysql-connector-java
  6. which version of mysql-connector are you using ? its an important thing
  7. seach inside your Textures folder there are some utx that may contain the scroll bar usually there are on L2UI_XX else there are binded inside a .u file on your system
  8. Δεν υπάρχει κανένας ιός αποκαλούμενος ως κορονοιός είναι προσποιητό ολο αυτό, ολη αυτή η ιστορία έχει γίνει για να μας ρίξουν στάχτη στα μάτια για να μπορέσουν να βάλουν παντού κεραίες 5G και μετά μέσο του εμβολίου ο bill gates να μας ελέγχει σε ότι και αν κάνουμε παίζει να κάνει και mining με τους υπολογιστές μέσα στα χέρια μας, καλή φάση
  9. You have to declare your new handler on GameServer.java also
  10. Check AbstractEnchantPacket and try to work around , test your skills
  11. The first example was not returning a float result as the second one seems like it's the correct one however when you want to do a division between 2 floats and you want the exact result you have to type something like "2/.1f”
  12. 811 is id from systemmsg that contains a string , this is a requestbypass packet
  13. ok found it , one more question if if the method is IsInEvent so the function will work for the rest of the events ? and 1 more, to validate the check on the ItemUse i have to add a return on canUseItem variable ?
  14. can you explain further what you mean by "(Request)UseItem, from memory" ?
  15. If i only could turn my logical idea on code it would be so easy, as sweets said i just want to prevent the player to use another weapon than my specific id on this event , so i think im going to use that code sweets said ----EDIT---- what return should i use because my class is public boolen not void so i cant return nothing
  16. will this code force the player to use only 1 specific id ? because thats what im trying to do
×
×
  • Create New...