how can i check if the player make, for example, 2 kills in 5 seconds.
[Algorithmic]
private date&hour time; (IDK actually the real name of this type)
private date&hour timelast;
private int cumulkill = 0; // 3 global variables in L2PcInstance
in setPvpKills() method // method that add a pvp point
setCumulKill(CumulKill()+1);
if ( cumulkill() == 1)
{
time = current time;
timelast = time +5 sec;
}
doublekill();
public void doublekill ()
if ( time =< timelast)
{
if (CumulKill() >=2)
{
reward doublekill;
}
}
else
{
SetCumulKill (0);
}
public void SetCumulKill (int x)
{
cumulkill = x;
}
public int CumulKill ()
{
return cumulkill;
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
People really like my server. But whenever someone mentions L2Mid, the haters show up and start throwing shits 🙂 I can't really say much about the 50–100 online players. I’m thinking of giving L2Mid a try later this yearif anyone’s interested, let’s keep it positive.
LF a skilled (& affordable 😆 ) developer to help me create some stuff for a project.
Message me your discord or type it as a response here and I'll be adding you if you're providing services.
Im writing for someone that share my vision a good L2 gold style server that won't just randomly shut like L2 Gold.in and will help me maybe build the server for the comunity
Question
Bleadd
Hello,
how can i check if the player make, for example, 2 kills in 5 seconds.
[Algorithmic]
[/algorithmic]
This algo can works?
Cordially,
Bleadd
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.