Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Seven Sign Seal Of The Emperor
#11
дядьки, ну обьясните , или киньте мануал, как всё это делаеццо ..( добавляются импорты и т.д. ) ну не могу же я так всё бросить ....
Бешенство, это не болезнь :di: © Pumo4ka
Ответ
#12
файл называется Disciple.java
а выдаёт ошибку при компилировании
Код:
the public type must be defined in its own file
на вот эту строчку
[src=java]public class Disciple extends Quest[/src]

:ck::cb::cj:

Добавлено через 10 часов 14 минут
up up up up up up :cj:
Бешенство, это не болезнь :di: © Pumo4ka
Ответ
#13
/topic_update now
Бешенство, это не болезнь :di: © Pumo4ka
Ответ
#14
Puma1414 Написал:/topic_update now
Это жи ява, ну.
Файл Disciple.class ему надо. Или что-то в этом роде.
Или его нет, или его не видит, или я не прав потому что знаю только С/C++. :cq:
[Изображение: dxqV.gif]
Ответ
#15
поменял скрипт...теперь
Код:
the type Disciple is already defined
Бешенство, это не болезнь :di: © Pumo4ka
Ответ
#16
Класс уже определён, возможно ли что есть классы с таким же именем?
Ответ
#17
CSharpRU Написал:Класс уже определён, возможно ли что есть классы с таким же именем?

в данном скрипте ?
[src=java]/**
* @author Skyline
* OpenTeamFree 14.09.2010, Based on PTS Freya.
* TODO: Disciple - Lilith and Anakim Attack.
* TODO: Disciple - Fix in sql rb's 32715,32716,32717,32718,32719,32720,32721
*/
package instances.Disciple;

import ru.l2open.gameserver.ai.CtrlIntention;
import ru.l2open.gameserver.datatables.SkillTable;
import ru.l2open.gameserver.instancemanager.InstanceManager;
import ru.l2open.gameserver.instancemanager.InstanceManager.InstanceWorld;
import ru.l2open.gameserver.model.actor.L2Npc;
import ru.l2open.gameserver.model.actor.instance.L2DoorInstance;
import ru.l2open.gameserver.model.actor.instance.L2PcInstance;
import ru.l2open.gameserver.model.L2Object;
import ru.l2open.gameserver.model.L2Skill;
import ru.l2open.gameserver.model.L2World;
import ru.l2open.gameserver.model.quest.Quest;
import ru.l2open.gameserver.model.quest.QuestState;
import ru.l2open.gameserver.network.SystemMessageId;
import ru.l2open.gameserver.network.serverpackets.SystemMessage;

public class Disciple extends Quest
{
private class DiSWorld extends InstanceWorld
{
public long[] storeTime = {0,0};
public DiSWorld()
{
InstanceManager.getInstance().super();
}
}

private static final String qn = "Disciple";
private static final int INSTANCEID = 112;

private static final int PROMISE = 32585;
private static final int LEON = 32587;
private static final int DOOR = 17240111;
private static final int GATEKEEPER = 32657;
private static final int SEALDEVICE = 27384;
//private static final int EINHASAD_STRIKE = 8357;

private class teleCoord {int instanceId; int x; int y; int z;}

private void teleportplayer(L2PcInstance player, teleCoord teleto)
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.setInstanceId(teleto.instanceId);
player.teleToLocation(teleto.x, teleto.y, teleto.z);
return;
}

protected void exitInstance(L2PcInstance player, teleCoord tele)
{
player.setInstanceId(0);
player.teleToLocation(tele.x, tele.y, tele.z);
}

protected int enterInstance(L2PcInstance player, String template, teleCoord teleto)
{
int instanceId = 0;
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if (world != null)
{
if (!(world instanceof DiSWorld))
{
player.sendPacket(new SystemMessage(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER));
return 0;
}
teleto.instanceId = world.instanceId;
teleportplayer(player,teleto);
return instanceId;
}
else
{
instanceId = InstanceManager.getInstance().createDynamicInstance(template);
world = new DiSWorld();
world.instanceId = instanceId;
world.templateId = INSTANCEID;
world.status = 0;
((DiSWorld)world).storeTime[0] = System.currentTimeMillis();
InstanceManager.getInstance().addWorld(world);
_log.info("Disciple started " + template + " Instance: " + instanceId + " created by player: " + player.getName());
teleto.instanceId = instanceId;
teleportplayer(player,teleto);
world.allowed.add(player.getObjectId());
return instanceId;
}
}

