Jump to content
  • 0

Mass mage bane


Question

Posted

I want create like this code if player is in olympiad mode he can only use this skill other places he cannot use this skill.

 

i create like this in l2pcinstance.java useMagic method

 

		if (skill.getId() == 1345)
	{
		sendMessage("You can use this skill only in olympiad mode.");
		sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}
	else 
	{
		isInOlympiadMode();
		sendPacket(ActionFailed.STATIC_PACKET);
	}

 

but this doesn't work what wrong?

4 answers to this question

Recommended Posts

  • 0
Posted

I want create like this code if player is in olympiad mode he can only use this skill other places he cannot use this skill.

 

i create like this in l2pcinstance.java useMagic method

 

		if (skill.getId() == 1345)
	{
		sendMessage("You can use this skill only in olympiad mode.");
		sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}
	else 
	{
		isInOlympiadMode();
		sendPacket(ActionFailed.STATIC_PACKET);
	}

 

but this doesn't work what wrong?

Your statement should to be like this

	if (!player.isInOlympiadMode() && skill.getId() == 1345)
	{
		sendMessage("You can use this skill only in olympiad mode.");
		sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}

  • 0
Posted

Your statement should to be like this

 

if (!player.isInOlympiadMode() && skill.getId() == 1345)

{

sendMessage("You can use this skill only in olympiad mode.");

sendPacket(ActionFailed.STATIC_PACKET);

return;

}

 

 

 

i have error at player

Guest
This topic is now closed to further replies.


×
×
  • Create New...