Now there is no drop for premium users at all but still works for users w/o premium.
Am I miss something or it's impossible to make it in this way?
Best Wishes
Update: Problem solved.
I used standard DropListScope Death but i made changes in IChanceMultiplierStrategy DEFAULT_STRATEGY and IAmountMultiplierStrategy DEFAULT_STRATEGY methods.
The trick was to add public property L2PcInstance killer (initialized before call getChanceMultiplier) and read data about premium using victim.killer in DEFAULT_STRATEGY
Γεια σε ολους, προσπαθω εδω και 2 μερες να κανω αυτο το πραγμα να λειτουργει. το καταφερα για ενα διαστημα 5 ωρων. αλλα φαινεται οτι το discord μου κανει block to dll. ή κατι αλλο που δεν μπορω να ειμαι σιγουρος για το τι φταιει... αν καποιος γνωριζει κατι ας στειλει ενα pm να το δουμε μαζι.
*το source το εφιαξα εγω.
https://youtu.be/kMvrbo9VBZc
ενα βιντεο που δειχνει πως δουλευε πριν σταματησει να δουλευει...
Unlock Unlimited Access with GoProxy's Residential Proxies!
Experience seamless, secure, and unrestricted connectivity worldwide with GoProxy's Unlimited Residential Proxies.
Our service offers access to a global network of rotating residential IPs, ensuring top performance for your large-scale data collection, streaming, and more.
✔️Unlimited Traffic & IPs: Enjoy unrestricted access with our rotating residential proxies, delivering high performance through a vast global IP pool.
✔️High Success Rate: Achieve a 99.96% success rate with a rapid 0.6-second response time, ensuring efficient and reliable operations.
✔️Flexible Sessions: Customize IP rotation to fit your project needs, with options for automatic rotation and sticky sessions lasting up to 60 minutes.
✔️Global Coverage: Access IPs from over 120 countries, making it ideal for businesses requiring high bandwidth without region-specific constraints.
All plans include unlimited traffic and IPs, unlimited concurrent requests, and access to real residential IP addresses.
Elevate your online operations with GoProxy's Unlimited Residential Proxies—your smart choice for large-scale projects.
👉 Learn more and get started today: GoProxy Unlimited Proxies
Question
sylwuu
Hello,
i'm working on premium account and i need a little help.
I created a database table with premium account data and this data is loaded on player login.
As i saw in L2Attackable.java there is a method doItemDrop and line
deathItems = npcTemplate.calculateDrops(DropListScope.DEATH, this, player);
so i added
if (player.hasPremium()) { deathItems = npcTemplate.calculateDrops(DropListScope.PREMIUMDEATH, this, player); } else{ deathItems = npcTemplate.calculateDrops(DropListScope.DEATH, this, player); }
To DropListScope i added
PREMIUMDEATH((itemId, min, max, chance) -> new GeneralDropItem(itemId, min, max, chance, IAmountMultiplierStrategy.PREMIUMDROP, IChanceMultiplierStrategy.PREMIUMDROP), GroupedGeneralDropItem::new),
To IAmountMultiplierStrategy.java i added
IAmountMultiplierStrategy PREMIUMDROP = DEFAULT_STRATEGY(rates().getDeathDropAmountMultiplier() + rates().getDeathDropAmountMultiplier()/2);
To IChanceMultiplierStrategy.java added
IChanceMultiplierStrategy PREMIUMDROP = DEFAULT_STRATEGY(rates().getCorpseDropChanceMultiplier() + rates().getCorpseDropChanceMultiplier()/2);
Now there is no drop for premium users at all but still works for users w/o premium.
Am I miss something or it's impossible to make it in this way?
Best Wishes
Update: Problem solved.
I used standard DropListScope Death but i made changes in IChanceMultiplierStrategy DEFAULT_STRATEGY and IAmountMultiplierStrategy DEFAULT_STRATEGY methods.
The trick was to add public property L2PcInstance killer (initialized before call getChanceMultiplier) and read data about premium using victim.killer in DEFAULT_STRATEGY
0 answers to this question
Recommended Posts