Hi guys i have one issue with my bot report button a player can spam it without get the message "You have already reported this player"
What i have done wrong?
L2PcInstance:
public boolean isBotReportedBy(L2PcInstance botReporter)
{
if (_botReportedBy.isEmpty())
return false;
for (L2PcInstance reporter : _botReportedBy)
{
if (reporter == null)
continue;
if (reporter == botReporter)
return true;
}
return false;
}
RequestActionUse:
case 65: // Bot Report Button
if (target == null)
return;
if (target == activeChar)
return;
if (!(target instanceof L2PcInstance))
return;
L2PcInstance targetPlayer = (L2PcInstance) target;
if (activeChar.isInsideZone(ZONE_PEACE))
{
activeChar.sendMessage("Cannot use this function in the peace zone.");
return;
}
if (targetPlayer.isInsideZone(ZONE_PEACE))
{
activeChar.sendMessage("Cannot use this function if the target is in a peace zone.");
return;
}
if (((L2PcInstance) target).isBotReportedBy(activeChar))
{
activeChar.sendMessage("You have already reported this player.");
return;
}
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.
DISCORD :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
A small reminder for everyone browsing here - our bonus-start is active starting from today, you can already play with the new benefits! Have a good time everyone 🙂
Congratulations to the Creative alliance on the first-ever defeat of Frintezza on our server! 🏆 Your teamwork and dedication have earned you a place in history.🎉
Question
GameBlonD
Hi guys i have one issue with my bot report button a player can spam it without get the message "You have already reported this player"
What i have done wrong?
L2PcInstance:
public boolean isBotReportedBy(L2PcInstance botReporter)
RequestActionUse:
Tnx guys.
7 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.