We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

[BROKEN QUEST] - Q10272_LightFragment (Keucereus Alliance Base)

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
kotsoskorg
Posts: 14
Joined: Sat Oct 08, 2016 2:01 pm

[BROKEN QUEST] - Q10272_LightFragment (Keucereus Alliance Base)

Post by kotsoskorg » Mon Apr 02, 2018 10:21 pm

Hello again,
It would be a charming generocity if you would offer me some of your knowledge. Yesterdays, I started to test some of Gracia Continent quests.

I found this above titled quest been bugged in the below snapshooted steps. The npc Soldier Ginby after been payed 10,000 adena teleports the player to the Temple of Shillen. Unfortunately, appears the word "enter" in the message window (last photo). I will attach the code in a second post.

Thank you again!

Image

Image

Image

Image

Image

Image

User avatar
kotsoskorg
Posts: 14
Joined: Sat Oct 08, 2016 2:01 pm

Re: [BROKEN QUEST] - Q10272_LightFragment (Keucereus Alliance Base)

Post by kotsoskorg » Mon Apr 02, 2018 10:28 pm

Files:

32566-05.html
<html><body>Soldier Ginby:<br>
Good, good. You're smarter than you look! I'll be on the lookout, but hurry. Understand? If the other guards see you talking to the Shilen Priest, it'll be bad news for both of us.<br>
<a action="bypass -h Quest Q10272_LightFragment 32566-06.html">"Then hurry and lead me inside."</a>
</body></html>

32566-06.html (file with enter on message window)
<html><body>Soldier Ginby:<br>
Ready? Then let's go!<br>
<a action="bypass -h Quest Q10272_LightFragment enter">Teleport to the Temple of Shilen.</a>
</body></html>


Q10272_LightFragment.java (The whole java code file)
package quests.Q10272_LightFragment;

import com.l2jserver.Config;
import com.l2jserver.gameserver.enums.audio.Sound;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;

import quests.Q10271_TheEnvelopingDarkness.Q10271_TheEnvelopingDarkness;

/**
* Light Fragment (10272)
* @author Gladicek
*/
public class Q10272_LightFragment extends Quest
{
private static final int ORBYU = 32560;
private static final int ARTIUS = 32559;
private static final int GINBY = 32566;
private static final int LELRIKIA = 32567;
private static final int LEKON = 32557;
private static final int[] MOBS =
{
22536, // Royal Guard Captain
22537, // Dragon Steed Troop Grand Magician
22538, // Dragon Steed Troop Commander
22539, // Dragon Steed Troops No 1 Battalion Commander
22540, // White Dragon Leader
22541, // Dragon Steed Troop Infantry
22542, // Dragon Steed Troop Magic Leader
22543, // Dragon Steed Troop Magician
22544, // Dragon Steed Troop Magic Soldier
22547, // Dragon Steed Troop Healer
22550, // Savage Warrior
22551, // Priest of Darkness
22552, // Mutation Drake
22596
// White Dragon Leader
};
private static final int FRAGMENT_POWDER = 13853;
private static final int LIGHT_FRAGMENT_POWDER = 13854;
private static final int LIGHT_FRAGMENT = 13855;
private static final double DROP_CHANCE = 60;

public Q10272_LightFragment()
{
super(10272, Q10272_LightFragment.class.getSimpleName(), "Light Fragment");
addStartNpc(ORBYU);
addTalkId(ORBYU, ARTIUS, GINBY, LELRIKIA, LEKON);
addKillId(MOBS);
registerQuestItems(FRAGMENT_POWDER, LIGHT_FRAGMENT_POWDER);
}

@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
if (st == null)
{
return getNoQuestMsg(player);
}

switch (event)
{
case "32560-06.html":
{
st.startQuest();
break;
}
case "32559-03.html":
{
st.setCond(2, true);
break;
}
case "32559-07.html":
{
st.setCond(3, true);
break;
}
case "pay":
{
if (st.getQuestItemsCount(Inventory.ADENA_ID) >= 10000)
{
st.takeItems(Inventory.ADENA_ID, 10000);
event = "32566-05.html";
}
else
{
event = "32566-04a.html";
}
break;
}
case "32567-04.html":
{
st.setCond(4, true);
break;
}
case "32559-12.html":
{
st.setCond(5, true);
break;
}
case "32557-03.html":
{
if (st.getQuestItemsCount(LIGHT_FRAGMENT_POWDER) >= 100)
{
st.takeItems(LIGHT_FRAGMENT_POWDER, 100);
st.set("wait", "1");
}
else
{
event = "32557-04.html";
}
break;
}
default:
break;
}
return event;
}