protected void openDoor(int doorId,int instanceId)
{
for (L2DoorInstance door : InstanceManager.getInstance().getInstance(instanceId).getDoors())
{
if (door.getDoorId() == doorId)
door.openMe();
}
}

public String onSkillSee(L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DiSWorld)
{
for (L2Object obj : targets)
{
if (npc != obj)
return null;
}
if (skill.getId() == 8357 && npc.getNpcId() == SEALDEVICE)
{
npc.doCast(SkillTable.getInstance().getInfo(5980, 1));
}
}
return super.onSkillSee(npc,caster,skill,targets,isPet);
}

public String onTalk ( L2Npc npc, L2PcInstance player)
{
int npcId = npc.getNpcId();
QuestState st = player.getQuestState(qn);
if (st == null)
st = newQuestState(player);
if (npcId == PROMISE)
{
teleCoord tele = new teleCoord();
tele.x = -89559;
tele.y = 216030;
tele.z = -7488;
enterInstance(player, "Disciple.xml", tele);
}
else if (npcId == LEON)
{
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.allowed.remove(world.allowed.indexOf(player.getObjectId()));
teleCoord tele = new teleCoord();
tele.instanceId = 0;
tele.x = 171782;
tele.y = -17612;
tele.z = -4901;
exitInstance(player,tele);
}
else if (npcId == GATEKEEPER)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DiSWorld)
{
DiSWorld world = (DiSWorld) tmpworld;
{
openDoor(DOOR,world.instanceId);
for(int objId : world.allowed)
{
L2PcInstance pl = L2World.getInstance().getPlayer(objId);
if (pl != null)
pl.showQuestMovie(12);
}
}
}
}
return "";

}

public Disciple(int questId, String name, String descr)
{
super(questId, name, descr);

addStartNpc(PROMISE);
addTalkId(PROMISE);
addTalkId(LEON);
addTalkId(GATEKEEPER);
addSkillSeeId(SEALDEVICE);
}

public static void main(String[] args)
{
new Disciple(-1,qn,"instances");
}
}




public class Disciple extends Quest
{
private class DiSWorld extends InstanceWorld
{
public long[] storeTime = {0,0};
public DiSWorld()
{
InstanceManager.getInstance().super();
}
}

private static final String qn = "Disciple";
private static final int INSTANCEID = 112;

private static final int PROMISE = 32585;
private static final int LEON = 32587;
private static final int DOOR = 17240111;
private static final int GATEKEEPER = 32657;
private static final int SEALDEVICE = 27384;
//private static final int EINHASAD_STRIKE = 8357;

private class teleCoord {int instanceId; int x; int y; int z;}

private void teleportplayer(L2PcInstance player, teleCoord teleto)
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.setInstanceId(teleto.instanceId);
player.teleToLocation(teleto.x, teleto.y, teleto.z);
return;
}

protected void exitInstance(L2PcInstance player, teleCoord tele)
{
player.setInstanceId(0);
player.teleToLocation(tele.x, tele.y, tele.z);
}

protected int enterInstance(L2PcInstance player, String template, teleCoord teleto)
{
int instanceId = 0;
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if (world != null)
{
if (!(world instanceof DiSWorld))
{
player.sendPacket(new SystemMessage(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER));
return 0;
}
teleto.instanceId = world.instanceId;
teleportplayer(player,teleto);
return instanceId;
}
else
{
instanceId = InstanceManager.getInstance().createDynamicInstance(template);
world = new DiSWorld();
world.instanceId = instanceId;
world.templateId = INSTANCEID;
world.status = 0;
((DiSWorld)world).storeTime[0] = System.currentTimeMillis();
InstanceManager.getInstance().addWorld(world);
_log.info("Disciple started " + template + " Instance: " + instanceId + " created by player: " + player.getName());
teleto.instanceId = instanceId;
teleportplayer(player,teleto);
world.allowed.add(player.getObjectId());
return instanceId;
}
}

protected void openDoor(int doorId,int instanceId)
{
for (L2DoorInstance door : InstanceManager.getInstance().getInstance(instanceId).getDoors())
{
if (door.getDoorId() == doorId)
door.openMe();
}
}

public String onSkillSee(L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DiSWorld)
{
for (L2Object obj : targets)
{
if (npc != obj)
return null;
}
if (skill.getId() == 8357 && npc.getNpcId() == SEALDEVICE)
{
npc.doCast(SkillTable.getInstance().getInfo(5980, 1));
}
}
return super.onSkillSee(npc,caster,skill,targets,isPet);
}

