Jump to content
  • 0

Code Clan Reputation Item


Question

Posted

gia sas maxcheaters.

 

8elo ton code gia Clan Reputation Item an mporei kapoios.

 

kai signomi pou den psaxno alla den mporo na katso 3 ores. na to bro.

 

 

gia l2jfrozen

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.handler.itemhandlers;

import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUser;

/**
 * This class ...
 *
 * @version $Revision: 1.0.0.0.0.0 $ $Date: 2005/09/02 19:41:13 $
 */
public class CustomRep implements IItemHandler
{
	// Modified by Baghak (Prograsso): Added Firework support
	private static final int[] ITEM_IDS = { 11000 };

	public void useItem(L2PlayableInstance playable, L2ItemInstance item)
	{
		if (!(playable instanceof L2PcInstance))
			return; // prevent Class cast exception
		L2PcInstance activeChar = (L2PcInstance) playable;
		int itemId = item.getItemId();
		if (activeChar.isInOlympiadMode())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		if (activeChar.inObserverMode())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		if (activeChar.isSitting())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		if (activeChar.isAway())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		if (activeChar.isConfused())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		if (activeChar.isStunned())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		if (activeChar.isDead())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		if (activeChar.isAlikeDead())
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
        if (activeChar.isInCombat())
    	{
        	activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
    	}
        if (activeChar.isInJail())
        {
        	activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
        }
		if (!activeChar.getFloodProtectors().getFirework().tryPerformAction("firework"))
		{
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		/*
		 * Elven Firecracker
		 */
		if (itemId == 11000) // elven_firecracker, xml: 2023
		{
			MagicSkillUser MSU = new MagicSkillUser(playable, activeChar, 2023, 1, 1, 0);
			activeChar.sendPacket(MSU);
			activeChar.broadcastPacket(MSU);
			useFw(activeChar, 2023, 1);
			playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
			activeChar.getClan().setReputationScore(activeChar.getClan().getReputationScore() +5000, true);
            activeChar.sendMessage("Grats you have award your clan with 5000 Reputation Points!");
            activeChar.broadcastUserInfo();

		}
	}

	public void useFw(L2PcInstance activeChar, int magicId, int level)
	{
		L2Skill skill = SkillTable.getInstance().getInfo(magicId, level);
		if (skill != null)
			activeChar.useMagic(skill, false, false);
	}

	public int[] getItemIds()
	{
		return ITEM_IDS;
	}
}

pisteuw pws 8a douleuei !

kai episi uparxei kai to google me to opoio mporeis na kaneis search to code pou 8es arki na grapsis maxcheater!!

Edited by ourat1995
  • 0
Posted (edited)

an den sou doulepsei o parapano code prospathise na valeis auton kai tha doulepsei 100%
 

in com.l2jfrozen.gameserver.handler. open ItemHandler.java
find this 
Code: [select]
import com.l2jfrozen.gameserver.handler.itemhandlers.ChristmasTree;
and add below this 
Code: [select]
import com.l2jfrozen.gameserver.handler.itemhandlers.ClanRepsItem;
 
then find this
Code: [select]
registerItemHandler(new ChestKey());
 
and add bellow this
Code: [select]
registerItemHandler(new ClanRepsItem());
 
save it and close it.
 
in com.l2jfrozen.gameserver.handler.itemhandlers create new file Called ClanRepsItem.java
 
open it and add this
 
 
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 */
package com.l2jfrozen.gameserver.handler.itemhandlers;
 
/**
 * 
 * 
 * @author Strike
 * 
 */
 
 
import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.handler.IItemHandler;
import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.serverpackets.MagicSkillUser;
 
public class ClanRepsItem implements IItemHandler
{
    private static final int ITEM_IDS[] =
    {
       Config.CR_ITEM_REPS_ITEM_ID
    };
 
