Jump to content

JackCerutti

Members
  • Posts

    67
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by JackCerutti

  1. <html>
    <body>
    <title>
    Skin System
    </title>
    <center>
    	<br>
    	<br>
    	<br>
    	<br>
    	<br>
    		<br>
    <img src="L2UI.SquareGray" width=295 height=1>
    
    <table width=320 bgcolor="000000">
    <tr>
    <td width=30></td>
    <td><font color="CD6839">Skin System, Click on the icon to test the Skin</font></a></td>
    </tr>
    </table>
    	<table width=230>
        <tr>
    		<td align=left><button value="" action="bypass voiced_visualTest 1" width=32 height=32 back="MAYKE_MENDES_SKIN.archer_f" fore="MAYKE_MENDES_SKIN.archer_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 2" width=32 height=32 back="MAYKE_MENDES_SKIN.archer2_f" fore="MAYKE_MENDES_SKIN.archer2_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 3" width=32 height=32 back="MAYKE_MENDES_SKIN.light_f" fore="MAYKE_MENDES_SKIN.light_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 4" width=32 height=32 back="MAYKE_MENDES_SKIN.dark_f" fore="MAYKE_MENDES_SKIN.dark_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 5" width=32 height=32 back="MAYKE_MENDES_SKIN.muskeeter2_f" fore="MAYKE_MENDES_SKIN.muskeeter2_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 6" width=32 height=32 back="MAYKE_MENDES_SKIN.muskeeter_f" fore="MAYKE_MENDES_SKIN.muskeeter_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 7" width=32 height=32 back="MAYKE_MENDES_SKIN.wizard_f" fore="MAYKE_MENDES_SKIN.wizard_f"></td>
        </tr>
        </table>
    	<table width=230>
        <tr>
    	    <td align=left><button value=""  action="bypass voiced_visualTest 8" width=32 height=32 back="MAYKE_MENDES_SKIN.warrior_f" fore="MAYKE_MENDES_SKIN.warrior_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 9" width=32 height=32 back="MAYKE_MENDES_SKIN.cat_f" fore="MAYKE_MENDES_SKIN.cat_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 10" width=32 height=32 back="MAYKE_MENDES_SKIN.rei_f" fore="MAYKE_MENDES_SKIN.rei_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 11" width=32 height=32 back="MAYKE_MENDES_SKIN.rei2_f" fore="MAYKE_MENDES_SKIN.rei2_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 12" width=32 height=32 back="MAYKE_MENDES_SKIN.valkyri_f" fore="MAYKE_MENDES_SKIN.valkyri_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 13" width=32 height=32 back="MAYKE_MENDES_SKIN.anakim_f" fore="MAYKE_MENDES_SKIN.anakim_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 14" width=32 height=32 back="MAYKE_MENDES_SKIN.pirate_f" fore="MAYKE_MENDES_SKIN.pirate_f"></td>
        </tr>
        </table>
    	<table width=230>
        <tr>
    		<td align=left><button value=""  action="bypass voiced_visualTest 15" width=32 height=32 back="MAYKE_MENDES_SKIN.pirate_blue_f" fore="MAYKE_MENDES_SKIN.pirate_blue_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 16" width=32 height=32 back="MAYKE_MENDES_SKIN.ninja_f" fore="MAYKE_MENDES_SKIN.ninja_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 17" width=32 height=32 back="MAYKE_MENDES_SKIN.samurai_f" fore="MAYKE_MENDES_SKIN.samurai_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 18" width=32 height=32 back="MAYKE_MENDES_SKIN.wizard2_f" fore="MAYKE_MENDES_SKIN.wizard2_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 19" width=32 height=32 back="MAYKE_MENDES_SKIN.vampire_f" fore="MAYKE_MENDES_SKIN.vampire_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 20" width=32 height=32 back="MAYKE_MENDES_SKIN.beleth_f" fore="MAYKE_MENDES_SKIN.beleth_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 21" width=32 height=32 back="MAYKE_MENDES_SKIN.cyborg_f" fore="MAYKE_MENDES_SKIN.cyborg_f"></td>
    	</tr>
        </table>
    	<table width=230>
        <tr>
    		<td align=left><button value=""  action="bypass voiced_visualTest 22" width=32 height=32 back="MAYKE_MENDES_SKIN.cowboy_f" fore="MAYKE_MENDES_SKIN.cowboy_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 23" width=32 height=32 back="MAYKE_MENDES_SKIN.wolf_f" fore="MAYKE_MENDES_SKIN.wolf_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 24" width=32 height=32 back="MAYKE_MENDES_SKIN.dragon_f" fore="MAYKE_MENDES_SKIN.dragon_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 25" width=32 height=32 back="MAYKE_MENDES_SKIN.knight2_f" fore="MAYKE_MENDES_SKIN.knight2_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 26" width=32 height=32 back="MAYKE_MENDES_SKIN.natal2_f" fore="MAYKE_MENDES_SKIN.natal2_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 27" width=32 height=32 back="MAYKE_MENDES_SKIN.natal1_f" fore="MAYKE_MENDES_SKIN.natal1_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 28" width=32 height=32 back="MAYKE_MENDES_SKIN.knight_f" fore="MAYKE_MENDES_SKIN.knight_f"></td>
        </tr>
        </table>
    	<table width=96>
        <tr>
    		<td align=left><button value=""  action="bypass voiced_visualTest 29" width=32 height=32 back="MAYKE_MENDES_SKIN.saint_f" fore="MAYKE_MENDES_SKIN.saint_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 30" width=32 height=32 back="MAYKE_MENDES_SKIN.lilith_f" fore="MAYKE_MENDES_SKIN.lilith_f"></td>
    		<td align=left><button value=""  action="bypass voiced_visualTest 31" width=32 height=32 back="MAYKE_MENDES_SKIN.casamento_f" fore="MAYKE_MENDES_SKIN.casamento_f"></td>
         </tr>
        </table>
    	<br>
    	
    
    
    	
    	
    
    <button value="Buy Skin" action="bypass -h npc_%objectId%_multisell 101192" width=200 height=31 back="Icons.OlympiadWnd_DF_BuyEtc_Down" fore="Icons.OlympiadWnd_DF_BuyEtc">
    
    
    </center>
    </body>
    </html>

    i have this HTML if this is what you need, you can addapt any other skin system if you need it.

  2. 8 minutes ago, Ugleethyn said:

    I don't know about the specific file that exists on download but I know that you can take any of this icons and use it as you wish.. If the file does not work for interlude you can adapt it. By a utx viewer you can get the icon you want and next follow this guide and you will be able to use it. 

    Anyway if the download is a utx file I can't find a reason for not working... 

    yes, they're working good for interlude.

    https://prnt.sc/147yrbn

  3. ⚔️ Lineage 2 Arcan High five x10 ⚔️
    🎆 Grand Opening 5-2-21 Time: 18:00 GMT -3 🎆
    ✅ GMSHOP till Low-S Grade
    ✅ NPC Buffer
    ✅ Global GK
    ✅ Mammon and Blacksmith in Giran
    ✅ NPC Buffer with Cov & Magnus
    ✅ Sell Buff System
    ✅ Vote Shop
    ✅ Medal Shop For accessories
    ✅ Offline Stores
    ✅ No Subclass quest needed
    ✅ Free full vitality till Lvl 52
    ✅ You can't loose buffs til Lvl 40
    ✅ Free first and second class, third class require Adena and Ancient Adena
    ✅ Autolearn skills til lvl 80
    ✅ Safe Enchant +3 - Max Enchant +16
    ✅ H5 Treasure Chests, Lucky Pigs Working
    ✅ All instances working
    ✅ Mana Potions 600mp 10sec delay
    🎮 Discord: https://discord.gg/dyJRn6JR64
    ❌ No Pay to Win
    🏆 Event engine 4 Automatic Events
    🔨 Olympiad Retail period, Max enchant +6
    🗡 Friendly and international community
    💰 Adena x10, Drop Chance x7, Spoil Chance x5 (Dynamic Drop System)
    💰 Dynamic quest drops and rewards
    ⚙️ Commands:
    ➡ .7rb
    ➡ .hellbound
    ➡ .expon .expoff
    ➡ .aa
    ➡ .hopzone
    ➡ .sellbuff
    ➡ .epic
    ✡ Custom Premium Rune 50% XP,XP,Drop chance + Access to Premium Buffer
    ✡ Custom Adena Rune 50% more adena
    ✡ Custom Spoil Rune 50% more spoil
    🏰 Sieges Every Week
    🎲 Vote Bracelet 5% Stats 12-Hours duration
    🛡 Antibot
    👉 http://lineage2arcan.es/
     

  4. 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
     */
    public class L2ClanManagerInstance extends L2Npc
    {
    	
    	public static Map<Integer, Integer> CLAN_SKILLS;
    	
    	public L2ClanManagerInstance(L2NpcTemplate template)
    	{
    		super(template);
    		setInstanceType(InstanceType.L2ClanManagerInstance);
    	}
    	
    	public int[] clanSkills =
    		 {
    			391, 370, 371, 373, 374, 376, 377, 379, 383	 
    		 };
    
    	public void onBypassFeedback(L2PcInstance player, String command)
    	{
    		StringTokenizer st = new StringTokenizer(command, " ");
    		String actualCommand = st.nextToken();
    		
    		if (actualCommand.startsWith("mainHtml"))
    		{
    			showMainHtml(player, "data/html/mods/ClanManager/main.htm");
    		}
    		else if (actualCommand.startsWith("clanreward"))
    		{
    			showMainHtml(player, "data/html/mods/ClanManager/clanreward.htm");
    		}
    		else if (actualCommand.startsWith("getclanreward"))
    		{
    			
    		if (player.getClan() == null)
    		{
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "You don't have a clan."));
    			return;
    		}
    		else if ((player.getClan() == null) || (!player.isClanLeader()))
    		{
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "You need to be a Clan leader to take this reward."));
    			return;
    		}
    		else if (player.getClan().getLevel() <= 4)
    		{
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "Your clan need to be at least Lvl 5!"));
    			return;
    		}
    		else if (player.getClan().getLevel() >= 6)
    		{
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "Your clan is already Lv 6 or more!"));
    			return;	
    		}
    		
    		else if (player.getClan().getMembersCount() <= 14)
    		{
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "You need minimum 15 members."));
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "Members amount: " + (player.getClan().getMembersCount()) + "."));
    			return ;	
    		}
    		else if (player.getClan().getOnlineMembersCount() <= 9)
    		{
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "You need minimum 10 members online."));
    			player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "Members online: " + (player.getClan().getMembersCount()) + "."));
    			return;	
    		}
    		else if (player.isClanLeader() && player.getClan().getMembersCount() >= 15 && player.getClan().getOnlineMembersCount() >= 10)
    			{
    				player.getClan().changeLevel(6);
                    
    				//Ids> 391, 370, 371, 373, 374, 376, 377, 379, 383
    				for (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(new EtcStatusUpdate(player));
    			    player.sendPacket(new AcquireSkillDone());
    				player.sendPacket(new CreatureSay(0, Say2.BATTLEFIELD, "Clan Manager", "Congratulations, Your clan has been rewarded!."));
    			}
    
    				
    		}
    		else
    			super.onBypassFeedback(player, command);
    	}
    	@Override
    	public void onAction(L2PcInstance player)
    	{
    		if (this != player.getTarget())
    		{
    			player.setTarget(this);
    			player.sendPacket(new ValidateLocation(player));
    		}
    		else if (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);
    		}
    	}
    	
    	private void showMainHtml(L2PcInstance player, String file)
    	{
    		String filename = HtmCache.getInstance().getHtm(file);
    		if (filename != null)
    		{
    			NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
    			html.setHtml(filename);
    			html.replace("%objectId%", String.valueOf(getObjectId()));
    			html.replace("%charname%", player.getName());
    			player.sendPacket(html);
    			filename = null;
    			html = null;
    		}
    	}
    }

     

    Clan 6 or more.jpg

    Clan leader.jpg

    Clan lvl 5 required.jpg

    clanreward1.jpg

  5. package handlers.voicedcommandhandlers;
    
    import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
    import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
    import com.l2jserver.gameserver.model.quest.QuestState;
    import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
    
    public class SevenRB implements IVoicedCommandHandler
    {
    	private static final String QUEST_NAME = "Q00254_LegendaryTales";
    	  private static final String SERVER_NAME = "(NAME)";
    	  private static final String[] commands =
    		  {
    				  "7rb",
    		  };
    	  
    	  @Override
    	  public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
    	  {
    		  if (command.equalsIgnoreCase("7rb"))
    		  {
    			  QuestState st = activeChar.getQuestState(QUEST_NAME);
    			  NpcHtmlMessage m = new NpcHtmlMessage();
    			  m.setHtml(buildHtml(st));
    			  activeChar.sendPacket(m);
    		  }
    		  return true;
    	  }
    	  
    	  private static final String buildHtml(QuestState st)
    	  { 
    		  StringBuilder sb = new StringBuilder();
    		  sb.append("<html><head>");
    		  sb.append("<title>" + SERVER_NAME + "</title>");
    		  sb.append("</head>");
    		  sb.append("<body><br>");
    		  sb.append("<br>7Rb Quest (Legendary Tales) status:<br>");
    		  if (st == null)
    		  {
    			  sb.append("Quest is not started yet. Please visit Glimore in dragon valley in order to start it.");
    			  sb.append("<br>");
    		  }
    		  else
    		  {
    			  if (st.isCond(1))
    			  {
    				  for (Bosses boss : Bosses.class.getEnumConstants())
    				  {
    					  sb.append(boss.getName() + ": ");
    					  sb.append(checkMask(st, boss) ? "<font color=\"00FF00\">Killed.</font>" : "<font color=\"FF0000\">Not killed.</font>");
    					  sb.append("<br>");
    				  }
    			  }
    			  else
    			  {
    				  sb.append("Legendary Tales quest is completed.");
    				  sb.append("<br>");
    			  }
    		  }
    		  sb.append("</body></html>");
    		  return sb.toString();
    	  }
    	  
    	  private static boolean checkMask(QuestState qs, Bosses boss)
    	  {
    		  int pos = boss.getMask();
    		  return ((qs.getInt("raids") & pos) == pos);
    	  }
    	  @Override
    	  public String[] getVoicedCommandList()
    	  {
    		  return commands;
    	  }
    	  
    	  public static enum Bosses
    	  {
    		  EMERALD_HORN("Emerald Horn"),
    		  DUST_RIDER("Dust Rider"),
    		  BLEEDING_FLY("Bleeding Fly"),
    		  BLACK_DAGGER("Blackdagger Wing"),
    		  SHADOW_SUMMONER("Shadow Summoner"),
    		  SPIKE_SLASHER("Spike Slasher"),
    		  MUSCLE_BOMBER("Muscle Bomber");
    		  
    		  private final String name;
    		  private final int _mask;
    		  
    		  private Bosses(String name)
    		  {
    			  this.name = name;
    			  _mask = 1 << ordinal();
    		  }
    		  
    		  public int getMask()
    		  {
    			  return _mask;
    		  }
    		  
    		  public String getName()
    		  {
    			  return name;
    		  }
    	  }
    }

    Sorry but i needed to make it look right xD

    • Haha 1
  6. Hello ppl of mxc, i never post anything or ask for anything,but this last few days i almost melt my brain trying to get to work Clan quest for acis, i dont care about the rev in this case 370 i've got the code without errors, quest started all ok, but mobs don't drop the items, or when killed Grave Guards,  grave keymaster isnt spawning,the same happen with the box when imperal gravekeeper is killed. this is the code im trying to get to work. alsoi i had to add some lines to Quest but those are not improtant, just a few typos i had form the code below.

    Blitz.jpg
    Drake.jpg
    Fritz.jpg
    giantscave.jpg
    Grave-Guard-don-spawn.jpg
    Kurtz.jpg
    Lutz.jpg
    Scepter.jpg
     

    clan.jpg

    package net.sf.l2j.gameserver.scripting.quests;
    
    import net.sf.l2j.commons.random.Rnd;
    
    import net.sf.l2j.gameserver.model.L2Skill;
    import net.sf.l2j.gameserver.model.actor.Npc;
    import net.sf.l2j.gameserver.model.actor.instance.Player;
    import net.sf.l2j.gameserver.scripting.Quest;
    import net.sf.l2j.gameserver.scripting.QuestState;
    
    public class Q503_PursuitOfClanAmbition extends Quest
    {
    	private static final int G_LET_MARTIEN = 3866;
    	private static final int TH_WYRM_EGGS = 3842;
    	private static final int DRAKE_EGGS = 3841;
    	private static final int BL_WYRM_EGGS = 3840;
    	private static final int MI_DRAKE_EGGS = 3839;
    	private static final int BROOCH = 3843;
    	private static final int BL_ANVIL_COIN = 3871;
    	
    	private static final int G_LET_BALTHAZAR = 3867;
    	private static final int RECIPE_POWER_STONE = 3838;
    	private static final int POWER_STONE = 3846;
    	private static final int NEBULITE_CRYSTALS = 3844;
    	private static final int BROKE_POWER_STONE = 3845;
    	
    	private static final int G_LET_RODEMAI = 3868;
    	private static final int IMP_KEYS = 3847;
    	private static final int SCEPTER_JUDGEMENT = 3869;
    
    	private static final int PROOF_ASPIRATION = 3870;
    
    	private static final int MARTIEN = 30645;
    	private static final int ATHREA = 30758;
    	private static final int KALIS = 30759;
    	private static final int GUSTAF = 30760;
    	private static final int FRITZ = 30761;
    	private static final int LUTZ = 30762;
    	private static final int KURTZ = 30763;
    	private static final int KUSTO = 30512;
    	private static final int BALTHAZAR = 30764;
    	private static final int RODEMAI = 30868;
    	private static final int COFFER = 30765;
    	private static final int CLEO = 30766;
    	
    	private static final int THUNDER_WYRM = 20282;
    	private static final int THUNDER_WYRM_TWO = 20243;
    	private static final int DRAKE = 20137;
    	private static final int DRAKE_TWO = 20285;
    	private static final int BLITZ_WYRM = 27178;
    	private static final int GIANT_SOLDIER = 20654;
    	private static final int GIANT_SCOUT = 20656;
    	private static final int GRAVE_GUARD = 20668;
    	private static final int GRAVE_KEYMASTER = 27179;
    	private static final int IMPERIAL_SLAVE = 27180;
    	private static final int IMPERIAL_GRAVEKEEPER = 27181;
    
    	private static final int[][] DROPLIST =
    	{
    		// npcId, cond, MaxCount, chance, item1, item2 (giants), item3 (giants)
    		// @formatter:off
    		{THUNDER_WYRM, 2, 10, 200000, TH_WYRM_EGGS, 0, 0},
    		{THUNDER_WYRM_TWO, 2, 10, 90000, TH_WYRM_EGGS, 0, 0},
    		{DRAKE, 2, 10, 200000, DRAKE_EGGS, 0, 0},
    		{DRAKE_TWO, 2, 10, 250000, DRAKE_EGGS, 0, 0},
    		{BLITZ_WYRM, 2, 10, 1000000, BL_WYRM_EGGS, 0, 0},
    		{GIANT_SOLDIER, 5, 10, 250000, NEBULITE_CRYSTALS, BROKE_POWER_STONE, POWER_STONE},
    		{GIANT_SCOUT, 5, 10, 350000, NEBULITE_CRYSTALS, BROKE_POWER_STONE, POWER_STONE},
    		{GRAVE_GUARD, 10, 0, 150000, 0, 0, 0},
    		{GRAVE_KEYMASTER, 10, 6, 800000, IMP_KEYS, 0, 0},
    		{IMPERIAL_GRAVEKEEPER, 10, 0, 0, 0, 0, 0}
    		// @formatter:on
    	};
    	
    	public Q503_PursuitOfClanAmbition()
    	{
    		super(503, "Pursuit of Clan Ambition!");
    		
    		setItemsIds(MI_DRAKE_EGGS, BL_WYRM_EGGS, DRAKE_EGGS, TH_WYRM_EGGS, BROOCH, NEBULITE_CRYSTALS, BROKE_POWER_STONE, POWER_STONE, IMP_KEYS, G_LET_MARTIEN, G_LET_BALTHAZAR, G_LET_RODEMAI, SCEPTER_JUDGEMENT);
    		
    		addStartNpc(GUSTAF);
    		addTalkId(MARTIEN, ATHREA, KALIS, GUSTAF, FRITZ, LUTZ, KURTZ, KUSTO, BALTHAZAR, RODEMAI, COFFER, CLEO);
    		
    		addKillId(THUNDER_WYRM_TWO, THUNDER_WYRM, DRAKE, DRAKE_TWO, BLITZ_WYRM, GIANT_SOLDIER, GIANT_SCOUT, GRAVE_GUARD, GRAVE_KEYMASTER, IMPERIAL_GRAVEKEEPER);
    		addAttackId(IMPERIAL_GRAVEKEEPER);
    	}
    	
    	@Override
    	public String onAdvEvent(String event, Npc npc, Player player)
    	{
    		String htmltext = event;
    		final QuestState st = player.getQuestState(getName());
    		if (st == null)
    		{
    			return htmltext;
    		}
    		
    		// Gustaf
    		if (event.equalsIgnoreCase("30760-08.htm"))
    		{
    			st.setState(STATE_STARTED);
    			st.giveItems(G_LET_MARTIEN, 1);
    			st.set("cond", "1");
    		}
    		else if (event.equalsIgnoreCase("30760-12.htm"))
    		{
    			st.giveItems(G_LET_BALTHAZAR, 1);
    			st.set("cond", "4");
    		}
    		else if (event.equalsIgnoreCase("30760-16.htm"))
    		{
    			st.giveItems(G_LET_RODEMAI, 1);
    			st.set("cond", "7");
    		}
    		else if (event.equalsIgnoreCase("30760-20.htm"))
    		{
    			st.takeItems(SCEPTER_JUDGEMENT, -1);
    			st.giveItems(PROOF_ASPIRATION, 1);
    			st.rewardExpAndSp(0, 250000);
    			st.exitQuest(false);
    			finishQuestToClan(player);
    		}
    		else if (event.equalsIgnoreCase("30760-22.htm"))
    		{
    			st.set("cond", "1");
    		}
    		else if (event.equalsIgnoreCase("30760-23.htm"))
    		{
    			st.takeItems(SCEPTER_JUDGEMENT, -1);
    			st.giveItems(PROOF_ASPIRATION, 1);
    			st.rewardExpAndSp(0, 250000);
    			st.exitQuest(false);
    			finishQuestToClan(player);
    		}
    		// Martien
    		else if (event.equalsIgnoreCase("30645-03.htm"))
    		{
    			setQuestToClanMembers(player);
    			st.takeItems(G_LET_MARTIEN, -1);
    			st.set("cond", "2");
    			st.set("kurt", "0");
    		}
    		// Kurtz
    		else if (event.equalsIgnoreCase("30763-02.htm"))
    		{
    			st.giveItems(MI_DRAKE_EGGS, 6);
    			st.giveItems(BROOCH, 1);
    			st.set("kurt", "1");
    		}
    		// Lutz
    		else if (event.equalsIgnoreCase("30762-02.htm"))
    		{
    			st.giveItems(MI_DRAKE_EGGS, 4);
    			st.giveItems(BL_WYRM_EGGS, 3);
    			st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false);
    			st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false);
    			st.set("lutz", "1");
    		}
    		// Fritz
    		else if (event.equalsIgnoreCase("30761-02.htm"))
    		{
    			st.giveItems(BL_WYRM_EGGS, 3);
    			st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false);
    			st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false);
    			st.set("fritz", "1");
    		}
    		// Kusto
    		else if (event.equalsIgnoreCase("30512-03.htm"))
    		{
    			st.takeItems(BROOCH, 1);
    			st.giveItems(BL_ANVIL_COIN, 1);
    			st.set("kurt", "2");
    		}
    		// Balthazar
    		else if (event.equalsIgnoreCase("30764-03.htm"))
    		{
    			st.takeItems(G_LET_BALTHAZAR, -1);
    			st.set("cond", "5");
    		}
    		else if (event.equalsIgnoreCase("30764-05.htm"))
    		{
    			st.takeItems(G_LET_BALTHAZAR, -1);
    			st.set("cond", "5");
    		}
    		else if (event.equalsIgnoreCase("30764-06.htm"))
    		{
    			st.takeItems(BL_ANVIL_COIN, -1);
    			st.giveItems(RECIPE_POWER_STONE, 1);
    		}
    		// Rodemai
    		else if (event.equalsIgnoreCase("30868-04.htm"))
    		{
    			st.takeItems(G_LET_RODEMAI, -1);
    			st.set("cond", "8");
    		}
    		else if (event.equalsIgnoreCase("30868-06a.htm"))
    		{
    			st.set("cond", "10");
    		}
    		else if (event.equalsIgnoreCase("30868-10.htm"))
    		{
    			st.set("cond", "12");
    		}
    		// Cleo
    		else if (event.equalsIgnoreCase("30766-04.htm"))
    		{
    			st.set("cond", "9");
    			npc.broadcastNpcSay("Blood and Honor");
    			final Npc sister1 = addSpawn(KALIS, 160665, 21209, -3710, npc.getHeading(), false, 180000, false);
    			sister1.broadcastNpcSay("Ambition and Power");
    			final Npc sister2 = addSpawn(ATHREA, 160665, 21291, -3710, npc.getHeading(), false, 180000, false);
    			sister2.broadcastNpcSay("War and Death");
    		}
    		// Coffer
    		else if (event.equalsIgnoreCase("Open"))
    		{
    			if (st.getQuestItemsCount(IMP_KEYS) < 6)
    			{
    				htmltext = "30765-03a.htm";
    			}
    			else
    			{
    				htmltext = "30765-03.htm";
    				st.set("cond", "11");
    				st.takeItems(IMP_KEYS, 6);
    				st.giveItems(SCEPTER_JUDGEMENT, 1);
    			}
    		}
    		
    		return htmltext;
    	}
    	
    	@Override
    	public String onTalk(Npc npc, Player player)
    	{
    		String htmltext = getNoQuestMsg();
    		final QuestState st = player.getQuestState(getName());
    		if (st == null)
    		{
    			return htmltext;
    		}
    		
    		switch (st.getState())
    		{
    			case STATE_CREATED:
    				if (player.getClan() == null)
    				{
    					htmltext = "30760-01.htm";
    					st.exitQuest(true);
    				}
    				else if (player.isClanLeader())
    				{
    					if (st.hasQuestItems(PROOF_ASPIRATION))
    					{
    						htmltext = "30760-03.htm";
    						st.exitQuest(true);
    					}
    					else if (player.getClan().getLevel() != 4)
    					{
    						htmltext = "30760-02.htm";
    						st.exitQuest(true);
    					}
    					else
    					{
    						htmltext = "30760-04.htm";
    					}
    				}
    				else
    				{
    					htmltext = "30760-04t.htm";
    					st.exitQuest(true);
    				}
    				break;
    			
    			case STATE_STARTED:
    				final int cond = st.getInt("cond");
    				int memberCond = 0;
    				if (getClanLeaderQuestState(player, npc) != null)
    				{
    					memberCond = getClanLeaderQuestState(player, npc).getInt("cond");
    				}
    				
    				switch (npc.getNpcId())
    				{
    					case GUSTAF:
    						if (player.isClanLeader())
    						{
    							if (cond == 1)
    							{
    								htmltext = "30760-09.htm";
    							}
    							else if (cond == 2)
    							{
    								htmltext = "30760-10.htm";
    							}
    							else if (cond == 3)
    							{
    								htmltext = "30760-11.htm";
    							}
    							else if (cond == 4)
    							{
    								htmltext = "30760-13.htm";
    							}
    							else if (cond == 5)
    							{
    								htmltext = "30760-14.htm";
    							}
    							else if (cond == 6)
    							{
    								htmltext = "30760-15.htm";
    							}
    							else if (cond == 7)
    							{
    								htmltext = "30760-17.htm";
    							}
    							else if (cond == 12)
    							{
    								htmltext = "30760-19.htm";
    							}
    							else if (cond == 13)
    							{
    								htmltext = "30760-24.htm";
    							}
    							else
    							{
    								htmltext = "30760-18.htm";
    							}
    						}
    						else
    						{
    							if (memberCond == 3)
    							{
    								htmltext = "30760-11t.htm";
    							}
    							else if (memberCond == 4)
    							{
    								htmltext = "30760-15t.htm";
    							}
    							else if (memberCond == 12)
    							{
    								htmltext = "30760-19t.htm";
    							}
    							else if (memberCond == 13)
    							{
    								htmltext = "30766-24t.htm";
    							}
    						}
    						break;
    					
    					case MARTIEN:
    						if (player.isClanLeader())
    						{
    							if (cond == 1)
    							{
    								htmltext = "30645-02.htm";
    							}
    							else if (cond == 2)
    							{
    								if ((st.getQuestItemsCount(MI_DRAKE_EGGS) > 9) && (st.getQuestItemsCount(BL_WYRM_EGGS) > 9) && (st.getQuestItemsCount(DRAKE_EGGS) > 9) && (st.getQuestItemsCount(TH_WYRM_EGGS) > 9))
    								{
    									htmltext = "30645-05.htm";
    									st.set("cond", "3");
    									st.takeItems(MI_DRAKE_EGGS, -1);
    									st.takeItems(BL_WYRM_EGGS, -1);
    									st.takeItems(DRAKE_EGGS, -1);
    									st.takeItems(TH_WYRM_EGGS, -1);
    								}
    								else
    								{
    									htmltext = "30645-04.htm";
    								}
    							}
    							else if (cond == 3)
    							{
    								htmltext = "30645-07.htm";
    							}
    							else
    							{
    								htmltext = "30645-08.htm";
    							}
    						}
    						else
    						{
    							if ((memberCond == 1) || (memberCond == 2) || (memberCond == 3))
    							{
    								htmltext = "30645-01.htm";
    							}
    						}
    						break;
    					
    					case LUTZ:
    						if (player.isClanLeader() && (cond == 2))
    						{
    							if (st.getInt("lutz") == 1)
    							{
    								htmltext = "30762-03.htm";
    							}
    							else
    							{
    								htmltext = "30762-01.htm";
    							}
    						}
    						break;
    					
    					case KURTZ:
    						if (player.isClanLeader() && (cond == 2))
    						{
    							if (st.getInt("kurt") == 1)
    							{
    								htmltext = "30763-03.htm";
    							}
    							else
    							{
    								htmltext = "30763-01.htm";
    							}
    						}
    						break;
    					
    					case FRITZ:
    						if (player.isClanLeader() && (cond == 2))
    						{
    							if (st.getInt("fritz") == 1)
    							{
    								htmltext = "30761-03.htm";
    							}
    							else
    							{
    								htmltext = "30761-01.htm";
    							}
    						}
    						break;
    					
    					case KUSTO:
    						if (player.isClanLeader())
    						{
    							if (st.getQuestItemsCount(BROOCH) == 1)
    							{
    								if (st.getInt("kurt") == 0)
    								{
    									htmltext = "30512-01.htm";
    								}
    								else if (st.getInt("kurt") == 1)
    								{
    									htmltext = "30512-02.htm";
    								}
    								else
    								{
    									htmltext = "30512-04.htm";
    								}
    							}
    						}
    						else
    						{
    							if ((memberCond > 2) && (memberCond < 6))
    							{
    								htmltext = "30512-01a.htm";
    							}
    						}
    						break;
    					
    					case BALTHAZAR:
    						if (player.isClanLeader())
    						{
    							if (cond == 4)
    							{
    								if (st.getInt("kurt") == 2)
    								{
    									htmltext = "30764-04.htm";
    								}
    								else
    								{
    									htmltext = "30764-02.htm";
    								}
    							}
    							else if (cond == 5)
    							{
    								if ((st.getQuestItemsCount(POWER_STONE) > 9) && (st.getQuestItemsCount(NEBULITE_CRYSTALS) > 9))
    								{
    									htmltext = "30764-08.htm";
    									st.takeItems(POWER_STONE, -1);
    									st.takeItems(NEBULITE_CRYSTALS, -1);
    									st.takeItems(BROOCH, -1);
    									st.set("cond", "6");
    								}
    								else
    								{
    									htmltext = "30764-07.htm";
    								}
    							}
    							else if (cond == 6)
    							{
    								htmltext = "30764-09.htm";
    							}
    						}
    						else
    						{
    							if (memberCond == 4)
    							{
    								htmltext = "30764-01.htm";
    							}
    						}
    						break;
    					
    					case RODEMAI:
    						if (player.isClanLeader())
    						{
    							if (cond == 7)
    							{
    								htmltext = "30868-02.htm";
    							}
    							else if (cond == 8)
    							{
    								htmltext = "30868-05.htm";
    							}
    							else if (cond == 9)
    							{
    								htmltext = "30868-06.htm";
    							}
    							else if (cond == 10)
    							{
    								htmltext = "30868-08.htm";
    							}
    							else if (cond == 11)
    							{
    								htmltext = "30868-09.htm";
    							}
    							else if (cond == 12)
    							{
    								htmltext = "30868-11.htm";
    							}
    						}
    						else
    						{
    							if (memberCond == 7)
    							{
    								htmltext = "30868-01.htm";
    							}
    							else if ((memberCond == 9) || (memberCond == 10))
    							{
    								htmltext = "30868-07.htm";
    							}
    						}
    						break;
    					
    					case CLEO:
    						if (player.isClanLeader())
    						{
    							if (cond == 8)
    							{
    								htmltext = "30766-02.htm";
    							}
    							else if (cond == 9)
    							{
    								htmltext = "30766-05.htm";
    							}
    							else if (cond == 10)
    							{
    								htmltext = "30766-06.htm";
    							}
    							else if ((cond == 11) || (cond == 12) || (cond == 13))
    							{
    								htmltext = "30766-07.htm";
    							}
    						}
    						else
    						{
    							if (memberCond == 8)
    							{
    								htmltext = "30766-01.htm";
    							}
    						}
    						break;
    					
    					case COFFER:
    						if (player.isClanLeader())
    						{
    							if (cond == 10)
    							{
    								htmltext = "30765-01.htm";
    							}
    						}
    						else
    						{
    							if (memberCond == 10)
    							{
    								htmltext = "30765-02.htm";
    							}
    						}
    						break;
    					
    					case KALIS:
    						if (player.isClanLeader())
    						{
    							htmltext = "30759-01.htm";
    						}
    						break;
    					
    					case ATHREA:
    						if (player.isClanLeader())
    						{
    							htmltext = "30758-01.htm";
    						}
    						break;
    				}
    				break;
    		}
    		
    		return htmltext;
    	}
    	
    	@Override
    	public String onKill(Npc npc, Player player, boolean isPet)
    	{
    		QuestState st = null;
    		st = getClanLeaderQuestState(player, npc);
    		if ((st == null) || !st.isStarted())
    		{
    			return null;
    		}
    		
    		for (int[] element : DROPLIST)
    		{
    			if (element[0] == npc.getNpcId())
    			{
    				final int cond = element[1];
    				final int maxCount = element[2];
    				final int chance = element[3];
    				final int item1 = element[4];
    				final int item2 = element[5];
    				final int item3 = element[6];
    				
    				if (st.getInt("cond") == cond)
    				{
    					if (item1 != 0)
    					{
    						st.dropItems(item1, 1, maxCount, chance);
    					}
    					else
    					{
    						if (element[0] == IMPERIAL_GRAVEKEEPER)
    						{
    							final Npc coffer = addSpawn(COFFER, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 180000, false);
    							coffer.broadcastNpcSay("Curse of the gods on the one that defiles the property of the empire!");
    						}
    						else if ((element[0] == GRAVE_GUARD) && (st.getQuestItemsCount(IMP_KEYS) < 6) && (Rnd.get(50) < chance))
    						{
    							addSpawn(GRAVE_KEYMASTER, player.getX(), player.getY(), player.getZ(), player.getHeading(), true, 0, false);
    						}
    					}
    					if ((item2 != 0) && (item3 != 0))
    					{
    						if (Rnd.get(4) == 0)
    						{
    							st.dropItems(item2, 1, maxCount, chance);
    						}
    						else
    						{
    							st.dropItems(item3, 1, maxCount, chance);
    						}
    					}
    				}
    			}
    		}
    		
    		return null;
    	}
    	
    	@Override
    	public String onAttack(Npc npc, Player attacker, int damage, boolean isPet, L2Skill skill)
    	{
    		if ((npc.getMaxHp() / 2) > npc.getCurrentHp())
    		{
    			if (Rnd.get(100) < 4)
    			{
    				addSpawn(IMPERIAL_SLAVE, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false);
    			}
    			else
    			{
    				attacker.teleToLocation(185462, 20342, -3250, 0);
    			}
    		}
    		return super.onAttack(npc, attacker, damage, isPet, skill);
    	}
    }

     

     

    NVM, Fixed :) close this topic!

×
×
  • Create New...