Page 1 of 1

Seed Of Destruction!

Posted: Wed Nov 17, 2010 7:34 am
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!

Re: Seed Of Destruction!

Posted: Wed Nov 17, 2010 9:45 am
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.

Re: Seed Of Destruction!

Posted: Thu Nov 18, 2010 9:32 am
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 "";    }

Re: Seed Of Destruction!

Posted: Thu Nov 18, 2010 10:15 am
by jurchiks
that's how it should have been done in the first place :)