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...

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