Jump to content

Random Fight


Lioy

Recommended Posts

 

 
 

 

[GR]Fysika kai autos ine o skopos tou post , http://thenewboston.org/list.php?cat=31 des edw kapia tutorials arxika.

 

 

 

 

I will update the version in some hours gyes, for fixes, dont forget i made this for practice , so i won't be much fast.

 

ευχαριστώ

Link to comment
Share on other sites

UPDATED V2

replaced announce with Broadcast.announceToOnlinePlayers

fixed @SuppressWarnings shits

improved pickplayers() method

now announce number of players that registed before pick the 2 random players

 

when i register more than two players, for example three players:  http://i.imgur.com/Z54Nm1S.jpg

In version 2, i tested with 3 players registed, no problem until now.

 

 

 

FOR ANY BUGS , FIXES , YOU KNOW!!

Edited by Lioy
Link to comment
Share on other sites

 

Asked by discorder25 , made for practice
 
Description:
 

 

 

CODE[V2]:

http://codecrap.com/content/1229/

 

Default delay: 3 minutes(it was for test)

Configuarable(including reward id,count,allow or no the event and delay)

?register to register

?unregister to unregister

Tested(no errors)

For bugs: pm me in the forum or let a comment in this topic,thank you.

 

23huphz.jpg

az9yma.jpg

34j3mf4.jpg

2udussi.jpg

2hpnbzl.jpg

2utkzkw.jpg

2u4t0ub.jpg

 

For more code requests pm me , I do this only for pract

it works to l2jfrozen ?

Link to comment
Share on other sites

  • 3 months later...

sure

i have register 3 ppl and when say in announcement "amount of players registed 3. 2 random players will be choosen in 30 seconds show that error in gs and event dont start, dont say somethnig in announcements not start again

 

image.png

Edited by nikosdevil20
Link to comment
Share on other sites

i have register 3 ppl and when say in announcement "amount of players registed 3. 2 random players will be choosen in 30 seconds show that error in gs and event dont start, dont say somethnig in announcements not start again

 

image.png

 

 

Change public static Vector<L2PcInstance> players = new Vector<>();

 

to :

 

public static CopyOnWriteArrayList<L2PcInstance> players = new CopyOnWriteArrayList<>();

Link to comment
Share on other sites

Change public static Vector<L2PcInstance> players = new Vector<>();

 

to :

 

public static CopyOnWriteArrayList<L2PcInstance> players = new CopyOnWriteArrayList<>();

 

This, also you should add a little restriction pony where the char can only fight if he has level 80 or nobless

 

if (!activeChar.isNoble)

return true;

else if (!activeChar.isNoble()

return false;

 

something like that for fun

Link to comment
Share on other sites

well

"something like that for fun"

 

if (!activeChar.isNoble || activeChar.getClassId().level() == 3)
        {
        activeChar.sendMessage("You have successfully registered to the event!");
        return true;
        }
    else if (!activeChar.isNoble() || activeChar.getClassId().level() < 3)
    {
        activeChar.sendMessage("You need to be a nobless and have 3rd prof.");
     return false;
    }

 

Sorry napster is that better for you?

Link to comment
Share on other sites

Change public static Vector<L2PcInstance> players = new Vector<>();

 

to :

 

public static CopyOnWriteArrayList<L2PcInstance> players = new CopyOnWriteArrayList<>();

i change to this and now i have this error: 

 

image.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Posts

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...