Jump to content
  • 0

skill restriction item


shawshaw

Question

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..

Link to comment
Share on other sites

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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;

.

Link to comment
Share on other sites

  • 0

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..

Link to comment
Share on other sites

  • 0

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...

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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;

}

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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.. :)

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...