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

    • Only 3 days left and we'll start with some events, you can check our Discord for more info!
    • Tired of frantically switching between windows trying to find that specific Warlock who should be casting saves? Forgot which server you left your Warsmith on? This mod solves these problems! What it does: Turns the boring window title into an information panel: Server Name - Character Name [Class] Real-life examples: - ServerName - HardcoreFarm [Spoilerr] (who's been spoiling for 3 months already) - ServerName - ClericHelper [Buffer] (eternal buffer on standby) - ServerName - MainChar [Gladiator] (main character who's always AFK) Why you need this: For multiboxers - to avoid confusing where the DD is and where the healer is For the forgetful - if your memory is like a goldfish For streamers - viewers immediately see who's on screen For adults - when playing at work and need to quickly hide the window DLL only - no Interface files needed Installation (more complicated than making tea): 1. Download the DLL 2. Drop it into the System folder 3. Launch the client 4. Be amazed how you lived without this before! Purchase Conditions: Price: 100$ Payment Method: USDT. How to Buy: Contact me on Telegram: @kiselevwv for a quick response. I will answer all your questions and provide additional information if needed. I guarantee functionality at the moment of sale and prompt assistance with setup after purchase.
    • I agree, l2damage crap to compare to l2java which was the father of pvp servers and till this days people playing there for good time.
    • 📝 Registration — Account Registration Creating a new player account. Usually includes: login password password confirmation email Result: a new record is created in the accounts table (loginserver). 🔑 Change Password — Password Change The player changes the password knowing the current one. Required: current password new password new password confirmation Result: the password field is updated in the accounts table. ♻️ Password Recovery — Password Reset If the player forgot the password. Implementation only via email: the player enters their login, email the system sends an email with a link or code the player opens the link / enters the code sets a new password Result: the password is updated in the accounts table.   All fields are validated (required, format, length, uniqueness, security checks).   Price: 80$   and i can rewrite script for PTS server.   Contacts:   Telegram Discord
  • 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..