public String onTalk (L2Npc npc, L2PcInstance player)
{
int npcId = npc.getNpcId();
QuestState st = player.getQuestState(qn);
if (st == null)
st = newQuestState(player);
if (npcId == PROMISE)
{
teleCoord tele = new teleCoord();
tele.x = -89559;
tele.y = 216030;
tele.z = -7488;
enterInstance(player, "Disciple.xml", tele);
}
else if (npcId == LEON)
{
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.allowed.remove(world.allowed.indexOf(player.getObjectId()));
teleCoord tele = new teleCoord();
tele.instanceId = 0;
tele.x = 171782;
tele.y = -17612;
tele.z = -4901;
exitInstance(player,tele);
}
else if (npcId == GATEKEEPER)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DiSWorld)
{
DiSWorld world = (DiSWorld) tmpworld;
{
openDoor(DOOR,world.instanceId);
for(int objId : world.allowed)
{
L2PcInstance pl = L2World.getInstance().getPlayer(objId);
if (pl != null)
pl.showQuestMovie(12);
}
}
}
}
return "";

}

public Disciple(int questId, String name, String descr)
{
super(questId, name, descr);

addStartNpc(PROMISE);
addTalkId(PROMISE);
addTalkId(LEON);
addTalkId(GATEKEEPER);
addSkillSeeId(SEALDEVICE);
}

public static void main(String[] args)
{
new Disciple(-1,qn,"instances");
}


@Override
public String onTalk ( L2Npc npc, L2PcInstance player)
{
QuestState st = player.getQuestState(qn);
if (st == null)
st = newQuestState(player);

switch (npc.getNpcId())
{
case PROMISE:
teleCoord tele = new teleCoord();
tele.x = -89559;
tele.y = 216030;
tele.z = -7488;
enterInstance(player, "Disciple.xml", tele);
break;
case LEON:
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.allowed.remove(world.allowed.indexOf(player.getObjectId()));
tele = new teleCoord();
tele.instanceId = 0;
tele.x = 171782;
tele.y = -17612;
tele.z = -4901;
exitInstance(player,tele);
break;
case GATEKEEPER:
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DiSWorld)
{
world = (DiSWorld) tmpworld;
openDoor(DOOR,world.instanceId);
for (int objId : world.allowed)
{
final L2PcInstance pl = L2World.getInstance().getPlayer(objId);
if (pl != null)
pl.showQuestMovie(13);
}
}
break;
}

return "";
}

public Disciple(int questId, String name, String descr)
{
super(questId, name, descr);

addStartNpc(PROMISE);
addTalkId(PROMISE);
addTalkId(LEON);
addTalkId(GATEKEEPER);
}

public static void main(String[] args)
{
new Disciple(-1, qn, "instances");
}
}[/src]

Добавлено через 14 часов 0 минут
отключил абсолютно все квесты, запустил только дисайпл, та же ошибка .

Добавлено через 23 часа 13 минут
нашёл рабочий скрипт ...
[src=java]/**
* @author Skyline
* OpenTeamFree 14.09.2010, Based on PTS Freya.
* TODO: Disciple - Lilith and Anakim Attack.
* TODO: Disciple - Fix in sql rb's 32715,32716,32717,32718,32719,32720,32721
*/
package instances.Disciple;

import ru.l2open.gameserver.ai.CtrlIntention;
import ru.l2open.gameserver.datatables.SkillTable;
import ru.l2open.gameserver.instancemanager.InstanceManager;
import ru.l2open.gameserver.instancemanager.InstanceManager.InstanceWorld;
import ru.l2open.gameserver.model.actor.L2Npc;
import ru.l2open.gameserver.model.actor.instance.L2DoorInstance;
import ru.l2open.gameserver.model.actor.instance.L2PcInstance;
import ru.l2open.gameserver.model.L2Object;
import ru.l2open.gameserver.model.L2Skill;
import ru.l2open.gameserver.model.L2World;
import ru.l2open.gameserver.model.quest.Quest;
import ru.l2open.gameserver.model.quest.QuestState;
import ru.l2open.gameserver.network.SystemMessageId;
import ru.l2open.gameserver.network.serverpackets.SystemMessage;


