criss22 Posted October 7, 2019 Share Posted October 7, 2019 How i can set activeChar to not use CB on zones farm? Just in peace zones (Towns) Quote Link to comment Share on other sites More sharing options...
0 Rootware Posted October 7, 2019 Share Posted October 7, 2019 if (activeChar.isInsideZone(ZoneId.PEACE) || activeChar.isInsideZone(ZoneId.TOWN)) { // Do something here. } Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 7, 2019 Author Share 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 Quote Link to comment Share on other sites More sharing options...
0 Rootware Posted October 7, 2019 Share 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. Quote Link to comment Share on other sites More sharing options...
0 melron Posted October 7, 2019 Share Posted October 7, 2019 The comment (//) stands there for a reason.. put the code inside Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 7, 2019 Author Share 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...:/ Quote Link to comment Share on other sites More sharing options...
0 Rootware Posted October 7, 2019 Share 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) Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 7, 2019 Author Share Posted October 7, 2019 Ah..sorry then. I want player to use CB just in towns. Not in other ways Quote Link to comment Share on other sites More sharing options...
0 Rootware Posted October 7, 2019 Share Posted October 7, 2019 if (!activeChar.isInsideZone(ZoneIdType.PEACE) || !activeChar.isInsideZone(ZoneIdType.TOWN)) { activeChar.sendMessage("Cannot use outside of peace zone."); return; } Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 7, 2019 Author Share 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 Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 7, 2019 Author Share Posted October 7, 2019 Anyway, can close topic. I leave how it is. I make just isInCombat and it is enough Quote Link to comment Share on other sites More sharing options...
0 tazerman2 Posted October 7, 2019 Share 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 Quote Link to comment Share on other sites More sharing options...
0 Rootware Posted October 7, 2019 Share 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; } Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 7, 2019 Author Share 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. Quote Link to comment Share on other sites More sharing options...
0 SweeTs Posted October 8, 2019 Share 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 Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 9, 2019 Author Share 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 Quote Link to comment Share on other sites More sharing options...
Question
criss22
How i can set activeChar to not use CB on zones farm? Just in peace zones (Towns)
Link to comment
Share on other sites
51 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.