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. You may encounter the Push item fail error when trying to pick up an item dropped on the ground by a mob.
or
You can throw something out of your inventory and pick it up again, several times.
Probably this is a quantum dependency) I don't understand at what point this happens, sometimes two items one after another experience push item errors, and sometimes I don't have enough thousands of attempts to repeat this trick)
In any case, this is just a visual error and after the relog, the item appears in the inventory. I think first i need to disconnect the extender and check it on a bare server. I still need time to check this, maybe it's not even about the autoloot function.
https://youtu.be/6mcfmdImofE
-----------
In general, I would like to thank our wonderful Emca Eressea for her deep knowledge in programming and reverse engineering. And for the fact that her work is open to everyone, this is very amazing, and incredibly valuable.
ADENA
500 K = 40e
1kk = 70e
3kk = 190e
ITEMS
staff of life = 150e
karmian set = 90e
elven jewls top D = 30e
Orcish Poleaxe+1 best C pole = 680e
any D grade armor on demand
discord
wiz0642_81242
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