Jump to content
  • 0

_456 Dont Know Dont Care Quest From Hi5 Pack With Pay


Question

Posted (edited)
pws mporw na kanw na milaei o ka8enas sto npc kai na pernei to essence?Twra thelei 18ppl....opoios kserei ena pm!!

 

 

 

 

package quests;

 

import java.util.Calendar;

import java.util.HashMap;

import java.util.Map;

 

import org.apache.commons.lang3.ArrayUtils;

 

import wp.commons.util.Rnd;

import wp.gameserver.model.Player;

import wp.gameserver.model.instances.NpcInstance;

import wp.gameserver.model.quest.Quest;

import wp.gameserver.model.quest.QuestState;

import wp.gameserver.scripts.ScriptFile;

 

/**

 * @author pchayka Daily quest ВНИМАНИЕ! Данный квест можно выполнять не только группой, но и командным каналом, все персонажи в командном канале имеют шанс получить квестовые предметы. После убийства боссов будут появляться специальные НПЦ - мертвые тела боссов, для получения квестовых предметов

 *         необходимо будет "поговорить" с этим НПЦ.

 */

public class _456_DontKnowDontCare extends Quest implements ScriptFile

{

private static final int[] SeparatedSoul =

{

32864,

32865,

32866,

32867,

32868,

32869,

32870

};

private static final int DrakeLordsEssence = 17251;

private static final int BehemothLeadersEssence = 17252;

private static final int DragonBeastsEssence = 17253;

private static final int DrakeLord = 25725;

private static final int BehemothLeader = 25726;

private static final int DragonBeast = 25727;

 

private static final int DrakeLordCorpse = 32884;

private static final int BehemothLeaderCorpse = 32885;

private static final int DragonBeastCorpse = 32886;

 

// Reward set

private static final int[] weapons =

{

15558,

15559,

15560,

15561,

15562,

15563,

15564,

15565,

15566,

15567,

15568,

15569,

15570,

15571

};

private static final int[] armors =

{

15743,

15744,

15745,

15746,

15747,

15748,

15749,

15750,

15751,

15752,

15753,

15754,

15755,

15756,

15757,

15759,

15758

};

private static final int[] accessory =

{

15763,

15764,

15765

};

private static final int[] scrolls =

{

6577,

6578,

959

};

private static final int[] reward_attr_crystal =

{

4342,

4343,

4344,

4345,

4346,

4347

};

private static final int gemstone_s = 2134;

 

private static Map<String, Long> _hwidsCompleted = new HashMap<>();

 

public _456_DontKnowDontCare()

{

super(PARTY_ALL);

addStartNpc(SeparatedSoul);

addTalkId(DrakeLordCorpse, BehemothLeaderCorpse, DragonBeastCorpse);

addQuestItem(DrakeLordsEssence, BehemothLeadersEssence, DragonBeastsEssence);

}

 

@Override

public String onEvent(String event, QuestState st, NpcInstance npc)

{

String htmltext = event;

if (event.equalsIgnoreCase("sepsoul_q456_05.htm"))

{

st.setState(STARTED);

st.setCond(1);

st.playSound(SOUND_ACCEPT);

}

else if (event.equalsIgnoreCase("take_essense"))

{

if ((st.getCond() == 1) && (st.getInt(String.valueOf(npc.getNpcId())) == 1))

{

switch (npc.getNpcId())

{

case DrakeLordCorpse:

if (st.getQuestItemsCount(DrakeLordsEssence) < 1)

{

st.giveItems(DrakeLordsEssence, 1);

}

break;

case BehemothLeaderCorpse:

if (st.getQuestItemsCount(BehemothLeadersEssence) < 1)

{

st.giveItems(BehemothLeadersEssence, 1);

}

break;

case DragonBeastCorpse:

if (st.getQuestItemsCount(DragonBeastsEssence) < 1)

{

st.giveItems(DragonBeastsEssence, 1);

}

break;

default:

break;

}

if ((st.getQuestItemsCount(DrakeLordsEssence) > 1) && (st.getQuestItemsCount(BehemothLeadersEssence) > 1) && (st.getQuestItemsCount(DragonBeastsEssence) > 1))

{

st.setCond(2);

}

}

else

{

return "";

}

 

return null;

}

else if (event.equalsIgnoreCase("sepsoul_q456_08.htm"))

{

if (_hwidsCompleted.containsKey(st.getPlayer().getHWID()))

{

long resetTime = _hwidsCompleted.get(st.getPlayer().getHWID());

if (resetTime > System.currentTimeMillis())

{

return "You have already completed this quest for today.";

}

}

 

st.takeAllItems(DrakeLordsEssence);

st.takeAllItems(BehemothLeadersEssence);

st.takeAllItems(DragonBeastsEssence);

 

if (Rnd.chance(7))

{

st.giveItems(weapons[Rnd.get(weapons.length)], 1);

}

else if (Rnd.chance(20))

{

st.giveItems(armors[Rnd.get(armors.length)], 1);

}

else

{

st.giveItems(accessory[Rnd.get(accessory.length)], 1);

}

 

if (Rnd.chance(30))

{

st.giveItems(scrolls[Rnd.get(scrolls.length)], 1);

}

if (Rnd.chance(70))

{

st.giveItems(reward_attr_crystal[Rnd.get(reward_attr_crystal.length)], 1);

}

st.giveItems(gemstone_s, 3);

 

st.setState(COMPLETED);

st.playSound(SOUND_FINISH);

 

st.exitCurrentQuest(this);

 

Calendar cal = Calendar.getInstance();

if (cal.get(Calendar.HOUR_OF_DAY) >= 6)

{

cal.add(Calendar.DATE, 1);

}

cal.set(Calendar.HOUR_OF_DAY, 6);

cal.set(Calendar.MINUTE, 30);

_hwidsCompleted.put(st.getPlayer().getHWID(), cal.getTimeInMillis());

}

 

return htmltext;

}

 

@Override

public String onTalk(NpcInstance npc, QuestState st)

{

String htmltext = "noquest";

 

int cond = st.getCond();

if (ArrayUtils.contains(SeparatedSoul, npc.getNpcId()))

{

if (_hwidsCompleted.containsKey(st.getPlayer().getHWID()))

{

long resetTime = _hwidsCompleted.get(st.getPlayer().getHWID());

if (resetTime > System.currentTimeMillis())

{

return "You have already completed this quest for today.";

}

}

 

switch (st.getState())

{

case CREATED:

if (st.isNowAvailable())

{

if (st.getPlayer().getLevel() >= 80)

{

htmltext = "sepsoul_q456_01.htm";

}

else

{

htmltext = "sepsoul_q456_00.htm";

st.exitCurrentQuest(true);

}

}

else

{

htmltext = "sepsoul_q456_00a.htm";

}

break;

case STARTED:

if (cond == 1)

{

htmltext = "sepsoul_q456_06.htm";

}

else if (cond == 2)

{

htmltext = "sepsoul_q456_07.htm";

}

break;

}

}

 

return htmltext;

}

 

@Override

public String onKill(NpcInstance npc, QuestState st)

{

if ((st.getPlayer().getParty() != null) && (st.getPlayer().getParty().getCommandChannel() != null) && (st.getPlayer().getParty().getCommandChannel().size() >= 1))

{

for (Player plr : st.getPlayer().getParty().getCommandChannel())

{

st = plr.getQuestState(getName());

if (st != null)

{

switch (npc.getNpcId())

{

case DrakeLord:

st.set(String.valueOf(DrakeLordCorpse), 1);

break;

case BehemothLeader:

st.set(String.valueOf(BehemothLeaderCorpse), 1);

break;

case DragonBeast:

st.set(String.valueOf(DragonBeastCorpse), 1);

break;

}

}

}

}

return "You must kill the boss with a command channel of at least 1 players to complete the quest.";

}

 

@Override

public void onLoad()

{

}

 

@Override

public void onReload()

{

}

 

@Override

public void onShutdown()

{

}

}