@Override
public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestState st = getQuestState(player, false);
if ((st != null) && st.isCond(5))
{
final long count = st.getQuestItemsCount(FRAGMENT_POWDER);
if (count < 100)
{
int chance = (int) (Config.RATE_QUEST_DROP * DROP_CHANCE);
int numItems = chance / 100;
chance = chance % 100;
if (getRandom(100) < chance)
{
numItems++;
}
if (numItems > 0)
{
if ((count + numItems) > 100)
{
numItems = 100 - (int) count;
}
if (numItems > 0)
{
st.giveItems(FRAGMENT_POWDER, numItems);
st.playSound(Sound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}
return null;
}

@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
QuestState st = getQuestState(player, true);
switch (npc.getId())
{
case ORBYU:
{
switch (st.getState())
{
case State.CREATED:
if (player.getLevel() < 75)
{
htmltext = "32560-03.html";
}
else
{
st = player.getQuestState(Q10271_TheEnvelopingDarkness.class.getSimpleName());
htmltext = ((st != null) && st.isCompleted()) ? "32560-01.htm" : "32560-02.html";
}
break;
case State.STARTED:
htmltext = "32560-06.html";
break;
case State.COMPLETED:
htmltext = "32560-04.html";
break;
}
break;
}
case ARTIUS:
{
if (st.isCompleted())
{
htmltext = "32559-19.html";
}
else
{
switch (st.getCond())
{
case 1:
htmltext = "32559-01.html";
break;
case 2:
htmltext = "32559-04.html";
break;
case 3:
htmltext = "32559-08.html";
break;
case 4:
htmltext = "32559-10.html";
break;
case 5:
if (st.getQuestItemsCount(FRAGMENT_POWDER) >= 100)
{
htmltext = "32559-15.html";
st.setCond(6, true);
}
else
{
htmltext = st.hasQuestItems(FRAGMENT_POWDER) ? "32559-14.html" : "32559-13.html";
}
break;
case 6:
if (st.getQuestItemsCount(LIGHT_FRAGMENT_POWDER) < 100)
{
htmltext = "32559-16.html";
}
else
{
htmltext = "32559-17.html";
st.setCond(7, true);
}
break;
case 7:
// TODO Nothing here?
break;
case 8:
htmltext = "32559-18.html";
st.giveAdena(556980, true);
st.addExpAndSp(1009016, 91363);
st.exitQuest(false, true);
break;
}
}
break;
}
case GINBY:
{
switch (st.getCond())
{
case 1:
case 2:
htmltext = "32566-02.html";
break;
case 3:
htmltext = "32566-01.html";
break;
case 4:
htmltext = "32566-09.html";
break;
case 5:
htmltext = "32566-10.html";
break;
case 6:
htmltext = "32566-10.html";
break;
}
break;
}
case LELRIKIA:
{
switch (st.getCond())
{
case 3:
htmltext = "32567-01.html";
break;
case 4:
htmltext = "32567-05.html";
break;
}
break;
}
case LEKON:
{
switch (st.getCond())
{
case 7:
if (st.getInt("wait") == 1)
{
htmltext = "32557-05.html";
st.unset("wait");
st.setCond(8, true);
st.giveItems(LIGHT_FRAGMENT, 1);
}
else
{
htmltext = "32557-01.html";
}
break;
case 8:
htmltext = "32557-06.html";
break;
}
break;
}
}
return htmltext;
}
}

User avatar
Avanael92
Advanced User
Advanced User
Posts: 186
Joined: Thu Aug 07, 2014 5:26 pm
Location: Germany

Re: [BROKEN QUEST] - Q10272_LightFragment (Keucereus Alliance Base)

Post by Avanael92 » Tue Apr 03, 2018 1:17 am

Well the quest per se is not bugged, it's missing a part because there aren't any events connected with enter and not even one coordination of location to be found in the code. Seems like someone have to dig for the source code.
Image

User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 6905
Joined: Tue Aug 11, 2009 3:36 am

Re: [BROKEN QUEST] - Q10272_LightFragment (Keucereus Alliance Base)

Post by Zoey76 » Sat Aug 17, 2019 11:50 pm

I think it's missing the instance.
Using Eclipse 4.11 - OpenJDK11 - MySQL 8.0.12 - L2J Server

Post Reply