Seed Of Destruction!

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
shortys^^
Posts: 6
Joined: Sun Jun 17, 2007 1:18 pm
Location: Athens

Seed Of Destruction!

Post by shortys^^ »

Hello.. first of all I couldn't post it in User Contributions section cause i have low post count :D

So... i tried to use this version of SoD (viewtopic.php?f=69&t=16509) in the latest L2j Freya release...everything was fine but i got this "error" when i tried to speak with the first Instant moving device.
Image

Alsoo this message appeared in server's console
Image

The htm code of npc ID: 32601 is the following:

Code: Select all

<html><body>Instant Moving Device:<br>This device can teleport you deep inside the Seed of Destruction.<br><a action="bypass -h npc_%objectId%_Quest SeedOfDestruction">Teleport</a></body></html>
Any kind of help would be great! thanks!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Seed Of Destruction!

Post by jurchiks »

well, for some stupid reason some devs use onFirstTalk in most of their new scripts, and this one is no exclusion. There is no need for onFirstTalk just to create questState because it's created onTalk in the QuestLink bypass, but they obviously don't know it.

Anyway, you needed to post this in that topic, not in a new one.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
shortys^^
Posts: 6
Joined: Sun Jun 17, 2007 1:18 pm
Location: Athens

Re: Seed Of Destruction!

Post by shortys^^ »

jurchiks wrote: Anyway, you needed to post this in that topic, not in a new one.
well, as i said before i wasn't able to post there cause i had 4 posts...! finaly i solved this issue like this

Code: Select all

public String onTalk (L2Npc npc, L2PcInstance player)    {        int npcId = npc.getNpcId();        QuestState st = player.getQuestState(qn);        if (st == null)            st = newQuestState(player);        if (npcId == ALENOS)        {            if (GraciaSeedManager.getInstance().getSoDState() == 1)            {                teleCoord tele = new teleCoord();                tele.x = -242759;                tele.y = 219981;                tele.z = -9986;                enterInstance(player, "SeedOfDestruction.xml", tele);            }            else if (GraciaSeedManager.getInstance().getSoDState() == 2)            {                teleCoord tele = new teleCoord();                tele.x = -245800;                tele.y = 220488;                tele.z = -12112;                tele.instanceId = 0;                teleportplayerEnergy(player,tele);            }        }        else if (npcId == TELEPORT)        {            InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());            if (tmpworld instanceof SODWorld)            {                SODWorld world = (SODWorld) tmpworld;                teleCoord tele = new teleCoord();                tele.x = -245802;                tele.y = 220528;                tele.z = -12104;                tele.instanceId = player.getInstanceId();                teleportplayer(player,tele,world);            }        }        else if (npcId == 32601)        {            InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());            if (tmpworld instanceof SODWorld)            {                SODWorld world = (SODWorld) tmpworld;                if (world.status == 1 )                    return "32601.htm";                if (world.status == 2 )                    return "32601-1.htm";                if (world.status > 2  && world.status < 9)                    return "32601-2.htm";                if (world.status == 9)                    return "32601-3.htm";            }            npc.showChatWindow(player);            return null;        }                    return "";    }
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Seed Of Destruction!

Post by jurchiks »

that's how it should have been done in the first place :)
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply