Jump to content
  • 0

skill restriction item


Question

Posted

anyone know about skill restriction outside peacezone? and add it into an item...

example: if this item is with the AIO Buffer char, this buffer cannot use all skills outside peace zone... sorry if ever im in wrong section, and thanks in advance if someone dare to help/share.. peace.. anyway i saw this kind of restriction from L2OFF, where AIO BUFFER CHARACTER cannot use thier skills outside peace zone..

Recommended Posts

  • 0
Posted

I'm sure it's possible, it'd simply be reversing the logic for -not- casting inside the peace zone. I don't have the code infront of me right now, but maybe it'd be a good idea to check the L2PcInstance.java file at the doAttack or doCast or something along those lines.

  • 0
Posted

Look on the skill type handler and add a condition for the desirable zone. If a player is inside/outside the zone, actionFailed, else, continue

  • 0
Posted

If it's an item which got it's own system of cast skill, make restriction on the itemhandler directly. Restricting the skillhandler will change the general behavior (which isn't what you want).

 

Find the appropriated itemhandler, and add a check

if (!activeChar.isInsideZone(L2Character.ZONE_PEACE))
return;

.

  • 0
Posted

damn i can't make it.. i did made my analysation but i crossed the line... btw im not a programer, so it's impossible for me to make deep java knowledge... off limits to my know how..

  • 0
Posted

if you have problems with the handlers, you can check the

/gameserver/network/clientpackets/UseItem.java

and add the restriction there

 

i dont have any problems with handlers.. my problem is i can't make a right code to give a skill restriction in Itemhandlers...

  • 0
Posted

i have a code from l2j, this code will give a restriction to a dual box, you cannot use any skill into your other char while you are dual boxing.. anyways, can someone help me to rewrite it and make it as a fully skill restriction? not only in dual box, but fully restriction if a char is outside town/peace zone...

 

PasteBin

  • 0
Posted

that code block the skills of heal / buff, and you need to block an item, dont you? and thats not a handler, the handlers are in datapack

yes it blocks those type of skills and i can add more type, like PDAM MDAM COMBATPOINTHEAL and etc.. What i need is, to put this code in an "ITEM", where if an AIO buffer will have that ITEM, that buffer will no longer can use it skills outside peace zone [glow=red,2,300](for example Custom Nobless Item,if you get this Item, you will be Nobless)[/glow] just like what i need, if i put this item of an AIO buffer char, he will no longer can use any skills outside peace zone..And yes this topic is talking about the datapack, not the core.. i hope you get my point . :D

  • 0
Posted

In my latest post (08 October) I gave you the exact check to make. If you (still) got issues, consider learn more about Java basics, cause except doing the patch for you (and my religion is kinda clear about it : "You won't code for others"), I don't see how to help more.

 

There's no special "skill restriction" to make. What you want is kinda clear : don't make possible the use of the AIO buffs part except in town/peace zones.

 

Find the code part where buffs are made on your AIO itemhandler (eventually if it's a greek crap, there will have 500 configs, so just check where configs are used), then just add the 2 lines I wrote.

 

Btw do you simply have the AIO code ? Or you code all yourself from zero ? You show nothing, how do you want exact answers.

  • 0
Posted

Easy one find doCast and doAttack on pcinstance... on ADD_ZONE add your forbitten zones

 

{

if (isAio ()  || isInsideZone(ADD_ZONE))

                  || isInsideZone(ADD_ZONE))

                  || isInsideZone(ADD_ZONE))

                  || isInsideZone(ADD_ZONE))

activeChar.sendMessage("Aio cant cast skill outside towns");

  return false;

}

  • 0
Posted

In my latest post (08 October) I gave you the exact check to make. If you (still) got issues, consider learn more about Java basics, cause except doing the patch for you (and my religion is kinda clear about it : "You won't code for others"), I don't see how to help more.

 

There's no special "skill restriction" to make. What you want is kinda clear : don't make possible the use of the AIO buffs part except in town/peace zones.

 

Find the code part where buffs are made on your AIO itemhandler (eventually if it's a greek crap, there will have 500 configs, so just check where configs are used), then just add the 2 lines I wrote.

 

Btw do you simply have the AIO code ? Or you code all yourself from zero ? You show nothing, how do you want exact answers.

 

btw the first post with this topic is asking/requesting for the code. How am i suppose to code for others while i can't even code for myself? :P

and im not a java scripter, im a damn Airline Engineer,weird huh? but what's wrong with it if i enjoy learning some java from other's advice and teaching? nothings wrong at all.. anyways, it's not that important tho.. let's just forget what i posted.. :)) ..thanks for the time.. ciao.

  • 0
Posted

Easy one find doCast and doAttack on pcinstance... on ADD_ZONE add your forbitten zones

 

{

if (isAio ()  || isInsideZone(ADD_ZONE))

                  || isInsideZone(ADD_ZONE))

                  || isInsideZone(ADD_ZONE))

                  || isInsideZone(ADD_ZONE))

activeChar.sendMessage("Aio cant cast skill outside towns");

  return false;

}

 

You just copied it from somewhere because parentheses are wrong.

 

Anyway it is a stupid think to write it into L2PcInstance when already exist other classes for Skills, Zones.

 

Regards.

  • 0
Posted

You just copied it from somewhere because parentheses are wrong.

 

Anyway it is a stupid think to write it into L2PcInstance when already exist other classes for Skills, Zones.

 

Regards.

 

yea i copied if (isDead () || isInvul blablabla and made it like this whats your problem and this is more faster than make all this for skills etc etc but not good cause is on pcinstance so what? If you are so pro share with him a patch instead to criticize my code

  • 0
Posted

yea i copied if (isDead () || isInvul blablabla and made it like this whats your problem and this is more faster than make all this for skills etc etc but not good cause is on pcinstance so what? If you are so pro share with him a patch instead to criticize my code

 

+1 ... better to share with all your heart than to criticize someone tried to helped.. :)

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


  • Posts

    • Inventory restock: Premium business accounts are now available.   ✔ Wallester Business EU 🇪🇺|💳 Unlimited virtual cards, physical cards, 🏦 multi-currency IBAN, ₿ crypto & stablecoin deposits. ✔ Stripe Business UK 🇬🇧|💳 Instant virtual cards (Visa/Mastercard), high-conversion checkout, multi-currency payouts, ₿ crypto payments, no-code payment links. ✔ Mercury Business US 🇺🇸|🏦 US checking & savings, 💳 unlimited virtual cards, domestic & International wires, native stablecoin settlement. ✔ Payset Business EU 🇪🇺|🏦 Multiple IBANs, UK sort code, SEPA Instant, 💳 unlimited virtual cards, multi-currency accounts. ✔ Novo Business US 🇺🇸|🏦 Business checking account, ACH payments & invoicing, 💳 virtual & physical cards, novo boost.
    • Let me see if I understand correctly, older gentlemen, when a newcomer shows up to create modern things with the help of AI, doing what you charge them to do, you point the finger and laugh. I believe that's why everything is stagnant. The product isn't for programming experts, it's for newcomers. Don't buy from you if they can do it themselves using this base. You're going to deliver a similar product, maybe even worse than this one, so why are you complaining? PowerShell, as you well know, started with it, then came new platforms and new apps, new creation models, all with different languages; I chose the simplest one for my taste. This is about being organized and knowing how to choose the right words for each situation. It's not 100%, but it already gives a good impression. Nothing is 100%, so a topic written by AI, and all the code that you charge an absurd amount for to prohibit and sell hacks, could be open source so that everyone can create new practices, new models, new information for passing packets, prohibiting the use of cheats that cause server owners to break so much. Let's remember that the Admin doesn't always shut down the server; it's the players who find problems and take advantage by buying and reselling items, and they say that the GM shuts down the server every week, but that's a lie. What they do is duplicate items with packages and sell them, but perhaps this could give some future developers a starting point to create their own protection following the model in the initial documentation. Because none of you answer a question from a newbie, you think you're superior because you have knowledge, but with AI, people like that can have the same knowledge as you, but with less practice. And if they practice a lot, 10,000 hours, they can be as good as all of you older developers in the L2J field.
    • ✨ Exclusive Offer for Marketplace Growth 🔥 Elevate your performance with a premium bonus. 💲 Top up your balance with $100 or more and receive an additional $5 credit — seamlessly added to your account. ⭐️ Designed for those who value efficiency, scale, and results. ⚡️ Effortless. Refined. Effective. 💥 Enhance your strategy today 💥
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..