Jump to content
  • 0

[HELP] Mana-Potion behaviour in PVP


Question

Posted

Hi guys,

 

i edited the Mana-Drugs a bit so they work like healing potions.. just for mana..

 

now i wanted to implement some other feature ....

 

 

if a player is not flagged .. reuse 15 seconds of the potion

if a player is flagged... reuse 30 seconfs of the potion

 

any chance that you can help me with that ?

 

greets

Jinsu

 

//EDIT

 

Sry i forgot ... Client is the Freya Chronicle

 

 

And if you can tell me how to change Triggers and Toggles so they dont overbuff... i would be rly thankful

11 answers to this question

Recommended Posts

  • 0
Posted

You can search at potion.java and make that potion with an sleep thread wen player is flaged.

 

 

 

Never sleep a thread that is used by multiple tasks it will hog the threadpool.

 

 

public boolean isSkillDisabled(int reuseHashcode)

{

if (isAllSkillsDisabled())

return true;

 

if (_disabledSkills == null)

return false;

 

final Long timeStamp = _disabledSkills.get(Integer.valueOf(reuseHashcode));

if (timeStamp == null)

return false;

 

if (timeStamp < System.currentTimeMillis())

{

_disabledSkills.remove(Integer.valueOf(reuseHashcode));

return false;

}

 

return true;

}

 

The potion has a skill on the back working with it and the skill has a timestamp of usage compare it with the reuse delay /2 to get the remaining time and direct the flow of the function.

  • 0
Posted

Never sleep a thread that is used by multiple tasks it will hog the threadpool.

 

 

public boolean isSkillDisabled(int reuseHashcode)

{

if (isAllSkillsDisabled())

return true;

 

if (_disabledSkills == null)

return false;

 

final Long timeStamp = _disabledSkills.get(Integer.valueOf(reuseHashcode));

if (timeStamp == null)

return false;

 

if (timeStamp < System.currentTimeMillis())

{

_disabledSkills.remove(Integer.valueOf(reuseHashcode));

return false;

}

 

return true;

}

 

The potion has a skill on the back working with it and the skill has a timestamp of usage compare it with the reuse delay /2 to get the remaining time and direct the flow of the function.

 

You can make it even from xml... with a type.

 

There are different methods that you can use. if any error occurs on the skill can be disabled or enabled...easly... if you mean that.

  • 0
Posted

I mean that if you sleep a thread, and the thread pool alocates a pool of 10 - 20 threads for skill usages, then after some pot usages the pool will get out of resources and the server will stop responding to skill usages. And you cant do it with xml, since there is no check in the core for flagged ppl. You have to edit the core for it.

  • 0
Posted

I mean that if you sleep a thread, and the thread pool alocates a pool of 10 - 20 threads for skill usages, then after some pot usages the pool will get out of resources and the server will stop responding to skill usages.

 

Well he ask for an custom edit and he have to think. There are many methods as i said... from potion.java from character.java from l2pcinstance.java you can edit and do it in many ways and try different methods and choices.

 

If you think!!!

 

And you cant do it with xml, since there is no check in the core for flagged ppl. You have to edit the core for it.

 

Whats the problem with that... cant be done? ^^

 

If you have something to tell or help get in the point and reply... quoting my words dint help the poster but your e-post aka e-penis bigger.

 

 

 

 

 

 

  • 0
Posted

Once again, you cant Thread.sleep() in a poolable resource cause the number of threads are limmited. If you wanna use xml, you need to also specify if "xx" attribute is present in xml, then check the flag status of the player and get the reuse according to his flag. So thread.sleep is not an alternative method to do it, cause it will freaking crash the server, get it ?

 

 

The only reason i posted, is to show you how wrong you always are :)

 

  • 0
Posted

Once again, you cant Thread.sleep() in a poolable resource cause the number of threads are limmited. If you wanna use xml, you need to also specify if "xx" attribute is present in xml, then check the flag status of the player and get the reuse according to his flag. So thread.sleep is not an alternative method to do it, cause it will freaking crash the server, get it ?

 

 

The only reason i posted, is to show you how wrong you always are :)

 

 

 

the user is extended to reply by the stupidity detected on the board.

 

Hf.

  • 0
Posted

 

the user is extended to reply by the stupidity detected on the board.

 

Hf.

 

Its "expected", not extended. And dont go off-topic, i just told you that your "solution" will crash the server. Stay cool.

  • 0
Posted

Thanks for the answers so far...

Well he ask for an custom edit and he have to think. There are many methods as i said... from potion.java from character.java from l2pcinstance.java you can edit and do it in many ways and try different methods and choices.

 

If you think!!!

 

I thought that there are many ways to do that ... if i would have any clue about how to make it .. i would have done it already...  Well ... im kinda new to this stuff and i would he happy if you can show me how to do that ..

 

quoting my words dint help the poster but your e-post aka e-penis bigger.

 

Im sorry that i quoted you .. but a bigger e-penis is always great ^^

 

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

    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
    • THEY DON’T COME BACK FOR NO REASON. HERE’S WHY Our clients come from different countries and with very different tasks. But the strongest indicator of quality is simple — when a client comes back **for a second time**. This case is exactly that. The client returned with a request for a **German ID**. The requirement was clear: a document **in a male hand**, with a natural live scene and correct geographic context. What we did: ▪ accepted source files and data without unnecessary bureaucracy ▪ selected a **real street**, not a generic background ▪ built a print-ready mockup with correct scene logic ▪ sent it for approval ▪ after confirmation, delivered the **final file for printing** No templates. No “good enough”. Only solutions tailored to a specific task. Result: ▪ mockup approved on the first try ▪ client fully satisfied ▪ stays in touch We work **worldwide** — and that’s exactly why clients return. Contact us › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +6RAKokIn5ItmYjEx ) *All data is published with the client’s consent.* #redraw #verification #documents #case #ID
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
  • 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..