Jump to content
  • 0

onFirstTalk Function


Question

Posted

Hi, i was writing Seven Signs quest but onFirstTalk function i stuck.

when i talk to npc example : 

npcId == WestTeleportControlDevice

 

it shows me exact html what is written onFirstTalk function but,

when i press to teleport button it has no reaction.

 

Bypass of html

<a action="bypass -h Quest ToTheMonastery TeleWest">Move to West Watcher's Room</a>

 

i have written TeleWest function to teleport on exact cordinates, but no reaction,

hope mxc will help

	@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
     	  int npcId = npc.getNpcId();
	if(npcId == WestTeleportControlDevice)
		return "32816-01.htm";
	else if(npcId == NorthTeleportControlDevice)
		return "32817-01.htm";
	else if(npcId == EastTeleportControlDevice)
		return "32818-01.htm";
	else if(npcId == SouthTeleportControlDevice)
		return "32819-01.htm";

	for(int[] d : desks)
		if(Util.ArrayContains(d, npcId))
		{
			if(npcId == d[0])
				return npcId + "-01.htm";
			else
				return "empty_desk.htm";
		}

	return null;
}

2 answers to this question

Recommended Posts

  • 0
Posted

Bypasses are related to onAdvEvent.

 

onFirstTalk changes behavior of the first HTM (the one shown when you double click on a NPC).

 

Btw you don't show anything related to TeleWest, so I can't say what you did wrong. Check panda sig.

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


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock