Jump to content
  • 0

[HELP]Java code for event!


Question

Posted

Hello guys well has someone any idea about a code like .join/.leave i mean to join the event when he want and .leave when he want too if someone has idea make a reply ;)

thanks.

P.S on l2j ofc :P

4 answers to this question

Recommended Posts

  • 0
Posted

Each event has a method to register a player, usually used by NPCs.

Should be something like public void registerplayer(L2PcInstance p) or (int p) where in this case p stands for the player's objectId.

Either you call that method from the voiced command or you just remove it from the FastList which contains the Player List. Usually, since most Events have a registration period the players are put in an Array (which is just stupid honestly) but I'm guessing that they have updated it to FastLists or HashMaps (FastMaps) so you should have no problem adding the player to the registration list. Just make sure you put a few checks to prevent double registrations.

  • 0
Posted

Its shared here.. search a bit.

Whats the difference between .tvtjoin and .tvtleave?

not big at all.Every event has an NPC ,right? Just get the method from the .tvtjoin/leave code and u`ll get it :]

  • 0
Posted

Leeroy do you know if they have changed everything from Arrays to FasLists ?

I dun have Eclipse here and I'm curious. Its just dumb to use Arrays.

Guest
This topic is now closed to further replies.
×
×
  • Create New...