Edited by roukounas123

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

    • I think that solves the freeze thing, anyway great share! 
    • Introducing: Daily & Weekly Missions!   I've released a major panel update with a new Missions system and expanded language support.   Players can now complete daily and weekly missions directly through the panel and claim rewards such as balance or items. Mission progress is tied to in-game activity and supported panel actions, and the update also adds a dedicated Missions page, dashboard mission previews, claimable mission indicators, and full admin tools for creating and managing missions.   The Roll page now shows the potential reward drops below the roll container.   Alongside this, I’ve expanded the panel’s language support with new locale options, including Bulgarian, Czech, Georgian, Lithuanian, Polish, Romanian, Japanese, Simplified Chinese, and Traditional Chinese.     The Demo is now updated with the new features for you to try out!
    • I sell complete packs. If you want to add an item, NPC, etc., you have to do that yourselves. Your friend bought the pack; he's the one who needs to configure his server type. He received what he bought as agreed, and I'm saying this without knowing who you're talking about, because anyone who buys something receives what was agreed upon.   Regards. mmmmm L2Velmore ????   If that's the one, I see everything went well... if I remember correctly you were crying over $100, I gave you a better price, and I suppose you made thousands with that... And you're still coming back to complain? :=)
    • I know many people have struggled with this specific issue and had trouble setting up the correct behavior for Toggle skills in aCis. By default, toggles interrupt the player's movement (retail-like), which often feels clunky to players who prefer a smoother, more modern experience. I've prepared a clean solution that eliminates this "freeze" and allows for fluid movement while toggling your auras. Below is the code on how to achieve this. Hope it helps! Changes in PlayerAI.java: Modified doActiveIntention to properly update the active state without stalling. Removed the forced stop() during toggle casting. Added a MoveToLocation broadcast to ensure other players see your movement correctly (prevents visual "teleporting" or desync). Best regards 😃 diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java index ba0425a..1b2658d 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java @@ -28,6 +28,7 @@  import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;  import net.sf.l2j.gameserver.network.serverpackets.AutoAttackStart;  import net.sf.l2j.gameserver.network.serverpackets.ChairSit; +import net.sf.l2j.gameserver.network.serverpackets.MoveToLocation;  import net.sf.l2j.gameserver.network.serverpackets.MoveToLocationInVehicle;  import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn;  import net.sf.l2j.gameserver.network.serverpackets.StopMove; @@ -159,7 +160,10 @@      @Override      public synchronized void doActiveIntention()      { -        doIdleIntention(); +        prepareIntention(); +        _currentIntention.updateAsActive(); +        if (!getActor().isMoving()) +            thinkIdle();      }            @Override @@ -280,8 +284,9 @@                    if (skill.isToggle())          { -            getActor().getMove().stop();              getActor().getCast().doToggleCast(skill, target); +            if (getActor().isMoving()) +                getActor().broadcastPacket(new MoveToLocation(getActor()));          }          else          { https://pastebin.com/twZujZ3Y
  • 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..