Jump to content
  • 0

activeChar.isIn?


Question

Recommended Posts

  • 0
Posted (edited)
37 minutes ago, Rootware said:

if (activeChar.isInsideZone(ZoneId.PEACE) || activeChar.isInsideZone(ZoneId.TOWN))
{
	// Do something here.
}

 

With this i can open CB just in farm zones, and not in town. And i want reverse :)

 

In peace i want to use and farm zone not

Edited by criss22
  • 0
Posted

I make like this

if (activeChar.isInsideZone(ZoneIdType.PEACE) || activeChar.isInsideZone(ZoneIdType.TOWN))
		{
			activeChar.sendMessage("Cannot use outside of peace zone.");
			return;
		}

and i can't open Comunity board in towns. Just in Farm zones i can open...:/

  • 0
Posted

Because you asked question with one conditions and in result wants the another.

 

1 hour ago, criss22 said:

How i can set activeChar to not use CB on zones farm? Just in peace zones (Towns)

 

  • 0
Posted
if (!activeChar.isInsideZone(ZoneIdType.PEACE) || !activeChar.isInsideZone(ZoneIdType.TOWN))
{
	activeChar.sendMessage("Cannot use outside of peace zone.");
	return;
}

 

  • 0
Posted
!activeChar.isInsideZone()

-->   <-- activeChar.isInsideZone(mplampla)  <---- this is for player is not inside zone and if player is in zone town/peace cant open cb
without -->     <-- this he check if player is in zone town/peace he can open it only out of that zones

  • 0
Posted

Your towns isn't peace zones?

 

if (!activeChar.isInsideZone(ZoneIdType.TOWN) && !activeChar.isInsideZone(ZoneIdType.PEACE))
{
	activeChar.sendMessage("Cannot use outside of peace zone.");
	return;
}

 

  • 0
Posted

RootWare, i am glad to have you here. And your answer are faster and correct. But for me, doedn't work. If you want (it is not

necessary) to join into my pc to check yourself how it's work.

  • 0
Posted
On 10/7/2019 at 10:59 PM, criss22 said:

RootWare, i am glad to have you here. And your answer are faster and correct. But for me, doedn't work. If you want (it is not

necessary) to join into my pc to check yourself how it's work.

God, ofc it's gonna work, just do as he posted on second post, add godamn ! to deny condition...... 

 

! stands for NOT 

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