Jump to content

Question

Posted

Hey guys I have a problem with my server iam using l2f pack every things is OK but some time players die in olympiad and he get reviv request to town like he dead in pvp it's not happen every day may be 3 -4 times per week .

Server doesn't show any error at log .

Hop you help me to solve it .

Sorry for my bad english .

12 answers to this question

Recommended Posts

  • 0
Posted


protected void onReduceCurrentHp(double damage, Creature attacker, Skill skill, boolean awake, boolean standUp, boolean directHp)

{

if(standUp && !isInTvT())

{

standUp();

if(isFakeDeath())

{

breakFakeDeath();

}

}

 

lastAttacker = attacker;

lastAttackDate = System.currentTimeMillis();

 

if(attacker.isPlayable())

{

if(!directHp && (getCurrentCp() > 0))

{

double cp = getCurrentCp();

if(isInOlympiadMode())

{

addDamageOnOlympiad(attacker, skill, damage, cp);

}

 

if(cp >= damage)

{

cp -= damage;

damage = 0;

}

else

{

damage -= cp;

cp = 0;

}

 

setCurrentCp(cp);

}

}

 

double hp = getCurrentHp();

 

DuelEvent duelEvent = getEvent(DuelEvent.class);

if(duelEvent != null)

{

if(hp <= damage)

{

setCurrentHp(1, true);

duelEvent.onDie(this);

return;

}

}

 

if((getPvPTeam() != 0) && (_event != null))

{

if(hp <= damage) // if x <= 1 - killed

{

setCurrentHp(1, true);

_event.doDie(attacker, this);

return;

}

}

 

if(isInOlympiadMode())

{

addDamageOnOlympiad(attacker, skill, damage, hp);

 

if(hp + 0.5 <= damage)

{

if(_olympiadGame.getType() != CompType.TEAM)

{

setCurrentHp(1, true);

_olympiadGame.setWinner(getOlympiadSide() == 1 ? 2 : 1);

_olympiadGame.endGame(20000, false);

attacker.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);

attacker.sendActionFailed();

return;

}

else if(_olympiadGame.doDie(this))

{

 

_olympiadGame.setWinner(getOlympiadSide() == 1 ? 2 : 1);

_olympiadGame.endGame(20000, false);

}

}

}

 

super.onReduceCurrentHp(damage, attacker, skill, awake, standUp, directHp);

}

 

  • 0
Posted

This line:

if(hp + 0.5 <= damage)

should be:

if(hp - damage < 0.5)

Actually it took me a while to figure this out. I think this line is the only cause, not 100% sure though.

  • 0
Posted (edited)
if(standUp && !isInTvT()){
	standUp();
	...
}

Can someone explain me this?

He is standUp() already ,so whats the point of it?

 

Also

if(isFakeDeath()){
	breakFakeDeath();
}

Since u standUp(),why do u check if he has fakeDeath?

Being is fakeDeath means that he isnt standUp,and the first if confirmed that he is standUp +u used standUp above,which means its always false..

 

Any explaination?

Edited by bravetobe
  • 0
Posted
if(standUp && !isInTvT()){
	standUp();
	...
}

Can someone explain me this?

He is standUp() already ,so whats the point of it?

 

Also

if(isFakeDeath()){
	breakFakeDeath();
}

Since u standUp(),why do u check if he has fakeDeath?

Being is fakeDeath means that he isnt standUp,and the first if confirmed that he is standUp +u used standUp above,which means its always false..

 

Any explaination?

 

Because guy who was adding events to this pack, didnt do it carefuly. Maybe fandc is still using them, but I dont really know.

 

 

thank you for your help i will try ti change it but can you till me or explain to me what happen in this line ?

Player is considered dead if he has < 0.5 hp. In your code if he have got 1 HP and gets 0.7 damage, then condition will be: if(1 + 0.5 <= 0.7) - that's false

  • 0
Posted (edited)
if(standUp && !isInTvT()){
	standUp();
	...
}

Can someone explain me this?

He is standUp() already ,so whats the point of it?

 

Also

if(isFakeDeath()){
	breakFakeDeath();
}

Since u standUp(),why do u check if he has fakeDeath?

Being is fakeDeath means that he isnt standUp,and the first if confirmed that he is standUp +u used standUp above,which means its always false..

 

