Hello community, i never write anything here, i just wonder, how can i set some code to check if the members of a clan are dualboxing, because i adapted reborn12 Clan reward from acis, and the rewards are working good, this is the code i can manage to make it work:
(Also i don't know how to make a list to add all clan lvl 6 skills.)
Once is finished i want to share it with the htmls.
Dont know why do not add the skills to the clan
package com.l2jserver.gameserver.model.actor.instance;import java.util.Map;import java.util.StringTokenizer;import com.l2jserver.gameserver.ai.CtrlIntention;import com.l2jserver.gameserver.cache.HtmCache;import com.l2jserver.gameserver.datatables.SkillData;import com.l2jserver.gameserver.enums.InstanceType;import com.l2jserver.gameserver.model.actor.L2Npc;import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;import com.l2jserver.gameserver.model.skills.Skill;import com.l2jserver.gameserver.network.clientpackets.Say2;import com.l2jserver.gameserver.network.serverpackets.AcquireSkillDone;import com.l2jserver.gameserver.network.serverpackets.ActionFailed;import com.l2jserver.gameserver.network.serverpackets.CreatureSay;import com.l2jserver.gameserver.network.serverpackets.EtcStatusUpdate;import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;import com.l2jserver.gameserver.network.serverpackets.ValidateLocation;/**
* @author Reborn12
*/publicclass L2ClanManagerInstance extends L2Npc
{publicstaticMap<Integer,Integer> CLAN_SKILLS;public L2ClanManagerInstance(L2NpcTemplate template){
super(template);
setInstanceType(InstanceType.L2ClanManagerInstance);}publicint[] clanSkills ={391,370,371,373,374,376,377,379,383};publicvoid onBypassFeedback(L2PcInstance player,String command){StringTokenizer st =newStringTokenizer(command," ");String actualCommand = st.nextToken();if(actualCommand.startsWith("mainHtml")){
showMainHtml(player,"data/html/mods/ClanManager/main.htm");}elseif(actualCommand.startsWith("clanreward")){
showMainHtml(player,"data/html/mods/ClanManager/clanreward.htm");}elseif(actualCommand.startsWith("getclanreward")){if(player.getClan()== null){
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","You don't have a clan."));return;}elseif((player.getClan()== null)||(!player.isClanLeader())){
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","You need to be a Clan leader to take this reward."));return;}elseif(player.getClan().getLevel()<=4){
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","Your clan need to be at least Lvl 5!"));return;}elseif(player.getClan().getLevel()>=6){
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","Your clan is already Lv 6 or more!"));return;}elseif(player.getClan().getMembersCount()<=14){
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","You need minimum 15 members."));
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","Members amount: "+(player.getClan().getMembersCount())+"."));return;}elseif(player.getClan().getOnlineMembersCount()<=9){
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","You need minimum 10 members online."));
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","Members online: "+(player.getClan().getMembersCount())+"."));return;}elseif(player.isClanLeader()&& player.getClan().getMembersCount()>=15&& player.getClan().getOnlineMembersCount()>=10){
player.getClan().changeLevel(6);//Ids> 391, 370, 371, 373, 374, 376, 377, 379, 383for(int s : clanSkills){Skill clanSkill =SkillData.getInstance().getInfo(s,SkillData.getInstance().getMaxLevel(s));
player.getClan().addNewSkill(clanSkill);
player.getClan().broadcastClanStatus();}
player.getClan().addReputationScore(15000,true);
player.sendPacket(newEtcStatusUpdate(player));
player.sendPacket(newAcquireSkillDone());
player.sendPacket(newCreatureSay(0,Say2.BATTLEFIELD,"Clan Manager","Congratulations, Your clan has been rewarded!."));}}else
super.onBypassFeedback(player, command);}@Overridepublicvoid onAction(L2PcInstance player){if(this!= player.getTarget()){
player.setTarget(this);
player.sendPacket(newValidateLocation(player));}elseif(isInsideRadius(player,100,false,false)){
player.setLastFolkNPC(this);
showMainHtml(player,"data/html/mods/ClanManager/main.htm");
player.sendPacket(ActionFailed.STATIC_PACKET);}else{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE,this);
player.sendPacket(ActionFailed.STATIC_PACKET);}}privatevoid showMainHtml(L2PcInstance player,String file){String filename =HtmCache.getInstance().getHtm(file);if(filename != null){NpcHtmlMessage html =newNpcHtmlMessage(getObjectId());
html.setHtml(filename);
html.replace("%objectId%",String.valueOf(getObjectId()));
html.replace("%charname%", player.getName());
player.sendPacket(html);
filename = null;
html = null;}}}
Hello @Hitcher. Could you please clarify the scenario in which this happened?
Was it on GF server?
The drops that were on the ground were from the same character? These fell with autoloot off, then you activated autoloot and tried to pick? Please provide more details so we can replicate it.
Quality service,
I hired him as driver, and whole time while it lasted, I was notified every detail what he was doing. Really quality.
I recommend these services.
🔥 DISCOUNT UNTIL THE END OF THE MONTH!
» From 21.11.2024 to 24.11.2024 - 20% Discount!
Price: 500$ - 400$.
»From 25.11.2024 to 30.11.2024 - 10% Discount!
Price: 500$ - 450$.
Question
JackCerutti
Hello community, i never write anything here, i just wonder, how can i set some code to check if the members of a clan are dualboxing, because i adapted reborn12 Clan reward from acis, and the rewards are working good, this is the code i can manage to make it work:
(Also i don't know how to make a list to add all clan lvl 6 skills.)
Once is finished i want to share it with the htmls.
Dont know why do not add the skills to the clan
0 answers to this question
Recommended Posts