Jump to content

haha code edit


scraw

Recommended Posts

-Hello..i know that noone will answer but i never stop hopping..so get to the point:

 

 

-I have an code for auto-reward every shcelude time "X" but it reward all players in L2World no matter if dualbox or whatever.

-That i want is: Players reward by Ip (only one player) 

 

thats what i have :

Spoiler

 L2JFROZEN REV 1132!!!!\i want to do it individual code:

==============================================
 public static void AutoReward ()
 {
 Collection <L2PcInstance> pls = L2World.getInstance (). getAllPlayers ();
 for (L2PcInstance p: pls)
 {
 p.sendMessage ("AutoReward: You got" + Config.AUTO_REWARD_COUNT + "" + Config.NAME_ITEM_REWARD + "by being online");
 p.getInventory (). addItem ("", Config.AUTO_REWARD_ID, Config.AUTO_REWARD_COUNT, p, null);
}
}

}

 

Edited by scraw
Link to comment
Share on other sites

  • 3 weeks later...
final Map<String, AtomicInteger> IP = new HashMap<>();
		
for (final L2PcInstance activeChar : L2World.getInstance().getPlayers())
{
	if (IP.computeIfAbsent(activeChar.getIPAddress(), k -> new AtomicInteger()).incrementAndGet() > MAX_REWARD_PER_IP) // MAX_REWARD_PER_IP represent a static var or a config of yours.
	{
        // Skip player since there are more IP's in map than allowed
		continue;
	}
    
    // Your code for reward
}

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Posts

    • I am selling the essence project which includes versions 388 and 439 that have been running for over 2 years or (447 as custom PVP like Pride). I have a test server for you to test them out. If you are really interested in it then contact my seller at discord: kiwi7106. Price: 4000 Euro P/s: This is a project that I have spent a lot of money and time developing, so if you are not interested in it, please get out of this topic, thank you. P/s 2: If you find the price too expensive, it's best to skip this article and find another project and don't comment negatively on my topic, thank you.
    • Someone ask me for this, it should work on any client that has Kamael race, preview:     Installation - there are two ways to install depending on how you want to use it:   Method 1: If you want to completely replace the original, do:   Copy all lines from your armorgrp to Notepad++, press Ctrl+H, check the "match whole word" option and replace:   kamael.Mkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_MKamael_m001_w_ad00   Then replace:   MKamael.Mkamael_m000_t00_w   by:   AvengersKamaelWings.MKamael_m001_t00_w   Now repeat the same process with the female, replace:   kamael.Fkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_FKamael_m001_w_ad00   Then replace:   FKamael.Fkamael_m000_t00_w   by:   AvengersKamaelWings.FKamael_m001_t00_w   You're done, paste everything back into File Edit and save!   Method 2: If you only want to replace in specific sets, execute the above process only on the armorgrp of those sets.   Repack by: AvengersTeamBr Password: LadrãoDeFrango      
    • 用于解密、加密和编辑 .u 文件的工具。
    • It's always awesome when you find someone who not only delivers great quality but also does it way ahead of schedule. Makes you feel like you hit the jackpot, right? I'm new around here, just stumbled upon this forum, and seeing posts like yours really gives me hope that there are some real pros hanging out in this community.
  • Topics

×
×
  • Create New...