    public void useItem(L2PlayableInstance playable, L2ItemInstance item)
    {
            if (!(playable instanceof L2PcInstance))
            {
                return;
            }
 
            L2PcInstance activeChar = (L2PcInstance)playable;
 
            if (!activeChar.isClanLeader())
            {
                activeChar.sendMessage("This can be used only by Clan Leaders!");
                return;
            }
           
            else if (!(activeChar.getClan().getLevel() >= Config.CR_ITEM_MIN_CLAN_LVL))
            {
               activeChar.sendMessage("Your Clan Level is not big enough to use this item!");
               return;
            }
            else
            {
               activeChar.getClan().setReputationScore(activeChar.getClan().getReputationScore()+Config.CR_ITEM_REPS_TO_BE_AWARDED, true);
               activeChar.sendMessage("Your clan has earned "+ Config.CR_ITEM_REPS_TO_BE_AWARDED +" rep points!");
               MagicSkillUser  MSU = new MagicSkillUser(activeChar, activeChar, 2024, 1, 1, 0);
               activeChar.broadcastPacket(MSU);
              playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
            }
        }
 
    public int[] getItemIds()
    {
        return ITEM_IDS;
    }
}
 
save it and close it.
then in com.l2jfrozen open Config.java and find this
Code: [select]
public static String PVP2_CUSTOM_MESSAGE;
add bellow this
Code: [select]
 
/**
* Clan Reputation Item
* Author Strike
*/
public static boolean USE_CR_ITEM;
public static int CR_ITEM_MIN_CLAN_LVL;
public static int CR_ITEM_REPS_TO_BE_AWARDED;
public static int CR_ITEM_REPS_ITEM_ID;
 
then find this
Code: [select]
 
PVP2_CUSTOM_MESSAGE = L2ScoriaSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
 
and add bellow this
Code: [select]
/** Clan reputation Item**/
USE_CR_ITEM = Boolean.parseBoolean(L2ScoriaSettings.getProperty("EnableTheClanRepPointsItem", "False"));
CR_ITEM_MIN_CLAN_LVL = Integer.parseInt(L2ScoriaSettings.getProperty("ClanLevelNeededForCR", "5"));
CR_ITEM_REPS_TO_BE_AWARDED = Integer.parseInt(L2ScoriaSettings.getProperty("HowManyClanRepsToGive", "500"));
CR_ITEM_REPS_ITEM_ID = Integer.parseInt(L2ScoriaSettings.getProperty("CRItemID", "6673"));
save it and close it.
 
then to config/fuctions/l2jfrozen.prop
find 
Code: [select]
# -----------------------------------------------------
# Hero Custom Item Configuration -
# -----------------------------------------------------
# When ActiveChar will use this item will gain Hero Status.
EnableHeroCustomItem = False
# Id Itemn Need's 
HeroCustomItemId = 3481
# Hero for X days, 0 forever.
HeroCustomDay = 0
and add below this
Code: [select]
# -------------------------------------------------------
# Clan Reputation Custom Item Configuration
# -------------------------------------------------------
# Would you like to enable the Clan Reputation points item?
# Default: False
EnableTheClanRepPointsItem = False
# What's the Min Level in which clan leaders will be able to use the item?
# Default 5
MinClanLevelNeededForCR = 5
# How many rep points will be rewarded to the clan?
# Default 500
HowManyClanRepsToGive = 500
# Set the ID of the Clan Rep Points Item
# Default = 6673 (Festival Adena)
CRItemID = 6673

Doulevei 100% den tha exeis provlima :)
Edited by 'StriKe™

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • ⚔️ WELCOME TO L2EPICFAIL ⚔️ Server developed by gamers, for gamers! ❄️ WINTER SEASON #8 ❄️ OPEN BETA — 15 NOVEMBER 2026 GRAND OPENING — 20 NOVEMBER 2026, 18:30 GMT+0 Website: https://l2epic.fail/ Discord: https://discord.gg/6hwhrkrHBG ━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚔️ SERVER FEATURES & RATES EXP — 10x SP — 9x Adena — 6x Drop — 3x Spoil — 3x Seal Stones — 3x Epic Raid Boss Drop — 1x Regular Raid Boss — EXP 5x / SP 5x / Drop 4x Quest Drop — 1x (selected quests 2–3x) Quest Rewards — 1x (Adena / EXP / SP 3x) ━━━━━━━━━━━━━━━━━━━━━━━━━━ ★ PREMIUM ACCOUNT EXP +20% SP +20% Adena +20% Drop +20% Spoil +20% Quest Rewards +20% Available through voting, Epic Coins or donations. World Chat — 60 messages per day using "&" Buff Book usable outside towns. Premium applies to all characters on the account. ━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ SPECIAL FEATURES Classic Interface Active Anticheat Vote System Daily Missions Attendance Rewards Masterwork Items Brooches & Diamonds Kamaloka Autofarm Epic Auctioneer Epic Market Price Search No Carrier Protection Raid Rank System PvP Events ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🐉 EPIC BOSSES & RESPAWNS All times GMT+0. Spawn windows visible through .epic. QUEEN ANT — LVL 80 Every day except Wednesday and Sunday 18:00–18:30 Maximum C-grade equipment Boosted HP / Drop Chance 49% CORE — LVL 80 Monday and Friday 20:00–20:15 Maximum B-grade equipment Boosted HP / Drop Chance 60% Core Ring: +1 STR, +1 DEX ORFEN — LVL 80 Tuesday, Thursday and Saturday 20:00–20:15 Maximum B-grade equipment Boosted HP / Drop Chance 60% Orfen Earring: +1 WIT, +1 INT ZAKEN — LVL 80 Monday and Friday 19:00–19:30 Maximum A-grade equipment Automatic PvP Zone BAIUM Every Sunday 18:00–19:00 Automatic PvP Zone / Regular HP FRINTEZZA Tuesday and Thursday 19:00–20:00 Minimum 2 parties / Maximum 5 parties Minimum character level 74 Automatic PvP Zone ANTHARAS Every two weeks on Saturday 19:00–19:30 Automatic PvP Zone VALAKAS Every two weeks on Saturday 19:00–19:30 Automatic PvP Zone Antharas and Valakas spawn on alternating weeks. Epic Bosses drop Epic Medals equal to their level × 10. ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🏆 RAID RANK Clans earn Raid Rank points by killing Raid Bosses level 30+. Raid Bosses level 75+ award 150 points. Rankings reset every Monday morning. Weekly Rewards: 1st Place — 50 RRR Coins 2nd Place — 40 RRR Coins 3rd Place — 30 RRR Coins 4th Place — 20 RRR Coins 5th Place — 13 RRR Coins RRR Coins can be exchanged for Epic Jewelry. ━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚒️ ENCHANT SYSTEM Safe Enchant — +3 Maximum Enchant — +16 Regular Enchant Chance — 60% Blessed Enchant Chance — 66% Enchant chances progressively decrease after +10. ━━━━━━━━━━━━━━━━━━━━━━━━━━ 💎 BROOCHES & DIAMONDS Maximum Level — +10 Brooch Compound Chance — 25% Diamond Compound Chance — 35% Requires two items of the same type and level. On failure, one item remains in inventory. Disabled during Olympiad. ━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ MASTERWORK ITEMS Masterwork Crafting Chance — 2% A-grade — Armors & Jewelry S-grade — Weapons, Armors & Jewelry ━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚔️ REGULAR RAID BOSSES All regular Raid Bosses have boosted HP. Slightly increased M.Def to give fighters an advantage. Respawn — 24–30 hours Epic Medal Drops — Equal to Raid Boss level Raid Boss status can be checked on the map. ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🏅 OLYMPIAD Weekly Period Thursday–Saturday, 16:00–22:00 GMT+0 Maximum Equipment Enchant — +7 (progressive) Minimum Non-Class Participants — 5 Minimum Class-Based Participants — 10 ━━━━━━━━━━━━━━━━━━━━━━━━━━ 📜 CLASS TRANSFER 1st Class — 50k Adena 2nd Class — 500k Adena 3rd Class — 25kk Adena + 700 Halisha Marks Halisha Marks are tradeable and drop in Shrine of Loyalty. ━━━━━━━━━━━━━━━━━━━━━━━━━━ 👑 NOBLESSE QUEST Retail-style Noblesse Quest with boosted quest drops. Alternative Method — No Barakiel Kill Required Collect 100 Noble Ants Feeler from Wailing of Splendor in Valley of Saints. Drop Chance — 4% Barakiel Respawn — 10–14 hours Barakiel's Chest provides 10 Noble Ants Feeler when the relevant quest is active. ━━━━━━━━━━━━━━━━━━━━━━━━━━ 📖 SUBCLASS QUEST Minimum Main Class Level — 75 Start the Reorin Quest in Giran. Obtain the required item from Cabrio's Chest first. Collect items from Hallate, Kernon and Golkonda. Return to Reorin and complete the remaining quest requirements. Maximum Subclasses — 5 Cabrio Respawn — 6–8 hours Tower of Insolence Raid Bosses — 8–10 hours ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔮 SKILLS & AUGMENTS Mass Sweep — All Bounty Hunters level 40+ Block Buff — All characters, toggle Escape — 20 seconds, no Scroll of Escape required Automatic Skill Learning Skill Loss After 16 Levels of Delevel Maximum Buffs — 24 + 4 with books Augmentation Skill Chances: Normal Life Stone — 4% Mid-grade Life Stone — 5% High-grade Life Stone — 7% Top-grade Life Stone — 6% Fast Augmentation by double-clicking Life Stones. ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🛒 GM SHOP Weapons, Armors and Jewelry — Up to C-grade Soulshots / Spiritshots — Up to C-grade Mana Potions — 500 MP / 5 seconds ━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ NPC BUFFER All Buffs, Songs and Dances Third Class Buffs and Resists Buff Duration — 1 Hour Buff Book available to every character. ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🌍 GLOBAL GATEKEEPER All Towns Catacombs and Necropolises Tower of Insolence — Floors 3 / 5 / 7 / 10 ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🛡️ CLANS & PVP Maximum Main Clan Members — 80 Maximum Alliance Clans — 3 Clan Leave / Dismiss Penalty — 12 Hours Epic PvP Zone Limit — 4 CPs / 36 Players Clan skills apply to all members without requiring titles. ━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚙️ AUTOFARM Available to Everyone After the First Week Maximum 1 Active Window per HWID Maximum 1 Hour at a Time Requires Autofarm Tickets purchased with Epic Coins and Adena. Activate using .autofarm Disabled While PvP Flagged Third-Party Bot Software Is Prohibited ━━━━━━━━━━━━━━━━━━━━━━━━━━ 📌 ADDITIONAL FEATURES Maximum 3 Windows per HWID Only 1 Window Allowed in PvP Zones Teleport Protection — 20 Seconds Weight Limit — 10x Stackable Enchant Scrolls and Life Stones Blue Champions — 5x HP Minimum Trade Level — 40 Minimum Chat Level — 20 Arrows and Spellbook Drops Disabled Blacksmith of Mammon and Merchant of Mammon in Towns Alt+Click Buff Removal 19-Level Party EXP Difference No Carrier Disconnect Protection Payback System ━━━━━━━━━━━━━━━━━━━━━━━━━━
    • They're just jealous because I'm better at prompting than all of them combined. There's all working on L2jPromptius and can't even manage to open a single private server with it in like 10 years, and now they're nervous because I'm sharing tools they've been gatekeeping from the community so they can't profit anymore. Truly shameless behavior from them  They're losing business opportunities with every free share, they literally live from the game, just a bunch of unemployed dudes 
    • I don't understand the hate at all? Why are people getting mad at 911reg for sharing an already free tool but improved? Right now the competition is not in dev ability but in creativity and vision. 
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..