criss22 Posted October 7, 2019 Posted October 7, 2019 How i can set activeChar to not use CB on zones farm? Just in peace zones (Towns)
0 Rootware Posted October 7, 2019 Posted October 7, 2019 if (activeChar.isInsideZone(ZoneId.PEACE) || activeChar.isInsideZone(ZoneId.TOWN)) { // Do something here. }
0 criss22 Posted October 7, 2019 Author Posted October 7, 2019 (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 October 7, 2019 by criss22
0 Rootware Posted October 7, 2019 Posted October 7, 2019 What did you ask, and received such an answer. If the answer does not fit, then learn English to ask questions correctly.
0 melron Posted October 7, 2019 Posted October 7, 2019 The comment (//) stands there for a reason.. put the code inside
0 criss22 Posted October 7, 2019 Author Posted October 7, 2019 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 Rootware Posted October 7, 2019 Posted October 7, 2019 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 criss22 Posted October 7, 2019 Author Posted October 7, 2019 Ah..sorry then. I want player to use CB just in towns. Not in other ways
0 Rootware Posted October 7, 2019 Posted October 7, 2019 if (!activeChar.isInsideZone(ZoneIdType.PEACE) || !activeChar.isInsideZone(ZoneIdType.TOWN)) { activeChar.sendMessage("Cannot use outside of peace zone."); return; }
0 criss22 Posted October 7, 2019 Author Posted October 7, 2019 (edited) I understand RootWare, but this syntax block players to use CB in town. And i already do that. Edited October 7, 2019 by criss22
0 criss22 Posted October 7, 2019 Author Posted October 7, 2019 Anyway, can close topic. I leave how it is. I make just isInCombat and it is enough
0 tazerman2 Posted October 7, 2019 Posted October 7, 2019 !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 Rootware Posted October 7, 2019 Posted October 7, 2019 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 criss22 Posted October 7, 2019 Author Posted October 7, 2019 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 SweeTs Posted October 8, 2019 Posted October 8, 2019 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
0 criss22 Posted October 9, 2019 Author Posted October 9, 2019 (edited) Ok, and how i can make it in General file to config? like AllowFarm=True/False? Edited October 9, 2019 by criss22
Question
criss22
How i can set activeChar to not use CB on zones farm? Just in peace zones (Towns)
51 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now