public class Disciple extends Quest
{
private class DiSWorld extends InstanceWorld
{
public long[] storeTime = {0,0};
public DiSWorld()
{
InstanceManager.getInstance().super();
}
}

private static final String qn = "Disciple";
private static final int INSTANCEID = 112;

private static final int PROMISE = 32585;
private static final int LEON = 32587;
private static final int DOOR = 17240111;
private static final int GATEKEEPER = 32657;
private static final int SEALDEVICE = 27384;
private static final int EINHASAD_STRIKE = 8357;

private class teleCoord {int instanceId; int x; int y; int z;}

private void teleportplayer(L2PcInstance player, teleCoord teleto)
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.setInstanceId(teleto.instanceId);
player.teleToLocation(teleto.x, teleto.y, teleto.z);
return;
}

protected void exitInstance(L2PcInstance player, teleCoord tele)
{
player.setInstanceId(0);
player.teleToLocation(tele.x, tele.y, tele.z);
}

protected int enterInstance(L2PcInstance player, String template, teleCoord teleto)
{
int instanceId = 0;
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if (world != null)
{
if (!(world instanceof DiSWorld))
{
player.sendPacket(new SystemMessage(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER));
return 0;
}
teleto.instanceId = world.instanceId;
teleportplayer(player,teleto);
return instanceId;
}
else
{
instanceId = InstanceManager.getInstance().createDynamicInstance(template);
world = new DiSWorld();
world.instanceId = instanceId;
world.templateId = INSTANCEID;
world.status = 0;
((DiSWorld)world).storeTime[0] = System.currentTimeMillis();
InstanceManager.getInstance().addWorld(world);
_log.info("Disciple started " + template + " Instance: " + instanceId + " created by player: " + player.getName());
teleto.instanceId = instanceId;
teleportplayer(player,teleto);
world.allowed.add(player.getObjectId());
return instanceId;
}
}

protected void openDoor(int doorId,int instanceId)
{
for (L2DoorInstance door : InstanceManager.getInstance().getInstance(instanceId).getDoors())
{
if (door.getDoorId() == doorId)
door.openMe();
}
}

public String onSkillSee(L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DiSWorld)
{
for (L2Object obj : targets)
{
if (npc != obj)
return null;
}
if (skill.getId() == EINHASAD_STRIKE && npc.getNpcId() == SEALDEVICE)
{
npc.doCast(SkillTable.getInstance().getInfo(5980, 1));
}
}
return super.onSkillSee(npc,caster,skill,targets,isPet);
}

public String onTalk (L2Npc npc, L2PcInstance player)
{
int npcId = npc.getNpcId();
QuestState st = player.getQuestState(qn);
if (st == null)
st = newQuestState(player);
if (npcId == PROMISE)
{
teleCoord tele = new teleCoord();
tele.x = -89559;
tele.y = 216030;
tele.z = -7488;
enterInstance(player, "Disciple.xml", tele);
}
else if (npcId == LEON)
{
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.allowed.remove(world.allowed.indexOf(player.getObjectId()));
teleCoord tele = new teleCoord();
tele.instanceId = 0;
tele.x = 171782;
tele.y = -17612;
tele.z = -4901;
exitInstance(player,tele);
}
else if (npcId == GATEKEEPER)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DiSWorld)
{
DiSWorld world = (DiSWorld) tmpworld;
{
openDoor(DOOR,world.instanceId);
for(int objId : world.allowed)
{
L2PcInstance pl = L2World.getInstance().getPlayer(objId);
if (pl != null)
pl.showQuestMovie(12);
}
}
}
}
return "";

}

public Disciple(int questId, String name, String descr)
{
super(questId, name, descr);

addStartNpc(PROMISE);
addTalkId(PROMISE);
addTalkId(LEON);
addTalkId(GATEKEEPER);
addSkillSeeId(SEALDEVICE);
}

public static void main(String[] args)
{
new Disciple(-1,qn,"instances");
}
}[/src]

Добавлено через 23 часа 24 минуты
и я даже попал в данж, но тут проблемка , не открываются двери .. скил у сворда работает(на мобов, не на двери), а вот холи ватер , ваще по нулям ...пошёл искать ....http://l2kc.ru/item/13808 и вот тут вопрос ... у меня в хмл , нету в такого номера, есть только :
13000-13099.xml дальше такой идёт
14600-14699.xml
вопрос, почему мне собсно ДАЮТ по квесту этот итем если его нету нигде.. и могу ли я его как то добавить ?
Бешенство, это не болезнь :di: © Pumo4ka
Ответ
#18
не работают двери ? удалить :cw2:
зато квест работает:dk:
и всего то неделю с ним копался):loltt0:
Бешенство, это не болезнь :di: © Pumo4ka
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Эффект скиллов 1105 Madness и 1213 Seal of Mirage ntking 0 669 03-28-2023, 12:07 PM
Последний пост: ntking

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)