Any explaination?

 

as i can read the arguments from the function

(double damage, Creature attacker, Skill skill, boolean awake, boolean standUp, boolean directHp)

standUp doesnt mean that is stand up already, its just true/false

otherwise should be if(standUp() && !isInTvt) ...

 

so if standup setted true and not in tvt -> stand up and if is fakedeath, stop this

Edited by ⏇Melron⏇℠Abs

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.



  • Posts

    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click   🚀 Promo code: MEDIUM5 (5% Discount)   ➡️ Online Store: Click ✅ ➡️ Telegram Bot: Click ✅ ➡️ SMM Panel: Click ✅   Regular customers receive additional discounts and promo codes!   Support: ➡️ Telegram: https://t.me/solomon_bog ✅ ➡️ Discord: https://discord.gg/y9AStFFsrh ✅ ➡️ WhatsApp: https://wa.me/79051904467 ✅ ➡️ Email: solomonbog@socnet.store ✅   ➡️ Telegram Channel: https://t.me/accsforyou_shop ✅   You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners )  — Becoming a supplier   SocNet — your store for digital goods and premium subscriptions ✅
    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click Promo code: MEDIUM5 (5% Discount) Online Store: Click Telegram Bot: Click SMM Panel: Click Regular customers receive additional discounts and promo codes! Support: Telegram: https://t.me/solomon_bog Discord: https://discord.gg/y9AStFFsrh WhatsApp: https://wa.me/79051904467 Email: solomonbog@socnet.store  Telegram Channel: https://t.me/accsforyou_shop You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners ) — Becoming a supplier SocNet — your store for digital goods and premium subscriptions  Want to expand your business network or promote services through the largest B2B platform? LinkedIn accounts are your tool for marketing, recruiting, and outreach automation. Perfect for SMM, hiring, lead generation, and business scaling. ➡ Ready-made accounts — fast, convenient, no hassle. Promo code: LINKEDIN5 (5% discount) Payment: Bank cards · Cryptocurrency · Other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Product range: ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM USA IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM EUROPE IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM MIX IP | Price from: $2.5 ➡ LinkedIn Old Brute Account with Real Connections (0 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $10 ➡ LinkedIn Premium Brute Account (Premium) with active 1-month Premium subscription | Geo: MIX | Registered on real device | Full account access | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (50 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (100+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $39 ➡ LinkedIn Old Brute Account with Real Connections (500+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $69 ➡ LinkedIn Verified Brute Account with verified documents | Geo: MIX | Registered on real device | Full account access | Price from: $89 Loyal customers — additional discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop Also via these contacts you can: — Consult about wholesale purchases — Set up a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — Digital Goods and Premium Subscriptions Store
    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click Promo code: MEDIUM5 (5% Discount) Online Store: Click Telegram Bot: Click SMM Panel: Click Regular customers receive additional discounts and promo codes! Support: Telegram: https://t.me/solomon_bog Discord: https://discord.gg/y9AStFFsrh WhatsApp: https://wa.me/79051904467 Email: solomonbog@socnet.store  Telegram Channel: https://t.me/accsforyou_shop You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners ) — Becoming a supplier SocNet — your store for digital goods and premium subscriptions  Want to expand your business network or promote services through the largest B2B platform? LinkedIn accounts are your tool for marketing, recruiting, and outreach automation. Perfect for SMM, hiring, lead generation, and business scaling. ➡ Ready-made accounts — fast, convenient, no hassle. Promo code: LINKEDIN5 (5% discount) Payment: Bank cards · Cryptocurrency · Other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Product range: ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM USA IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM EUROPE IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM MIX IP | Price from: $2.5 ➡ LinkedIn Old Brute Account with Real Connections (0 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $10 ➡ LinkedIn Premium Brute Account (Premium) with active 1-month Premium subscription | Geo: MIX | Registered on real device | Full account access | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (50 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (100+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $39 ➡ LinkedIn Old Brute Account with Real Connections (500+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $69 ➡ LinkedIn Verified Brute Account with verified documents | Geo: MIX | Registered on real device | Full account access | Price from: $89 Loyal customers — additional discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop Also via these contacts you can: — Consult about wholesale purchases — Set up a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — Digital Goods and Premium Subscriptions Store
    • Buying & Selling Torn City Cash
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock